/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/alertifyjs/build/alertify.min.js":
/*!*******************************************************!*\
  !*** ./node_modules/alertifyjs/build/alertify.min.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! alertifyjs - v1.11.4 - Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) */
!function(a){"use strict";function b(a,b){a.className+=" "+b}function c(a,b){for(var c=a.className.split(" "),d=b.split(" "),e=0;e<d.length;e+=1){var f=c.indexOf(d[e]);f>-1&&c.splice(f,1)}a.className=c.join(" ")}function d(){return"rtl"===a.getComputedStyle(document.body).direction}function e(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}function f(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}function g(a){for(;a.lastChild;)a.removeChild(a.lastChild)}function h(a){if(null===a)return a;var b;if(Array.isArray(a)){b=[];for(var c=0;c<a.length;c+=1)b.push(h(a[c]));return b}if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return b=new RegExp(a.source),b.global=a.global,b.ignoreCase=a.ignoreCase,b.multiline=a.multiline,b.lastIndex=a.lastIndex,b;if("object"==typeof a){b={};for(var d in a)a.hasOwnProperty(d)&&(b[d]=h(a[d]));return b}return a}function i(a,b){if(a.elements){var c=a.elements.root;c.parentNode.removeChild(c),delete a.elements,a.settings=h(a.__settings),a.__init=b,delete a.__internal}}function j(a,b){return function(){if(arguments.length>0){for(var c=[],d=0;d<arguments.length;d+=1)c.push(arguments[d]);return c.push(a),b.apply(a,c)}return b.apply(a,[null,a])}}function k(a,b){return{index:a,button:b,cancel:!1}}function l(a,b){if("function"==typeof b.get(a))return b.get(a).call(b)}function m(){function a(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function b(a){var b=d[a].dialog;return b&&"function"==typeof b.__init&&b.__init(b),b}function c(b,c,e,f){var g={dialog:null,factory:c};return void 0!==f&&(g.factory=function(){return a(new d[f].factory,new c)}),e||(g.dialog=a(new g.factory,t)),d[b]=g}var d={};return{defaults:o,dialog:function(d,e,f,g){if("function"!=typeof e)return b(d);if(this.hasOwnProperty(d))throw new Error("alertify.dialog: name already exists");var h=c(d,e,f,g);this[d]=f?function(){if(0===arguments.length)return h.dialog;var b=a(new h.factory,t);return b&&"function"==typeof b.__init&&b.__init(b),b.main.apply(b,arguments),b.show.apply(b)}:function(){if(h.dialog&&"function"==typeof h.dialog.__init&&h.dialog.__init(h.dialog),0===arguments.length)return h.dialog;var a=h.dialog;return a.main.apply(h.dialog,arguments),a.show.apply(h.dialog)}},closeAll:function(a){for(var b=p.slice(0),c=0;c<b.length;c+=1){var d=b[c];void 0!==a&&a===d||d.close()}},setting:function(a,c,d){if("notifier"===a)return u.setting(c,d);var e=b(a);return e?e.setting(c,d):void 0},set:function(a,b,c){return this.setting(a,b,c)},get:function(a,b){return this.setting(a,b)},notify:function(a,b,c,d){return u.create(b,d).push(a,c)},message:function(a,b,c){return u.create(null,c).push(a,b)},success:function(a,b,c){return u.create("success",c).push(a,b)},error:function(a,b,c){return u.create("error",c).push(a,b)},warning:function(a,b,c){return u.create("warning",c).push(a,b)},dismissAll:function(){u.dismissAll()}}}var n={ENTER:13,ESC:27,F1:112,F12:123,LEFT:37,RIGHT:39},o={autoReset:!0,basic:!1,closable:!0,closableByDimmer:!0,frameless:!1,maintainFocus:!0,maximizable:!0,modal:!0,movable:!0,moveBounded:!1,overflow:!0,padding:!0,pinnable:!0,pinned:!0,preventBodyShift:!1,resizable:!0,startMaximized:!1,transition:"pulse",notifier:{delay:5,position:"bottom-right",closeButton:!1},glossary:{title:"AlertifyJS",ok:"OK",cancel:"Cancel",acccpt:"Accept",deny:"Deny",confirm:"Confirm",decline:"Decline",close:"Close",maximize:"Maximize",restore:"Restore"},theme:{input:"ajs-input",ok:"ajs-ok",cancel:"ajs-cancel"}},p=[],q=function(){return document.addEventListener?function(a,b,c,d){a.addEventListener(b,c,!0===d)}:document.attachEvent?function(a,b,c){a.attachEvent("on"+b,c)}:void 0}(),r=function(){return document.removeEventListener?function(a,b,c,d){a.removeEventListener(b,c,!0===d)}:document.detachEvent?function(a,b,c){a.detachEvent("on"+b,c)}:void 0}(),s=function(){var a,b,c=!1,d={animation:"animationend",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(a in d)if(void 0!==document.documentElement.style[a]){b=d[a],c=!0;break}return{type:b,supported:c}}(),t=function(){function m(a){if(!a.__internal){delete a.__init,a.__settings||(a.__settings=h(a.settings));var c;"function"==typeof a.setup?(c=a.setup(),c.options=c.options||{},c.focus=c.focus||{}):c={buttons:[],focus:{element:null,select:!1},options:{}},"object"!=typeof a.hooks&&(a.hooks={});var d=[];if(Array.isArray(c.buttons))for(var e=0;e<c.buttons.length;e+=1){var f=c.buttons[e],g={};for(var i in f)f.hasOwnProperty(i)&&(g[i]=f[i]);d.push(g)}var k=a.__internal={isOpen:!1,activeElement:document.body,timerIn:void 0,timerOut:void 0,buttons:d,focus:c.focus,options:{title:void 0,modal:void 0,basic:void 0,frameless:void 0,pinned:void 0,movable:void 0,moveBounded:void 0,resizable:void 0,autoReset:void 0,closable:void 0,closableByDimmer:void 0,maximizable:void 0,startMaximized:void 0,pinnable:void 0,transition:void 0,padding:void 0,overflow:void 0,onshow:void 0,onclosing:void 0,onclose:void 0,onfocus:void 0,onmove:void 0,onmoved:void 0,onresize:void 0,onresized:void 0,onmaximize:void 0,onmaximized:void 0,onrestore:void 0,onrestored:void 0},resetHandler:void 0,beginMoveHandler:void 0,beginResizeHandler:void 0,bringToFrontHandler:void 0,modalClickHandler:void 0,buttonsClickHandler:void 0,commandsClickHandler:void 0,transitionInHandler:void 0,transitionOutHandler:void 0,destroy:void 0},l={};l.root=document.createElement("div"),l.root.style.display="none",l.root.className=Da.base+" "+Da.hidden+" ",l.root.innerHTML=Ca.dimmer+Ca.modal,l.dimmer=l.root.firstChild,l.modal=l.root.lastChild,l.modal.innerHTML=Ca.dialog,l.dialog=l.modal.firstChild,l.dialog.innerHTML=Ca.reset+Ca.commands+Ca.header+Ca.body+Ca.footer+Ca.resizeHandle+Ca.reset,l.reset=[],l.reset.push(l.dialog.firstChild),l.reset.push(l.dialog.lastChild),l.commands={},l.commands.container=l.reset[0].nextSibling,l.commands.pin=l.commands.container.firstChild,l.commands.maximize=l.commands.pin.nextSibling,l.commands.close=l.commands.maximize.nextSibling,l.header=l.commands.container.nextSibling,l.body=l.header.nextSibling,l.body.innerHTML=Ca.content,l.content=l.body.firstChild,l.footer=l.body.nextSibling,l.footer.innerHTML=Ca.buttons.auxiliary+Ca.buttons.primary,l.resizeHandle=l.footer.nextSibling,l.buttons={},l.buttons.auxiliary=l.footer.firstChild,l.buttons.primary=l.buttons.auxiliary.nextSibling,l.buttons.primary.innerHTML=Ca.button,l.buttonTemplate=l.buttons.primary.firstChild,l.buttons.primary.removeChild(l.buttonTemplate);for(var m=0;m<a.__internal.buttons.length;m+=1){var n=a.__internal.buttons[m];ya.indexOf(n.key)<0&&ya.push(n.key),n.element=l.buttonTemplate.cloneNode(),n.element.innerHTML=n.text,"string"==typeof n.className&&""!==n.className&&b(n.element,n.className);for(var o in n.attrs)"className"!==o&&n.attrs.hasOwnProperty(o)&&n.element.setAttribute(o,n.attrs[o]);"auxiliary"===n.scope?l.buttons.auxiliary.appendChild(n.element):l.buttons.primary.appendChild(n.element)}a.elements=l,k.resetHandler=j(a,X),k.beginMoveHandler=j(a,aa),k.beginResizeHandler=j(a,ga),k.bringToFrontHandler=j(a,B),k.modalClickHandler=j(a,R),k.buttonsClickHandler=j(a,T),k.commandsClickHandler=j(a,F),k.transitionInHandler=j(a,Y),k.transitionOutHandler=j(a,Z);for(var p in k.options)void 0!==c.options[p]?a.set(p,c.options[p]):v.defaults.hasOwnProperty(p)?a.set(p,v.defaults[p]):"title"===p&&a.set(p,v.defaults.glossary[p]);"function"==typeof a.build&&a.build()}document.body.appendChild(a.elements.root)}function o(){wa=f(),xa=e()}function t(){a.scrollTo(wa,xa)}function u(){for(var a=0,d=0;d<p.length;d+=1){var e=p[d];(e.isModal()||e.isMaximized())&&(a+=1)}0===a&&document.body.className.indexOf(Da.noOverflow)>=0?(c(document.body,Da.noOverflow),w(!1)):a>0&&document.body.className.indexOf(Da.noOverflow)<0&&(w(!0),b(document.body,Da.noOverflow))}function w(d){v.defaults.preventBodyShift&&(d&&document.documentElement.scrollHeight>document.documentElement.clientHeight?(Fa=xa,Ea=a.getComputedStyle(document.body).top,b(document.body,Da.fixed),document.body.style.top=-xa+"px"):d||(xa=Fa,document.body.style.top=Ea,c(document.body,Da.fixed),t()))}function x(a,d,e){"string"==typeof e&&c(a.elements.root,Da.prefix+e),b(a.elements.root,Da.prefix+d),za=a.elements.root.offsetWidth}function y(a){a.get("modal")?(c(a.elements.root,Da.modeless),a.isOpen()&&(pa(a),N(a),u())):(b(a.elements.root,Da.modeless),a.isOpen()&&(oa(a),N(a),u()))}function z(a){a.get("basic")?b(a.elements.root,Da.basic):c(a.elements.root,Da.basic)}function A(a){a.get("frameless")?b(a.elements.root,Da.frameless):c(a.elements.root,Da.frameless)}function B(a,b){for(var c=p.indexOf(b),d=c+1;d<p.length;d+=1)if(p[d].isModal())return;return document.body.lastChild!==b.elements.root&&(document.body.appendChild(b.elements.root),p.splice(p.indexOf(b),1),p.push(b),W(b)),!1}function C(a,d,e,f){switch(d){case"title":a.setHeader(f);break;case"modal":y(a);break;case"basic":z(a);break;case"frameless":A(a);break;case"pinned":O(a);break;case"closable":Q(a);break;case"maximizable":P(a);break;case"pinnable":K(a);break;case"movable":ea(a);break;case"resizable":ka(a);break;case"padding":f?c(a.elements.root,Da.noPadding):a.elements.root.className.indexOf(Da.noPadding)<0&&b(a.elements.root,Da.noPadding);break;case"overflow":f?c(a.elements.root,Da.noOverflow):a.elements.root.className.indexOf(Da.noOverflow)<0&&b(a.elements.root,Da.noOverflow);break;case"transition":x(a,f,e)}"function"==typeof a.hooks.onupdate&&a.hooks.onupdate.call(a,d,e,f)}function D(a,b,c,d,e){var f={op:void 0,items:[]};if(void 0===e&&"string"==typeof d)f.op="get",b.hasOwnProperty(d)?(f.found=!0,f.value=b[d]):(f.found=!1,f.value=void 0);else{var g;if(f.op="set","object"==typeof d){var h=d;for(var i in h)b.hasOwnProperty(i)?(b[i]!==h[i]&&(g=b[i],b[i]=h[i],c.call(a,i,g,h[i])),f.items.push({key:i,value:h[i],found:!0})):f.items.push({key:i,value:h[i],found:!1})}else{if("string"!=typeof d)throw new Error("args must be a string or object");b.hasOwnProperty(d)?(b[d]!==e&&(g=b[d],b[d]=e,c.call(a,d,g,e)),f.items.push({key:d,value:e,found:!0})):f.items.push({key:d,value:e,found:!1})}}return f}function E(a){var b;S(a,function(a){return b=!0===a.invokeOnClose}),!b&&a.isOpen()&&a.close()}function F(a,b){switch(a.srcElement||a.target){case b.elements.commands.pin:b.isPinned()?H(b):G(b);break;case b.elements.commands.maximize:b.isMaximized()?J(b):I(b);break;case b.elements.commands.close:E(b)}return!1}function G(a){a.set("pinned",!0)}function H(a){a.set("pinned",!1)}function I(a){l("onmaximize",a),b(a.elements.root,Da.maximized),a.isOpen()&&u(),l("onmaximized",a)}function J(a){l("onrestore",a),c(a.elements.root,Da.maximized),a.isOpen()&&u(),l("onrestored",a)}function K(a){a.get("pinnable")?b(a.elements.root,Da.pinnable):c(a.elements.root,Da.pinnable)}function L(a){var b=f();a.elements.modal.style.marginTop=e()+"px",a.elements.modal.style.marginLeft=b+"px",a.elements.modal.style.marginRight=-b+"px"}function M(a){var b=parseInt(a.elements.modal.style.marginTop,10),c=parseInt(a.elements.modal.style.marginLeft,10);if(a.elements.modal.style.marginTop="",a.elements.modal.style.marginLeft="",a.elements.modal.style.marginRight="",a.isOpen()){var d=0,g=0;""!==a.elements.dialog.style.top&&(d=parseInt(a.elements.dialog.style.top,10)),a.elements.dialog.style.top=d+(b-e())+"px",""!==a.elements.dialog.style.left&&(g=parseInt(a.elements.dialog.style.left,10)),a.elements.dialog.style.left=g+(c-f())+"px"}}function N(a){a.get("modal")||a.get("pinned")?M(a):L(a)}function O(a){a.get("pinned")?(c(a.elements.root,Da.unpinned),a.isOpen()&&M(a)):(b(a.elements.root,Da.unpinned),a.isOpen()&&!a.isModal()&&L(a))}function P(a){a.get("maximizable")?b(a.elements.root,Da.maximizable):c(a.elements.root,Da.maximizable)}function Q(a){a.get("closable")?(b(a.elements.root,Da.closable),ua(a)):(c(a.elements.root,Da.closable),va(a))}function R(a,b){if(a.timeStamp-Ha>200&&(Ha=a.timeStamp)&&!Ga){var c=a.srcElement||a.target;return!0===b.get("closableByDimmer")&&c===b.elements.modal&&E(b),Ga=!1,!1}}function S(a,b){if(Date.now()-Ia>200&&(Ia=Date.now()))for(var c=0;c<a.__internal.buttons.length;c+=1){var d=a.__internal.buttons[c];if(!d.element.disabled&&b(d)){var e=k(c,d);"function"==typeof a.callback&&a.callback.apply(a,[e]),!1===e.cancel&&a.close();break}}}function T(a,b){var c=a.srcElement||a.target;S(b,function(a){return a.element===c&&(Ja=!0)})}function U(a){if(Ja)return void(Ja=!1);var b=p[p.length-1],c=a.keyCode;return 0===b.__internal.buttons.length&&c===n.ESC&&!0===b.get("closable")?(E(b),!1):ya.indexOf(c)>-1?(S(b,function(a){return a.key===c}),!1):void 0}function V(a){var b=p[p.length-1],c=a.keyCode;if(c===n.LEFT||c===n.RIGHT){for(var d=b.__internal.buttons,e=0;e<d.length;e+=1)if(document.activeElement===d[e].element)switch(c){case n.LEFT:return void d[(e||d.length)-1].element.focus();case n.RIGHT:return void d[(e+1)%d.length].element.focus()}}else if(c<n.F12+1&&c>n.F1-1&&ya.indexOf(c)>-1)return a.preventDefault(),a.stopPropagation(),S(b,function(a){return a.key===c}),!1}function W(a,b){if(b)b.focus();else{var c=a.__internal.focus,d=c.element;switch(typeof c.element){case"number":a.__internal.buttons.length>c.element&&(d=!0===a.get("basic")?a.elements.reset[0]:a.__internal.buttons[c.element].element);break;case"string":d=a.elements.body.querySelector(c.element);break;case"function":d=c.element.call(a)}void 0!==d&&null!==d||0!==a.__internal.buttons.length||(d=a.elements.reset[0]),d&&d.focus&&(d.focus(),c.select&&d.select&&d.select())}}function X(a,b){if(!b)for(var c=p.length-1;c>-1;c-=1)if(p[c].isModal()){b=p[c];break}if(b&&b.isModal()){var d,e=a.srcElement||a.target,f=e===b.elements.reset[1]||0===b.__internal.buttons.length&&e===document.body;f&&(b.get("maximizable")?d=b.elements.commands.maximize:b.get("closable")&&(d=b.elements.commands.close)),void 0===d&&("number"==typeof b.__internal.focus.element?e===b.elements.reset[0]?d=b.elements.buttons.auxiliary.firstChild||b.elements.buttons.primary.firstChild:f&&(d=b.elements.reset[0]):e===b.elements.reset[0]&&(d=b.elements.buttons.primary.lastChild||b.elements.buttons.auxiliary.lastChild)),W(b,d)}}function Y(a,b){clearTimeout(b.__internal.timerIn),W(b),t(),Ja=!1,l("onfocus",b),r(b.elements.dialog,s.type,b.__internal.transitionInHandler),c(b.elements.root,Da.animationIn)}function Z(a,b){clearTimeout(b.__internal.timerOut),r(b.elements.dialog,s.type,b.__internal.transitionOutHandler),da(b),ja(b),b.isMaximized()&&!b.get("startMaximized")&&J(b),v.defaults.maintainFocus&&b.__internal.activeElement&&(b.__internal.activeElement.focus(),b.__internal.activeElement=null),"function"==typeof b.__internal.destroy&&b.__internal.destroy.apply(b)}function $(a,b){var c=a[Na]-La,d=a[Oa]-Ma;Qa&&(d-=document.body.scrollTop),b.style.left=c+"px",b.style.top=d+"px"}function _(a,b){var c=a[Na]-La,d=a[Oa]-Ma;Qa&&(d-=document.body.scrollTop),b.style.left=Math.min(Pa.maxLeft,Math.max(Pa.minLeft,c))+"px",b.style.top=Qa?Math.min(Pa.maxTop,Math.max(Pa.minTop,d))+"px":Math.max(Pa.minTop,d)+"px"}function aa(a,c){if(null===Sa&&!c.isMaximized()&&c.get("movable")){var d,e=0,f=0;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0],Na="clientX",Oa="clientY"):0===a.button&&(d=a),d){var g=c.elements.dialog;if(b(g,Da.capture),g.style.left&&(e=parseInt(g.style.left,10)),g.style.top&&(f=parseInt(g.style.top,10)),La=d[Na]-e,Ma=d[Oa]-f,c.isModal()?Ma+=c.elements.modal.scrollTop:c.isPinned()&&(Ma-=document.body.scrollTop),c.get("moveBounded")){var h=g,i=-e,j=-f;do{i+=h.offsetLeft,j+=h.offsetTop}while(h=h.offsetParent);Pa={maxLeft:i,minLeft:-i,maxTop:document.documentElement.clientHeight-g.clientHeight-j,minTop:-j},Ra=_}else Pa=null,Ra=$;return l("onmove",c),Qa=!c.isModal()&&c.isPinned(),Ka=c,Ra(d,g),b(document.body,Da.noSelection),!1}}}function ba(a){if(Ka){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&Ra(b,Ka.elements.dialog)}}function ca(){if(Ka){var a=Ka;Ka=Pa=null,c(document.body,Da.noSelection),c(a.elements.dialog,Da.capture),l("onmoved",a)}}function da(a){Ka=null;var b=a.elements.dialog;b.style.left=b.style.top=""}function ea(a){a.get("movable")?(b(a.elements.root,Da.movable),a.isOpen()&&qa(a)):(da(a),c(a.elements.root,Da.movable),a.isOpen()&&ra(a))}function fa(a,b,c){var e=b,f=0,g=0;do{f+=e.offsetLeft,g+=e.offsetTop}while(e=e.offsetParent);var h,i;!0===c?(h=a.pageX,i=a.pageY):(h=a.clientX,i=a.clientY);var j=d();if(j&&(h=document.body.offsetWidth-h,isNaN(Ta)||(f=document.body.offsetWidth-f-b.offsetWidth)),b.style.height=i-g+Wa+"px",b.style.width=h-f+Wa+"px",!isNaN(Ta)){var k=.5*Math.abs(b.offsetWidth-Ua);j&&(k*=-1),b.offsetWidth>Ua?b.style.left=Ta+k+"px":b.offsetWidth>=Va&&(b.style.left=Ta-k+"px")}}function ga(a,c){if(!c.isMaximized()){var d;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0]):0===a.button&&(d=a),d){l("onresize",c),Sa=c,Wa=c.elements.resizeHandle.offsetHeight/2;var e=c.elements.dialog;return b(e,Da.capture),Ta=parseInt(e.style.left,10),e.style.height=e.offsetHeight+"px",e.style.minHeight=c.elements.header.offsetHeight+c.elements.footer.offsetHeight+"px",e.style.width=(Ua=e.offsetWidth)+"px","none"!==e.style.maxWidth&&(e.style.minWidth=(Va=e.offsetWidth)+"px"),e.style.maxWidth="none",b(document.body,Da.noSelection),!1}}}function ha(a){if(Sa){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&fa(b,Sa.elements.dialog,!Sa.get("modal")&&!Sa.get("pinned"))}}function ia(){if(Sa){var a=Sa;Sa=null,c(document.body,Da.noSelection),c(a.elements.dialog,Da.capture),Ga=!0,l("onresized",a)}}function ja(a){Sa=null;var b=a.elements.dialog;"none"===b.style.maxWidth&&(b.style.maxWidth=b.style.minWidth=b.style.width=b.style.height=b.style.minHeight=b.style.left="",Ta=Number.Nan,Ua=Va=Wa=0)}function ka(a){a.get("resizable")?(b(a.elements.root,Da.resizable),a.isOpen()&&sa(a)):(ja(a),c(a.elements.root,Da.resizable),a.isOpen()&&ta(a))}function la(){for(var a=0;a<p.length;a+=1){var b=p[a];b.get("autoReset")&&(da(b),ja(b))}}function ma(b){1===p.length&&(q(a,"resize",la),q(document.body,"keyup",U),q(document.body,"keydown",V),q(document.body,"focus",X),q(document.documentElement,"mousemove",ba),q(document.documentElement,"touchmove",ba),q(document.documentElement,"mouseup",ca),q(document.documentElement,"touchend",ca),q(document.documentElement,"mousemove",ha),q(document.documentElement,"touchmove",ha),q(document.documentElement,"mouseup",ia),q(document.documentElement,"touchend",ia)),q(b.elements.commands.container,"click",b.__internal.commandsClickHandler),q(b.elements.footer,"click",b.__internal.buttonsClickHandler),q(b.elements.reset[0],"focus",b.__internal.resetHandler),q(b.elements.reset[1],"focus",b.__internal.resetHandler),Ja=!0,q(b.elements.dialog,s.type,b.__internal.transitionInHandler),b.get("modal")||oa(b),b.get("resizable")&&sa(b),b.get("movable")&&qa(b)}function na(b){1===p.length&&(r(a,"resize",la),r(document.body,"keyup",U),r(document.body,"keydown",V),r(document.body,"focus",X),r(document.documentElement,"mousemove",ba),r(document.documentElement,"mouseup",ca),r(document.documentElement,"mousemove",ha),r(document.documentElement,"mouseup",ia)),r(b.elements.commands.container,"click",b.__internal.commandsClickHandler),r(b.elements.footer,"click",b.__internal.buttonsClickHandler),r(b.elements.reset[0],"focus",b.__internal.resetHandler),r(b.elements.reset[1],"focus",b.__internal.resetHandler),q(b.elements.dialog,s.type,b.__internal.transitionOutHandler),b.get("modal")||pa(b),b.get("movable")&&ra(b),b.get("resizable")&&ta(b)}function oa(a){q(a.elements.dialog,"focus",a.__internal.bringToFrontHandler,!0)}function pa(a){r(a.elements.dialog,"focus",a.__internal.bringToFrontHandler,!0)}function qa(a){q(a.elements.header,"mousedown",a.__internal.beginMoveHandler),q(a.elements.header,"touchstart",a.__internal.beginMoveHandler)}function ra(a){r(a.elements.header,"mousedown",a.__internal.beginMoveHandler),r(a.elements.header,"touchstart",a.__internal.beginMoveHandler)}function sa(a){q(a.elements.resizeHandle,"mousedown",a.__internal.beginResizeHandler),q(a.elements.resizeHandle,"touchstart",a.__internal.beginResizeHandler)}function ta(a){r(a.elements.resizeHandle,"mousedown",a.__internal.beginResizeHandler),r(a.elements.resizeHandle,"touchstart",a.__internal.beginResizeHandler)}function ua(a){q(a.elements.modal,"click",a.__internal.modalClickHandler)}function va(a){r(a.elements.modal,"click",a.__internal.modalClickHandler)}var wa,xa,ya=[],za=null,Aa=!1,Ba=a.navigator.userAgent.indexOf("Safari")>-1&&a.navigator.userAgent.indexOf("Chrome")<0,Ca={dimmer:'<div class="ajs-dimmer"></div>',modal:'<div class="ajs-modal" tabindex="0"></div>',dialog:'<div class="ajs-dialog" tabindex="0"></div>',reset:'<button class="ajs-reset"></button>',commands:'<div class="ajs-commands"><button class="ajs-pin"></button><button class="ajs-maximize"></button><button class="ajs-close"></button></div>',header:'<div class="ajs-header"></div>',body:'<div class="ajs-body"></div>',content:'<div class="ajs-content"></div>',footer:'<div class="ajs-footer"></div>',buttons:{primary:'<div class="ajs-primary ajs-buttons"></div>',auxiliary:'<div class="ajs-auxiliary ajs-buttons"></div>'},button:'<button class="ajs-button"></button>',resizeHandle:'<div class="ajs-handle"></div>'},Da={animationIn:"ajs-in",animationOut:"ajs-out",base:"alertify",basic:"ajs-basic",capture:"ajs-capture",closable:"ajs-closable",fixed:"ajs-fixed",frameless:"ajs-frameless",hidden:"ajs-hidden",maximize:"ajs-maximize",maximized:"ajs-maximized",maximizable:"ajs-maximizable",modeless:"ajs-modeless",movable:"ajs-movable",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",pin:"ajs-pin",pinnable:"ajs-pinnable",prefix:"ajs-",resizable:"ajs-resizable",restore:"ajs-restore",shake:"ajs-shake",unpinned:"ajs-unpinned"},Ea="",Fa=0,Ga=!1,Ha=0,Ia=0,Ja=!1,Ka=null,La=0,Ma=0,Na="pageX",Oa="pageY",Pa=null,Qa=!1,Ra=null,Sa=null,Ta=Number.Nan,Ua=0,Va=0,Wa=0;return{__init:m,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(Da.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(Da.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(Da.unpinned)<0},maximize:function(){return this.isMaximized()||I(this),this},restore:function(){return this.isMaximized()&&J(this),this},pin:function(){return this.isPinned()||G(this),this},unpin:function(){return this.isPinned()&&H(this),this},bringToFront:function(){return B(null,this),this},moveTo:function(a,b){if(!isNaN(a)&&!isNaN(b)){l("onmove",this);var c=this.elements.dialog,e=c,f=0,g=0;c.style.left&&(f-=parseInt(c.style.left,10)),c.style.top&&(g-=parseInt(c.style.top,10));do{f+=e.offsetLeft,g+=e.offsetTop}while(e=e.offsetParent);var h=a-f,i=b-g;d()&&(h*=-1),c.style.left=h+"px",c.style.top=i+"px",l("onmoved",this)}return this},resizeTo:function(a,b){var c=parseFloat(a),d=parseFloat(b),e=/(\d*\.\d+|\d+)%/;if(!isNaN(c)&&!isNaN(d)&&!0===this.get("resizable")){l("onresize",this),(""+a).match(e)&&(c=c/100*document.documentElement.clientWidth),(""+b).match(e)&&(d=d/100*document.documentElement.clientHeight);var f=this.elements.dialog;"none"!==f.style.maxWidth&&(f.style.minWidth=(Va=f.offsetWidth)+"px"),f.style.maxWidth="none",f.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",f.style.width=c+"px",f.style.height=d+"px",l("onresized",this)}return this},setting:function(a,b){var c=this,d=D(this,this.__internal.options,function(a,b,d){C(c,a,b,d)},a,b);if("get"===d.op)return d.found?d.value:void 0!==this.settings?D(this,this.settings,this.settingUpdated||function(){},a,b).value:void 0;if("set"===d.op){if(d.items.length>0)for(var e=this.settingUpdated||function(){},f=0;f<d.items.length;f+=1){var g=d.items[f];g.found||void 0===this.settings||D(this,this.settings,e,g.key,g.value)}return this}},set:function(a,b){return this.setting(a,b),this},get:function(a){return this.setting(a)},setHeader:function(b){return"string"==typeof b?(g(this.elements.header),this.elements.header.innerHTML=b):b instanceof a.HTMLElement&&this.elements.header.firstChild!==b&&(g(this.elements.header),this.elements.header.appendChild(b)),this},setContent:function(b){return"string"==typeof b?(g(this.elements.content),this.elements.content.innerHTML=b):b instanceof a.HTMLElement&&this.elements.content.firstChild!==b&&(g(this.elements.content),this.elements.content.appendChild(b)),this},showModal:function(a){return this.show(!0,a)},show:function(a,d){if(m(this),this.__internal.isOpen){da(this),ja(this),b(this.elements.dialog,Da.shake);var e=this;setTimeout(function(){c(e.elements.dialog,Da.shake)},200)}else{if(this.__internal.isOpen=!0,p.push(this),v.defaults.maintainFocus&&(this.__internal.activeElement=document.activeElement),document.body.hasAttribute("tabindex")||document.body.setAttribute("tabindex",Aa="0"),"function"==typeof this.prepare&&this.prepare(),ma(this),void 0!==a&&this.set("modal",a),o(),u(),"string"==typeof d&&""!==d&&(this.__internal.className=d,b(this.elements.root,d)),this.get("startMaximized")?this.maximize():this.isMaximized()&&J(this),N(this),this.elements.root.removeAttribute("style"),c(this.elements.root,Da.animationOut),b(this.elements.root,Da.animationIn),clearTimeout(this.__internal.timerIn),this.__internal.timerIn=setTimeout(this.__internal.transitionInHandler,s.supported?1e3:100),Ba){var f=this.elements.root;f.style.display="none",setTimeout(function(){f.style.display="block"},0)}za=this.elements.root.offsetWidth,c(this.elements.root,Da.hidden),"function"==typeof this.hooks.onshow&&this.hooks.onshow.call(this),l("onshow",this)}return this},close:function(){return this.__internal.isOpen&&!1!==l("onclosing",this)&&(na(this),c(this.elements.root,Da.animationIn),b(this.elements.root,Da.animationOut),clearTimeout(this.__internal.timerOut),this.__internal.timerOut=setTimeout(this.__internal.transitionOutHandler,s.supported?1e3:100),b(this.elements.root,Da.hidden),za=this.elements.modal.offsetWidth,void 0!==this.__internal.className&&""!==this.__internal.className&&c(this.elements.root,this.__internal.className),"function"==typeof this.hooks.onclose&&this.hooks.onclose.call(this),l("onclose",this),p.splice(p.indexOf(this),1),this.__internal.isOpen=!1,u()),p.length||"0"!==Aa||document.body.removeAttribute("tabindex"),this},closeOthers:function(){return v.closeAll(this),this},destroy:function(){return this.__internal&&(this.__internal.isOpen?(this.__internal.destroy=function(){i(this,m)},this.close()):this.__internal.destroy||i(this,m)),this}}}(),u=function(){function d(a){a.__internal||(a.__internal={position:v.defaults.notifier.position,delay:v.defaults.notifier.delay},l=document.createElement("DIV"),h(a)),l.parentNode!==document.body&&document.body.appendChild(l)}function e(a){a.__internal.pushed=!0,m.push(a)}function f(a){m.splice(m.indexOf(a),1),a.__internal.pushed=!1}function h(a){switch(l.className=n.base,a.__internal.position){case"top-right":b(l,n.top+" "+n.right);break;case"top-left":b(l,n.top+" "+n.left);break;case"top-center":b(l,n.top+" "+n.center);break;case"bottom-left":b(l,n.bottom+" "+n.left);break;case"bottom-center":b(l,n.bottom+" "+n.center);break;default:case"bottom-right":b(l,n.bottom+" "+n.right)}}function i(d,h){function i(a,b){b.__internal.closeButton&&"true"!==a.target.getAttribute("data-close")||b.dismiss(!0)}function m(a,b){r(b.element,s.type,m),l.removeChild(b.element)}function o(a){return a.__internal||(a.__internal={pushed:!1,delay:void 0,timer:void 0,clickHandler:void 0,transitionEndHandler:void 0,transitionTimeout:void 0},a.__internal.clickHandler=j(a,i),a.__internal.transitionEndHandler=j(a,m)),a}function p(a){clearTimeout(a.__internal.timer),clearTimeout(a.__internal.transitionTimeout)}return o({element:d,push:function(a,c){if(!this.__internal.pushed){e(this),p(this);var d,f;switch(arguments.length){case 0:f=this.__internal.delay;break;case 1:"number"==typeof a?f=a:(d=a,f=this.__internal.delay);break;case 2:d=a,f=c}return this.__internal.closeButton=v.defaults.notifier.closeButton,void 0!==d&&this.setContent(d),u.__internal.position.indexOf("top")<0?l.appendChild(this.element):l.insertBefore(this.element,l.firstChild),k=this.element.offsetWidth,b(this.element,n.visible),q(this.element,"click",this.__internal.clickHandler),this.delay(f)}return this},ondismiss:function(){},callback:h,dismiss:function(a){return this.__internal.pushed&&(p(this),"function"==typeof this.ondismiss&&!1===this.ondismiss.call(this)||(r(this.element,"click",this.__internal.clickHandler),void 0!==this.element&&this.element.parentNode===l&&(this.__internal.transitionTimeout=setTimeout(this.__internal.transitionEndHandler,s.supported?1e3:100),c(this.element,n.visible),"function"==typeof this.callback&&this.callback.call(this,a)),f(this))),this},delay:function(a){if(p(this),this.__internal.delay=void 0===a||isNaN(+a)?u.__internal.delay:+a,this.__internal.delay>0){var b=this;this.__internal.timer=setTimeout(function(){b.dismiss()},1e3*this.__internal.delay)}return this},setContent:function(c){if("string"==typeof c?(g(this.element),this.element.innerHTML=c):c instanceof a.HTMLElement&&this.element.firstChild!==c&&(g(this.element),this.element.appendChild(c)),this.__internal.closeButton){var d=document.createElement("span");b(d,n.close),d.setAttribute("data-close",!0),this.element.appendChild(d)}return this},dismissOthers:function(){return u.dismissAll(this),this}})}var k,l,m=[],n={base:"alertify-notifier",message:"ajs-message",top:"ajs-top",right:"ajs-right",bottom:"ajs-bottom",left:"ajs-left",center:"ajs-center",visible:"ajs-visible",hidden:"ajs-hidden",close:"ajs-close"};return{setting:function(a,b){if(d(this),void 0===b)return this.__internal[a];switch(a){case"position":this.__internal.position=b,h(this);break;case"delay":this.__internal.delay=b}return this},set:function(a,b){return this.setting(a,b),this},get:function(a){return this.setting(a)},create:function(a,b){d(this);var c=document.createElement("div");return c.className=n.message+("string"==typeof a&&""!==a?" ajs-"+a:""),i(c,b)},dismissAll:function(a){for(var b=m.slice(0),c=0;c<b.length;c+=1){var d=b[c];void 0!==a&&a===d||d.dismiss()}}}}(),v=new m;v.dialog("alert",function(){return{main:function(a,b,c){var d,e,f;switch(arguments.length){case 1:e=a;break;case 2:"function"==typeof b?(e=a,f=b):(d=a,e=b);break;case 3:d=a,e=b,f=c}return this.set("title",d),this.set("message",e),this.set("onok",f),this},setup:function(){return{buttons:[{text:v.defaults.glossary.ok,key:n.ESC,invokeOnClose:!0,className:v.defaults.theme.ok}],focus:{element:0,select:!1},options:{maximizable:!1,resizable:!1}}},build:function(){},prepare:function(){},setMessage:function(a){this.setContent(a)},settings:{message:void 0,onok:void 0,label:void 0},settingUpdated:function(a,b,c){switch(a){case"message":this.setMessage(c);break;case"label":this.__internal.buttons[0].element&&(this.__internal.buttons[0].element.innerHTML=c)}},callback:function(a){if("function"==typeof this.get("onok")){var b=this.get("onok").call(this,a);void 0!==b&&(a.cancel=!b)}}}}),v.dialog("confirm",function(){function a(a){null!==c.timer&&(clearInterval(c.timer),c.timer=null,a.__internal.buttons[c.index].element.innerHTML=c.text)}function b(b,d,e){a(b),c.duration=e,c.index=d,c.text=b.__internal.buttons[d].element.innerHTML,c.timer=setInterval(j(b,c.task),1e3),c.task(null,b)}var c={timer:null,index:null,text:null,duration:null,task:function(b,d){if(d.isOpen()){if(d.__internal.buttons[c.index].element.innerHTML=c.text+" (&#8207;"+c.duration+"&#8207;) ",c.duration-=1,-1===c.duration){a(d);var e=d.__internal.buttons[c.index],f=k(c.index,e);"function"==typeof d.callback&&d.callback.apply(d,[f]),!1!==f.close&&d.close()}}else a(d)}};return{main:function(a,b,c,d){var e,f,g,h;switch(arguments.length){case 1:f=a;break;case 2:f=a,g=b;break;case 3:f=a,g=b,h=c;break
;case 4:e=a,f=b,g=c,h=d}return this.set("title",e),this.set("message",f),this.set("onok",g),this.set("oncancel",h),this},setup:function(){return{buttons:[{text:v.defaults.glossary.ok,key:n.ENTER,className:v.defaults.theme.ok},{text:v.defaults.glossary.cancel,key:n.ESC,invokeOnClose:!0,className:v.defaults.theme.cancel}],focus:{element:0,select:!1},options:{maximizable:!1,resizable:!1}}},build:function(){},prepare:function(){},setMessage:function(a){this.setContent(a)},settings:{message:null,labels:null,onok:null,oncancel:null,defaultFocus:null,reverseButtons:null},settingUpdated:function(a,b,c){switch(a){case"message":this.setMessage(c);break;case"labels":"ok"in c&&this.__internal.buttons[0].element&&(this.__internal.buttons[0].text=c.ok,this.__internal.buttons[0].element.innerHTML=c.ok),"cancel"in c&&this.__internal.buttons[1].element&&(this.__internal.buttons[1].text=c.cancel,this.__internal.buttons[1].element.innerHTML=c.cancel);break;case"reverseButtons":!0===c?this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element):this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element);break;case"defaultFocus":this.__internal.focus.element="ok"===c?0:1}},callback:function(b){a(this);var c;switch(b.index){case 0:"function"==typeof this.get("onok")&&void 0!==(c=this.get("onok").call(this,b))&&(b.cancel=!c);break;case 1:"function"==typeof this.get("oncancel")&&void 0!==(c=this.get("oncancel").call(this,b))&&(b.cancel=!c)}},autoOk:function(a){return b(this,0,a),this},autoCancel:function(a){return b(this,1,a),this}}}),v.dialog("prompt",function(){var b=document.createElement("INPUT"),c=document.createElement("P");return{main:function(a,b,c,d,e){var f,g,h,i,j;switch(arguments.length){case 1:g=a;break;case 2:g=a,h=b;break;case 3:g=a,h=b,i=c;break;case 4:g=a,h=b,i=c,j=d;break;case 5:f=a,g=b,h=c,i=d,j=e}return this.set("title",f),this.set("message",g),this.set("value",h),this.set("onok",i),this.set("oncancel",j),this},setup:function(){return{buttons:[{text:v.defaults.glossary.ok,key:n.ENTER,className:v.defaults.theme.ok},{text:v.defaults.glossary.cancel,key:n.ESC,invokeOnClose:!0,className:v.defaults.theme.cancel}],focus:{element:b,select:!0},options:{maximizable:!1,resizable:!1}}},build:function(){b.className=v.defaults.theme.input,b.setAttribute("type","text"),b.value=this.get("value"),this.elements.content.appendChild(c),this.elements.content.appendChild(b)},prepare:function(){},setMessage:function(b){"string"==typeof b?(g(c),c.innerHTML=b):b instanceof a.HTMLElement&&c.firstChild!==b&&(g(c),c.appendChild(b))},settings:{message:void 0,labels:void 0,onok:void 0,oncancel:void 0,value:"",type:"text",reverseButtons:void 0},settingUpdated:function(a,c,d){switch(a){case"message":this.setMessage(d);break;case"value":b.value=d;break;case"type":switch(d){case"text":case"color":case"date":case"datetime-local":case"email":case"month":case"number":case"password":case"search":case"tel":case"time":case"week":b.type=d;break;default:b.type="text"}break;case"labels":d.ok&&this.__internal.buttons[0].element&&(this.__internal.buttons[0].element.innerHTML=d.ok),d.cancel&&this.__internal.buttons[1].element&&(this.__internal.buttons[1].element.innerHTML=d.cancel);break;case"reverseButtons":!0===d?this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element):this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element)}},callback:function(a){var c;switch(a.index){case 0:this.settings.value=b.value,"function"==typeof this.get("onok")&&void 0!==(c=this.get("onok").call(this,a,this.settings.value))&&(a.cancel=!c);break;case 1:"function"==typeof this.get("oncancel")&&void 0!==(c=this.get("oncancel").call(this,a))&&(a.cancel=!c),a.cancel||(b.value=this.settings.value)}}}}), true&&"object"==typeof module.exports?module.exports=v: true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){return v}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined}("undefined"!=typeof window?window:this);

/***/ }),

/***/ "./node_modules/alertifyjs/build/css/alertify.min.css":
/*!************************************************************!*\
  !*** ./node_modules/alertifyjs/build/css/alertify.min.css ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--4-1!./alertify.min.css */ "./node_modules/css-loader/dist/cjs.js?!./node_modules/alertifyjs/build/css/alertify.min.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../../style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./node_modules/babel-polyfill/lib/index.js":
/*!**************************************************!*\
  !*** ./node_modules/babel-polyfill/lib/index.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(global) {

__webpack_require__(/*! core-js/shim */ "./node_modules/core-js/shim.js");

__webpack_require__(/*! regenerator-runtime/runtime */ "./node_modules/regenerator-runtime/runtime.js");

__webpack_require__(/*! core-js/fn/regexp/escape */ "./node_modules/core-js/fn/regexp/escape.js");

if (global._babelPolyfill) {
  throw new Error("only one instance of babel-polyfill is allowed");
}
global._babelPolyfill = true;

var DEFINE_PROPERTY = "defineProperty";
function define(O, key, value) {
  O[key] || Object[DEFINE_PROPERTY](O, key, {
    writable: true,
    configurable: true,
    value: value
  });
}

define(String.prototype, "padLeft", "".padStart);
define(String.prototype, "padRight", "".padEnd);

"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
  [][key] && define(Array, key, Function.call.bind([][key]));
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))

/***/ }),

/***/ "./node_modules/blueimp-canvas-to-blob/js/canvas-to-blob.min.js":
/*!**********************************************************************!*\
  !*** ./node_modules/blueimp-canvas-to-blob/js/canvas-to-blob.min.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_RESULT__;!function(t){"use strict";var r=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,f=t.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),b=f&&t.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),d=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,B=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(f||d)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(t){var e,o,n,r,a,i,l,u,c;if(!(e=t.match(B)))throw new Error("invalid data URI");for(o=e[2]?e[1]:"text/plain"+(e[3]||";charset=US-ASCII"),n=!!e[4],r=t.slice(e[0].length),a=n?atob(r):decodeURIComponent(r),i=new ArrayBuffer(a.length),l=new Uint8Array(i),u=0;u<a.length;u+=1)l[u]=a.charCodeAt(u);return f?new Blob([b?l:i],{type:o}):((c=new d).append(i),c.getBlob(o))};t.HTMLCanvasElement&&!r.toBlob&&(r.mozGetAsFile?r.toBlob=function(t,e,o){var n=this;setTimeout(function(){o&&r.toDataURL&&a?t(a(n.toDataURL(e,o))):t(n.mozGetAsFile("blob",e))})}:r.toDataURL&&a&&(r.toBlob=function(t,e,o){var n=this;setTimeout(function(){t(a(n.toDataURL(e,o)))})})), true?!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return a}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined}(window);
//# sourceMappingURL=canvas-to-blob.min.js.map

/***/ }),

/***/ "./node_modules/core-js/fn/regexp/escape.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/fn/regexp/escape.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ../../modules/core.regexp.escape */ "./node_modules/core-js/modules/core.regexp.escape.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "./node_modules/core-js/modules/_core.js").RegExp.escape;


/***/ }),

/***/ "./node_modules/core-js/modules/_a-function.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_a-function.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_a-number-value.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/_a-number-value.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
module.exports = function (it, msg) {
  if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
  return +it;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_add-to-unscopables.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/_add-to-unscopables.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
  ArrayProto[UNSCOPABLES][key] = true;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_advance-string-index.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/_advance-string-index.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/modules/_string-at.js")(true);

 // `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
  return index + (unicode ? at(S, index).length : 1);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_an-instance.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_an-instance.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (it, Constructor, name, forbiddenField) {
  if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
    throw TypeError(name + ': incorrect invocation!');
  } return it;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_an-object.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_an-object.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
module.exports = function (it) {
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-copy-within.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/_array-copy-within.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)

var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");

module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  var O = toObject(this);
  var len = toLength(O.length);
  var to = toAbsoluteIndex(target, len);
  var from = toAbsoluteIndex(start, len);
  var end = arguments.length > 2 ? arguments[2] : undefined;
  var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  var inc = 1;
  if (from < to && to < from + count) {
    inc = -1;
    from += count - 1;
    to += count - 1;
  }
  while (count-- > 0) {
    if (from in O) O[to] = O[from];
    else delete O[to];
    to += inc;
    from += inc;
  } return O;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-fill.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_array-fill.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)

var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
module.exports = function fill(value /* , start = 0, end = @length */) {
  var O = toObject(this);
  var length = toLength(O.length);
  var aLen = arguments.length;
  var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
  var end = aLen > 2 ? arguments[2] : undefined;
  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  while (endPos > index) O[index++] = value;
  return O;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-from-iterable.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/_array-from-iterable.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");

module.exports = function (iter, ITERATOR) {
  var result = [];
  forOf(iter, false, result.push, result, ITERATOR);
  return result;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-includes.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/_array-includes.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// false -> Array#indexOf
// true  -> Array#includes
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
module.exports = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
      if (O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-methods.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_array-methods.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 0 -> Array#forEach
// 1 -> Array#map
// 2 -> Array#filter
// 3 -> Array#some
// 4 -> Array#every
// 5 -> Array#find
// 6 -> Array#findIndex
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var asc = __webpack_require__(/*! ./_array-species-create */ "./node_modules/core-js/modules/_array-species-create.js");
module.exports = function (TYPE, $create) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  var create = $create || asc;
  return function ($this, callbackfn, that) {
    var O = toObject($this);
    var self = IObject(O);
    var f = ctx(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
    var val, res;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      val = self[index];
      res = f(val, index, O);
      if (TYPE) {
        if (IS_MAP) result[index] = res;   // map
        else if (res) switch (TYPE) {
          case 3: return true;             // some
          case 5: return val;              // find
          case 6: return index;            // findIndex
          case 2: result.push(val);        // filter
        } else if (IS_EVERY) return false; // every
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-reduce.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/_array-reduce.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");

module.exports = function (that, callbackfn, aLen, memo, isRight) {
  aFunction(callbackfn);
  var O = toObject(that);
  var self = IObject(O);
  var length = toLength(O.length);
  var index = isRight ? length - 1 : 0;
  var i = isRight ? -1 : 1;
  if (aLen < 2) for (;;) {
    if (index in self) {
      memo = self[index];
      index += i;
      break;
    }
    index += i;
    if (isRight ? index < 0 : length <= index) {
      throw TypeError('Reduce of empty array with no initial value');
    }
  }
  for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
    memo = callbackfn(memo, self[index], index, O);
  }
  return memo;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-species-constructor.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/modules/_array-species-constructor.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js");
var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species');

module.exports = function (original) {
  var C;
  if (isArray(original)) {
    C = original.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return C === undefined ? Array : C;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_array-species-create.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/_array-species-create.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = __webpack_require__(/*! ./_array-species-constructor */ "./node_modules/core-js/modules/_array-species-constructor.js");

module.exports = function (original, length) {
  return new (speciesConstructor(original))(length);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_bind.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/modules/_bind.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/modules/_invoke.js");
var arraySlice = [].slice;
var factories = {};

var construct = function (F, len, args) {
  if (!(len in factories)) {
    for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
    // eslint-disable-next-line no-new-func
    factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
  } return factories[len](F, args);
};

module.exports = Function.bind || function bind(that /* , ...args */) {
  var fn = aFunction(this);
  var partArgs = arraySlice.call(arguments, 1);
  var bound = function (/* args... */) {
    var args = partArgs.concat(arraySlice.call(arguments));
    return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
  };
  if (isObject(fn.prototype)) bound.prototype = fn.prototype;
  return bound;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_classof.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/modules/_classof.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag');
// ES3 wrong here
var ARG = cof(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (e) { /* empty */ }
};

module.exports = function (it) {
  var O, T, B;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
    // builtinTag case
    : ARG ? cof(O)
    // ES3 arguments fallback
    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_cof.js":
/*!**********************************************!*\
  !*** ./node_modules/core-js/modules/_cof.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_collection-strong.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/_collection-strong.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
var $iterDefine = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/modules/_iter-define.js");
var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/modules/_iter-step.js");
var setSpecies = __webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
var fastKey = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").fastKey;
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
var SIZE = DESCRIPTORS ? '_s' : 'size';

var getEntry = function (that, key) {
  // fast case
  var index = fastKey(key);
  var entry;
  if (index !== 'F') return that._i[index];
  // frozen object case
  for (entry = that._f; entry; entry = entry.n) {
    if (entry.k == key) return entry;
  }
};

module.exports = {
  getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
    var C = wrapper(function (that, iterable) {
      anInstance(that, C, NAME, '_i');
      that._t = NAME;         // collection type
      that._i = create(null); // index
      that._f = undefined;    // first entry
      that._l = undefined;    // last entry
      that[SIZE] = 0;         // size
      if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
    });
    redefineAll(C.prototype, {
      // 23.1.3.1 Map.prototype.clear()
      // 23.2.3.2 Set.prototype.clear()
      clear: function clear() {
        for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
          entry.r = true;
          if (entry.p) entry.p = entry.p.n = undefined;
          delete data[entry.i];
        }
        that._f = that._l = undefined;
        that[SIZE] = 0;
      },
      // 23.1.3.3 Map.prototype.delete(key)
      // 23.2.3.4 Set.prototype.delete(value)
      'delete': function (key) {
        var that = validate(this, NAME);
        var entry = getEntry(that, key);
        if (entry) {
          var next = entry.n;
          var prev = entry.p;
          delete that._i[entry.i];
          entry.r = true;
          if (prev) prev.n = next;
          if (next) next.p = prev;
          if (that._f == entry) that._f = next;
          if (that._l == entry) that._l = prev;
          that[SIZE]--;
        } return !!entry;
      },
      // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
      // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
      forEach: function forEach(callbackfn /* , that = undefined */) {
        validate(this, NAME);
        var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
        var entry;
        while (entry = entry ? entry.n : this._f) {
          f(entry.v, entry.k, this);
          // revert to the last existing entry
          while (entry && entry.r) entry = entry.p;
        }
      },
      // 23.1.3.7 Map.prototype.has(key)
      // 23.2.3.7 Set.prototype.has(value)
      has: function has(key) {
        return !!getEntry(validate(this, NAME), key);
      }
    });
    if (DESCRIPTORS) dP(C.prototype, 'size', {
      get: function () {
        return validate(this, NAME)[SIZE];
      }
    });
    return C;
  },
  def: function (that, key, value) {
    var entry = getEntry(that, key);
    var prev, index;
    // change existing entry
    if (entry) {
      entry.v = value;
    // create new entry
    } else {
      that._l = entry = {
        i: index = fastKey(key, true), // <- index
        k: key,                        // <- key
        v: value,                      // <- value
        p: prev = that._l,             // <- previous entry
        n: undefined,                  // <- next entry
        r: false                       // <- removed
      };
      if (!that._f) that._f = entry;
      if (prev) prev.n = entry;
      that[SIZE]++;
      // add to index
      if (index !== 'F') that._i[index] = entry;
    } return that;
  },
  getEntry: getEntry,
  setStrong: function (C, NAME, IS_MAP) {
    // add .keys, .values, .entries, [@@iterator]
    // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
    $iterDefine(C, NAME, function (iterated, kind) {
      this._t = validate(iterated, NAME); // target
      this._k = kind;                     // kind
      this._l = undefined;                // previous
    }, function () {
      var that = this;
      var kind = that._k;
      var entry = that._l;
      // revert to the last existing entry
      while (entry && entry.r) entry = entry.p;
      // get next entry
      if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
        // or finish the iteration
        that._t = undefined;
        return step(1);
      }
      // return step by kind
      if (kind == 'keys') return step(0, entry.k);
      if (kind == 'values') return step(0, entry.v);
      return step(0, [entry.k, entry.v]);
    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);

    // add [@@species], 23.1.2.2, 23.2.2.2
    setSpecies(NAME);
  }
};


/***/ }),

/***/ "./node_modules/core-js/modules/_collection-to-json.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/_collection-to-json.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js");
var from = __webpack_require__(/*! ./_array-from-iterable */ "./node_modules/core-js/modules/_array-from-iterable.js");
module.exports = function (NAME) {
  return function toJSON() {
    if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
    return from(this);
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_collection-weak.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/_collection-weak.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
var getWeak = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").getWeak;
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
var createArrayMethod = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js");
var $has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
var arrayFind = createArrayMethod(5);
var arrayFindIndex = createArrayMethod(6);
var id = 0;

// fallback for uncaught frozen keys
var uncaughtFrozenStore = function (that) {
  return that._l || (that._l = new UncaughtFrozenStore());
};
var UncaughtFrozenStore = function () {
  this.a = [];
};
var findUncaughtFrozen = function (store, key) {
  return arrayFind(store.a, function (it) {
    return it[0] === key;
  });
};
UncaughtFrozenStore.prototype = {
  get: function (key) {
    var entry = findUncaughtFrozen(this, key);
    if (entry) return entry[1];
  },
  has: function (key) {
    return !!findUncaughtFrozen(this, key);
  },
  set: function (key, value) {
    var entry = findUncaughtFrozen(this, key);
    if (entry) entry[1] = value;
    else this.a.push([key, value]);
  },
  'delete': function (key) {
    var index = arrayFindIndex(this.a, function (it) {
      return it[0] === key;
    });
    if (~index) this.a.splice(index, 1);
    return !!~index;
  }
};

module.exports = {
  getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
    var C = wrapper(function (that, iterable) {
      anInstance(that, C, NAME, '_i');
      that._t = NAME;      // collection type
      that._i = id++;      // collection id
      that._l = undefined; // leak store for uncaught frozen objects
      if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
    });
    redefineAll(C.prototype, {
      // 23.3.3.2 WeakMap.prototype.delete(key)
      // 23.4.3.3 WeakSet.prototype.delete(value)
      'delete': function (key) {
        if (!isObject(key)) return false;
        var data = getWeak(key);
        if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
        return data && $has(data, this._i) && delete data[this._i];
      },
      // 23.3.3.4 WeakMap.prototype.has(key)
      // 23.4.3.4 WeakSet.prototype.has(value)
      has: function has(key) {
        if (!isObject(key)) return false;
        var data = getWeak(key);
        if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
        return data && $has(data, this._i);
      }
    });
    return C;
  },
  def: function (that, key, value) {
    var data = getWeak(anObject(key), true);
    if (data === true) uncaughtFrozenStore(that).set(key, value);
    else data[that._i] = value;
    return that;
  },
  ufstore: uncaughtFrozenStore
};


/***/ }),

/***/ "./node_modules/core-js/modules/_collection.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_collection.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js");
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var $iterDetect = __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "./node_modules/core-js/modules/_inherit-if-required.js");

module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  var Base = global[NAME];
  var C = Base;
  var ADDER = IS_MAP ? 'set' : 'add';
  var proto = C && C.prototype;
  var O = {};
  var fixMethod = function (KEY) {
    var fn = proto[KEY];
    redefine(proto, KEY,
      KEY == 'delete' ? function (a) {
        return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
      } : KEY == 'has' ? function has(a) {
        return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
      } : KEY == 'get' ? function get(a) {
        return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
      } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
        : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
    );
  };
  if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
    new C().entries().next();
  }))) {
    // create collection constructor
    C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
    redefineAll(C.prototype, methods);
    meta.NEED = true;
  } else {
    var instance = new C();
    // early implementations not supports chaining
    var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
    // V8 ~  Chromium 40- weak-collections throws on primitives, but should return false
    var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
    // most early implementations doesn't supports iterables, most modern - not close it correctly
    var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
    // for early implementations -0 and +0 not the same
    var BUGGY_ZERO = !IS_WEAK && fails(function () {
      // V8 ~ Chromium 42- fails only with 5+ elements
      var $instance = new C();
      var index = 5;
      while (index--) $instance[ADDER](index, index);
      return !$instance.has(-0);
    });
    if (!ACCEPT_ITERABLES) {
      C = wrapper(function (target, iterable) {
        anInstance(target, C, NAME);
        var that = inheritIfRequired(new Base(), target, C);
        if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
        return that;
      });
      C.prototype = proto;
      proto.constructor = C;
    }
    if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
      fixMethod('delete');
      fixMethod('has');
      IS_MAP && fixMethod('get');
    }
    if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
    // weak collections should not contains .clear method
    if (IS_WEAK && proto.clear) delete proto.clear;
  }

  setToStringTag(C, NAME);

  O[NAME] = C;
  $export($export.G + $export.W + $export.F * (C != Base), O);

  if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);

  return C;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_core.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/modules/_core.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

var core = module.exports = { version: '2.6.9' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef


/***/ }),

/***/ "./node_modules/core-js/modules/_create-property.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/_create-property.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");

module.exports = function (object, index, value) {
  if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  else object[index] = value;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_ctx.js":
/*!**********************************************!*\
  !*** ./node_modules/core-js/modules/_ctx.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// optional / simple context binding
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_date-to-iso-string.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/_date-to-iso-string.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var getTime = Date.prototype.getTime;
var $toISOString = Date.prototype.toISOString;

var lz = function (num) {
  return num > 9 ? num : '0' + num;
};

// PhantomJS / old WebKit has a broken implementations
module.exports = (fails(function () {
  return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
}) || !fails(function () {
  $toISOString.call(new Date(NaN));
})) ? function toISOString() {
  if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
  var d = this;
  var y = d.getUTCFullYear();
  var m = d.getUTCMilliseconds();
  var s = y < 0 ? '-' : y > 9999 ? '+' : '';
  return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
    '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
    'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
    ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
} : $toISOString;


/***/ }),

/***/ "./node_modules/core-js/modules/_date-to-primitive.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/_date-to-primitive.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
var NUMBER = 'number';

module.exports = function (hint) {
  if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
  return toPrimitive(anObject(this), hint != NUMBER);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_defined.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/modules/_defined.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on  " + it);
  return it;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_descriptors.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_descriptors.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),

/***/ "./node_modules/core-js/modules/_dom-create.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_dom-create.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
  return is ? document.createElement(it) : {};
};


/***/ }),

/***/ "./node_modules/core-js/modules/_enum-bug-keys.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_enum-bug-keys.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// IE 8- don't enum bug keys
module.exports = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');


/***/ }),

/***/ "./node_modules/core-js/modules/_enum-keys.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_enum-keys.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js");
var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js");
module.exports = function (it) {
  var result = getKeys(it);
  var getSymbols = gOPS.f;
  if (getSymbols) {
    var symbols = getSymbols(it);
    var isEnum = pIE.f;
    var i = 0;
    var key;
    while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  } return result;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_export.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/modules/_export.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var PROTOTYPE = 'prototype';

var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  var key, own, out, exp;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    // export native or passed
    out = (own ? target : source)[key];
    // bind timers to global for call from export context
    exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // extend global
    if (target) redefine(target, key, out, type & $export.U);
    // export
    if (exports[key] != out) hide(exports, key, exp);
    if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  }
};
global.core = core;
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;


/***/ }),

/***/ "./node_modules/core-js/modules/_fails-is-regexp.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/_fails-is-regexp.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var MATCH = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('match');
module.exports = function (KEY) {
  var re = /./;
  try {
    '/./'[KEY](re);
  } catch (e) {
    try {
      re[MATCH] = false;
      return !'/./'[KEY](re);
    } catch (f) { /* empty */ }
  } return true;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_fails.js":
/*!************************************************!*\
  !*** ./node_modules/core-js/modules/_fails.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};


/***/ }),

/***/ "./node_modules/core-js/modules/_fix-re-wks.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_fix-re-wks.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

__webpack_require__(/*! ./es6.regexp.exec */ "./node_modules/core-js/modules/es6.regexp.exec.js");
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js");
var regexpExec = __webpack_require__(/*! ./_regexp-exec */ "./node_modules/core-js/modules/_regexp-exec.js");

var SPECIES = wks('species');

var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  // #replace needs built-in support for named groups.
  // #match works fine because it just return the exec results, even if it has
  // a "grops" property.
  var re = /./;
  re.exec = function () {
    var result = [];
    result.groups = { a: '7' };
    return result;
  };
  return ''.replace(re, '$<a>') !== '7';
});

var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
  // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  var re = /(?:)/;
  var originalExec = re.exec;
  re.exec = function () { return originalExec.apply(this, arguments); };
  var result = 'ab'.split(re);
  return result.length === 2 && result[0] === 'a' && result[1] === 'b';
})();

module.exports = function (KEY, length, exec) {
  var SYMBOL = wks(KEY);

  var DELEGATES_TO_SYMBOL = !fails(function () {
    // String methods call symbol-named RegEp methods
    var O = {};
    O[SYMBOL] = function () { return 7; };
    return ''[KEY](O) != 7;
  });

  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
    // Symbol-named RegExp methods call .exec
    var execCalled = false;
    var re = /a/;
    re.exec = function () { execCalled = true; return null; };
    if (KEY === 'split') {
      // RegExp[@@split] doesn't call the regex's exec method, but first creates
      // a new one. We need to return the patched regex when creating the new one.
      re.constructor = {};
      re.constructor[SPECIES] = function () { return re; };
    }
    re[SYMBOL]('');
    return !execCalled;
  }) : undefined;

  if (
    !DELEGATES_TO_SYMBOL ||
    !DELEGATES_TO_EXEC ||
    (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
    (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  ) {
    var nativeRegExpMethod = /./[SYMBOL];
    var fns = exec(
      defined,
      SYMBOL,
      ''[KEY],
      function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
        if (regexp.exec === regexpExec) {
          if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
            // The native String method already delegates to @@method (this
            // polyfilled function), leasing to infinite recursion.
            // We avoid it by directly calling the native @@method method.
            return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
          }
          return { done: true, value: nativeMethod.call(str, regexp, arg2) };
        }
        return { done: false };
      }
    );
    var strfn = fns[0];
    var rxfn = fns[1];

    redefine(String.prototype, KEY, strfn);
    hide(RegExp.prototype, SYMBOL, length == 2
      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
      // 21.2.5.11 RegExp.prototype[@@split](string, limit)
      ? function (string, arg) { return rxfn.call(string, this, arg); }
      // 21.2.5.6 RegExp.prototype[@@match](string)
      // 21.2.5.9 RegExp.prototype[@@search](string)
      : function (string) { return rxfn.call(string, this); }
    );
  }
};


/***/ }),

/***/ "./node_modules/core-js/modules/_flags.js":
/*!************************************************!*\
  !*** ./node_modules/core-js/modules/_flags.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.unicode) result += 'u';
  if (that.sticky) result += 'y';
  return result;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_flatten-into-array.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/_flatten-into-array.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var IS_CONCAT_SPREADABLE = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('isConcatSpreadable');

function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
  var targetIndex = start;
  var sourceIndex = 0;
  var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
  var element, spreadable;

  while (sourceIndex < sourceLen) {
    if (sourceIndex in source) {
      element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];

      spreadable = false;
      if (isObject(element)) {
        spreadable = element[IS_CONCAT_SPREADABLE];
        spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
      }

      if (spreadable && depth > 0) {
        targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
      } else {
        if (targetIndex >= 0x1fffffffffffff) throw TypeError();
        target[targetIndex] = element;
      }

      targetIndex++;
    }
    sourceIndex++;
  }
  return targetIndex;
}

module.exports = flattenIntoArray;


/***/ }),

/***/ "./node_modules/core-js/modules/_for-of.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/modules/_for-of.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/modules/_iter-call.js");
var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/modules/_is-array-iter.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/modules/core.get-iterator-method.js");
var BREAK = {};
var RETURN = {};
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  var f = ctx(fn, that, entries ? 2 : 1);
  var index = 0;
  var length, step, iterator, result;
  if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  // fast case for arrays with default iterator
  if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
    result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
    if (result === BREAK || result === RETURN) return result;
  } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
    result = call(iterator, f, step.value, entries);
    if (result === BREAK || result === RETURN) return result;
  }
};
exports.BREAK = BREAK;
exports.RETURN = RETURN;


/***/ }),

/***/ "./node_modules/core-js/modules/_function-to-string.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/_function-to-string.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('native-function-to-string', Function.toString);


/***/ }),

/***/ "./node_modules/core-js/modules/_global.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/modules/_global.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self
  // eslint-disable-next-line no-new-func
  : Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef


/***/ }),

/***/ "./node_modules/core-js/modules/_has.js":
/*!**********************************************!*\
  !*** ./node_modules/core-js/modules/_has.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_hide.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/modules/_hide.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? function (object, key, value) {
  return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_html.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/modules/_html.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document;
module.exports = document && document.documentElement;


/***/ }),

/***/ "./node_modules/core-js/modules/_ie8-dom-define.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/_ie8-dom-define.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),

/***/ "./node_modules/core-js/modules/_inherit-if-required.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/_inherit-if-required.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var setPrototypeOf = __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js").set;
module.exports = function (that, target, C) {
  var S = target.constructor;
  var P;
  if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
    setPrototypeOf(that, P);
  } return that;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_invoke.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/modules/_invoke.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function (fn, args, that) {
  var un = that === undefined;
  switch (args.length) {
    case 0: return un ? fn()
                      : fn.call(that);
    case 1: return un ? fn(args[0])
                      : fn.call(that, args[0]);
    case 2: return un ? fn(args[0], args[1])
                      : fn.call(that, args[0], args[1]);
    case 3: return un ? fn(args[0], args[1], args[2])
                      : fn.call(that, args[0], args[1], args[2]);
    case 4: return un ? fn(args[0], args[1], args[2], args[3])
                      : fn.call(that, args[0], args[1], args[2], args[3]);
  } return fn.apply(that, args);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_iobject.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/modules/_iobject.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return cof(it) == 'String' ? it.split('') : Object(it);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_is-array-iter.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_is-array-iter.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// check on default Array iterator
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
var ArrayProto = Array.prototype;

module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_is-array.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/modules/_is-array.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 7.2.2 IsArray(argument)
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
module.exports = Array.isArray || function isArray(arg) {
  return cof(arg) == 'Array';
};


/***/ }),

/***/ "./node_modules/core-js/modules/_is-integer.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_is-integer.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.3 Number.isInteger(number)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var floor = Math.floor;
module.exports = function isInteger(it) {
  return !isObject(it) && isFinite(it) && floor(it) === it;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_is-object.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_is-object.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),

/***/ "./node_modules/core-js/modules/_is-regexp.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_is-regexp.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
var MATCH = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('match');
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};


/***/ }),

/***/ "./node_modules/core-js/modules/_iter-call.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_iter-call.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// call something on iterator step with safe closing on error
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
module.exports = function (iterator, fn, value, entries) {
  try {
    return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (e) {
    var ret = iterator['return'];
    if (ret !== undefined) anObject(ret.call(iterator));
    throw e;
  }
};


/***/ }),

/***/ "./node_modules/core-js/modules/_iter-create.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_iter-create.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
var IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator'), function () { return this; });

module.exports = function (Constructor, NAME, next) {
  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  setToStringTag(Constructor, NAME + ' Iterator');
};


/***/ }),

/***/ "./node_modules/core-js/modules/_iter-define.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_iter-define.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/modules/_iter-create.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';

var returnThis = function () { return this; };

module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  $iterCreate(Constructor, NAME, next);
  var getMethod = function (kind) {
    if (!BUGGY && kind in proto) return proto[kind];
    switch (kind) {
      case KEYS: return function keys() { return new Constructor(this, kind); };
      case VALUES: return function values() { return new Constructor(this, kind); };
    } return function entries() { return new Constructor(this, kind); };
  };
  var TAG = NAME + ' Iterator';
  var DEF_VALUES = DEFAULT == VALUES;
  var VALUES_BUG = false;
  var proto = Base.prototype;
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  var $default = $native || getMethod(DEFAULT);
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  var methods, key, IteratorPrototype;
  // Fix native
  if ($anyNative) {
    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
      // Set @@toStringTag to native iterators
      setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEF_VALUES && $native && $native.name !== VALUES) {
    VALUES_BUG = true;
    $default = function values() { return $native.call(this); };
  }
  // Define iterator
  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
    hide(proto, ITERATOR, $default);
  }
  // Plug for library
  Iterators[NAME] = $default;
  Iterators[TAG] = returnThis;
  if (DEFAULT) {
    methods = {
      values: DEF_VALUES ? $default : getMethod(VALUES),
      keys: IS_SET ? $default : getMethod(KEYS),
      entries: $entries
    };
    if (FORCED) for (key in methods) {
      if (!(key in proto)) redefine(proto, key, methods[key]);
    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  }
  return methods;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_iter-detect.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_iter-detect.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
var SAFE_CLOSING = false;

try {
  var riter = [7][ITERATOR]();
  riter['return'] = function () { SAFE_CLOSING = true; };
  // eslint-disable-next-line no-throw-literal
  Array.from(riter, function () { throw 2; });
} catch (e) { /* empty */ }

module.exports = function (exec, skipClosing) {
  if (!skipClosing && !SAFE_CLOSING) return false;
  var safe = false;
  try {
    var arr = [7];
    var iter = arr[ITERATOR]();
    iter.next = function () { return { done: safe = true }; };
    arr[ITERATOR] = function () { return iter; };
    exec(arr);
  } catch (e) { /* empty */ }
  return safe;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_iter-step.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_iter-step.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (done, value) {
  return { value: value, done: !!done };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_iterators.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_iterators.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "./node_modules/core-js/modules/_library.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/modules/_library.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = false;


/***/ }),

/***/ "./node_modules/core-js/modules/_math-expm1.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_math-expm1.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// 20.2.2.14 Math.expm1(x)
var $expm1 = Math.expm1;
module.exports = (!$expm1
  // Old FF bug
  || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
  // Tor Browser bug
  || $expm1(-2e-17) != -2e-17
) ? function expm1(x) {
  return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
} : $expm1;


/***/ }),

/***/ "./node_modules/core-js/modules/_math-fround.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_math-fround.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.16 Math.fround(x)
var sign = __webpack_require__(/*! ./_math-sign */ "./node_modules/core-js/modules/_math-sign.js");
var pow = Math.pow;
var EPSILON = pow(2, -52);
var EPSILON32 = pow(2, -23);
var MAX32 = pow(2, 127) * (2 - EPSILON32);
var MIN32 = pow(2, -126);

var roundTiesToEven = function (n) {
  return n + 1 / EPSILON - 1 / EPSILON;
};

module.exports = Math.fround || function fround(x) {
  var $abs = Math.abs(x);
  var $sign = sign(x);
  var a, result;
  if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
  a = (1 + EPSILON32 / EPSILON) * $abs;
  result = a - (a - $abs);
  // eslint-disable-next-line no-self-compare
  if (result > MAX32 || result != result) return $sign * Infinity;
  return $sign * result;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_math-log1p.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_math-log1p.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// 20.2.2.20 Math.log1p(x)
module.exports = Math.log1p || function log1p(x) {
  return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_math-scale.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_math-scale.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// https://rwaldron.github.io/proposal-math-extensions/
module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
  if (
    arguments.length === 0
      // eslint-disable-next-line no-self-compare
      || x != x
      // eslint-disable-next-line no-self-compare
      || inLow != inLow
      // eslint-disable-next-line no-self-compare
      || inHigh != inHigh
      // eslint-disable-next-line no-self-compare
      || outLow != outLow
      // eslint-disable-next-line no-self-compare
      || outHigh != outHigh
  ) return NaN;
  if (x === Infinity || x === -Infinity) return x;
  return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_math-sign.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_math-sign.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// 20.2.2.28 Math.sign(x)
module.exports = Math.sign || function sign(x) {
  // eslint-disable-next-line no-self-compare
  return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_meta.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/modules/_meta.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var META = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js")('meta');
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
  return true;
};
var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
  setDesc(it, META, { value: {
    i: 'O' + ++id, // object ID
    w: {}          // weak collections IDs
  } });
};
var fastKey = function (it, create) {
  // return primitive with prefix
  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return 'F';
    // not necessary to add metadata
    if (!create) return 'E';
    // add missing metadata
    setMeta(it);
  // return object ID
  } return it[META].i;
};
var getWeak = function (it, create) {
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return true;
    // not necessary to add metadata
    if (!create) return false;
    // add missing metadata
    setMeta(it);
  // return hash weak collections IDs
  } return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
  if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  return it;
};
var meta = module.exports = {
  KEY: META,
  NEED: false,
  fastKey: fastKey,
  getWeak: getWeak,
  onFreeze: onFreeze
};


/***/ }),

/***/ "./node_modules/core-js/modules/_metadata.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/modules/_metadata.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var Map = __webpack_require__(/*! ./es6.map */ "./node_modules/core-js/modules/es6.map.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('metadata');
var store = shared.store || (shared.store = new (__webpack_require__(/*! ./es6.weak-map */ "./node_modules/core-js/modules/es6.weak-map.js"))());

var getOrCreateMetadataMap = function (target, targetKey, create) {
  var targetMetadata = store.get(target);
  if (!targetMetadata) {
    if (!create) return undefined;
    store.set(target, targetMetadata = new Map());
  }
  var keyMetadata = targetMetadata.get(targetKey);
  if (!keyMetadata) {
    if (!create) return undefined;
    targetMetadata.set(targetKey, keyMetadata = new Map());
  } return keyMetadata;
};
var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
  var metadataMap = getOrCreateMetadataMap(O, P, false);
  return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
};
var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
  var metadataMap = getOrCreateMetadataMap(O, P, false);
  return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
};
var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
  getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
};
var ordinaryOwnMetadataKeys = function (target, targetKey) {
  var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
  var keys = [];
  if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
  return keys;
};
var toMetaKey = function (it) {
  return it === undefined || typeof it == 'symbol' ? it : String(it);
};
var exp = function (O) {
  $export($export.S, 'Reflect', O);
};

module.exports = {
  store: store,
  map: getOrCreateMetadataMap,
  has: ordinaryHasOwnMetadata,
  get: ordinaryGetOwnMetadata,
  set: ordinaryDefineOwnMetadata,
  keys: ordinaryOwnMetadataKeys,
  key: toMetaKey,
  exp: exp
};


/***/ }),

/***/ "./node_modules/core-js/modules/_microtask.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_microtask.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var macrotask = __webpack_require__(/*! ./_task */ "./node_modules/core-js/modules/_task.js").set;
var Observer = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var isNode = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js")(process) == 'process';

module.exports = function () {
  var head, last, notify;

  var flush = function () {
    var parent, fn;
    if (isNode && (parent = process.domain)) parent.exit();
    while (head) {
      fn = head.fn;
      head = head.next;
      try {
        fn();
      } catch (e) {
        if (head) notify();
        else last = undefined;
        throw e;
      }
    } last = undefined;
    if (parent) parent.enter();
  };

  // Node.js
  if (isNode) {
    notify = function () {
      process.nextTick(flush);
    };
  // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  } else if (Observer && !(global.navigator && global.navigator.standalone)) {
    var toggle = true;
    var node = document.createTextNode('');
    new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
    notify = function () {
      node.data = toggle = !toggle;
    };
  // environments with maybe non-completely correct, but existent Promise
  } else if (Promise && Promise.resolve) {
    // Promise.resolve without an argument throws an error in LG WebOS 2
    var promise = Promise.resolve(undefined);
    notify = function () {
      promise.then(flush);
    };
  // for other environments - macrotask based on:
  // - setImmediate
  // - MessageChannel
  // - window.postMessag
  // - onreadystatechange
  // - setTimeout
  } else {
    notify = function () {
      // strange IE + webpack dev server bug - use .call(global)
      macrotask.call(global, flush);
    };
  }

  return function (fn) {
    var task = { fn: fn, next: undefined };
    if (last) last.next = task;
    if (!head) {
      head = task;
      notify();
    } last = task;
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_new-promise-capability.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/modules/_new-promise-capability.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 25.4.1.5 NewPromiseCapability(C)
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");

function PromiseCapability(C) {
  var resolve, reject;
  this.promise = new C(function ($$resolve, $$reject) {
    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject = $$reject;
  });
  this.resolve = aFunction(resolve);
  this.reject = aFunction(reject);
}

module.exports.f = function (C) {
  return new PromiseCapability(C);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-assign.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_object-assign.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 19.1.2.1 Object.assign(target, source, ...)
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js");
var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
var $assign = Object.assign;

// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var S = Symbol();
  var K = 'abcdefghijklmnopqrst';
  A[S] = 7;
  K.split('').forEach(function (k) { B[k] = k; });
  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = toObject(target);
  var aLen = arguments.length;
  var index = 1;
  var getSymbols = gOPS.f;
  var isEnum = pIE.f;
  while (aLen > index) {
    var S = IObject(arguments[index++]);
    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) {
      key = keys[j++];
      if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
    }
  } return T;
} : $assign;


/***/ }),

/***/ "./node_modules/core-js/modules/_object-create.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_object-create.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/modules/_object-dps.js");
var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js");
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('iframe');
  var i = enumBugKeys.length;
  var lt = '<';
  var gt = '>';
  var iframeDocument;
  iframe.style.display = 'none';
  __webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js").appendChild(iframe);
  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  // createDict = iframe.contentWindow.Object;
  // html.removeChild(iframe);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  return createDict();
};

module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    Empty[PROTOTYPE] = anObject(O);
    result = new Empty();
    Empty[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = createDict();
  return Properties === undefined ? result : dPs(result, Properties);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-dp.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_object-dp.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
var dP = Object.defineProperty;

exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return dP(O, P, Attributes);
  } catch (e) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-dps.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_object-dps.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");

module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = getKeys(Properties);
  var length = keys.length;
  var i = 0;
  var P;
  while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  return O;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-forced-pam.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/_object-forced-pam.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// Forced replacement prototype accessors methods
module.exports = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js") || !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  var K = Math.random();
  // In FF throws only define methods
  // eslint-disable-next-line no-undef, no-useless-call
  __defineSetter__.call(null, K, function () { /* empty */ });
  delete __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js")[K];
});


/***/ }),

/***/ "./node_modules/core-js/modules/_object-gopd.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_object-gopd.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js");
var gOPD = Object.getOwnPropertyDescriptor;

exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) {
  O = toIObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return gOPD(O, P);
  } catch (e) { /* empty */ }
  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-gopn-ext.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/_object-gopn-ext.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f;
var toString = {}.toString;

var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  ? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function (it) {
  try {
    return gOPN(it);
  } catch (e) {
    return windowNames.slice();
  }
};

module.exports.f = function getOwnPropertyNames(it) {
  return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-gopn.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_object-gopn.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/modules/_object-keys-internal.js");
var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js").concat('length', 'prototype');

exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return $keys(O, hiddenKeys);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-gops.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_object-gops.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

exports.f = Object.getOwnPropertySymbols;


/***/ }),

/***/ "./node_modules/core-js/modules/_object-gpo.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_object-gpo.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
var ObjectProto = Object.prototype;

module.exports = Object.getPrototypeOf || function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectProto : null;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-keys-internal.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/_object-keys-internal.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(false);
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');

module.exports = function (object, names) {
  var O = toIObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~arrayIndexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-keys.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_object-keys.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/modules/_object-keys-internal.js");
var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js");

module.exports = Object.keys || function keys(O) {
  return $keys(O, enumBugKeys);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-pie.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_object-pie.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

exports.f = {}.propertyIsEnumerable;


/***/ }),

/***/ "./node_modules/core-js/modules/_object-sap.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_object-sap.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
module.exports = function (KEY, exec) {
  var fn = (core.Object || {})[KEY] || Object[KEY];
  var exp = {};
  exp[KEY] = exec(fn);
  $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_object-to-array.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/_object-to-array.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var isEnum = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js").f;
module.exports = function (isEntries) {
  return function (it) {
    var O = toIObject(it);
    var keys = getKeys(O);
    var length = keys.length;
    var i = 0;
    var result = [];
    var key;
    while (length > i) {
      key = keys[i++];
      if (!DESCRIPTORS || isEnum.call(O, key)) {
        result.push(isEntries ? [key, O[key]] : O[key]);
      }
    }
    return result;
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_own-keys.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/modules/_own-keys.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// all object keys, includes non-enumerable and symbols
var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js");
var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var Reflect = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  var keys = gOPN.f(anObject(it));
  var getSymbols = gOPS.f;
  return getSymbols ? keys.concat(getSymbols(it)) : keys;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_parse-float.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_parse-float.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $parseFloat = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").parseFloat;
var $trim = __webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js").trim;

module.exports = 1 / $parseFloat(__webpack_require__(/*! ./_string-ws */ "./node_modules/core-js/modules/_string-ws.js") + '-0') !== -Infinity ? function parseFloat(str) {
  var string = $trim(String(str), 3);
  var result = $parseFloat(string);
  return result === 0 && string.charAt(0) == '-' ? -0 : result;
} : $parseFloat;


/***/ }),

/***/ "./node_modules/core-js/modules/_parse-int.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_parse-int.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $parseInt = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").parseInt;
var $trim = __webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js").trim;
var ws = __webpack_require__(/*! ./_string-ws */ "./node_modules/core-js/modules/_string-ws.js");
var hex = /^[-+]?0[xX]/;

module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
  var string = $trim(String(str), 3);
  return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
} : $parseInt;


/***/ }),

/***/ "./node_modules/core-js/modules/_perform.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/modules/_perform.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return { e: false, v: exec() };
  } catch (e) {
    return { e: true, v: e };
  }
};


/***/ }),

/***/ "./node_modules/core-js/modules/_promise-resolve.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/_promise-resolve.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/modules/_new-promise-capability.js");

module.exports = function (C, x) {
  anObject(C);
  if (isObject(x) && x.constructor === C) return x;
  var promiseCapability = newPromiseCapability.f(C);
  var resolve = promiseCapability.resolve;
  resolve(x);
  return promiseCapability.promise;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_property-desc.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_property-desc.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_redefine-all.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/_redefine-all.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
module.exports = function (target, src, safe) {
  for (var key in src) redefine(target, key, src[key], safe);
  return target;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_redefine.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/modules/_redefine.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var SRC = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js")('src');
var $toString = __webpack_require__(/*! ./_function-to-string */ "./node_modules/core-js/modules/_function-to-string.js");
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);

__webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js").inspectSource = function (it) {
  return $toString.call(it);
};

(module.exports = function (O, key, val, safe) {
  var isFunction = typeof val == 'function';
  if (isFunction) has(val, 'name') || hide(val, 'name', key);
  if (O[key] === val) return;
  if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  if (O === global) {
    O[key] = val;
  } else if (!safe) {
    delete O[key];
    hide(O, key, val);
  } else if (O[key]) {
    O[key] = val;
  } else {
    hide(O, key, val);
  }
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
  return typeof this == 'function' && this[SRC] || $toString.call(this);
});


/***/ }),

/***/ "./node_modules/core-js/modules/_regexp-exec-abstract.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/_regexp-exec-abstract.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js");
var builtinExec = RegExp.prototype.exec;

 // `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
  var exec = R.exec;
  if (typeof exec === 'function') {
    var result = exec.call(R, S);
    if (typeof result !== 'object') {
      throw new TypeError('RegExp exec method returned something other than an Object or null');
    }
    return result;
  }
  if (classof(R) !== 'RegExp') {
    throw new TypeError('RegExp#exec called on incompatible receiver');
  }
  return builtinExec.call(R, S);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_regexp-exec.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_regexp-exec.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var regexpFlags = __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js");

var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;

var patchedExec = nativeExec;

var LAST_INDEX = 'lastIndex';

var UPDATES_LAST_INDEX_WRONG = (function () {
  var re1 = /a/,
      re2 = /b*/g;
  nativeExec.call(re1, 'a');
  nativeExec.call(re2, 'a');
  return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
})();

// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;

var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;

if (PATCH) {
  patchedExec = function exec(str) {
    var re = this;
    var lastIndex, reCopy, match, i;

    if (NPCG_INCLUDED) {
      reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
    }
    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];

    match = nativeExec.call(re, str);

    if (UPDATES_LAST_INDEX_WRONG && match) {
      re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
    }
    if (NPCG_INCLUDED && match && match.length > 1) {
      // Fix browsers whose `exec` methods don't consistently return `undefined`
      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
      // eslint-disable-next-line no-loop-func
      nativeReplace.call(match[0], reCopy, function () {
        for (i = 1; i < arguments.length - 2; i++) {
          if (arguments[i] === undefined) match[i] = undefined;
        }
      });
    }

    return match;
  };
}

module.exports = patchedExec;


/***/ }),

/***/ "./node_modules/core-js/modules/_replacer.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/modules/_replacer.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (regExp, replace) {
  var replacer = replace === Object(replace) ? function (part) {
    return replace[part];
  } : replace;
  return function (it) {
    return String(it).replace(regExp, replacer);
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_same-value.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_same-value.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// 7.2.9 SameValue(x, y)
module.exports = Object.is || function is(x, y) {
  // eslint-disable-next-line no-self-compare
  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_set-collection-from.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/_set-collection-from.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://tc39.github.io/proposal-setmap-offrom/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");

module.exports = function (COLLECTION) {
  $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
    var mapFn = arguments[1];
    var mapping, A, n, cb;
    aFunction(this);
    mapping = mapFn !== undefined;
    if (mapping) aFunction(mapFn);
    if (source == undefined) return new this();
    A = [];
    if (mapping) {
      n = 0;
      cb = ctx(mapFn, arguments[2], 2);
      forOf(source, false, function (nextItem) {
        A.push(cb(nextItem, n++));
      });
    } else {
      forOf(source, false, A.push, A);
    }
    return new this(A);
  } });
};


/***/ }),

/***/ "./node_modules/core-js/modules/_set-collection-of.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/_set-collection-of.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://tc39.github.io/proposal-setmap-offrom/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

module.exports = function (COLLECTION) {
  $export($export.S, COLLECTION, { of: function of() {
    var length = arguments.length;
    var A = new Array(length);
    while (length--) A[length] = arguments[length];
    return new this(A);
  } });
};


/***/ }),

/***/ "./node_modules/core-js/modules/_set-proto.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_set-proto.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var check = function (O, proto) {
  anObject(O);
  if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
  set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
    function (test, buggy, set) {
      try {
        set = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2);
        set(test, []);
        buggy = !(test instanceof Array);
      } catch (e) { buggy = true; }
      return function setPrototypeOf(O, proto) {
        check(O, proto);
        if (buggy) O.__proto__ = proto;
        else set(O, proto);
        return O;
      };
    }({}, false) : undefined),
  check: check
};


/***/ }),

/***/ "./node_modules/core-js/modules/_set-species.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_set-species.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species');

module.exports = function (KEY) {
  var C = global[KEY];
  if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
    configurable: true,
    get: function () { return this; }
  });
};


/***/ }),

/***/ "./node_modules/core-js/modules/_set-to-string-tag.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/_set-to-string-tag.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag');

module.exports = function (it, tag, stat) {
  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};


/***/ }),

/***/ "./node_modules/core-js/modules/_shared-key.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_shared-key.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('keys');
var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
module.exports = function (key) {
  return shared[key] || (shared[key] = uid(key));
};


/***/ }),

/***/ "./node_modules/core-js/modules/_shared.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/modules/_shared.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: core.version,
  mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js") ? 'pure' : 'global',
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});


/***/ }),

/***/ "./node_modules/core-js/modules/_species-constructor.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/_species-constructor.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species');
module.exports = function (O, D) {
  var C = anObject(O).constructor;
  var S;
  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_strict-method.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_strict-method.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");

module.exports = function (method, arg) {
  return !!method && fails(function () {
    // eslint-disable-next-line no-useless-call
    arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
  });
};


/***/ }),

/***/ "./node_modules/core-js/modules/_string-at.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_string-at.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
// true  -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
  return function (that, pos) {
    var s = String(defined(that));
    var i = toInteger(pos);
    var l = s.length;
    var a, b;
    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
    a = s.charCodeAt(i);
    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
      ? TO_STRING ? s.charAt(i) : a
      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  };
};


/***/ }),

/***/ "./node_modules/core-js/modules/_string-context.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/_string-context.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__(/*! ./_is-regexp */ "./node_modules/core-js/modules/_is-regexp.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");

module.exports = function (that, searchString, NAME) {
  if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  return String(defined(that));
};


/***/ }),

/***/ "./node_modules/core-js/modules/_string-html.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_string-html.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
var quot = /"/g;
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
var createHTML = function (string, tag, attribute, value) {
  var S = String(defined(string));
  var p1 = '<' + tag;
  if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
  return p1 + '>' + S + '</' + tag + '>';
};
module.exports = function (NAME, exec) {
  var O = {};
  O[NAME] = exec(createHTML);
  $export($export.P + $export.F * fails(function () {
    var test = ''[NAME]('"');
    return test !== test.toLowerCase() || test.split('"').length > 3;
  }), 'String', O);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_string-pad.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_string-pad.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-string-pad-start-end
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var repeat = __webpack_require__(/*! ./_string-repeat */ "./node_modules/core-js/modules/_string-repeat.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");

module.exports = function (that, maxLength, fillString, left) {
  var S = String(defined(that));
  var stringLength = S.length;
  var fillStr = fillString === undefined ? ' ' : String(fillString);
  var intMaxLength = toLength(maxLength);
  if (intMaxLength <= stringLength || fillStr == '') return S;
  var fillLen = intMaxLength - stringLength;
  var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
  if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
  return left ? stringFiller + S : S + stringFiller;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_string-repeat.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/_string-repeat.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");

module.exports = function repeat(count) {
  var str = String(defined(this));
  var res = '';
  var n = toInteger(count);
  if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
  return res;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_string-trim.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_string-trim.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var spaces = __webpack_require__(/*! ./_string-ws */ "./node_modules/core-js/modules/_string-ws.js");
var space = '[' + spaces + ']';
var non = '\u200b\u0085';
var ltrim = RegExp('^' + space + space + '*');
var rtrim = RegExp(space + space + '*$');

var exporter = function (KEY, exec, ALIAS) {
  var exp = {};
  var FORCE = fails(function () {
    return !!spaces[KEY]() || non[KEY]() != non;
  });
  var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  if (ALIAS) exp[ALIAS] = fn;
  $export($export.P + $export.F * FORCE, 'String', exp);
};

// 1 -> String#trimLeft
// 2 -> String#trimRight
// 3 -> String#trim
var trim = exporter.trim = function (string, TYPE) {
  string = String(defined(string));
  if (TYPE & 1) string = string.replace(ltrim, '');
  if (TYPE & 2) string = string.replace(rtrim, '');
  return string;
};

module.exports = exporter;


/***/ }),

/***/ "./node_modules/core-js/modules/_string-ws.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_string-ws.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';


/***/ }),

/***/ "./node_modules/core-js/modules/_task.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/modules/_task.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/modules/_invoke.js");
var html = __webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js");
var cel = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js");
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var process = global.process;
var setTask = global.setImmediate;
var clearTask = global.clearImmediate;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;
var run = function () {
  var id = +this;
  // eslint-disable-next-line no-prototype-builtins
  if (queue.hasOwnProperty(id)) {
    var fn = queue[id];
    delete queue[id];
    fn();
  }
};
var listener = function (event) {
  run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!setTask || !clearTask) {
  setTask = function setImmediate(fn) {
    var args = [];
    var i = 1;
    while (arguments.length > i) args.push(arguments[i++]);
    queue[++counter] = function () {
      // eslint-disable-next-line no-new-func
      invoke(typeof fn == 'function' ? fn : Function(fn), args);
    };
    defer(counter);
    return counter;
  };
  clearTask = function clearImmediate(id) {
    delete queue[id];
  };
  // Node.js 0.8-
  if (__webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js")(process) == 'process') {
    defer = function (id) {
      process.nextTick(ctx(run, id, 1));
    };
  // Sphere (JS game engine) Dispatch API
  } else if (Dispatch && Dispatch.now) {
    defer = function (id) {
      Dispatch.now(ctx(run, id, 1));
    };
  // Browsers with MessageChannel, includes WebWorkers
  } else if (MessageChannel) {
    channel = new MessageChannel();
    port = channel.port2;
    channel.port1.onmessage = listener;
    defer = ctx(port.postMessage, port, 1);
  // Browsers with postMessage, skip WebWorkers
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
    defer = function (id) {
      global.postMessage(id + '', '*');
    };
    global.addEventListener('message', listener, false);
  // IE8-
  } else if (ONREADYSTATECHANGE in cel('script')) {
    defer = function (id) {
      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
        html.removeChild(this);
        run.call(id);
      };
    };
  // Rest old browsers
  } else {
    defer = function (id) {
      setTimeout(ctx(run, id, 1), 0);
    };
  }
}
module.exports = {
  set: setTask,
  clear: clearTask
};


/***/ }),

/***/ "./node_modules/core-js/modules/_to-absolute-index.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/_to-absolute-index.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
  index = toInteger(index);
  return index < 0 ? max(index + length, 0) : min(index, length);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_to-index.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/modules/_to-index.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/ecma262/#sec-toindex
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
module.exports = function (it) {
  if (it === undefined) return 0;
  var number = toInteger(it);
  var length = toLength(number);
  if (number !== length) throw RangeError('Wrong length!');
  return length;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_to-integer.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_to-integer.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};


/***/ }),

/***/ "./node_modules/core-js/modules/_to-iobject.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_to-iobject.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
module.exports = function (it) {
  return IObject(defined(it));
};


/***/ }),

/***/ "./node_modules/core-js/modules/_to-length.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_to-length.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.15 ToLength
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var min = Math.min;
module.exports = function (it) {
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};


/***/ }),

/***/ "./node_modules/core-js/modules/_to-object.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/_to-object.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.13 ToObject(argument)
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
module.exports = function (it) {
  return Object(defined(it));
};


/***/ }),

/***/ "./node_modules/core-js/modules/_to-primitive.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/_to-primitive.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
  if (!isObject(it)) return it;
  var fn, val;
  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),

/***/ "./node_modules/core-js/modules/_typed-array.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/_typed-array.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

if (__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js")) {
  var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js");
  var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
  var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
  var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
  var $typed = __webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js");
  var $buffer = __webpack_require__(/*! ./_typed-buffer */ "./node_modules/core-js/modules/_typed-buffer.js");
  var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
  var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
  var propertyDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
  var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
  var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
  var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
  var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
  var toIndex = __webpack_require__(/*! ./_to-index */ "./node_modules/core-js/modules/_to-index.js");
  var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
  var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
  var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
  var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js");
  var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
  var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
  var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/modules/_is-array-iter.js");
  var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
  var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
  var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f;
  var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/modules/core.get-iterator-method.js");
  var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
  var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js");
  var createArrayMethod = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js");
  var createArrayIncludes = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js");
  var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js");
  var ArrayIterators = __webpack_require__(/*! ./es6.array.iterator */ "./node_modules/core-js/modules/es6.array.iterator.js");
  var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
  var $iterDetect = __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js");
  var setSpecies = __webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js");
  var arrayFill = __webpack_require__(/*! ./_array-fill */ "./node_modules/core-js/modules/_array-fill.js");
  var arrayCopyWithin = __webpack_require__(/*! ./_array-copy-within */ "./node_modules/core-js/modules/_array-copy-within.js");
  var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
  var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
  var dP = $DP.f;
  var gOPD = $GOPD.f;
  var RangeError = global.RangeError;
  var TypeError = global.TypeError;
  var Uint8Array = global.Uint8Array;
  var ARRAY_BUFFER = 'ArrayBuffer';
  var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
  var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  var PROTOTYPE = 'prototype';
  var ArrayProto = Array[PROTOTYPE];
  var $ArrayBuffer = $buffer.ArrayBuffer;
  var $DataView = $buffer.DataView;
  var arrayForEach = createArrayMethod(0);
  var arrayFilter = createArrayMethod(2);
  var arraySome = createArrayMethod(3);
  var arrayEvery = createArrayMethod(4);
  var arrayFind = createArrayMethod(5);
  var arrayFindIndex = createArrayMethod(6);
  var arrayIncludes = createArrayIncludes(true);
  var arrayIndexOf = createArrayIncludes(false);
  var arrayValues = ArrayIterators.values;
  var arrayKeys = ArrayIterators.keys;
  var arrayEntries = ArrayIterators.entries;
  var arrayLastIndexOf = ArrayProto.lastIndexOf;
  var arrayReduce = ArrayProto.reduce;
  var arrayReduceRight = ArrayProto.reduceRight;
  var arrayJoin = ArrayProto.join;
  var arraySort = ArrayProto.sort;
  var arraySlice = ArrayProto.slice;
  var arrayToString = ArrayProto.toString;
  var arrayToLocaleString = ArrayProto.toLocaleString;
  var ITERATOR = wks('iterator');
  var TAG = wks('toStringTag');
  var TYPED_CONSTRUCTOR = uid('typed_constructor');
  var DEF_CONSTRUCTOR = uid('def_constructor');
  var ALL_CONSTRUCTORS = $typed.CONSTR;
  var TYPED_ARRAY = $typed.TYPED;
  var VIEW = $typed.VIEW;
  var WRONG_LENGTH = 'Wrong length!';

  var $map = createArrayMethod(1, function (O, length) {
    return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
  });

  var LITTLE_ENDIAN = fails(function () {
    // eslint-disable-next-line no-undef
    return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
  });

  var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
    new Uint8Array(1).set({});
  });

  var toOffset = function (it, BYTES) {
    var offset = toInteger(it);
    if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
    return offset;
  };

  var validate = function (it) {
    if (isObject(it) && TYPED_ARRAY in it) return it;
    throw TypeError(it + ' is not a typed array!');
  };

  var allocate = function (C, length) {
    if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
      throw TypeError('It is not a typed array constructor!');
    } return new C(length);
  };

  var speciesFromList = function (O, list) {
    return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
  };

  var fromList = function (C, list) {
    var index = 0;
    var length = list.length;
    var result = allocate(C, length);
    while (length > index) result[index] = list[index++];
    return result;
  };

  var addGetter = function (it, key, internal) {
    dP(it, key, { get: function () { return this._d[internal]; } });
  };

  var $from = function from(source /* , mapfn, thisArg */) {
    var O = toObject(source);
    var aLen = arguments.length;
    var mapfn = aLen > 1 ? arguments[1] : undefined;
    var mapping = mapfn !== undefined;
    var iterFn = getIterFn(O);
    var i, length, values, result, step, iterator;
    if (iterFn != undefined && !isArrayIter(iterFn)) {
      for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
        values.push(step.value);
      } O = values;
    }
    if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
    for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
      result[i] = mapping ? mapfn(O[i], i) : O[i];
    }
    return result;
  };

  var $of = function of(/* ...items */) {
    var index = 0;
    var length = arguments.length;
    var result = allocate(this, length);
    while (length > index) result[index] = arguments[index++];
    return result;
  };

  // iOS Safari 6.x fails here
  var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });

  var $toLocaleString = function toLocaleString() {
    return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
  };

  var proto = {
    copyWithin: function copyWithin(target, start /* , end */) {
      return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
    },
    every: function every(callbackfn /* , thisArg */) {
      return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
      return arrayFill.apply(validate(this), arguments);
    },
    filter: function filter(callbackfn /* , thisArg */) {
      return speciesFromList(this, arrayFilter(validate(this), callbackfn,
        arguments.length > 1 ? arguments[1] : undefined));
    },
    find: function find(predicate /* , thisArg */) {
      return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
    },
    findIndex: function findIndex(predicate /* , thisArg */) {
      return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
    },
    forEach: function forEach(callbackfn /* , thisArg */) {
      arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    indexOf: function indexOf(searchElement /* , fromIndex */) {
      return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
    },
    includes: function includes(searchElement /* , fromIndex */) {
      return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
    },
    join: function join(separator) { // eslint-disable-line no-unused-vars
      return arrayJoin.apply(validate(this), arguments);
    },
    lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
      return arrayLastIndexOf.apply(validate(this), arguments);
    },
    map: function map(mapfn /* , thisArg */) {
      return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
      return arrayReduce.apply(validate(this), arguments);
    },
    reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
      return arrayReduceRight.apply(validate(this), arguments);
    },
    reverse: function reverse() {
      var that = this;
      var length = validate(that).length;
      var middle = Math.floor(length / 2);
      var index = 0;
      var value;
      while (index < middle) {
        value = that[index];
        that[index++] = that[--length];
        that[length] = value;
      } return that;
    },
    some: function some(callbackfn /* , thisArg */) {
      return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    sort: function sort(comparefn) {
      return arraySort.call(validate(this), comparefn);
    },
    subarray: function subarray(begin, end) {
      var O = validate(this);
      var length = O.length;
      var $begin = toAbsoluteIndex(begin, length);
      return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
        O.buffer,
        O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
        toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
      );
    }
  };

  var $slice = function slice(start, end) {
    return speciesFromList(this, arraySlice.call(validate(this), start, end));
  };

  var $set = function set(arrayLike /* , offset */) {
    validate(this);
    var offset = toOffset(arguments[1], 1);
    var length = this.length;
    var src = toObject(arrayLike);
    var len = toLength(src.length);
    var index = 0;
    if (len + offset > length) throw RangeError(WRONG_LENGTH);
    while (index < len) this[offset + index] = src[index++];
  };

  var $iterators = {
    entries: function entries() {
      return arrayEntries.call(validate(this));
    },
    keys: function keys() {
      return arrayKeys.call(validate(this));
    },
    values: function values() {
      return arrayValues.call(validate(this));
    }
  };

  var isTAIndex = function (target, key) {
    return isObject(target)
      && target[TYPED_ARRAY]
      && typeof key != 'symbol'
      && key in target
      && String(+key) == String(key);
  };
  var $getDesc = function getOwnPropertyDescriptor(target, key) {
    return isTAIndex(target, key = toPrimitive(key, true))
      ? propertyDesc(2, target[key])
      : gOPD(target, key);
  };
  var $setDesc = function defineProperty(target, key, desc) {
    if (isTAIndex(target, key = toPrimitive(key, true))
      && isObject(desc)
      && has(desc, 'value')
      && !has(desc, 'get')
      && !has(desc, 'set')
      // TODO: add validation descriptor w/o calling accessors
      && !desc.configurable
      && (!has(desc, 'writable') || desc.writable)
      && (!has(desc, 'enumerable') || desc.enumerable)
    ) {
      target[key] = desc.value;
      return target;
    } return dP(target, key, desc);
  };

  if (!ALL_CONSTRUCTORS) {
    $GOPD.f = $getDesc;
    $DP.f = $setDesc;
  }

  $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
    getOwnPropertyDescriptor: $getDesc,
    defineProperty: $setDesc
  });

  if (fails(function () { arrayToString.call({}); })) {
    arrayToString = arrayToLocaleString = function toString() {
      return arrayJoin.call(this);
    };
  }

  var $TypedArrayPrototype$ = redefineAll({}, proto);
  redefineAll($TypedArrayPrototype$, $iterators);
  hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
  redefineAll($TypedArrayPrototype$, {
    slice: $slice,
    set: $set,
    constructor: function () { /* noop */ },
    toString: arrayToString,
    toLocaleString: $toLocaleString
  });
  addGetter($TypedArrayPrototype$, 'buffer', 'b');
  addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
  addGetter($TypedArrayPrototype$, 'byteLength', 'l');
  addGetter($TypedArrayPrototype$, 'length', 'e');
  dP($TypedArrayPrototype$, TAG, {
    get: function () { return this[TYPED_ARRAY]; }
  });

  // eslint-disable-next-line max-statements
  module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
    CLAMPED = !!CLAMPED;
    var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
    var GETTER = 'get' + KEY;
    var SETTER = 'set' + KEY;
    var TypedArray = global[NAME];
    var Base = TypedArray || {};
    var TAC = TypedArray && getPrototypeOf(TypedArray);
    var FORCED = !TypedArray || !$typed.ABV;
    var O = {};
    var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
    var getter = function (that, index) {
      var data = that._d;
      return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
    };
    var setter = function (that, index, value) {
      var data = that._d;
      if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
      data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
    };
    var addElement = function (that, index) {
      dP(that, index, {
        get: function () {
          return getter(this, index);
        },
        set: function (value) {
          return setter(this, index, value);
        },
        enumerable: true
      });
    };
    if (FORCED) {
      TypedArray = wrapper(function (that, data, $offset, $length) {
        anInstance(that, TypedArray, NAME, '_d');
        var index = 0;
        var offset = 0;
        var buffer, byteLength, length, klass;
        if (!isObject(data)) {
          length = toIndex(data);
          byteLength = length * BYTES;
          buffer = new $ArrayBuffer(byteLength);
        } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
          buffer = data;
          offset = toOffset($offset, BYTES);
          var $len = data.byteLength;
          if ($length === undefined) {
            if ($len % BYTES) throw RangeError(WRONG_LENGTH);
            byteLength = $len - offset;
            if (byteLength < 0) throw RangeError(WRONG_LENGTH);
          } else {
            byteLength = toLength($length) * BYTES;
            if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
          }
          length = byteLength / BYTES;
        } else if (TYPED_ARRAY in data) {
          return fromList(TypedArray, data);
        } else {
          return $from.call(TypedArray, data);
        }
        hide(that, '_d', {
          b: buffer,
          o: offset,
          l: byteLength,
          e: length,
          v: new $DataView(buffer)
        });
        while (index < length) addElement(that, index++);
      });
      TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
      hide(TypedArrayPrototype, 'constructor', TypedArray);
    } else if (!fails(function () {
      TypedArray(1);
    }) || !fails(function () {
      new TypedArray(-1); // eslint-disable-line no-new
    }) || !$iterDetect(function (iter) {
      new TypedArray(); // eslint-disable-line no-new
      new TypedArray(null); // eslint-disable-line no-new
      new TypedArray(1.5); // eslint-disable-line no-new
      new TypedArray(iter); // eslint-disable-line no-new
    }, true)) {
      TypedArray = wrapper(function (that, data, $offset, $length) {
        anInstance(that, TypedArray, NAME);
        var klass;
        // `ws` module bug, temporarily remove validation length for Uint8Array
        // https://github.com/websockets/ws/pull/645
        if (!isObject(data)) return new Base(toIndex(data));
        if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
          return $length !== undefined
            ? new Base(data, toOffset($offset, BYTES), $length)
            : $offset !== undefined
              ? new Base(data, toOffset($offset, BYTES))
              : new Base(data);
        }
        if (TYPED_ARRAY in data) return fromList(TypedArray, data);
        return $from.call(TypedArray, data);
      });
      arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
        if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
      });
      TypedArray[PROTOTYPE] = TypedArrayPrototype;
      if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
    }
    var $nativeIterator = TypedArrayPrototype[ITERATOR];
    var CORRECT_ITER_NAME = !!$nativeIterator
      && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
    var $iterator = $iterators.values;
    hide(TypedArray, TYPED_CONSTRUCTOR, true);
    hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
    hide(TypedArrayPrototype, VIEW, true);
    hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);

    if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
      dP(TypedArrayPrototype, TAG, {
        get: function () { return NAME; }
      });
    }

    O[NAME] = TypedArray;

    $export($export.G + $export.W + $export.F * (TypedArray != Base), O);

    $export($export.S, NAME, {
      BYTES_PER_ELEMENT: BYTES
    });

    $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
      from: $from,
      of: $of
    });

    if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);

    $export($export.P, NAME, proto);

    setSpecies(NAME);

    $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });

    $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);

    if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;

    $export($export.P + $export.F * fails(function () {
      new TypedArray(1).slice();
    }), NAME, { slice: $slice });

    $export($export.P + $export.F * (fails(function () {
      return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
    }) || !fails(function () {
      TypedArrayPrototype.toLocaleString.call([1, 2]);
    })), NAME, { toLocaleString: $toLocaleString });

    Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
    if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
  };
} else module.exports = function () { /* empty */ };


/***/ }),

/***/ "./node_modules/core-js/modules/_typed-buffer.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/_typed-buffer.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js");
var $typed = __webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var toIndex = __webpack_require__(/*! ./_to-index */ "./node_modules/core-js/modules/_to-index.js");
var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f;
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
var arrayFill = __webpack_require__(/*! ./_array-fill */ "./node_modules/core-js/modules/_array-fill.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
var ARRAY_BUFFER = 'ArrayBuffer';
var DATA_VIEW = 'DataView';
var PROTOTYPE = 'prototype';
var WRONG_LENGTH = 'Wrong length!';
var WRONG_INDEX = 'Wrong index!';
var $ArrayBuffer = global[ARRAY_BUFFER];
var $DataView = global[DATA_VIEW];
var Math = global.Math;
var RangeError = global.RangeError;
// eslint-disable-next-line no-shadow-restricted-names
var Infinity = global.Infinity;
var BaseBuffer = $ArrayBuffer;
var abs = Math.abs;
var pow = Math.pow;
var floor = Math.floor;
var log = Math.log;
var LN2 = Math.LN2;
var BUFFER = 'buffer';
var BYTE_LENGTH = 'byteLength';
var BYTE_OFFSET = 'byteOffset';
var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;

// IEEE754 conversions based on https://github.com/feross/ieee754
function packIEEE754(value, mLen, nBytes) {
  var buffer = new Array(nBytes);
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
  var i = 0;
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  var e, m, c;
  value = abs(value);
  // eslint-disable-next-line no-self-compare
  if (value != value || value === Infinity) {
    // eslint-disable-next-line no-self-compare
    m = value != value ? 1 : 0;
    e = eMax;
  } else {
    e = floor(log(value) / LN2);
    if (value * (c = pow(2, -e)) < 1) {
      e--;
      c *= 2;
    }
    if (e + eBias >= 1) {
      value += rt / c;
    } else {
      value += rt * pow(2, 1 - eBias);
    }
    if (value * c >= 2) {
      e++;
      c /= 2;
    }
    if (e + eBias >= eMax) {
      m = 0;
      e = eMax;
    } else if (e + eBias >= 1) {
      m = (value * c - 1) * pow(2, mLen);
      e = e + eBias;
    } else {
      m = value * pow(2, eBias - 1) * pow(2, mLen);
      e = 0;
    }
  }
  for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
  e = e << mLen | m;
  eLen += mLen;
  for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
  buffer[--i] |= s * 128;
  return buffer;
}
function unpackIEEE754(buffer, mLen, nBytes) {
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var nBits = eLen - 7;
  var i = nBytes - 1;
  var s = buffer[i--];
  var e = s & 127;
  var m;
  s >>= 7;
  for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
  m = e & (1 << -nBits) - 1;
  e >>= -nBits;
  nBits += mLen;
  for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
  if (e === 0) {
    e = 1 - eBias;
  } else if (e === eMax) {
    return m ? NaN : s ? -Infinity : Infinity;
  } else {
    m = m + pow(2, mLen);
    e = e - eBias;
  } return (s ? -1 : 1) * m * pow(2, e - mLen);
}

function unpackI32(bytes) {
  return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
}
function packI8(it) {
  return [it & 0xff];
}
function packI16(it) {
  return [it & 0xff, it >> 8 & 0xff];
}
function packI32(it) {
  return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
}
function packF64(it) {
  return packIEEE754(it, 52, 8);
}
function packF32(it) {
  return packIEEE754(it, 23, 4);
}

function addGetter(C, key, internal) {
  dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
}

function get(view, bytes, index, isLittleEndian) {
  var numIndex = +index;
  var intIndex = toIndex(numIndex);
  if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  var store = view[$BUFFER]._b;
  var start = intIndex + view[$OFFSET];
  var pack = store.slice(start, start + bytes);
  return isLittleEndian ? pack : pack.reverse();
}
function set(view, bytes, index, conversion, value, isLittleEndian) {
  var numIndex = +index;
  var intIndex = toIndex(numIndex);
  if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  var store = view[$BUFFER]._b;
  var start = intIndex + view[$OFFSET];
  var pack = conversion(+value);
  for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
}

if (!$typed.ABV) {
  $ArrayBuffer = function ArrayBuffer(length) {
    anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
    var byteLength = toIndex(length);
    this._b = arrayFill.call(new Array(byteLength), 0);
    this[$LENGTH] = byteLength;
  };

  $DataView = function DataView(buffer, byteOffset, byteLength) {
    anInstance(this, $DataView, DATA_VIEW);
    anInstance(buffer, $ArrayBuffer, DATA_VIEW);
    var bufferLength = buffer[$LENGTH];
    var offset = toInteger(byteOffset);
    if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
    byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
    if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
    this[$BUFFER] = buffer;
    this[$OFFSET] = offset;
    this[$LENGTH] = byteLength;
  };

  if (DESCRIPTORS) {
    addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
    addGetter($DataView, BUFFER, '_b');
    addGetter($DataView, BYTE_LENGTH, '_l');
    addGetter($DataView, BYTE_OFFSET, '_o');
  }

  redefineAll($DataView[PROTOTYPE], {
    getInt8: function getInt8(byteOffset) {
      return get(this, 1, byteOffset)[0] << 24 >> 24;
    },
    getUint8: function getUint8(byteOffset) {
      return get(this, 1, byteOffset)[0];
    },
    getInt16: function getInt16(byteOffset /* , littleEndian */) {
      var bytes = get(this, 2, byteOffset, arguments[1]);
      return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
    },
    getUint16: function getUint16(byteOffset /* , littleEndian */) {
      var bytes = get(this, 2, byteOffset, arguments[1]);
      return bytes[1] << 8 | bytes[0];
    },
    getInt32: function getInt32(byteOffset /* , littleEndian */) {
      return unpackI32(get(this, 4, byteOffset, arguments[1]));
    },
    getUint32: function getUint32(byteOffset /* , littleEndian */) {
      return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
    },
    getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
      return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
    },
    getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
      return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
    },
    setInt8: function setInt8(byteOffset, value) {
      set(this, 1, byteOffset, packI8, value);
    },
    setUint8: function setUint8(byteOffset, value) {
      set(this, 1, byteOffset, packI8, value);
    },
    setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
      set(this, 2, byteOffset, packI16, value, arguments[2]);
    },
    setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
      set(this, 2, byteOffset, packI16, value, arguments[2]);
    },
    setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packI32, value, arguments[2]);
    },
    setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packI32, value, arguments[2]);
    },
    setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packF32, value, arguments[2]);
    },
    setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
      set(this, 8, byteOffset, packF64, value, arguments[2]);
    }
  });
} else {
  if (!fails(function () {
    $ArrayBuffer(1);
  }) || !fails(function () {
    new $ArrayBuffer(-1); // eslint-disable-line no-new
  }) || fails(function () {
    new $ArrayBuffer(); // eslint-disable-line no-new
    new $ArrayBuffer(1.5); // eslint-disable-line no-new
    new $ArrayBuffer(NaN); // eslint-disable-line no-new
    return $ArrayBuffer.name != ARRAY_BUFFER;
  })) {
    $ArrayBuffer = function ArrayBuffer(length) {
      anInstance(this, $ArrayBuffer);
      return new BaseBuffer(toIndex(length));
    };
    var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
    for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
      if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
    }
    if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
  }
  // iOS Safari 7.x bug
  var view = new $DataView(new $ArrayBuffer(2));
  var $setInt8 = $DataView[PROTOTYPE].setInt8;
  view.setInt8(0, 2147483648);
  view.setInt8(1, 2147483649);
  if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
    setInt8: function setInt8(byteOffset, value) {
      $setInt8.call(this, byteOffset, value << 24 >> 24);
    },
    setUint8: function setUint8(byteOffset, value) {
      $setInt8.call(this, byteOffset, value << 24 >> 24);
    }
  }, true);
}
setToStringTag($ArrayBuffer, ARRAY_BUFFER);
setToStringTag($DataView, DATA_VIEW);
hide($DataView[PROTOTYPE], $typed.VIEW, true);
exports[ARRAY_BUFFER] = $ArrayBuffer;
exports[DATA_VIEW] = $DataView;


/***/ }),

/***/ "./node_modules/core-js/modules/_typed.js":
/*!************************************************!*\
  !*** ./node_modules/core-js/modules/_typed.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
var TYPED = uid('typed_array');
var VIEW = uid('view');
var ABV = !!(global.ArrayBuffer && global.DataView);
var CONSTR = ABV;
var i = 0;
var l = 9;
var Typed;

var TypedArrayConstructors = (
  'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
).split(',');

while (i < l) {
  if (Typed = global[TypedArrayConstructors[i++]]) {
    hide(Typed.prototype, TYPED, true);
    hide(Typed.prototype, VIEW, true);
  } else CONSTR = false;
}

module.exports = {
  ABV: ABV,
  CONSTR: CONSTR,
  TYPED: TYPED,
  VIEW: VIEW
};


/***/ }),

/***/ "./node_modules/core-js/modules/_uid.js":
/*!**********************************************!*\
  !*** ./node_modules/core-js/modules/_uid.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

var id = 0;
var px = Math.random();
module.exports = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};


/***/ }),

/***/ "./node_modules/core-js/modules/_user-agent.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_user-agent.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var navigator = global.navigator;

module.exports = navigator && navigator.userAgent || '';


/***/ }),

/***/ "./node_modules/core-js/modules/_validate-collection.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/_validate-collection.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
module.exports = function (it, TYPE) {
  if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  return it;
};


/***/ }),

/***/ "./node_modules/core-js/modules/_wks-define.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/_wks-define.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js");
var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/modules/_wks-ext.js");
var defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
module.exports = function (name) {
  var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};


/***/ }),

/***/ "./node_modules/core-js/modules/_wks-ext.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/modules/_wks-ext.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports.f = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js");


/***/ }),

/***/ "./node_modules/core-js/modules/_wks.js":
/*!**********************************************!*\
  !*** ./node_modules/core-js/modules/_wks.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('wks');
var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Symbol;
var USE_SYMBOL = typeof Symbol == 'function';

var $exports = module.exports = function (name) {
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};

$exports.store = store;


/***/ }),

/***/ "./node_modules/core-js/modules/core.get-iterator-method.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/core.get-iterator-method.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js");
var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator');
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js").getIteratorMethod = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};


/***/ }),

/***/ "./node_modules/core-js/modules/core.regexp.escape.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/core.regexp.escape.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/benjamingr/RexExp.escape
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $re = __webpack_require__(/*! ./_replacer */ "./node_modules/core-js/modules/_replacer.js")(/[\\^$*+?.()|[\]{}]/g, '\\$&');

$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.copy-within.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.copy-within.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.P, 'Array', { copyWithin: __webpack_require__(/*! ./_array-copy-within */ "./node_modules/core-js/modules/_array-copy-within.js") });

__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('copyWithin');


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.every.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.every.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $every = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(4);

$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].every, true), 'Array', {
  // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
  every: function every(callbackfn /* , thisArg */) {
    return $every(this, callbackfn, arguments[1]);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.fill.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.fill.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.P, 'Array', { fill: __webpack_require__(/*! ./_array-fill */ "./node_modules/core-js/modules/_array-fill.js") });

__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('fill');


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.filter.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.filter.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $filter = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(2);

$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].filter, true), 'Array', {
  // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
  filter: function filter(callbackfn /* , thisArg */) {
    return $filter(this, callbackfn, arguments[1]);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.find-index.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.find-index.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $find = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(6);
var KEY = 'findIndex';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
  findIndex: function findIndex(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});
__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")(KEY);


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.find.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.find.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $find = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(5);
var KEY = 'find';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
  find: function find(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});
__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")(KEY);


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.for-each.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.for-each.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $forEach = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(0);
var STRICT = __webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].forEach, true);

$export($export.P + $export.F * !STRICT, 'Array', {
  // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
  forEach: function forEach(callbackfn /* , thisArg */) {
    return $forEach(this, callbackfn, arguments[1]);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.from.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.from.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/modules/_iter-call.js");
var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/modules/_is-array-iter.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/modules/_create-property.js");
var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/modules/core.get-iterator-method.js");

$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', {
  // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
    var O = toObject(arrayLike);
    var C = typeof this == 'function' ? this : Array;
    var aLen = arguments.length;
    var mapfn = aLen > 1 ? arguments[1] : undefined;
    var mapping = mapfn !== undefined;
    var index = 0;
    var iterFn = getIterFn(O);
    var length, result, step, iterator;
    if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
    // if object isn't iterable or it's array with default iterator - use simple case
    if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
      for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
        createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
      }
    } else {
      length = toLength(O.length);
      for (result = new C(length); length > index; index++) {
        createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
      }
    }
    result.length = index;
    return result;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.index-of.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.index-of.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $indexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(false);
var $native = [].indexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;

$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")($native)), 'Array', {
  // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
    return NEGATIVE_ZERO
      // convert -0 to +0
      ? $native.apply(this, arguments) || 0
      : $indexOf(this, searchElement, arguments[1]);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.is-array.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.is-array.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Array', { isArray: __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.iterator.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.iterator.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js");
var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/modules/_iter-step.js");
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");

// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) {
  this._t = toIObject(iterated); // target
  this._i = 0;                   // next index
  this._k = kind;                // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var kind = this._k;
  var index = this._i++;
  if (!O || index >= O.length) {
    this._t = undefined;
    return step(1);
  }
  if (kind == 'keys') return step(0, index);
  if (kind == 'values') return step(0, O[index]);
  return step(0, [index, O[index]]);
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;

addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.join.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.join.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 22.1.3.13 Array.prototype.join(separator)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var arrayJoin = [].join;

// fallback for not array-like strings
$export($export.P + $export.F * (__webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js") != Object || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")(arrayJoin)), 'Array', {
  join: function join(separator) {
    return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.last-index-of.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.last-index-of.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var $native = [].lastIndexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;

$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")($native)), 'Array', {
  // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
  lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
    // convert -0 to +0
    if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
    var O = toIObject(this);
    var length = toLength(O.length);
    var index = length - 1;
    if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
    if (index < 0) index = length + index;
    for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
    return -1;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.map.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.map.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $map = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(1);

$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].map, true), 'Array', {
  // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
  map: function map(callbackfn /* , thisArg */) {
    return $map(this, callbackfn, arguments[1]);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.of.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.of.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/modules/_create-property.js");

// WebKit Array.of isn't generic
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  function F() { /* empty */ }
  return !(Array.of.call(F) instanceof F);
}), 'Array', {
  // 22.1.2.3 Array.of( ...items)
  of: function of(/* ...args */) {
    var index = 0;
    var aLen = arguments.length;
    var result = new (typeof this == 'function' ? this : Array)(aLen);
    while (aLen > index) createProperty(result, index, arguments[index++]);
    result.length = aLen;
    return result;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.reduce-right.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.reduce-right.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $reduce = __webpack_require__(/*! ./_array-reduce */ "./node_modules/core-js/modules/_array-reduce.js");

$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].reduceRight, true), 'Array', {
  // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
  reduceRight: function reduceRight(callbackfn /* , initialValue */) {
    return $reduce(this, callbackfn, arguments.length, arguments[1], true);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.reduce.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.reduce.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $reduce = __webpack_require__(/*! ./_array-reduce */ "./node_modules/core-js/modules/_array-reduce.js");

$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].reduce, true), 'Array', {
  // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
  reduce: function reduce(callbackfn /* , initialValue */) {
    return $reduce(this, callbackfn, arguments.length, arguments[1], false);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.slice.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.slice.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var html = __webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js");
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var arraySlice = [].slice;

// fallback for not array-like ES3 strings and DOM objects
$export($export.P + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  if (html) arraySlice.call(html);
}), 'Array', {
  slice: function slice(begin, end) {
    var len = toLength(this.length);
    var klass = cof(this);
    end = end === undefined ? len : end;
    if (klass == 'Array') return arraySlice.call(this, begin, end);
    var start = toAbsoluteIndex(begin, len);
    var upTo = toAbsoluteIndex(end, len);
    var size = toLength(upTo - start);
    var cloned = new Array(size);
    var i = 0;
    for (; i < size; i++) cloned[i] = klass == 'String'
      ? this.charAt(start + i)
      : this[start + i];
    return cloned;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.some.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.some.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $some = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(3);

$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].some, true), 'Array', {
  // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
  some: function some(callbackfn /* , thisArg */) {
    return $some(this, callbackfn, arguments[1]);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.sort.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.sort.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var $sort = [].sort;
var test = [1, 2, 3];

$export($export.P + $export.F * (fails(function () {
  // IE8-
  test.sort(undefined);
}) || !fails(function () {
  // V8 bug
  test.sort(null);
  // Old WebKit
}) || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")($sort)), 'Array', {
  // 22.1.3.25 Array.prototype.sort(comparefn)
  sort: function sort(comparefn) {
    return comparefn === undefined
      ? $sort.call(toObject(this))
      : $sort.call(toObject(this), aFunction(comparefn));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.array.species.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.array.species.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")('Array');


/***/ }),

/***/ "./node_modules/core-js/modules/es6.date.now.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.date.now.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.3.3.1 / 15.9.4.4 Date.now()
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.date.to-iso-string.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.date.to-iso-string.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toISOString = __webpack_require__(/*! ./_date-to-iso-string */ "./node_modules/core-js/modules/_date-to-iso-string.js");

// PhantomJS / old WebKit has a broken implementations
$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
  toISOString: toISOString
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.date.to-json.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.date.to-json.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");

$export($export.P + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  return new Date(NaN).toJSON() !== null
    || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
}), 'Date', {
  // eslint-disable-next-line no-unused-vars
  toJSON: function toJSON(key) {
    var O = toObject(this);
    var pv = toPrimitive(O);
    return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.date.to-primitive.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.date.to-primitive.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var TO_PRIMITIVE = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toPrimitive');
var proto = Date.prototype;

if (!(TO_PRIMITIVE in proto)) __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")(proto, TO_PRIMITIVE, __webpack_require__(/*! ./_date-to-primitive */ "./node_modules/core-js/modules/_date-to-primitive.js"));


/***/ }),

/***/ "./node_modules/core-js/modules/es6.date.to-string.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.date.to-string.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DateProto = Date.prototype;
var INVALID_DATE = 'Invalid Date';
var TO_STRING = 'toString';
var $toString = DateProto[TO_STRING];
var getTime = DateProto.getTime;
if (new Date(NaN) + '' != INVALID_DATE) {
  __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(DateProto, TO_STRING, function toString() {
    var value = getTime.call(this);
    // eslint-disable-next-line no-self-compare
    return value === value ? $toString.call(this) : INVALID_DATE;
  });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es6.function.bind.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.function.bind.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.P, 'Function', { bind: __webpack_require__(/*! ./_bind */ "./node_modules/core-js/modules/_bind.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.function.has-instance.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.function.has-instance.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var HAS_INSTANCE = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('hasInstance');
var FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f(FunctionProto, HAS_INSTANCE, { value: function (O) {
  if (typeof this != 'function' || !isObject(O)) return false;
  if (!isObject(this.prototype)) return O instanceof this;
  // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
  while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
  return false;
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.function.name.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.function.name.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';

// 19.2.4.2 name
NAME in FProto || __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && dP(FProto, NAME, {
  configurable: true,
  get: function () {
    try {
      return ('' + this).match(nameRE)[1];
    } catch (e) {
      return '';
    }
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.map.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/modules/es6.map.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var strong = __webpack_require__(/*! ./_collection-strong */ "./node_modules/core-js/modules/_collection-strong.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
var MAP = 'Map';

// 23.1 Map Objects
module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(MAP, function (get) {
  return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
  // 23.1.3.6 Map.prototype.get(key)
  get: function get(key) {
    var entry = strong.getEntry(validate(this, MAP), key);
    return entry && entry.v;
  },
  // 23.1.3.9 Map.prototype.set(key, value)
  set: function set(key, value) {
    return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  }
}, strong, true);


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.acosh.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.acosh.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.3 Math.acosh(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var log1p = __webpack_require__(/*! ./_math-log1p */ "./node_modules/core-js/modules/_math-log1p.js");
var sqrt = Math.sqrt;
var $acosh = Math.acosh;

$export($export.S + $export.F * !($acosh
  // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
  && Math.floor($acosh(Number.MAX_VALUE)) == 710
  // Tor Browser bug: Math.acosh(Infinity) -> NaN
  && $acosh(Infinity) == Infinity
), 'Math', {
  acosh: function acosh(x) {
    return (x = +x) < 1 ? NaN : x > 94906265.62425156
      ? Math.log(x) + Math.LN2
      : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.asinh.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.asinh.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.5 Math.asinh(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $asinh = Math.asinh;

function asinh(x) {
  return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}

// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.atanh.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.atanh.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.7 Math.atanh(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $atanh = Math.atanh;

// Tor Browser bug: Math.atanh(-0) -> 0
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
  atanh: function atanh(x) {
    return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.cbrt.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.cbrt.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.9 Math.cbrt(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var sign = __webpack_require__(/*! ./_math-sign */ "./node_modules/core-js/modules/_math-sign.js");

$export($export.S, 'Math', {
  cbrt: function cbrt(x) {
    return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.clz32.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.clz32.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.11 Math.clz32(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  clz32: function clz32(x) {
    return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.cosh.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.cosh.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.12 Math.cosh(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var exp = Math.exp;

$export($export.S, 'Math', {
  cosh: function cosh(x) {
    return (exp(x = +x) + exp(-x)) / 2;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.expm1.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.expm1.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.14 Math.expm1(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $expm1 = __webpack_require__(/*! ./_math-expm1 */ "./node_modules/core-js/modules/_math-expm1.js");

$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.fround.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.fround.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.16 Math.fround(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', { fround: __webpack_require__(/*! ./_math-fround */ "./node_modules/core-js/modules/_math-fround.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.hypot.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.hypot.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var abs = Math.abs;

$export($export.S, 'Math', {
  hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
    var sum = 0;
    var i = 0;
    var aLen = arguments.length;
    var larg = 0;
    var arg, div;
    while (i < aLen) {
      arg = abs(arguments[i++]);
      if (larg < arg) {
        div = larg / arg;
        sum = sum * div * div + 1;
        larg = arg;
      } else if (arg > 0) {
        div = arg / larg;
        sum += div * div;
      } else sum += arg;
    }
    return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.imul.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.imul.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.18 Math.imul(x, y)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $imul = Math.imul;

// some WebKit versions fails with big numbers, some has wrong arity
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
  imul: function imul(x, y) {
    var UINT16 = 0xffff;
    var xn = +x;
    var yn = +y;
    var xl = UINT16 & xn;
    var yl = UINT16 & yn;
    return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.log10.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.log10.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.21 Math.log10(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  log10: function log10(x) {
    return Math.log(x) * Math.LOG10E;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.log1p.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.log1p.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.20 Math.log1p(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', { log1p: __webpack_require__(/*! ./_math-log1p */ "./node_modules/core-js/modules/_math-log1p.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.log2.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.log2.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.22 Math.log2(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  log2: function log2(x) {
    return Math.log(x) / Math.LN2;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.sign.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.sign.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.28 Math.sign(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', { sign: __webpack_require__(/*! ./_math-sign */ "./node_modules/core-js/modules/_math-sign.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.sinh.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.sinh.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.30 Math.sinh(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var expm1 = __webpack_require__(/*! ./_math-expm1 */ "./node_modules/core-js/modules/_math-expm1.js");
var exp = Math.exp;

// V8 near Chromium 38 has a problem with very small numbers
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
  sinh: function sinh(x) {
    return Math.abs(x = +x) < 1
      ? (expm1(x) - expm1(-x)) / 2
      : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.tanh.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.tanh.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.33 Math.tanh(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var expm1 = __webpack_require__(/*! ./_math-expm1 */ "./node_modules/core-js/modules/_math-expm1.js");
var exp = Math.exp;

$export($export.S, 'Math', {
  tanh: function tanh(x) {
    var a = expm1(x = +x);
    var b = expm1(-x);
    return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.math.trunc.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.math.trunc.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.2.2.34 Math.trunc(x)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  trunc: function trunc(it) {
    return (it > 0 ? Math.floor : Math.ceil)(it);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.constructor.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.constructor.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");
var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "./node_modules/core-js/modules/_inherit-if-required.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f;
var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f;
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
var $trim = __webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js").trim;
var NUMBER = 'Number';
var $Number = global[NUMBER];
var Base = $Number;
var proto = $Number.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_COF = cof(__webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js")(proto)) == NUMBER;
var TRIM = 'trim' in String.prototype;

// 7.1.3 ToNumber(argument)
var toNumber = function (argument) {
  var it = toPrimitive(argument, false);
  if (typeof it == 'string' && it.length > 2) {
    it = TRIM ? it.trim() : $trim(it, 3);
    var first = it.charCodeAt(0);
    var third, radix, maxCode;
    if (first === 43 || first === 45) {
      third = it.charCodeAt(2);
      if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
    } else if (first === 48) {
      switch (it.charCodeAt(1)) {
        case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
        case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
        default: return +it;
      }
      for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
        code = digits.charCodeAt(i);
        // parseInt parses a string to a first unavailable symbol
        // but ToNumber should return NaN if a string contains unavailable symbols
        if (code < 48 || code > maxCode) return NaN;
      } return parseInt(digits, radix);
    }
  } return +it;
};

if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
  $Number = function Number(value) {
    var it = arguments.length < 1 ? 0 : value;
    var that = this;
    return that instanceof $Number
      // check on 1..constructor(foo) case
      && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
        ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
  };
  for (var keys = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? gOPN(Base) : (
    // ES3:
    'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
    // ES6 (in case, if modules with ES6 Number statics required before):
    'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
    'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  ).split(','), j = 0, key; keys.length > j; j++) {
    if (has(Base, key = keys[j]) && !has($Number, key)) {
      dP($Number, key, gOPD(Base, key));
    }
  }
  $Number.prototype = proto;
  proto.constructor = $Number;
  __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(global, NUMBER, $Number);
}


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.epsilon.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.epsilon.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.1 Number.EPSILON
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.is-finite.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.is-finite.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.2 Number.isFinite(number)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var _isFinite = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").isFinite;

$export($export.S, 'Number', {
  isFinite: function isFinite(it) {
    return typeof it == 'number' && _isFinite(it);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.is-integer.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.is-integer.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.3 Number.isInteger(number)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Number', { isInteger: __webpack_require__(/*! ./_is-integer */ "./node_modules/core-js/modules/_is-integer.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.is-nan.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.is-nan.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.4 Number.isNaN(number)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Number', {
  isNaN: function isNaN(number) {
    // eslint-disable-next-line no-self-compare
    return number != number;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.is-safe-integer.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.is-safe-integer.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.5 Number.isSafeInteger(number)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var isInteger = __webpack_require__(/*! ./_is-integer */ "./node_modules/core-js/modules/_is-integer.js");
var abs = Math.abs;

$export($export.S, 'Number', {
  isSafeInteger: function isSafeInteger(number) {
    return isInteger(number) && abs(number) <= 0x1fffffffffffff;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.max-safe-integer.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.max-safe-integer.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.min-safe-integer.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.min-safe-integer.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.parse-float.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.parse-float.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $parseFloat = __webpack_require__(/*! ./_parse-float */ "./node_modules/core-js/modules/_parse-float.js");
// 20.1.2.12 Number.parseFloat(string)
$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.parse-int.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.parse-int.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $parseInt = __webpack_require__(/*! ./_parse-int */ "./node_modules/core-js/modules/_parse-int.js");
// 20.1.2.13 Number.parseInt(string, radix)
$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.to-fixed.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.to-fixed.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var aNumberValue = __webpack_require__(/*! ./_a-number-value */ "./node_modules/core-js/modules/_a-number-value.js");
var repeat = __webpack_require__(/*! ./_string-repeat */ "./node_modules/core-js/modules/_string-repeat.js");
var $toFixed = 1.0.toFixed;
var floor = Math.floor;
var data = [0, 0, 0, 0, 0, 0];
var ERROR = 'Number.toFixed: incorrect invocation!';
var ZERO = '0';

var multiply = function (n, c) {
  var i = -1;
  var c2 = c;
  while (++i < 6) {
    c2 += n * data[i];
    data[i] = c2 % 1e7;
    c2 = floor(c2 / 1e7);
  }
};
var divide = function (n) {
  var i = 6;
  var c = 0;
  while (--i >= 0) {
    c += data[i];
    data[i] = floor(c / n);
    c = (c % n) * 1e7;
  }
};
var numToString = function () {
  var i = 6;
  var s = '';
  while (--i >= 0) {
    if (s !== '' || i === 0 || data[i] !== 0) {
      var t = String(data[i]);
      s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
    }
  } return s;
};
var pow = function (x, n, acc) {
  return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};
var log = function (x) {
  var n = 0;
  var x2 = x;
  while (x2 >= 4096) {
    n += 12;
    x2 /= 4096;
  }
  while (x2 >= 2) {
    n += 1;
    x2 /= 2;
  } return n;
};

$export($export.P + $export.F * (!!$toFixed && (
  0.00008.toFixed(3) !== '0.000' ||
  0.9.toFixed(0) !== '1' ||
  1.255.toFixed(2) !== '1.25' ||
  1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  // V8 ~ Android 4.3-
  $toFixed.call({});
})), 'Number', {
  toFixed: function toFixed(fractionDigits) {
    var x = aNumberValue(this, ERROR);
    var f = toInteger(fractionDigits);
    var s = '';
    var m = ZERO;
    var e, z, j, k;
    if (f < 0 || f > 20) throw RangeError(ERROR);
    // eslint-disable-next-line no-self-compare
    if (x != x) return 'NaN';
    if (x <= -1e21 || x >= 1e21) return String(x);
    if (x < 0) {
      s = '-';
      x = -x;
    }
    if (x > 1e-21) {
      e = log(x * pow(2, 69, 1)) - 69;
      z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
      z *= 0x10000000000000;
      e = 52 - e;
      if (e > 0) {
        multiply(0, z);
        j = f;
        while (j >= 7) {
          multiply(1e7, 0);
          j -= 7;
        }
        multiply(pow(10, j, 1), 0);
        j = e - 1;
        while (j >= 23) {
          divide(1 << 23);
          j -= 23;
        }
        divide(1 << j);
        multiply(1, 1);
        divide(2);
        m = numToString();
      } else {
        multiply(0, z);
        multiply(1 << -e, 0);
        m = numToString() + repeat.call(ZERO, f);
      }
    }
    if (f > 0) {
      k = m.length;
      m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
    } else {
      m = s + m;
    } return m;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.number.to-precision.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.number.to-precision.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var aNumberValue = __webpack_require__(/*! ./_a-number-value */ "./node_modules/core-js/modules/_a-number-value.js");
var $toPrecision = 1.0.toPrecision;

$export($export.P + $export.F * ($fails(function () {
  // IE7-
  return $toPrecision.call(1, undefined) !== '1';
}) || !$fails(function () {
  // V8 ~ Android 4.3-
  $toPrecision.call({});
})), 'Number', {
  toPrecision: function toPrecision(precision) {
    var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
    return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.assign.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.assign.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/modules/_object-assign.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.create.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.create.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.define-properties.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.define-properties.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"), 'Object', { defineProperties: __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/modules/_object-dps.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.define-property.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.define-property.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.freeze.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.freeze.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.5 Object.freeze(O)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").onFreeze;

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('freeze', function ($freeze) {
  return function freeze(it) {
    return $freeze && isObject(it) ? $freeze(meta(it)) : it;
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js":
/*!********************************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var $getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f;

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('getOwnPropertyDescriptor', function () {
  return function getOwnPropertyDescriptor(it, key) {
    return $getOwnPropertyDescriptor(toIObject(it), key);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.get-own-property-names.js":
/*!***************************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.get-own-property-names.js ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.7 Object.getOwnPropertyNames(O)
__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('getOwnPropertyNames', function () {
  return __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/core-js/modules/_object-gopn-ext.js").f;
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.get-prototype-of.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.get-prototype-of.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('getPrototypeOf', function () {
  return function getPrototypeOf(it) {
    return $getPrototypeOf(toObject(it));
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.is-extensible.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.is-extensible.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.11 Object.isExtensible(O)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('isExtensible', function ($isExtensible) {
  return function isExtensible(it) {
    return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.is-frozen.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.is-frozen.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.12 Object.isFrozen(O)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('isFrozen', function ($isFrozen) {
  return function isFrozen(it) {
    return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.is-sealed.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.is-sealed.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.13 Object.isSealed(O)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('isSealed', function ($isSealed) {
  return function isSealed(it) {
    return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.is.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.is.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.3.10 Object.is(value1, value2)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
$export($export.S, 'Object', { is: __webpack_require__(/*! ./_same-value */ "./node_modules/core-js/modules/_same-value.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.keys.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.keys.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('keys', function () {
  return function keys(it) {
    return $keys(toObject(it));
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.prevent-extensions.js":
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.prevent-extensions.js ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.15 Object.preventExtensions(O)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").onFreeze;

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('preventExtensions', function ($preventExtensions) {
  return function preventExtensions(it) {
    return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.seal.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.seal.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.17 Object.seal(O)
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").onFreeze;

__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('seal', function ($seal) {
  return function seal(it) {
    return $seal && isObject(it) ? $seal(meta(it)) : it;
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.set-prototype-of.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.set-prototype-of.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js").set });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.object.to-string.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.object.to-string.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 19.1.3.6 Object.prototype.toString()
var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js");
var test = {};
test[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag')] = 'z';
if (test + '' != '[object z]') {
  __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(Object.prototype, 'toString', function toString() {
    return '[object ' + classof(this) + ']';
  }, true);
}


/***/ }),

/***/ "./node_modules/core-js/modules/es6.parse-float.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.parse-float.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $parseFloat = __webpack_require__(/*! ./_parse-float */ "./node_modules/core-js/modules/_parse-float.js");
// 18.2.4 parseFloat(string)
$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.parse-int.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.parse-int.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $parseInt = __webpack_require__(/*! ./_parse-int */ "./node_modules/core-js/modules/_parse-int.js");
// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.promise.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/es6.promise.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js");
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js");
var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js");
var task = __webpack_require__(/*! ./_task */ "./node_modules/core-js/modules/_task.js").set;
var microtask = __webpack_require__(/*! ./_microtask */ "./node_modules/core-js/modules/_microtask.js")();
var newPromiseCapabilityModule = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/modules/_new-promise-capability.js");
var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/modules/_perform.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js");
var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/modules/_promise-resolve.js");
var PROMISE = 'Promise';
var TypeError = global.TypeError;
var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8 || '';
var $Promise = global[PROMISE];
var isNode = classof(process) == 'process';
var empty = function () { /* empty */ };
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;

var USE_NATIVE = !!function () {
  try {
    // correct subclassing with @@species support
    var promise = $Promise.resolve(1);
    var FakePromise = (promise.constructor = {})[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species')] = function (exec) {
      exec(empty, empty);
    };
    // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    return (isNode || typeof PromiseRejectionEvent == 'function')
      && promise.then(empty) instanceof FakePromise
      // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
      // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
      // we can't detect it synchronously, so just check versions
      && v8.indexOf('6.6') !== 0
      && userAgent.indexOf('Chrome/66') === -1;
  } catch (e) { /* empty */ }
}();

// helpers
var isThenable = function (it) {
  var then;
  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, isReject) {
  if (promise._n) return;
  promise._n = true;
  var chain = promise._c;
  microtask(function () {
    var value = promise._v;
    var ok = promise._s == 1;
    var i = 0;
    var run = function (reaction) {
      var handler = ok ? reaction.ok : reaction.fail;
      var resolve = reaction.resolve;
      var reject = reaction.reject;
      var domain = reaction.domain;
      var result, then, exited;
      try {
        if (handler) {
          if (!ok) {
            if (promise._h == 2) onHandleUnhandled(promise);
            promise._h = 1;
          }
          if (handler === true) result = value;
          else {
            if (domain) domain.enter();
            result = handler(value); // may throw
            if (domain) {
              domain.exit();
              exited = true;
            }
          }
          if (result === reaction.promise) {
            reject(TypeError('Promise-chain cycle'));
          } else if (then = isThenable(result)) {
            then.call(result, resolve, reject);
          } else resolve(result);
        } else reject(value);
      } catch (e) {
        if (domain && !exited) domain.exit();
        reject(e);
      }
    };
    while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
    promise._c = [];
    promise._n = false;
    if (isReject && !promise._h) onUnhandled(promise);
  });
};
var onUnhandled = function (promise) {
  task.call(global, function () {
    var value = promise._v;
    var unhandled = isUnhandled(promise);
    var result, handler, console;
    if (unhandled) {
      result = perform(function () {
        if (isNode) {
          process.emit('unhandledRejection', value, promise);
        } else if (handler = global.onunhandledrejection) {
          handler({ promise: promise, reason: value });
        } else if ((console = global.console) && console.error) {
          console.error('Unhandled promise rejection', value);
        }
      });
      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
      promise._h = isNode || isUnhandled(promise) ? 2 : 1;
    } promise._a = undefined;
    if (unhandled && result.e) throw result.v;
  });
};
var isUnhandled = function (promise) {
  return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
  task.call(global, function () {
    var handler;
    if (isNode) {
      process.emit('rejectionHandled', promise);
    } else if (handler = global.onrejectionhandled) {
      handler({ promise: promise, reason: promise._v });
    }
  });
};
var $reject = function (value) {
  var promise = this;
  if (promise._d) return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  promise._v = value;
  promise._s = 2;
  if (!promise._a) promise._a = promise._c.slice();
  notify(promise, true);
};
var $resolve = function (value) {
  var promise = this;
  var then;
  if (promise._d) return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  try {
    if (promise === value) throw TypeError("Promise can't be resolved itself");
    if (then = isThenable(value)) {
      microtask(function () {
        var wrapper = { _w: promise, _d: false }; // wrap
        try {
          then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
        } catch (e) {
          $reject.call(wrapper, e);
        }
      });
    } else {
      promise._v = value;
      promise._s = 1;
      notify(promise, false);
    }
  } catch (e) {
    $reject.call({ _w: promise, _d: false }, e); // wrap
  }
};

// constructor polyfill
if (!USE_NATIVE) {
  // 25.4.3.1 Promise(executor)
  $Promise = function Promise(executor) {
    anInstance(this, $Promise, PROMISE, '_h');
    aFunction(executor);
    Internal.call(this);
    try {
      executor(ctx($resolve, this, 1), ctx($reject, this, 1));
    } catch (err) {
      $reject.call(this, err);
    }
  };
  // eslint-disable-next-line no-unused-vars
  Internal = function Promise(executor) {
    this._c = [];             // <- awaiting reactions
    this._a = undefined;      // <- checked in isUnhandled reactions
    this._s = 0;              // <- state
    this._d = false;          // <- done
    this._v = undefined;      // <- value
    this._h = 0;              // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
    this._n = false;          // <- notify
  };
  Internal.prototype = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js")($Promise.prototype, {
    // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
    then: function then(onFulfilled, onRejected) {
      var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
      reaction.fail = typeof onRejected == 'function' && onRejected;
      reaction.domain = isNode ? process.domain : undefined;
      this._c.push(reaction);
      if (this._a) this._a.push(reaction);
      if (this._s) notify(this, false);
      return reaction.promise;
    },
    // 25.4.5.1 Promise.prototype.catch(onRejected)
    'catch': function (onRejected) {
      return this.then(undefined, onRejected);
    }
  });
  OwnPromiseCapability = function () {
    var promise = new Internal();
    this.promise = promise;
    this.resolve = ctx($resolve, promise, 1);
    this.reject = ctx($reject, promise, 1);
  };
  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
    return C === $Promise || C === Wrapper
      ? new OwnPromiseCapability(C)
      : newGenericPromiseCapability(C);
  };
}

$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
__webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js")($Promise, PROMISE);
__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")(PROMISE);
Wrapper = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js")[PROMISE];

// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  // 25.4.4.5 Promise.reject(r)
  reject: function reject(r) {
    var capability = newPromiseCapability(this);
    var $$reject = capability.reject;
    $$reject(r);
    return capability.promise;
  }
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  // 25.4.4.6 Promise.resolve(x)
  resolve: function resolve(x) {
    return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
  }
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js")(function (iter) {
  $Promise.all(iter)['catch'](empty);
})), PROMISE, {
  // 25.4.4.1 Promise.all(iterable)
  all: function all(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var resolve = capability.resolve;
    var reject = capability.reject;
    var result = perform(function () {
      var values = [];
      var index = 0;
      var remaining = 1;
      forOf(iterable, false, function (promise) {
        var $index = index++;
        var alreadyCalled = false;
        values.push(undefined);
        remaining++;
        C.resolve(promise).then(function (value) {
          if (alreadyCalled) return;
          alreadyCalled = true;
          values[$index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if (result.e) reject(result.v);
    return capability.promise;
  },
  // 25.4.4.4 Promise.race(iterable)
  race: function race(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var reject = capability.reject;
    var result = perform(function () {
      forOf(iterable, false, function (promise) {
        C.resolve(promise).then(capability.resolve, reject);
      });
    });
    if (result.e) reject(result.v);
    return capability.promise;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.apply.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.apply.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var rApply = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect || {}).apply;
var fApply = Function.apply;
// MS Edge argumentsList argument is optional
$export($export.S + $export.F * !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  rApply(function () { /* empty */ });
}), 'Reflect', {
  apply: function apply(target, thisArgument, argumentsList) {
    var T = aFunction(target);
    var L = anObject(argumentsList);
    return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.construct.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.construct.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var bind = __webpack_require__(/*! ./_bind */ "./node_modules/core-js/modules/_bind.js");
var rConstruct = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect || {}).construct;

// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
  function F() { /* empty */ }
  return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
  rConstruct(function () { /* empty */ });
});

$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
  construct: function construct(Target, args /* , newTarget */) {
    aFunction(Target);
    anObject(args);
    var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
    if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
    if (Target == newTarget) {
      // w/o altered newTarget, optimization for 0-4 arguments
      switch (args.length) {
        case 0: return new Target();
        case 1: return new Target(args[0]);
        case 2: return new Target(args[0], args[1]);
        case 3: return new Target(args[0], args[1], args[2]);
        case 4: return new Target(args[0], args[1], args[2], args[3]);
      }
      // w/o altered newTarget, lot of arguments case
      var $args = [null];
      $args.push.apply($args, args);
      return new (bind.apply(Target, $args))();
    }
    // with altered newTarget, not support built-in constructors
    var proto = newTarget.prototype;
    var instance = create(isObject(proto) ? proto : Object.prototype);
    var result = Function.apply.call(Target, instance, args);
    return isObject(result) ? result : instance;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.define-property.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.define-property.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");

// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  // eslint-disable-next-line no-undef
  Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
}), 'Reflect', {
  defineProperty: function defineProperty(target, propertyKey, attributes) {
    anObject(target);
    propertyKey = toPrimitive(propertyKey, true);
    anObject(attributes);
    try {
      dP.f(target, propertyKey, attributes);
      return true;
    } catch (e) {
      return false;
    }
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.delete-property.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.delete-property.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f;
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");

$export($export.S, 'Reflect', {
  deleteProperty: function deleteProperty(target, propertyKey) {
    var desc = gOPD(anObject(target), propertyKey);
    return desc && !desc.configurable ? false : delete target[propertyKey];
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.enumerate.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.enumerate.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 26.1.5 Reflect.enumerate(target)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var Enumerate = function (iterated) {
  this._t = anObject(iterated); // target
  this._i = 0;                  // next index
  var keys = this._k = [];      // keys
  var key;
  for (key in iterated) keys.push(key);
};
__webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/modules/_iter-create.js")(Enumerate, 'Object', function () {
  var that = this;
  var keys = that._k;
  var key;
  do {
    if (that._i >= keys.length) return { value: undefined, done: true };
  } while (!((key = keys[that._i++]) in that._t));
  return { value: key, done: false };
});

$export($export.S, 'Reflect', {
  enumerate: function enumerate(target) {
    return new Enumerate(target);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");

$export($export.S, 'Reflect', {
  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
    return gOPD.f(anObject(target), propertyKey);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.get-prototype-of.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.get-prototype-of.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.8 Reflect.getPrototypeOf(target)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var getProto = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");

$export($export.S, 'Reflect', {
  getPrototypeOf: function getPrototypeOf(target) {
    return getProto(anObject(target));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.get.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.get.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");

function get(target, propertyKey /* , receiver */) {
  var receiver = arguments.length < 3 ? target : arguments[2];
  var desc, proto;
  if (anObject(target) === receiver) return target[propertyKey];
  if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
    ? desc.value
    : desc.get !== undefined
      ? desc.get.call(receiver)
      : undefined;
  if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
}

$export($export.S, 'Reflect', { get: get });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.has.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.has.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.9 Reflect.has(target, propertyKey)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Reflect', {
  has: function has(target, propertyKey) {
    return propertyKey in target;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.is-extensible.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.is-extensible.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.10 Reflect.isExtensible(target)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var $isExtensible = Object.isExtensible;

$export($export.S, 'Reflect', {
  isExtensible: function isExtensible(target) {
    anObject(target);
    return $isExtensible ? $isExtensible(target) : true;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.own-keys.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.own-keys.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.11 Reflect.ownKeys(target)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Reflect', { ownKeys: __webpack_require__(/*! ./_own-keys */ "./node_modules/core-js/modules/_own-keys.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.prevent-extensions.js":
/*!************************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.prevent-extensions.js ***!
  \************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.12 Reflect.preventExtensions(target)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var $preventExtensions = Object.preventExtensions;

$export($export.S, 'Reflect', {
  preventExtensions: function preventExtensions(target) {
    anObject(target);
    try {
      if ($preventExtensions) $preventExtensions(target);
      return true;
    } catch (e) {
      return false;
    }
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.set-prototype-of.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.set-prototype-of.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var setProto = __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js");

if (setProto) $export($export.S, 'Reflect', {
  setPrototypeOf: function setPrototypeOf(target, proto) {
    setProto.check(target, proto);
    try {
      setProto.set(target, proto);
      return true;
    } catch (e) {
      return false;
    }
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.reflect.set.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.reflect.set.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");

function set(target, propertyKey, V /* , receiver */) {
  var receiver = arguments.length < 4 ? target : arguments[3];
  var ownDesc = gOPD.f(anObject(target), propertyKey);
  var existingDescriptor, proto;
  if (!ownDesc) {
    if (isObject(proto = getPrototypeOf(target))) {
      return set(proto, propertyKey, V, receiver);
    }
    ownDesc = createDesc(0);
  }
  if (has(ownDesc, 'value')) {
    if (ownDesc.writable === false || !isObject(receiver)) return false;
    if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
      if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
      existingDescriptor.value = V;
      dP.f(receiver, propertyKey, existingDescriptor);
    } else dP.f(receiver, propertyKey, createDesc(0, V));
    return true;
  }
  return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
}

$export($export.S, 'Reflect', { set: set });


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.constructor.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.constructor.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "./node_modules/core-js/modules/_inherit-if-required.js");
var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f;
var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f;
var isRegExp = __webpack_require__(/*! ./_is-regexp */ "./node_modules/core-js/modules/_is-regexp.js");
var $flags = __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js");
var $RegExp = global.RegExp;
var Base = $RegExp;
var proto = $RegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;
// "new" creates a new object, old webkit buggy here
var CORRECT_NEW = new $RegExp(re1) !== re1;

if (__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && (!CORRECT_NEW || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  re2[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('match')] = false;
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
  return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))) {
  $RegExp = function RegExp(p, f) {
    var tiRE = this instanceof $RegExp;
    var piRE = isRegExp(p);
    var fiU = f === undefined;
    return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
      : inheritIfRequired(CORRECT_NEW
        ? new Base(piRE && !fiU ? p.source : p, f)
        : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
      , tiRE ? this : proto, $RegExp);
  };
  var proxy = function (key) {
    key in $RegExp || dP($RegExp, key, {
      configurable: true,
      get: function () { return Base[key]; },
      set: function (it) { Base[key] = it; }
    });
  };
  for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
  proto.constructor = $RegExp;
  $RegExp.prototype = proto;
  __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(global, 'RegExp', $RegExp);
}

__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")('RegExp');


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.exec.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.exec.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var regexpExec = __webpack_require__(/*! ./_regexp-exec */ "./node_modules/core-js/modules/_regexp-exec.js");
__webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js")({
  target: 'RegExp',
  proto: true,
  forced: regexpExec !== /./.exec
}, {
  exec: regexpExec
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.flags.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.flags.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && /./g.flags != 'g') __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f(RegExp.prototype, 'flags', {
  configurable: true,
  get: __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js")
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.match.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.match.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var advanceStringIndex = __webpack_require__(/*! ./_advance-string-index */ "./node_modules/core-js/modules/_advance-string-index.js");
var regExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "./node_modules/core-js/modules/_regexp-exec-abstract.js");

// @@match logic
__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('match', 1, function (defined, MATCH, $match, maybeCallNative) {
  return [
    // `String.prototype.match` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.match
    function match(regexp) {
      var O = defined(this);
      var fn = regexp == undefined ? undefined : regexp[MATCH];
      return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
    },
    // `RegExp.prototype[@@match]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
    function (regexp) {
      var res = maybeCallNative($match, regexp, this);
      if (res.done) return res.value;
      var rx = anObject(regexp);
      var S = String(this);
      if (!rx.global) return regExpExec(rx, S);
      var fullUnicode = rx.unicode;
      rx.lastIndex = 0;
      var A = [];
      var n = 0;
      var result;
      while ((result = regExpExec(rx, S)) !== null) {
        var matchStr = String(result[0]);
        A[n] = matchStr;
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
        n++;
      }
      return n === 0 ? null : A;
    }
  ];
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.replace.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.replace.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var advanceStringIndex = __webpack_require__(/*! ./_advance-string-index */ "./node_modules/core-js/modules/_advance-string-index.js");
var regExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "./node_modules/core-js/modules/_regexp-exec-abstract.js");
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;

var maybeToString = function (it) {
  return it === undefined ? it : String(it);
};

// @@replace logic
__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
  return [
    // `String.prototype.replace` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.replace
    function replace(searchValue, replaceValue) {
      var O = defined(this);
      var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
      return fn !== undefined
        ? fn.call(searchValue, O, replaceValue)
        : $replace.call(String(O), searchValue, replaceValue);
    },
    // `RegExp.prototype[@@replace]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
    function (regexp, replaceValue) {
      var res = maybeCallNative($replace, regexp, this, replaceValue);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);
      var functionalReplace = typeof replaceValue === 'function';
      if (!functionalReplace) replaceValue = String(replaceValue);
      var global = rx.global;
      if (global) {
        var fullUnicode = rx.unicode;
        rx.lastIndex = 0;
      }
      var results = [];
      while (true) {
        var result = regExpExec(rx, S);
        if (result === null) break;
        results.push(result);
        if (!global) break;
        var matchStr = String(result[0]);
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
      }
      var accumulatedResult = '';
      var nextSourcePosition = 0;
      for (var i = 0; i < results.length; i++) {
        result = results[i];
        var matched = String(result[0]);
        var position = max(min(toInteger(result.index), S.length), 0);
        var captures = [];
        // NOTE: This is equivalent to
        //   captures = result.slice(1).map(maybeToString)
        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
        // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
        var namedCaptures = result.groups;
        if (functionalReplace) {
          var replacerArgs = [matched].concat(captures, position, S);
          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
          var replacement = String(replaceValue.apply(undefined, replacerArgs));
        } else {
          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
        }
        if (position >= nextSourcePosition) {
          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
          nextSourcePosition = position + matched.length;
        }
      }
      return accumulatedResult + S.slice(nextSourcePosition);
    }
  ];

    // https://tc39.github.io/ecma262/#sec-getsubstitution
  function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
    var tailPos = position + matched.length;
    var m = captures.length;
    var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
    if (namedCaptures !== undefined) {
      namedCaptures = toObject(namedCaptures);
      symbols = SUBSTITUTION_SYMBOLS;
    }
    return $replace.call(replacement, symbols, function (match, ch) {
      var capture;
      switch (ch.charAt(0)) {
        case '$': return '$';
        case '&': return matched;
        case '`': return str.slice(0, position);
        case "'": return str.slice(tailPos);
        case '<':
          capture = namedCaptures[ch.slice(1, -1)];
          break;
        default: // \d\d?
          var n = +ch;
          if (n === 0) return match;
          if (n > m) {
            var f = floor(n / 10);
            if (f === 0) return match;
            if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
            return match;
          }
          capture = captures[n - 1];
      }
      return capture === undefined ? '' : capture;
    });
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.search.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.search.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var sameValue = __webpack_require__(/*! ./_same-value */ "./node_modules/core-js/modules/_same-value.js");
var regExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "./node_modules/core-js/modules/_regexp-exec-abstract.js");

// @@search logic
__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('search', 1, function (defined, SEARCH, $search, maybeCallNative) {
  return [
    // `String.prototype.search` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.search
    function search(regexp) {
      var O = defined(this);
      var fn = regexp == undefined ? undefined : regexp[SEARCH];
      return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
    },
    // `RegExp.prototype[@@search]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
    function (regexp) {
      var res = maybeCallNative($search, regexp, this);
      if (res.done) return res.value;
      var rx = anObject(regexp);
      var S = String(this);
      var previousLastIndex = rx.lastIndex;
      if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
      var result = regExpExec(rx, S);
      if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
      return result === null ? -1 : result.index;
    }
  ];
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.split.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.split.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var isRegExp = __webpack_require__(/*! ./_is-regexp */ "./node_modules/core-js/modules/_is-regexp.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js");
var advanceStringIndex = __webpack_require__(/*! ./_advance-string-index */ "./node_modules/core-js/modules/_advance-string-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var callRegExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "./node_modules/core-js/modules/_regexp-exec-abstract.js");
var regexpExec = __webpack_require__(/*! ./_regexp-exec */ "./node_modules/core-js/modules/_regexp-exec.js");
var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var $min = Math.min;
var $push = [].push;
var $SPLIT = 'split';
var LENGTH = 'length';
var LAST_INDEX = 'lastIndex';
var MAX_UINT32 = 0xffffffff;

// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });

// @@split logic
__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
  var internalSplit;
  if (
    'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
    'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
    'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
    '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
    '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
    ''[$SPLIT](/.?/)[LENGTH]
  ) {
    // based on es5-shim implementation, need to rework it
    internalSplit = function (separator, limit) {
      var string = String(this);
      if (separator === undefined && limit === 0) return [];
      // If `separator` is not a regex, use native split
      if (!isRegExp(separator)) return $split.call(string, separator, limit);
      var output = [];
      var flags = (separator.ignoreCase ? 'i' : '') +
                  (separator.multiline ? 'm' : '') +
                  (separator.unicode ? 'u' : '') +
                  (separator.sticky ? 'y' : '');
      var lastLastIndex = 0;
      var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
      // Make `global` and avoid `lastIndex` issues by working with a copy
      var separatorCopy = new RegExp(separator.source, flags + 'g');
      var match, lastIndex, lastLength;
      while (match = regexpExec.call(separatorCopy, string)) {
        lastIndex = separatorCopy[LAST_INDEX];
        if (lastIndex > lastLastIndex) {
          output.push(string.slice(lastLastIndex, match.index));
          if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
          lastLength = match[0][LENGTH];
          lastLastIndex = lastIndex;
          if (output[LENGTH] >= splitLimit) break;
        }
        if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
      }
      if (lastLastIndex === string[LENGTH]) {
        if (lastLength || !separatorCopy.test('')) output.push('');
      } else output.push(string.slice(lastLastIndex));
      return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
    };
  // Chakra, V8
  } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
    internalSplit = function (separator, limit) {
      return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
    };
  } else {
    internalSplit = $split;
  }

  return [
    // `String.prototype.split` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.split
    function split(separator, limit) {
      var O = defined(this);
      var splitter = separator == undefined ? undefined : separator[SPLIT];
      return splitter !== undefined
        ? splitter.call(separator, O, limit)
        : internalSplit.call(String(O), separator, limit);
    },
    // `RegExp.prototype[@@split]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
    //
    // NOTE: This cannot be properly polyfilled in engines that don't support
    // the 'y' flag.
    function (regexp, limit) {
      var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);
      var C = speciesConstructor(rx, RegExp);

      var unicodeMatching = rx.unicode;
      var flags = (rx.ignoreCase ? 'i' : '') +
                  (rx.multiline ? 'm' : '') +
                  (rx.unicode ? 'u' : '') +
                  (SUPPORTS_Y ? 'y' : 'g');

      // ^(? + rx + ) is needed, in combination with some S slicing, to
      // simulate the 'y' flag.
      var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
      var p = 0;
      var q = 0;
      var A = [];
      while (q < S.length) {
        splitter.lastIndex = SUPPORTS_Y ? q : 0;
        var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
        var e;
        if (
          z === null ||
          (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
        ) {
          q = advanceStringIndex(S, q, unicodeMatching);
        } else {
          A.push(S.slice(p, q));
          if (A.length === lim) return A;
          for (var i = 1; i <= z.length - 1; i++) {
            A.push(z[i]);
            if (A.length === lim) return A;
          }
          q = p = e;
        }
      }
      A.push(S.slice(p));
      return A;
    }
  ];
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.regexp.to-string.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.regexp.to-string.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

__webpack_require__(/*! ./es6.regexp.flags */ "./node_modules/core-js/modules/es6.regexp.flags.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var $flags = __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];

var define = function (fn) {
  __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(RegExp.prototype, TO_STRING, fn, true);
};

// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
  define(function toString() {
    var R = anObject(this);
    return '/'.concat(R.source, '/',
      'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
  });
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
  define(function toString() {
    return $toString.call(this);
  });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es6.set.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/modules/es6.set.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var strong = __webpack_require__(/*! ./_collection-strong */ "./node_modules/core-js/modules/_collection-strong.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
var SET = 'Set';

// 23.2 Set Objects
module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(SET, function (get) {
  return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
  // 23.2.3.1 Set.prototype.add(value)
  add: function add(value) {
    return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  }
}, strong);


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.anchor.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.anchor.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.2 String.prototype.anchor(name)
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('anchor', function (createHTML) {
  return function anchor(name) {
    return createHTML(this, 'a', 'name', name);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.big.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.big.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.3 String.prototype.big()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('big', function (createHTML) {
  return function big() {
    return createHTML(this, 'big', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.blink.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.blink.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.4 String.prototype.blink()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('blink', function (createHTML) {
  return function blink() {
    return createHTML(this, 'blink', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.bold.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.bold.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.5 String.prototype.bold()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('bold', function (createHTML) {
  return function bold() {
    return createHTML(this, 'b', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.code-point-at.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.code-point-at.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/modules/_string-at.js")(false);
$export($export.P, 'String', {
  // 21.1.3.3 String.prototype.codePointAt(pos)
  codePointAt: function codePointAt(pos) {
    return $at(this, pos);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.ends-with.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.ends-with.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var context = __webpack_require__(/*! ./_string-context */ "./node_modules/core-js/modules/_string-context.js");
var ENDS_WITH = 'endsWith';
var $endsWith = ''[ENDS_WITH];

$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "./node_modules/core-js/modules/_fails-is-regexp.js")(ENDS_WITH), 'String', {
  endsWith: function endsWith(searchString /* , endPosition = @length */) {
    var that = context(this, searchString, ENDS_WITH);
    var endPosition = arguments.length > 1 ? arguments[1] : undefined;
    var len = toLength(that.length);
    var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
    var search = String(searchString);
    return $endsWith
      ? $endsWith.call(that, search, end)
      : that.slice(end - search.length, end) === search;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.fixed.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.fixed.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.6 String.prototype.fixed()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('fixed', function (createHTML) {
  return function fixed() {
    return createHTML(this, 'tt', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.fontcolor.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.fontcolor.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.7 String.prototype.fontcolor(color)
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('fontcolor', function (createHTML) {
  return function fontcolor(color) {
    return createHTML(this, 'font', 'color', color);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.fontsize.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.fontsize.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.8 String.prototype.fontsize(size)
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('fontsize', function (createHTML) {
  return function fontsize(size) {
    return createHTML(this, 'font', 'size', size);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.from-code-point.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.from-code-point.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
var fromCharCode = String.fromCharCode;
var $fromCodePoint = String.fromCodePoint;

// length should be 1, old FF problem
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
  // 21.1.2.2 String.fromCodePoint(...codePoints)
  fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
    var res = [];
    var aLen = arguments.length;
    var i = 0;
    var code;
    while (aLen > i) {
      code = +arguments[i++];
      if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
      res.push(code < 0x10000
        ? fromCharCode(code)
        : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
      );
    } return res.join('');
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.includes.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.includes.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// 21.1.3.7 String.prototype.includes(searchString, position = 0)

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var context = __webpack_require__(/*! ./_string-context */ "./node_modules/core-js/modules/_string-context.js");
var INCLUDES = 'includes';

$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "./node_modules/core-js/modules/_fails-is-regexp.js")(INCLUDES), 'String', {
  includes: function includes(searchString /* , position = 0 */) {
    return !!~context(this, searchString, INCLUDES)
      .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.italics.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.italics.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.9 String.prototype.italics()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('italics', function (createHTML) {
  return function italics() {
    return createHTML(this, 'i', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.iterator.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.iterator.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/modules/_string-at.js")(true);

// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/modules/_iter-define.js")(String, 'String', function (iterated) {
  this._t = String(iterated); // target
  this._i = 0;                // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var index = this._i;
  var point;
  if (index >= O.length) return { value: undefined, done: true };
  point = $at(O, index);
  this._i += point.length;
  return { value: point, done: false };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.link.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.link.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.10 String.prototype.link(url)
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('link', function (createHTML) {
  return function link(url) {
    return createHTML(this, 'a', 'href', url);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.raw.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.raw.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");

$export($export.S, 'String', {
  // 21.1.2.4 String.raw(callSite, ...substitutions)
  raw: function raw(callSite) {
    var tpl = toIObject(callSite.raw);
    var len = toLength(tpl.length);
    var aLen = arguments.length;
    var res = [];
    var i = 0;
    while (len > i) {
      res.push(String(tpl[i++]));
      if (i < aLen) res.push(String(arguments[i]));
    } return res.join('');
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.repeat.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.repeat.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.P, 'String', {
  // 21.1.3.13 String.prototype.repeat(count)
  repeat: __webpack_require__(/*! ./_string-repeat */ "./node_modules/core-js/modules/_string-repeat.js")
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.small.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.small.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.11 String.prototype.small()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('small', function (createHTML) {
  return function small() {
    return createHTML(this, 'small', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.starts-with.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.starts-with.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var context = __webpack_require__(/*! ./_string-context */ "./node_modules/core-js/modules/_string-context.js");
var STARTS_WITH = 'startsWith';
var $startsWith = ''[STARTS_WITH];

$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "./node_modules/core-js/modules/_fails-is-regexp.js")(STARTS_WITH), 'String', {
  startsWith: function startsWith(searchString /* , position = 0 */) {
    var that = context(this, searchString, STARTS_WITH);
    var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
    var search = String(searchString);
    return $startsWith
      ? $startsWith.call(that, search, index)
      : that.slice(index, index + search.length) === search;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.strike.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.strike.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.12 String.prototype.strike()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('strike', function (createHTML) {
  return function strike() {
    return createHTML(this, 'strike', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.sub.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.sub.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.13 String.prototype.sub()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('sub', function (createHTML) {
  return function sub() {
    return createHTML(this, 'sub', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.sup.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.sup.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// B.2.3.14 String.prototype.sup()
__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('sup', function (createHTML) {
  return function sup() {
    return createHTML(this, 'sup', '', '');
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.string.trim.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es6.string.trim.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 21.1.3.25 String.prototype.trim()
__webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js")('trim', function ($trim) {
  return function trim() {
    return $trim(this, 3);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.symbol.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/es6.symbol.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// ECMAScript 6 symbols shim
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
var META = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").KEY;
var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js");
var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js");
var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js");
var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js");
var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/modules/_wks-ext.js");
var wksDefine = __webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/modules/_wks-define.js");
var enumKeys = __webpack_require__(/*! ./_enum-keys */ "./node_modules/core-js/modules/_enum-keys.js");
var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js");
var _create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js");
var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/core-js/modules/_object-gopn-ext.js");
var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
var $GOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js");
var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");
var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;

// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
  return _create(dP({}, 'a', {
    get: function () { return dP(this, 'a', { value: 7 }).a; }
  })).a != 7;
}) ? function (it, key, D) {
  var protoDesc = gOPD(ObjectProto, key);
  if (protoDesc) delete ObjectProto[key];
  dP(it, key, D);
  if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;

var wrap = function (tag) {
  var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  sym._k = tag;
  return sym;
};

var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  return it instanceof $Symbol;
};

var $defineProperty = function defineProperty(it, key, D) {
  if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  anObject(it);
  key = toPrimitive(key, true);
  anObject(D);
  if (has(AllSymbols, key)) {
    if (!D.enumerable) {
      if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
      it[HIDDEN][key] = true;
    } else {
      if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
      D = _create(D, { enumerable: createDesc(0, false) });
    } return setSymbolDesc(it, key, D);
  } return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
  anObject(it);
  var keys = enumKeys(P = toIObject(P));
  var i = 0;
  var l = keys.length;
  var key;
  while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  return it;
};
var $create = function create(it, P) {
  return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  var E = isEnum.call(this, key = toPrimitive(key, true));
  if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  it = toIObject(it);
  key = toPrimitive(key, true);
  if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  var D = gOPD(it, key);
  if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  var names = gOPN(toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  } return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  var IS_OP = it === ObjectProto;
  var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  } return result;
};

// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
  $Symbol = function Symbol() {
    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
    var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
    var $set = function (value) {
      if (this === ObjectProto) $set.call(OPSymbols, value);
      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
      setSymbolDesc(this, tag, createDesc(1, value));
    };
    if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
    return wrap(tag);
  };
  redefine($Symbol[PROTOTYPE], 'toString', function toString() {
    return this._k;
  });

  $GOPD.f = $getOwnPropertyDescriptor;
  $DP.f = $defineProperty;
  __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames;
  __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js").f = $propertyIsEnumerable;
  $GOPS.f = $getOwnPropertySymbols;

  if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js")) {
    redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  }

  wksExt.f = function (name) {
    return wrap(wks(name));
  };
}

$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });

for (var es6Symbols = (
  // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);

for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);

$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  // 19.4.2.1 Symbol.for(key)
  'for': function (key) {
    return has(SymbolRegistry, key += '')
      ? SymbolRegistry[key]
      : SymbolRegistry[key] = $Symbol(key);
  },
  // 19.4.2.5 Symbol.keyFor(sym)
  keyFor: function keyFor(sym) {
    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
    for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  },
  useSetter: function () { setter = true; },
  useSimple: function () { setter = false; }
});

$export($export.S + $export.F * !USE_NATIVE, 'Object', {
  // 19.1.2.2 Object.create(O [, Properties])
  create: $create,
  // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  defineProperty: $defineProperty,
  // 19.1.2.3 Object.defineProperties(O, Properties)
  defineProperties: $defineProperties,
  // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  // 19.1.2.7 Object.getOwnPropertyNames(O)
  getOwnPropertyNames: $getOwnPropertyNames,
  // 19.1.2.8 Object.getOwnPropertySymbols(O)
  getOwnPropertySymbols: $getOwnPropertySymbols
});

// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });

$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
  getOwnPropertySymbols: function getOwnPropertySymbols(it) {
    return $GOPS.f(toObject(it));
  }
});

// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  var S = $Symbol();
  // MS Edge converts symbol values to JSON as {}
  // WebKit converts symbol values to JSON as null
  // V8 throws on boxed symbols
  return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
  stringify: function stringify(it) {
    var args = [it];
    var i = 1;
    var replacer, $replacer;
    while (arguments.length > i) args.push(arguments[i++]);
    $replacer = replacer = args[1];
    if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
    if (!isArray(replacer)) replacer = function (key, value) {
      if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
      if (!isSymbol(value)) return value;
    };
    args[1] = replacer;
    return _stringify.apply($JSON, args);
  }
});

// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.array-buffer.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.array-buffer.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $typed = __webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js");
var buffer = __webpack_require__(/*! ./_typed-buffer */ "./node_modules/core-js/modules/_typed-buffer.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var ArrayBuffer = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").ArrayBuffer;
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js");
var $ArrayBuffer = buffer.ArrayBuffer;
var $DataView = buffer.DataView;
var $isView = $typed.ABV && ArrayBuffer.isView;
var $slice = $ArrayBuffer.prototype.slice;
var VIEW = $typed.VIEW;
var ARRAY_BUFFER = 'ArrayBuffer';

$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });

$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
  // 24.1.3.1 ArrayBuffer.isView(arg)
  isView: function isView(it) {
    return $isView && $isView(it) || isObject(it) && VIEW in it;
  }
});

$export($export.P + $export.U + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () {
  return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
}), ARRAY_BUFFER, {
  // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
  slice: function slice(start, end) {
    if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
    var len = anObject(this).byteLength;
    var first = toAbsoluteIndex(start, len);
    var fin = toAbsoluteIndex(end === undefined ? len : end, len);
    var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
    var viewS = new $DataView(this);
    var viewT = new $DataView(result);
    var index = 0;
    while (first < fin) {
      viewT.setUint8(index++, viewS.getUint8(first++));
    } return result;
  }
});

__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")(ARRAY_BUFFER);


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.data-view.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.data-view.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
$export($export.G + $export.W + $export.F * !__webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js").ABV, {
  DataView: __webpack_require__(/*! ./_typed-buffer */ "./node_modules/core-js/modules/_typed-buffer.js").DataView
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.float32-array.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.float32-array.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Float32', 4, function (init) {
  return function Float32Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.float64-array.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.float64-array.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Float64', 8, function (init) {
  return function Float64Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.int16-array.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.int16-array.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Int16', 2, function (init) {
  return function Int16Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.int32-array.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.int32-array.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Int32', 4, function (init) {
  return function Int32Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.int8-array.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.int8-array.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Int8', 1, function (init) {
  return function Int8Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.uint16-array.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.uint16-array.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint16', 2, function (init) {
  return function Uint16Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.uint32-array.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.uint32-array.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint32', 4, function (init) {
  return function Uint32Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.uint8-array.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.uint8-array.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint8', 1, function (init) {
  return function Uint8Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js":
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint8', 1, function (init) {
  return function Uint8ClampedArray(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
}, true);


/***/ }),

/***/ "./node_modules/core-js/modules/es6.weak-map.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.weak-map.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var each = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(0);
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js");
var assign = __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/modules/_object-assign.js");
var weak = __webpack_require__(/*! ./_collection-weak */ "./node_modules/core-js/modules/_collection-weak.js");
var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
var NATIVE_WEAK_MAP = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
var WEAK_MAP = 'WeakMap';
var getWeak = meta.getWeak;
var isExtensible = Object.isExtensible;
var uncaughtFrozenStore = weak.ufstore;
var InternalMap;

var wrapper = function (get) {
  return function WeakMap() {
    return get(this, arguments.length > 0 ? arguments[0] : undefined);
  };
};

var methods = {
  // 23.3.3.3 WeakMap.prototype.get(key)
  get: function get(key) {
    if (isObject(key)) {
      var data = getWeak(key);
      if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
      return data ? data[this._i] : undefined;
    }
  },
  // 23.3.3.5 WeakMap.prototype.set(key, value)
  set: function set(key, value) {
    return weak.def(validate(this, WEAK_MAP), key, value);
  }
};

// 23.3 WeakMap Objects
var $WeakMap = module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(WEAK_MAP, wrapper, methods, weak, true, true);

// IE11 WeakMap frozen keys fix
if (NATIVE_WEAK_MAP && IS_IE11) {
  InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
  assign(InternalMap.prototype, methods);
  meta.NEED = true;
  each(['delete', 'has', 'get', 'set'], function (key) {
    var proto = $WeakMap.prototype;
    var method = proto[key];
    redefine(proto, key, function (a, b) {
      // store frozen objects on internal weakmap shim
      if (isObject(a) && !isExtensible(a)) {
        if (!this._f) this._f = new InternalMap();
        var result = this._f[key](a, b);
        return key == 'set' ? this : result;
      // store all the rest on native weakmap
      } return method.call(this, a, b);
    });
  });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es6.weak-set.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es6.weak-set.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var weak = __webpack_require__(/*! ./_collection-weak */ "./node_modules/core-js/modules/_collection-weak.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js");
var WEAK_SET = 'WeakSet';

// 23.4 WeakSet Objects
__webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(WEAK_SET, function (get) {
  return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
  // 23.4.3.1 WeakSet.prototype.add(value)
  add: function add(value) {
    return weak.def(validate(this, WEAK_SET), value, true);
  }
}, weak, false, true);


/***/ }),

/***/ "./node_modules/core-js/modules/es7.array.flat-map.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.array.flat-map.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var flattenIntoArray = __webpack_require__(/*! ./_flatten-into-array */ "./node_modules/core-js/modules/_flatten-into-array.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var arraySpeciesCreate = __webpack_require__(/*! ./_array-species-create */ "./node_modules/core-js/modules/_array-species-create.js");

$export($export.P, 'Array', {
  flatMap: function flatMap(callbackfn /* , thisArg */) {
    var O = toObject(this);
    var sourceLen, A;
    aFunction(callbackfn);
    sourceLen = toLength(O.length);
    A = arraySpeciesCreate(O, 0);
    flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
    return A;
  }
});

__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('flatMap');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.array.flatten.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.array.flatten.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var flattenIntoArray = __webpack_require__(/*! ./_flatten-into-array */ "./node_modules/core-js/modules/_flatten-into-array.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js");
var arraySpeciesCreate = __webpack_require__(/*! ./_array-species-create */ "./node_modules/core-js/modules/_array-species-create.js");

$export($export.P, 'Array', {
  flatten: function flatten(/* depthArg = 1 */) {
    var depthArg = arguments[0];
    var O = toObject(this);
    var sourceLen = toLength(O.length);
    var A = arraySpeciesCreate(O, 0);
    flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
    return A;
  }
});

__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('flatten');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.array.includes.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.array.includes.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $includes = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(true);

$export($export.P, 'Array', {
  includes: function includes(el /* , fromIndex = 0 */) {
    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  }
});

__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('includes');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.asap.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/modules/es7.asap.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var microtask = __webpack_require__(/*! ./_microtask */ "./node_modules/core-js/modules/_microtask.js")();
var process = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").process;
var isNode = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js")(process) == 'process';

$export($export.G, {
  asap: function asap(fn) {
    var domain = isNode && process.domain;
    microtask(domain ? domain.bind(fn) : fn);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.error.is-error.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.error.is-error.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/ljharb/proposal-is-error
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js");

$export($export.S, 'Error', {
  isError: function isError(it) {
    return cof(it) === 'Error';
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.global.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/es7.global.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-global
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.G, { global: __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.map.from.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es7.map.from.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
__webpack_require__(/*! ./_set-collection-from */ "./node_modules/core-js/modules/_set-collection-from.js")('Map');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.map.of.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/es7.map.of.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
__webpack_require__(/*! ./_set-collection-of */ "./node_modules/core-js/modules/_set-collection-of.js")('Map');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.map.to-json.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.map.to-json.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(/*! ./_collection-to-json */ "./node_modules/core-js/modules/_collection-to-json.js")('Map') });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.clamp.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.clamp.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  clamp: function clamp(x, lower, upper) {
    return Math.min(upper, Math.max(lower, x));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.deg-per-rad.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.deg-per-rad.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.degrees.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.degrees.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var RAD_PER_DEG = 180 / Math.PI;

$export($export.S, 'Math', {
  degrees: function degrees(radians) {
    return radians * RAD_PER_DEG;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.fscale.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.fscale.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var scale = __webpack_require__(/*! ./_math-scale */ "./node_modules/core-js/modules/_math-scale.js");
var fround = __webpack_require__(/*! ./_math-fround */ "./node_modules/core-js/modules/_math-fround.js");

$export($export.S, 'Math', {
  fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
    return fround(scale(x, inLow, inHigh, outLow, outHigh));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.iaddh.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.iaddh.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  iaddh: function iaddh(x0, x1, y0, y1) {
    var $x0 = x0 >>> 0;
    var $x1 = x1 >>> 0;
    var $y0 = y0 >>> 0;
    return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.imulh.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.imulh.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  imulh: function imulh(u, v) {
    var UINT16 = 0xffff;
    var $u = +u;
    var $v = +v;
    var u0 = $u & UINT16;
    var v0 = $v & UINT16;
    var u1 = $u >> 16;
    var v1 = $v >> 16;
    var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
    return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.isubh.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.isubh.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  isubh: function isubh(x0, x1, y0, y1) {
    var $x0 = x0 >>> 0;
    var $x1 = x1 >>> 0;
    var $y0 = y0 >>> 0;
    return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.rad-per-deg.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.rad-per-deg.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.radians.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.radians.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var DEG_PER_RAD = Math.PI / 180;

$export($export.S, 'Math', {
  radians: function radians(degrees) {
    return degrees * DEG_PER_RAD;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.scale.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.scale.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', { scale: __webpack_require__(/*! ./_math-scale */ "./node_modules/core-js/modules/_math-scale.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.signbit.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.signbit.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// http://jfbastien.github.io/papers/Math.signbit.html
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', { signbit: function signbit(x) {
  // eslint-disable-next-line no-self-compare
  return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.math.umulh.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.math.umulh.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'Math', {
  umulh: function umulh(u, v) {
    var UINT16 = 0xffff;
    var $u = +u;
    var $v = +v;
    var u0 = $u & UINT16;
    var v0 = $v & UINT16;
    var u1 = $u >>> 16;
    var v1 = $v >>> 16;
    var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
    return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.object.define-getter.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.object.define-getter.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");

// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && $export($export.P + __webpack_require__(/*! ./_object-forced-pam */ "./node_modules/core-js/modules/_object-forced-pam.js"), 'Object', {
  __defineGetter__: function __defineGetter__(P, getter) {
    $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.object.define-setter.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.object.define-setter.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js");

// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && $export($export.P + __webpack_require__(/*! ./_object-forced-pam */ "./node_modules/core-js/modules/_object-forced-pam.js"), 'Object', {
  __defineSetter__: function __defineSetter__(P, setter) {
    $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.object.entries.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.object.entries.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $entries = __webpack_require__(/*! ./_object-to-array */ "./node_modules/core-js/modules/_object-to-array.js")(true);

$export($export.S, 'Object', {
  entries: function entries(it) {
    return $entries(it);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var ownKeys = __webpack_require__(/*! ./_own-keys */ "./node_modules/core-js/modules/_own-keys.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js");
var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js");
var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/modules/_create-property.js");

$export($export.S, 'Object', {
  getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
    var O = toIObject(object);
    var getDesc = gOPD.f;
    var keys = ownKeys(O);
    var result = {};
    var i = 0;
    var key, desc;
    while (keys.length > i) {
      desc = getDesc(O, key = keys[i++]);
      if (desc !== undefined) createProperty(result, key, desc);
    }
    return result;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.object.lookup-getter.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.object.lookup-getter.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f;

// B.2.2.4 Object.prototype.__lookupGetter__(P)
__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && $export($export.P + __webpack_require__(/*! ./_object-forced-pam */ "./node_modules/core-js/modules/_object-forced-pam.js"), 'Object', {
  __lookupGetter__: function __lookupGetter__(P) {
    var O = toObject(this);
    var K = toPrimitive(P, true);
    var D;
    do {
      if (D = getOwnPropertyDescriptor(O, K)) return D.get;
    } while (O = getPrototypeOf(O));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.object.lookup-setter.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.object.lookup-setter.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f;

// B.2.2.5 Object.prototype.__lookupSetter__(P)
__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && $export($export.P + __webpack_require__(/*! ./_object-forced-pam */ "./node_modules/core-js/modules/_object-forced-pam.js"), 'Object', {
  __lookupSetter__: function __lookupSetter__(P) {
    var O = toObject(this);
    var K = toPrimitive(P, true);
    var D;
    do {
      if (D = getOwnPropertyDescriptor(O, K)) return D.set;
    } while (O = getPrototypeOf(O));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.object.values.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.object.values.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $values = __webpack_require__(/*! ./_object-to-array */ "./node_modules/core-js/modules/_object-to-array.js")(false);

$export($export.S, 'Object', {
  values: function values(it) {
    return $values(it);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.observable.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.observable.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/zenparsing/es-observable
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
var microtask = __webpack_require__(/*! ./_microtask */ "./node_modules/core-js/modules/_microtask.js")();
var OBSERVABLE = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('observable');
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js");
var RETURN = forOf.RETURN;

var getMethod = function (fn) {
  return fn == null ? undefined : aFunction(fn);
};

var cleanupSubscription = function (subscription) {
  var cleanup = subscription._c;
  if (cleanup) {
    subscription._c = undefined;
    cleanup();
  }
};

var subscriptionClosed = function (subscription) {
  return subscription._o === undefined;
};

var closeSubscription = function (subscription) {
  if (!subscriptionClosed(subscription)) {
    subscription._o = undefined;
    cleanupSubscription(subscription);
  }
};

var Subscription = function (observer, subscriber) {
  anObject(observer);
  this._c = undefined;
  this._o = observer;
  observer = new SubscriptionObserver(this);
  try {
    var cleanup = subscriber(observer);
    var subscription = cleanup;
    if (cleanup != null) {
      if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };
      else aFunction(cleanup);
      this._c = cleanup;
    }
  } catch (e) {
    observer.error(e);
    return;
  } if (subscriptionClosed(this)) cleanupSubscription(this);
};

Subscription.prototype = redefineAll({}, {
  unsubscribe: function unsubscribe() { closeSubscription(this); }
});

var SubscriptionObserver = function (subscription) {
  this._s = subscription;
};

SubscriptionObserver.prototype = redefineAll({}, {
  next: function next(value) {
    var subscription = this._s;
    if (!subscriptionClosed(subscription)) {
      var observer = subscription._o;
      try {
        var m = getMethod(observer.next);
        if (m) return m.call(observer, value);
      } catch (e) {
        try {
          closeSubscription(subscription);
        } finally {
          throw e;
        }
      }
    }
  },
  error: function error(value) {
    var subscription = this._s;
    if (subscriptionClosed(subscription)) throw value;
    var observer = subscription._o;
    subscription._o = undefined;
    try {
      var m = getMethod(observer.error);
      if (!m) throw value;
      value = m.call(observer, value);
    } catch (e) {
      try {
        cleanupSubscription(subscription);
      } finally {
        throw e;
      }
    } cleanupSubscription(subscription);
    return value;
  },
  complete: function complete(value) {
    var subscription = this._s;
    if (!subscriptionClosed(subscription)) {
      var observer = subscription._o;
      subscription._o = undefined;
      try {
        var m = getMethod(observer.complete);
        value = m ? m.call(observer, value) : undefined;
      } catch (e) {
        try {
          cleanupSubscription(subscription);
        } finally {
          throw e;
        }
      } cleanupSubscription(subscription);
      return value;
    }
  }
});

var $Observable = function Observable(subscriber) {
  anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
};

redefineAll($Observable.prototype, {
  subscribe: function subscribe(observer) {
    return new Subscription(observer, this._f);
  },
  forEach: function forEach(fn) {
    var that = this;
    return new (core.Promise || global.Promise)(function (resolve, reject) {
      aFunction(fn);
      var subscription = that.subscribe({
        next: function (value) {
          try {
            return fn(value);
          } catch (e) {
            reject(e);
            subscription.unsubscribe();
          }
        },
        error: reject,
        complete: resolve
      });
    });
  }
});

redefineAll($Observable, {
  from: function from(x) {
    var C = typeof this === 'function' ? this : $Observable;
    var method = getMethod(anObject(x)[OBSERVABLE]);
    if (method) {
      var observable = anObject(method.call(x));
      return observable.constructor === C ? observable : new C(function (observer) {
        return observable.subscribe(observer);
      });
    }
    return new C(function (observer) {
      var done = false;
      microtask(function () {
        if (!done) {
          try {
            if (forOf(x, false, function (it) {
              observer.next(it);
              if (done) return RETURN;
            }) === RETURN) return;
          } catch (e) {
            if (done) throw e;
            observer.error(e);
            return;
          } observer.complete();
        }
      });
      return function () { done = true; };
    });
  },
  of: function of() {
    for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];
    return new (typeof this === 'function' ? this : $Observable)(function (observer) {
      var done = false;
      microtask(function () {
        if (!done) {
          for (var j = 0; j < items.length; ++j) {
            observer.next(items[j]);
            if (done) return;
          } observer.complete();
        }
      });
      return function () { done = true; };
    });
  }
});

hide($Observable.prototype, OBSERVABLE, function () { return this; });

$export($export.G, { Observable: $Observable });

__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")('Observable');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.promise.finally.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.promise.finally.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// https://github.com/tc39/proposal-promise-finally

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js");
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js");
var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/modules/_promise-resolve.js");

$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
  var C = speciesConstructor(this, core.Promise || global.Promise);
  var isFunction = typeof onFinally == 'function';
  return this.then(
    isFunction ? function (x) {
      return promiseResolve(C, onFinally()).then(function () { return x; });
    } : onFinally,
    isFunction ? function (e) {
      return promiseResolve(C, onFinally()).then(function () { throw e; });
    } : onFinally
  );
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.promise.try.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.promise.try.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/tc39/proposal-promise-try
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/modules/_new-promise-capability.js");
var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/modules/_perform.js");

$export($export.S, 'Promise', { 'try': function (callbackfn) {
  var promiseCapability = newPromiseCapability.f(this);
  var result = perform(callbackfn);
  (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
  return promiseCapability.promise;
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.define-metadata.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.define-metadata.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toMetaKey = metadata.key;
var ordinaryDefineOwnMetadata = metadata.set;

metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
  ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.delete-metadata.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.delete-metadata.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var toMetaKey = metadata.key;
var getOrCreateMetadataMap = metadata.map;
var store = metadata.store;

metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
  var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
  var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
  if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
  if (metadataMap.size) return true;
  var targetMetadata = store.get(target);
  targetMetadata['delete'](targetKey);
  return !!targetMetadata.size || store['delete'](target);
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js":
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var Set = __webpack_require__(/*! ./es6.set */ "./node_modules/core-js/modules/es6.set.js");
var from = __webpack_require__(/*! ./_array-from-iterable */ "./node_modules/core-js/modules/_array-from-iterable.js");
var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var ordinaryOwnMetadataKeys = metadata.keys;
var toMetaKey = metadata.key;

var ordinaryMetadataKeys = function (O, P) {
  var oKeys = ordinaryOwnMetadataKeys(O, P);
  var parent = getPrototypeOf(O);
  if (parent === null) return oKeys;
  var pKeys = ordinaryMetadataKeys(parent, P);
  return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
};

metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
  return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.get-metadata.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.get-metadata.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var ordinaryHasOwnMetadata = metadata.has;
var ordinaryGetOwnMetadata = metadata.get;
var toMetaKey = metadata.key;

var ordinaryGetMetadata = function (MetadataKey, O, P) {
  var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
  var parent = getPrototypeOf(O);
  return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
};

metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js":
/*!***************************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var ordinaryOwnMetadataKeys = metadata.keys;
var toMetaKey = metadata.key;

metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
  return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.get-own-metadata.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.get-own-metadata.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var ordinaryGetOwnMetadata = metadata.get;
var toMetaKey = metadata.key;

metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryGetOwnMetadata(metadataKey, anObject(target)
    , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.has-metadata.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.has-metadata.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js");
var ordinaryHasOwnMetadata = metadata.has;
var toMetaKey = metadata.key;

var ordinaryHasMetadata = function (MetadataKey, O, P) {
  var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  if (hasOwn) return true;
  var parent = getPrototypeOf(O);
  return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
};

metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.has-own-metadata.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.has-own-metadata.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var ordinaryHasOwnMetadata = metadata.has;
var toMetaKey = metadata.key;

metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryHasOwnMetadata(metadataKey, anObject(target)
    , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.reflect.metadata.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.reflect.metadata.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $metadata = __webpack_require__(/*! ./_metadata */ "./node_modules/core-js/modules/_metadata.js");
var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js");
var toMetaKey = $metadata.key;
var ordinaryDefineOwnMetadata = $metadata.set;

$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
  return function decorator(target, targetKey) {
    ordinaryDefineOwnMetadata(
      metadataKey, metadataValue,
      (targetKey !== undefined ? anObject : aFunction)(target),
      toMetaKey(targetKey)
    );
  };
} });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.set.from.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es7.set.from.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
__webpack_require__(/*! ./_set-collection-from */ "./node_modules/core-js/modules/_set-collection-from.js")('Set');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.set.of.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/es7.set.of.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
__webpack_require__(/*! ./_set-collection-of */ "./node_modules/core-js/modules/_set-collection-of.js")('Set');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.set.to-json.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.set.to-json.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(/*! ./_collection-to-json */ "./node_modules/core-js/modules/_collection-to-json.js")('Set') });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.string.at.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es7.string.at.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/mathiasbynens/String.prototype.at
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/modules/_string-at.js")(true);

$export($export.P, 'String', {
  at: function at(pos) {
    return $at(this, pos);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.string.match-all.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.string.match-all.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://tc39.github.io/String.prototype.matchAll/
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js");
var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js");
var isRegExp = __webpack_require__(/*! ./_is-regexp */ "./node_modules/core-js/modules/_is-regexp.js");
var getFlags = __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js");
var RegExpProto = RegExp.prototype;

var $RegExpStringIterator = function (regexp, string) {
  this._r = regexp;
  this._s = string;
};

__webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/modules/_iter-create.js")($RegExpStringIterator, 'RegExp String', function next() {
  var match = this._r.exec(this._s);
  return { value: match, done: match === null };
});

$export($export.P, 'String', {
  matchAll: function matchAll(regexp) {
    defined(this);
    if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');
    var S = String(this);
    var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);
    var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
    rx.lastIndex = toLength(regexp.lastIndex);
    return new $RegExpStringIterator(rx, S);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.string.pad-end.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.string.pad-end.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $pad = __webpack_require__(/*! ./_string-pad */ "./node_modules/core-js/modules/_string-pad.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js");

// https://github.com/zloirock/core-js/issues/280
var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);

$export($export.P + $export.F * WEBKIT_BUG, 'String', {
  padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
    return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.string.pad-start.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.string.pad-start.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $pad = __webpack_require__(/*! ./_string-pad */ "./node_modules/core-js/modules/_string-pad.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js");

// https://github.com/zloirock/core-js/issues/280
var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);

$export($export.P + $export.F * WEBKIT_BUG, 'String', {
  padStart: function padStart(maxLength /* , fillString = ' ' */) {
    return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es7.string.trim-left.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.string.trim-left.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js")('trimLeft', function ($trim) {
  return function trimLeft() {
    return $trim(this, 1);
  };
}, 'trimStart');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.string.trim-right.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.string.trim-right.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js")('trimRight', function ($trim) {
  return function trimRight() {
    return $trim(this, 2);
  };
}, 'trimEnd');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.symbol.async-iterator.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.symbol.async-iterator.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/modules/_wks-define.js")('asyncIterator');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.symbol.observable.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es7.symbol.observable.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/modules/_wks-define.js")('observable');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.system.global.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.system.global.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://github.com/tc39/proposal-global
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");

$export($export.S, 'System', { global: __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js") });


/***/ }),

/***/ "./node_modules/core-js/modules/es7.weak-map.from.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.weak-map.from.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
__webpack_require__(/*! ./_set-collection-from */ "./node_modules/core-js/modules/_set-collection-from.js")('WeakMap');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.weak-map.of.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.weak-map.of.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
__webpack_require__(/*! ./_set-collection-of */ "./node_modules/core-js/modules/_set-collection-of.js")('WeakMap');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.weak-set.from.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.weak-set.from.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
__webpack_require__(/*! ./_set-collection-from */ "./node_modules/core-js/modules/_set-collection-from.js")('WeakSet');


/***/ }),

/***/ "./node_modules/core-js/modules/es7.weak-set.of.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es7.weak-set.of.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
__webpack_require__(/*! ./_set-collection-of */ "./node_modules/core-js/modules/_set-collection-of.js")('WeakSet');


/***/ }),

/***/ "./node_modules/core-js/modules/web.dom.iterable.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/web.dom.iterable.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $iterators = __webpack_require__(/*! ./es6.array.iterator */ "./node_modules/core-js/modules/es6.array.iterator.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js");
var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js");
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js");
var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js");
var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js");
var ITERATOR = wks('iterator');
var TO_STRING_TAG = wks('toStringTag');
var ArrayValues = Iterators.Array;

var DOMIterables = {
  CSSRuleList: true, // TODO: Not spec compliant, should be false.
  CSSStyleDeclaration: false,
  CSSValueList: false,
  ClientRectList: false,
  DOMRectList: false,
  DOMStringList: false,
  DOMTokenList: true,
  DataTransferItemList: false,
  FileList: false,
  HTMLAllCollection: false,
  HTMLCollection: false,
  HTMLFormElement: false,
  HTMLSelectElement: false,
  MediaList: true, // TODO: Not spec compliant, should be false.
  MimeTypeArray: false,
  NamedNodeMap: false,
  NodeList: true,
  PaintRequestList: false,
  Plugin: false,
  PluginArray: false,
  SVGLengthList: false,
  SVGNumberList: false,
  SVGPathSegList: false,
  SVGPointList: false,
  SVGStringList: false,
  SVGTransformList: false,
  SourceBufferList: false,
  StyleSheetList: true, // TODO: Not spec compliant, should be false.
  TextTrackCueList: false,
  TextTrackList: false,
  TouchList: false
};

for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  var NAME = collections[i];
  var explicit = DOMIterables[NAME];
  var Collection = global[NAME];
  var proto = Collection && Collection.prototype;
  var key;
  if (proto) {
    if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
    if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
    Iterators[NAME] = ArrayValues;
    if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  }
}


/***/ }),

/***/ "./node_modules/core-js/modules/web.immediate.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/web.immediate.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var $task = __webpack_require__(/*! ./_task */ "./node_modules/core-js/modules/_task.js");
$export($export.G + $export.B, {
  setImmediate: $task.set,
  clearImmediate: $task.clear
});


/***/ }),

/***/ "./node_modules/core-js/modules/web.timers.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/modules/web.timers.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// ie9- setTimeout & setInterval additional parameters fix
var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js");
var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js");
var slice = [].slice;
var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
var wrap = function (set) {
  return function (fn, time /* , ...args */) {
    var boundArgs = arguments.length > 2;
    var args = boundArgs ? slice.call(arguments, 2) : false;
    return set(boundArgs ? function () {
      // eslint-disable-next-line no-new-func
      (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
    } : fn, time);
  };
};
$export($export.G + $export.B + $export.F * MSIE, {
  setTimeout: wrap(global.setTimeout),
  setInterval: wrap(global.setInterval)
});


/***/ }),

/***/ "./node_modules/core-js/shim.js":
/*!**************************************!*\
  !*** ./node_modules/core-js/shim.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! ./modules/es6.symbol */ "./node_modules/core-js/modules/es6.symbol.js");
__webpack_require__(/*! ./modules/es6.object.create */ "./node_modules/core-js/modules/es6.object.create.js");
__webpack_require__(/*! ./modules/es6.object.define-property */ "./node_modules/core-js/modules/es6.object.define-property.js");
__webpack_require__(/*! ./modules/es6.object.define-properties */ "./node_modules/core-js/modules/es6.object.define-properties.js");
__webpack_require__(/*! ./modules/es6.object.get-own-property-descriptor */ "./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js");
__webpack_require__(/*! ./modules/es6.object.get-prototype-of */ "./node_modules/core-js/modules/es6.object.get-prototype-of.js");
__webpack_require__(/*! ./modules/es6.object.keys */ "./node_modules/core-js/modules/es6.object.keys.js");
__webpack_require__(/*! ./modules/es6.object.get-own-property-names */ "./node_modules/core-js/modules/es6.object.get-own-property-names.js");
__webpack_require__(/*! ./modules/es6.object.freeze */ "./node_modules/core-js/modules/es6.object.freeze.js");
__webpack_require__(/*! ./modules/es6.object.seal */ "./node_modules/core-js/modules/es6.object.seal.js");
__webpack_require__(/*! ./modules/es6.object.prevent-extensions */ "./node_modules/core-js/modules/es6.object.prevent-extensions.js");
__webpack_require__(/*! ./modules/es6.object.is-frozen */ "./node_modules/core-js/modules/es6.object.is-frozen.js");
__webpack_require__(/*! ./modules/es6.object.is-sealed */ "./node_modules/core-js/modules/es6.object.is-sealed.js");
__webpack_require__(/*! ./modules/es6.object.is-extensible */ "./node_modules/core-js/modules/es6.object.is-extensible.js");
__webpack_require__(/*! ./modules/es6.object.assign */ "./node_modules/core-js/modules/es6.object.assign.js");
__webpack_require__(/*! ./modules/es6.object.is */ "./node_modules/core-js/modules/es6.object.is.js");
__webpack_require__(/*! ./modules/es6.object.set-prototype-of */ "./node_modules/core-js/modules/es6.object.set-prototype-of.js");
__webpack_require__(/*! ./modules/es6.object.to-string */ "./node_modules/core-js/modules/es6.object.to-string.js");
__webpack_require__(/*! ./modules/es6.function.bind */ "./node_modules/core-js/modules/es6.function.bind.js");
__webpack_require__(/*! ./modules/es6.function.name */ "./node_modules/core-js/modules/es6.function.name.js");
__webpack_require__(/*! ./modules/es6.function.has-instance */ "./node_modules/core-js/modules/es6.function.has-instance.js");
__webpack_require__(/*! ./modules/es6.parse-int */ "./node_modules/core-js/modules/es6.parse-int.js");
__webpack_require__(/*! ./modules/es6.parse-float */ "./node_modules/core-js/modules/es6.parse-float.js");
__webpack_require__(/*! ./modules/es6.number.constructor */ "./node_modules/core-js/modules/es6.number.constructor.js");
__webpack_require__(/*! ./modules/es6.number.to-fixed */ "./node_modules/core-js/modules/es6.number.to-fixed.js");
__webpack_require__(/*! ./modules/es6.number.to-precision */ "./node_modules/core-js/modules/es6.number.to-precision.js");
__webpack_require__(/*! ./modules/es6.number.epsilon */ "./node_modules/core-js/modules/es6.number.epsilon.js");
__webpack_require__(/*! ./modules/es6.number.is-finite */ "./node_modules/core-js/modules/es6.number.is-finite.js");
__webpack_require__(/*! ./modules/es6.number.is-integer */ "./node_modules/core-js/modules/es6.number.is-integer.js");
__webpack_require__(/*! ./modules/es6.number.is-nan */ "./node_modules/core-js/modules/es6.number.is-nan.js");
__webpack_require__(/*! ./modules/es6.number.is-safe-integer */ "./node_modules/core-js/modules/es6.number.is-safe-integer.js");
__webpack_require__(/*! ./modules/es6.number.max-safe-integer */ "./node_modules/core-js/modules/es6.number.max-safe-integer.js");
__webpack_require__(/*! ./modules/es6.number.min-safe-integer */ "./node_modules/core-js/modules/es6.number.min-safe-integer.js");
__webpack_require__(/*! ./modules/es6.number.parse-float */ "./node_modules/core-js/modules/es6.number.parse-float.js");
__webpack_require__(/*! ./modules/es6.number.parse-int */ "./node_modules/core-js/modules/es6.number.parse-int.js");
__webpack_require__(/*! ./modules/es6.math.acosh */ "./node_modules/core-js/modules/es6.math.acosh.js");
__webpack_require__(/*! ./modules/es6.math.asinh */ "./node_modules/core-js/modules/es6.math.asinh.js");
__webpack_require__(/*! ./modules/es6.math.atanh */ "./node_modules/core-js/modules/es6.math.atanh.js");
__webpack_require__(/*! ./modules/es6.math.cbrt */ "./node_modules/core-js/modules/es6.math.cbrt.js");
__webpack_require__(/*! ./modules/es6.math.clz32 */ "./node_modules/core-js/modules/es6.math.clz32.js");
__webpack_require__(/*! ./modules/es6.math.cosh */ "./node_modules/core-js/modules/es6.math.cosh.js");
__webpack_require__(/*! ./modules/es6.math.expm1 */ "./node_modules/core-js/modules/es6.math.expm1.js");
__webpack_require__(/*! ./modules/es6.math.fround */ "./node_modules/core-js/modules/es6.math.fround.js");
__webpack_require__(/*! ./modules/es6.math.hypot */ "./node_modules/core-js/modules/es6.math.hypot.js");
__webpack_require__(/*! ./modules/es6.math.imul */ "./node_modules/core-js/modules/es6.math.imul.js");
__webpack_require__(/*! ./modules/es6.math.log10 */ "./node_modules/core-js/modules/es6.math.log10.js");
__webpack_require__(/*! ./modules/es6.math.log1p */ "./node_modules/core-js/modules/es6.math.log1p.js");
__webpack_require__(/*! ./modules/es6.math.log2 */ "./node_modules/core-js/modules/es6.math.log2.js");
__webpack_require__(/*! ./modules/es6.math.sign */ "./node_modules/core-js/modules/es6.math.sign.js");
__webpack_require__(/*! ./modules/es6.math.sinh */ "./node_modules/core-js/modules/es6.math.sinh.js");
__webpack_require__(/*! ./modules/es6.math.tanh */ "./node_modules/core-js/modules/es6.math.tanh.js");
__webpack_require__(/*! ./modules/es6.math.trunc */ "./node_modules/core-js/modules/es6.math.trunc.js");
__webpack_require__(/*! ./modules/es6.string.from-code-point */ "./node_modules/core-js/modules/es6.string.from-code-point.js");
__webpack_require__(/*! ./modules/es6.string.raw */ "./node_modules/core-js/modules/es6.string.raw.js");
__webpack_require__(/*! ./modules/es6.string.trim */ "./node_modules/core-js/modules/es6.string.trim.js");
__webpack_require__(/*! ./modules/es6.string.iterator */ "./node_modules/core-js/modules/es6.string.iterator.js");
__webpack_require__(/*! ./modules/es6.string.code-point-at */ "./node_modules/core-js/modules/es6.string.code-point-at.js");
__webpack_require__(/*! ./modules/es6.string.ends-with */ "./node_modules/core-js/modules/es6.string.ends-with.js");
__webpack_require__(/*! ./modules/es6.string.includes */ "./node_modules/core-js/modules/es6.string.includes.js");
__webpack_require__(/*! ./modules/es6.string.repeat */ "./node_modules/core-js/modules/es6.string.repeat.js");
__webpack_require__(/*! ./modules/es6.string.starts-with */ "./node_modules/core-js/modules/es6.string.starts-with.js");
__webpack_require__(/*! ./modules/es6.string.anchor */ "./node_modules/core-js/modules/es6.string.anchor.js");
__webpack_require__(/*! ./modules/es6.string.big */ "./node_modules/core-js/modules/es6.string.big.js");
__webpack_require__(/*! ./modules/es6.string.blink */ "./node_modules/core-js/modules/es6.string.blink.js");
__webpack_require__(/*! ./modules/es6.string.bold */ "./node_modules/core-js/modules/es6.string.bold.js");
__webpack_require__(/*! ./modules/es6.string.fixed */ "./node_modules/core-js/modules/es6.string.fixed.js");
__webpack_require__(/*! ./modules/es6.string.fontcolor */ "./node_modules/core-js/modules/es6.string.fontcolor.js");
__webpack_require__(/*! ./modules/es6.string.fontsize */ "./node_modules/core-js/modules/es6.string.fontsize.js");
__webpack_require__(/*! ./modules/es6.string.italics */ "./node_modules/core-js/modules/es6.string.italics.js");
__webpack_require__(/*! ./modules/es6.string.link */ "./node_modules/core-js/modules/es6.string.link.js");
__webpack_require__(/*! ./modules/es6.string.small */ "./node_modules/core-js/modules/es6.string.small.js");
__webpack_require__(/*! ./modules/es6.string.strike */ "./node_modules/core-js/modules/es6.string.strike.js");
__webpack_require__(/*! ./modules/es6.string.sub */ "./node_modules/core-js/modules/es6.string.sub.js");
__webpack_require__(/*! ./modules/es6.string.sup */ "./node_modules/core-js/modules/es6.string.sup.js");
__webpack_require__(/*! ./modules/es6.date.now */ "./node_modules/core-js/modules/es6.date.now.js");
__webpack_require__(/*! ./modules/es6.date.to-json */ "./node_modules/core-js/modules/es6.date.to-json.js");
__webpack_require__(/*! ./modules/es6.date.to-iso-string */ "./node_modules/core-js/modules/es6.date.to-iso-string.js");
__webpack_require__(/*! ./modules/es6.date.to-string */ "./node_modules/core-js/modules/es6.date.to-string.js");
__webpack_require__(/*! ./modules/es6.date.to-primitive */ "./node_modules/core-js/modules/es6.date.to-primitive.js");
__webpack_require__(/*! ./modules/es6.array.is-array */ "./node_modules/core-js/modules/es6.array.is-array.js");
__webpack_require__(/*! ./modules/es6.array.from */ "./node_modules/core-js/modules/es6.array.from.js");
__webpack_require__(/*! ./modules/es6.array.of */ "./node_modules/core-js/modules/es6.array.of.js");
__webpack_require__(/*! ./modules/es6.array.join */ "./node_modules/core-js/modules/es6.array.join.js");
__webpack_require__(/*! ./modules/es6.array.slice */ "./node_modules/core-js/modules/es6.array.slice.js");
__webpack_require__(/*! ./modules/es6.array.sort */ "./node_modules/core-js/modules/es6.array.sort.js");
__webpack_require__(/*! ./modules/es6.array.for-each */ "./node_modules/core-js/modules/es6.array.for-each.js");
__webpack_require__(/*! ./modules/es6.array.map */ "./node_modules/core-js/modules/es6.array.map.js");
__webpack_require__(/*! ./modules/es6.array.filter */ "./node_modules/core-js/modules/es6.array.filter.js");
__webpack_require__(/*! ./modules/es6.array.some */ "./node_modules/core-js/modules/es6.array.some.js");
__webpack_require__(/*! ./modules/es6.array.every */ "./node_modules/core-js/modules/es6.array.every.js");
__webpack_require__(/*! ./modules/es6.array.reduce */ "./node_modules/core-js/modules/es6.array.reduce.js");
__webpack_require__(/*! ./modules/es6.array.reduce-right */ "./node_modules/core-js/modules/es6.array.reduce-right.js");
__webpack_require__(/*! ./modules/es6.array.index-of */ "./node_modules/core-js/modules/es6.array.index-of.js");
__webpack_require__(/*! ./modules/es6.array.last-index-of */ "./node_modules/core-js/modules/es6.array.last-index-of.js");
__webpack_require__(/*! ./modules/es6.array.copy-within */ "./node_modules/core-js/modules/es6.array.copy-within.js");
__webpack_require__(/*! ./modules/es6.array.fill */ "./node_modules/core-js/modules/es6.array.fill.js");
__webpack_require__(/*! ./modules/es6.array.find */ "./node_modules/core-js/modules/es6.array.find.js");
__webpack_require__(/*! ./modules/es6.array.find-index */ "./node_modules/core-js/modules/es6.array.find-index.js");
__webpack_require__(/*! ./modules/es6.array.species */ "./node_modules/core-js/modules/es6.array.species.js");
__webpack_require__(/*! ./modules/es6.array.iterator */ "./node_modules/core-js/modules/es6.array.iterator.js");
__webpack_require__(/*! ./modules/es6.regexp.constructor */ "./node_modules/core-js/modules/es6.regexp.constructor.js");
__webpack_require__(/*! ./modules/es6.regexp.exec */ "./node_modules/core-js/modules/es6.regexp.exec.js");
__webpack_require__(/*! ./modules/es6.regexp.to-string */ "./node_modules/core-js/modules/es6.regexp.to-string.js");
__webpack_require__(/*! ./modules/es6.regexp.flags */ "./node_modules/core-js/modules/es6.regexp.flags.js");
__webpack_require__(/*! ./modules/es6.regexp.match */ "./node_modules/core-js/modules/es6.regexp.match.js");
__webpack_require__(/*! ./modules/es6.regexp.replace */ "./node_modules/core-js/modules/es6.regexp.replace.js");
__webpack_require__(/*! ./modules/es6.regexp.search */ "./node_modules/core-js/modules/es6.regexp.search.js");
__webpack_require__(/*! ./modules/es6.regexp.split */ "./node_modules/core-js/modules/es6.regexp.split.js");
__webpack_require__(/*! ./modules/es6.promise */ "./node_modules/core-js/modules/es6.promise.js");
__webpack_require__(/*! ./modules/es6.map */ "./node_modules/core-js/modules/es6.map.js");
__webpack_require__(/*! ./modules/es6.set */ "./node_modules/core-js/modules/es6.set.js");
__webpack_require__(/*! ./modules/es6.weak-map */ "./node_modules/core-js/modules/es6.weak-map.js");
__webpack_require__(/*! ./modules/es6.weak-set */ "./node_modules/core-js/modules/es6.weak-set.js");
__webpack_require__(/*! ./modules/es6.typed.array-buffer */ "./node_modules/core-js/modules/es6.typed.array-buffer.js");
__webpack_require__(/*! ./modules/es6.typed.data-view */ "./node_modules/core-js/modules/es6.typed.data-view.js");
__webpack_require__(/*! ./modules/es6.typed.int8-array */ "./node_modules/core-js/modules/es6.typed.int8-array.js");
__webpack_require__(/*! ./modules/es6.typed.uint8-array */ "./node_modules/core-js/modules/es6.typed.uint8-array.js");
__webpack_require__(/*! ./modules/es6.typed.uint8-clamped-array */ "./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js");
__webpack_require__(/*! ./modules/es6.typed.int16-array */ "./node_modules/core-js/modules/es6.typed.int16-array.js");
__webpack_require__(/*! ./modules/es6.typed.uint16-array */ "./node_modules/core-js/modules/es6.typed.uint16-array.js");
__webpack_require__(/*! ./modules/es6.typed.int32-array */ "./node_modules/core-js/modules/es6.typed.int32-array.js");
__webpack_require__(/*! ./modules/es6.typed.uint32-array */ "./node_modules/core-js/modules/es6.typed.uint32-array.js");
__webpack_require__(/*! ./modules/es6.typed.float32-array */ "./node_modules/core-js/modules/es6.typed.float32-array.js");
__webpack_require__(/*! ./modules/es6.typed.float64-array */ "./node_modules/core-js/modules/es6.typed.float64-array.js");
__webpack_require__(/*! ./modules/es6.reflect.apply */ "./node_modules/core-js/modules/es6.reflect.apply.js");
__webpack_require__(/*! ./modules/es6.reflect.construct */ "./node_modules/core-js/modules/es6.reflect.construct.js");
__webpack_require__(/*! ./modules/es6.reflect.define-property */ "./node_modules/core-js/modules/es6.reflect.define-property.js");
__webpack_require__(/*! ./modules/es6.reflect.delete-property */ "./node_modules/core-js/modules/es6.reflect.delete-property.js");
__webpack_require__(/*! ./modules/es6.reflect.enumerate */ "./node_modules/core-js/modules/es6.reflect.enumerate.js");
__webpack_require__(/*! ./modules/es6.reflect.get */ "./node_modules/core-js/modules/es6.reflect.get.js");
__webpack_require__(/*! ./modules/es6.reflect.get-own-property-descriptor */ "./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js");
__webpack_require__(/*! ./modules/es6.reflect.get-prototype-of */ "./node_modules/core-js/modules/es6.reflect.get-prototype-of.js");
__webpack_require__(/*! ./modules/es6.reflect.has */ "./node_modules/core-js/modules/es6.reflect.has.js");
__webpack_require__(/*! ./modules/es6.reflect.is-extensible */ "./node_modules/core-js/modules/es6.reflect.is-extensible.js");
__webpack_require__(/*! ./modules/es6.reflect.own-keys */ "./node_modules/core-js/modules/es6.reflect.own-keys.js");
__webpack_require__(/*! ./modules/es6.reflect.prevent-extensions */ "./node_modules/core-js/modules/es6.reflect.prevent-extensions.js");
__webpack_require__(/*! ./modules/es6.reflect.set */ "./node_modules/core-js/modules/es6.reflect.set.js");
__webpack_require__(/*! ./modules/es6.reflect.set-prototype-of */ "./node_modules/core-js/modules/es6.reflect.set-prototype-of.js");
__webpack_require__(/*! ./modules/es7.array.includes */ "./node_modules/core-js/modules/es7.array.includes.js");
__webpack_require__(/*! ./modules/es7.array.flat-map */ "./node_modules/core-js/modules/es7.array.flat-map.js");
__webpack_require__(/*! ./modules/es7.array.flatten */ "./node_modules/core-js/modules/es7.array.flatten.js");
__webpack_require__(/*! ./modules/es7.string.at */ "./node_modules/core-js/modules/es7.string.at.js");
__webpack_require__(/*! ./modules/es7.string.pad-start */ "./node_modules/core-js/modules/es7.string.pad-start.js");
__webpack_require__(/*! ./modules/es7.string.pad-end */ "./node_modules/core-js/modules/es7.string.pad-end.js");
__webpack_require__(/*! ./modules/es7.string.trim-left */ "./node_modules/core-js/modules/es7.string.trim-left.js");
__webpack_require__(/*! ./modules/es7.string.trim-right */ "./node_modules/core-js/modules/es7.string.trim-right.js");
__webpack_require__(/*! ./modules/es7.string.match-all */ "./node_modules/core-js/modules/es7.string.match-all.js");
__webpack_require__(/*! ./modules/es7.symbol.async-iterator */ "./node_modules/core-js/modules/es7.symbol.async-iterator.js");
__webpack_require__(/*! ./modules/es7.symbol.observable */ "./node_modules/core-js/modules/es7.symbol.observable.js");
__webpack_require__(/*! ./modules/es7.object.get-own-property-descriptors */ "./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js");
__webpack_require__(/*! ./modules/es7.object.values */ "./node_modules/core-js/modules/es7.object.values.js");
__webpack_require__(/*! ./modules/es7.object.entries */ "./node_modules/core-js/modules/es7.object.entries.js");
__webpack_require__(/*! ./modules/es7.object.define-getter */ "./node_modules/core-js/modules/es7.object.define-getter.js");
__webpack_require__(/*! ./modules/es7.object.define-setter */ "./node_modules/core-js/modules/es7.object.define-setter.js");
__webpack_require__(/*! ./modules/es7.object.lookup-getter */ "./node_modules/core-js/modules/es7.object.lookup-getter.js");
__webpack_require__(/*! ./modules/es7.object.lookup-setter */ "./node_modules/core-js/modules/es7.object.lookup-setter.js");
__webpack_require__(/*! ./modules/es7.map.to-json */ "./node_modules/core-js/modules/es7.map.to-json.js");
__webpack_require__(/*! ./modules/es7.set.to-json */ "./node_modules/core-js/modules/es7.set.to-json.js");
__webpack_require__(/*! ./modules/es7.map.of */ "./node_modules/core-js/modules/es7.map.of.js");
__webpack_require__(/*! ./modules/es7.set.of */ "./node_modules/core-js/modules/es7.set.of.js");
__webpack_require__(/*! ./modules/es7.weak-map.of */ "./node_modules/core-js/modules/es7.weak-map.of.js");
__webpack_require__(/*! ./modules/es7.weak-set.of */ "./node_modules/core-js/modules/es7.weak-set.of.js");
__webpack_require__(/*! ./modules/es7.map.from */ "./node_modules/core-js/modules/es7.map.from.js");
__webpack_require__(/*! ./modules/es7.set.from */ "./node_modules/core-js/modules/es7.set.from.js");
__webpack_require__(/*! ./modules/es7.weak-map.from */ "./node_modules/core-js/modules/es7.weak-map.from.js");
__webpack_require__(/*! ./modules/es7.weak-set.from */ "./node_modules/core-js/modules/es7.weak-set.from.js");
__webpack_require__(/*! ./modules/es7.global */ "./node_modules/core-js/modules/es7.global.js");
__webpack_require__(/*! ./modules/es7.system.global */ "./node_modules/core-js/modules/es7.system.global.js");
__webpack_require__(/*! ./modules/es7.error.is-error */ "./node_modules/core-js/modules/es7.error.is-error.js");
__webpack_require__(/*! ./modules/es7.math.clamp */ "./node_modules/core-js/modules/es7.math.clamp.js");
__webpack_require__(/*! ./modules/es7.math.deg-per-rad */ "./node_modules/core-js/modules/es7.math.deg-per-rad.js");
__webpack_require__(/*! ./modules/es7.math.degrees */ "./node_modules/core-js/modules/es7.math.degrees.js");
__webpack_require__(/*! ./modules/es7.math.fscale */ "./node_modules/core-js/modules/es7.math.fscale.js");
__webpack_require__(/*! ./modules/es7.math.iaddh */ "./node_modules/core-js/modules/es7.math.iaddh.js");
__webpack_require__(/*! ./modules/es7.math.isubh */ "./node_modules/core-js/modules/es7.math.isubh.js");
__webpack_require__(/*! ./modules/es7.math.imulh */ "./node_modules/core-js/modules/es7.math.imulh.js");
__webpack_require__(/*! ./modules/es7.math.rad-per-deg */ "./node_modules/core-js/modules/es7.math.rad-per-deg.js");
__webpack_require__(/*! ./modules/es7.math.radians */ "./node_modules/core-js/modules/es7.math.radians.js");
__webpack_require__(/*! ./modules/es7.math.scale */ "./node_modules/core-js/modules/es7.math.scale.js");
__webpack_require__(/*! ./modules/es7.math.umulh */ "./node_modules/core-js/modules/es7.math.umulh.js");
__webpack_require__(/*! ./modules/es7.math.signbit */ "./node_modules/core-js/modules/es7.math.signbit.js");
__webpack_require__(/*! ./modules/es7.promise.finally */ "./node_modules/core-js/modules/es7.promise.finally.js");
__webpack_require__(/*! ./modules/es7.promise.try */ "./node_modules/core-js/modules/es7.promise.try.js");
__webpack_require__(/*! ./modules/es7.reflect.define-metadata */ "./node_modules/core-js/modules/es7.reflect.define-metadata.js");
__webpack_require__(/*! ./modules/es7.reflect.delete-metadata */ "./node_modules/core-js/modules/es7.reflect.delete-metadata.js");
__webpack_require__(/*! ./modules/es7.reflect.get-metadata */ "./node_modules/core-js/modules/es7.reflect.get-metadata.js");
__webpack_require__(/*! ./modules/es7.reflect.get-metadata-keys */ "./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js");
__webpack_require__(/*! ./modules/es7.reflect.get-own-metadata */ "./node_modules/core-js/modules/es7.reflect.get-own-metadata.js");
__webpack_require__(/*! ./modules/es7.reflect.get-own-metadata-keys */ "./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js");
__webpack_require__(/*! ./modules/es7.reflect.has-metadata */ "./node_modules/core-js/modules/es7.reflect.has-metadata.js");
__webpack_require__(/*! ./modules/es7.reflect.has-own-metadata */ "./node_modules/core-js/modules/es7.reflect.has-own-metadata.js");
__webpack_require__(/*! ./modules/es7.reflect.metadata */ "./node_modules/core-js/modules/es7.reflect.metadata.js");
__webpack_require__(/*! ./modules/es7.asap */ "./node_modules/core-js/modules/es7.asap.js");
__webpack_require__(/*! ./modules/es7.observable */ "./node_modules/core-js/modules/es7.observable.js");
__webpack_require__(/*! ./modules/web.timers */ "./node_modules/core-js/modules/web.timers.js");
__webpack_require__(/*! ./modules/web.immediate */ "./node_modules/core-js/modules/web.immediate.js");
__webpack_require__(/*! ./modules/web.dom.iterable */ "./node_modules/core-js/modules/web.dom.iterable.js");
module.exports = __webpack_require__(/*! ./modules/_core */ "./node_modules/core-js/modules/_core.js");


/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/alertifyjs/build/css/alertify.min.css":
/*!************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--4-1!./node_modules/alertifyjs/build/css/alertify.min.css ***!
  \************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "/**\r\n * alertifyjs 1.11.4 http://alertifyjs.com\r\n * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.\r\n * Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com) \r\n * Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/\r\n.alertify .ajs-dimmer{position:fixed;z-index:1981;top:0;right:0;bottom:0;left:0;padding:0;margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{position:fixed;top:0;right:0;left:0;bottom:0;padding:0;overflow-y:auto;z-index:1981}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0 24px;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;right:4px;margin:-14px 24px 0 0;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-left:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px;margin-bottom:0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 24px 16px 16px}.alertify .ajs-footer{padding:4px;margin-left:-24px;margin-right:-24px;min-height:43px;background-color:#fff}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:left;clear:none;text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;right:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(1);transform:scaleX(1);cursor:se-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{left:0;right:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-left:-24px;margin-right:-24px}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content{padding:0}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{left:0;right:0}.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-closable .ajs-commands button.ajs-close{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;left:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 24px 0 0}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;left:0;right:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;right:24px;bottom:50px;left:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;left:0;right:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;left:0;right:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;right:0;bottom:0;left:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;right:0;bottom:0;left:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:1px dotted #3593d2}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-property:opacity,visibility;transition-property:opacity,visibility;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:250ms;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1.275);animation-timing-function:cubic-bezier(.175,.885,.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(.6,-.28,.735,.045);animation-timing-function:cubic-bezier(.6,-.28,.735,.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.275);transition-timing-function:cubic-bezier(.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier .ajs-message .ajs-close{position:absolute;top:0;right:0;width:16px;height:16px;cursor:pointer;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAFBJREFUGBl1j0EKADEIA+ve/P9f9bh1hEihNBfjVCO1v7RKVqJK4h8gM5cAPR42AkQEpSXPwMTyoi13n5N9YqJehm3Fnr7nL1D0ZEbD5OubGyC7a9gx+9eNAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center center;background-color:rgba(0,0,0,.5);border-top-right-radius:2px}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{right:10px}.alertify-notifier.ajs-right .ajs-message{right:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{right:290px}.alertify-notifier.ajs-left{left:10px}.alertify-notifier.ajs-left .ajs-message{left:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{left:0}.alertify-notifier.ajs-center{left:50%}.alertify-notifier.ajs-center .ajs-message{-webkit-transform:translateX(-50%);transform:translateX(-50%)}.alertify-notifier.ajs-center .ajs-message.ajs-visible{left:50%;-webkit-transition-timing-function:cubic-bezier(.57,.43,.1,.65);transition-timing-function:cubic-bezier(.57,.43,.1,.65)}.alertify-notifier.ajs-center.ajs-top .ajs-message{top:-300px}.alertify-notifier.ajs-center.ajs-top .ajs-message.ajs-visible{top:0}.alertify-notifier.ajs-center.ajs-bottom .ajs-message{bottom:-300px}.alertify-notifier.ajs-center.ajs-bottom .ajs-message.ajs-visible{bottom:0}", ""]);


/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/spectrum-colorpicker/spectrum.css":
/*!********************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--4-1!./node_modules/spectrum-colorpicker/spectrum.css ***!
  \********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "/***\nSpectrum Colorpicker v1.8.0\nhttps://github.com/bgrins/spectrum\nAuthor: Brian Grinstead\nLicense: MIT\n***/\n\n.sp-container {\n    position:absolute;\n    top:0;\n    left:0;\n    display:inline-block;\n    *display: inline;\n    *zoom: 1;\n    /* https://github.com/bgrins/spectrum/issues/40 */\n    z-index: 9999994;\n    overflow: hidden;\n}\n.sp-container.sp-flat {\n    position: relative;\n}\n\n/* Fix for * { box-sizing: border-box; } */\n.sp-container,\n.sp-container * {\n    -webkit-box-sizing: content-box;\n       -moz-box-sizing: content-box;\n            box-sizing: content-box;\n}\n\n/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */\n.sp-top {\n  position:relative;\n  width: 100%;\n  display:inline-block;\n}\n.sp-top-inner {\n   position:absolute;\n   top:0;\n   left:0;\n   bottom:0;\n   right:0;\n}\n.sp-color {\n    position: absolute;\n    top:0;\n    left:0;\n    bottom:0;\n    right:20%;\n}\n.sp-hue {\n    position: absolute;\n    top:0;\n    right:0;\n    bottom:0;\n    left:84%;\n    height: 100%;\n}\n\n.sp-clear-enabled .sp-hue {\n    top:33px;\n    height: 77.5%;\n}\n\n.sp-fill {\n    padding-top: 80%;\n}\n.sp-sat, .sp-val {\n    position: absolute;\n    top:0;\n    left:0;\n    right:0;\n    bottom:0;\n}\n\n.sp-alpha-enabled .sp-top {\n    margin-bottom: 18px;\n}\n.sp-alpha-enabled .sp-alpha {\n    display: block;\n}\n.sp-alpha-handle {\n    position:absolute;\n    top:-4px;\n    bottom: -4px;\n    width: 6px;\n    left: 50%;\n    cursor: pointer;\n    border: 1px solid black;\n    background: white;\n    opacity: .8;\n}\n.sp-alpha {\n    display: none;\n    position: absolute;\n    bottom: -14px;\n    right: 0;\n    left: 0;\n    height: 8px;\n}\n.sp-alpha-inner {\n    border: solid 1px #333;\n}\n\n.sp-clear {\n    display: none;\n}\n\n.sp-clear.sp-clear-display {\n    background-position: center;\n}\n\n.sp-clear-enabled .sp-clear {\n    display: block;\n    position:absolute;\n    top:0px;\n    right:0;\n    bottom:0;\n    left:84%;\n    height: 28px;\n}\n\n/* Don't allow text selection */\n.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button  {\n    -webkit-user-select:none;\n    -moz-user-select: -moz-none;\n    -o-user-select:none;\n    user-select: none;\n}\n\n.sp-container.sp-input-disabled .sp-input-container {\n    display: none;\n}\n.sp-container.sp-buttons-disabled .sp-button-container {\n    display: none;\n}\n.sp-container.sp-palette-buttons-disabled .sp-palette-button-container {\n    display: none;\n}\n.sp-palette-only .sp-picker-container {\n    display: none;\n}\n.sp-palette-disabled .sp-palette-container {\n    display: none;\n}\n\n.sp-initial-disabled .sp-initial {\n    display: none;\n}\n\n\n/* Gradients for hue, saturation and value instead of images.  Not pretty... but it works */\n.sp-sat {\n    background-image: -webkit-gradient(linear,  0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));\n    background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));\n    background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\n    background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\n    background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\n    background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)\";\n    filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');\n}\n.sp-val {\n    background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));\n    background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));\n    background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\n    background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\n    background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\n    background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)\";\n    filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');\n}\n\n.sp-hue {\n    background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n    background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n    background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n    background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));\n    background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n    background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n}\n\n/* IE filters do not support multiple color stops.\n   Generate 6 divs, line them up, and do two color gradients for each.\n   Yes, really.\n */\n.sp-1 {\n    height:17%;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');\n}\n.sp-2 {\n    height:16%;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');\n}\n.sp-3 {\n    height:17%;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');\n}\n.sp-4 {\n    height:17%;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');\n}\n.sp-5 {\n    height:16%;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');\n}\n.sp-6 {\n    height:17%;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');\n}\n\n.sp-hidden {\n    display: none !important;\n}\n\n/* Clearfix hack */\n.sp-cf:before, .sp-cf:after { content: \"\"; display: table; }\n.sp-cf:after { clear: both; }\n.sp-cf { *zoom: 1; }\n\n/* Mobile devices, make hue slider bigger so it is easier to slide */\n@media (max-device-width: 480px) {\n    .sp-color { right: 40%; }\n    .sp-hue { left: 63%; }\n    .sp-fill { padding-top: 60%; }\n}\n.sp-dragger {\n   border-radius: 5px;\n   height: 5px;\n   width: 5px;\n   border: 1px solid #fff;\n   background: #000;\n   cursor: pointer;\n   position:absolute;\n   top:0;\n   left: 0;\n}\n.sp-slider {\n    position: absolute;\n    top:0;\n    cursor:pointer;\n    height: 3px;\n    left: -1px;\n    right: -1px;\n    border: 1px solid #000;\n    background: white;\n    opacity: .8;\n}\n\n/*\nTheme authors:\nHere are the basic themeable display options (colors, fonts, global widths).\nSee http://bgrins.github.io/spectrum/themes/ for instructions.\n*/\n\n.sp-container {\n    border-radius: 0;\n    background-color: #ECECEC;\n    border: solid 1px #f0c49B;\n    padding: 0;\n}\n.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {\n    font: normal 12px \"Lucida Grande\", \"Lucida Sans Unicode\", \"Lucida Sans\", Geneva, Verdana, sans-serif;\n    -webkit-box-sizing: border-box;\n    -moz-box-sizing: border-box;\n    -ms-box-sizing: border-box;\n    box-sizing: border-box;\n}\n.sp-top {\n    margin-bottom: 3px;\n}\n.sp-color, .sp-hue, .sp-clear {\n    border: solid 1px #666;\n}\n\n/* Input */\n.sp-input-container {\n    float:right;\n    width: 100px;\n    margin-bottom: 4px;\n}\n.sp-initial-disabled  .sp-input-container {\n    width: 100%;\n}\n.sp-input {\n   font-size: 12px !important;\n   border: 1px inset;\n   padding: 4px 5px;\n   margin: 0;\n   width: 100%;\n   background:transparent;\n   border-radius: 3px;\n   color: #222;\n}\n.sp-input:focus  {\n    border: 1px solid orange;\n}\n.sp-input.sp-validation-error {\n    border: 1px solid red;\n    background: #fdd;\n}\n.sp-picker-container , .sp-palette-container {\n    float:left;\n    position: relative;\n    padding: 10px;\n    padding-bottom: 300px;\n    margin-bottom: -290px;\n}\n.sp-picker-container {\n    width: 172px;\n    border-left: solid 1px #fff;\n}\n\n/* Palettes */\n.sp-palette-container {\n    border-right: solid 1px #ccc;\n}\n\n.sp-palette-only .sp-palette-container {\n    border: 0;\n}\n\n.sp-palette .sp-thumb-el {\n    display: block;\n    position:relative;\n    float:left;\n    width: 24px;\n    height: 15px;\n    margin: 3px;\n    cursor: pointer;\n    border:solid 2px transparent;\n}\n.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {\n    border-color: orange;\n}\n.sp-thumb-el {\n    position:relative;\n}\n\n/* Initial */\n.sp-initial {\n    float: left;\n    border: solid 1px #333;\n}\n.sp-initial span {\n    width: 30px;\n    height: 25px;\n    border:none;\n    display:block;\n    float:left;\n    margin:0;\n}\n\n.sp-initial .sp-clear-display {\n    background-position: center;\n}\n\n/* Buttons */\n.sp-palette-button-container,\n.sp-button-container {\n    float: right;\n}\n\n/* Replacer (the little preview div that shows up instead of the <input>) */\n.sp-replacer {\n    margin:0;\n    overflow:hidden;\n    cursor:pointer;\n    padding: 4px;\n    display:inline-block;\n    *zoom: 1;\n    *display: inline;\n    border: solid 1px #91765d;\n    background: #eee;\n    color: #333;\n    vertical-align: middle;\n}\n.sp-replacer:hover, .sp-replacer.sp-active {\n    border-color: #F0C49B;\n    color: #111;\n}\n.sp-replacer.sp-disabled {\n    cursor:default;\n    border-color: silver;\n    color: silver;\n}\n.sp-dd {\n    padding: 2px 0;\n    height: 16px;\n    line-height: 16px;\n    float:left;\n    font-size:10px;\n}\n.sp-preview {\n    position:relative;\n    width:25px;\n    height: 20px;\n    border: solid 1px #222;\n    margin-right: 5px;\n    float:left;\n    z-index: 0;\n}\n\n.sp-palette {\n    *width: 220px;\n    max-width: 220px;\n}\n.sp-palette .sp-thumb-el {\n    width:16px;\n    height: 16px;\n    margin:2px 1px;\n    border: solid 1px #d0d0d0;\n}\n\n.sp-container {\n    padding-bottom:0;\n}\n\n\n/* Buttons: http://hellohappy.org/css3-buttons/ */\n.sp-container button {\n  background-color: #eeeeee;\n  background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);\n  background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);\n  background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);\n  background-image: -o-linear-gradient(top, #eeeeee, #cccccc);\n  background-image: linear-gradient(to bottom, #eeeeee, #cccccc);\n  border: 1px solid #ccc;\n  border-bottom: 1px solid #bbb;\n  border-radius: 3px;\n  color: #333;\n  font-size: 14px;\n  line-height: 1;\n  padding: 5px 4px;\n  text-align: center;\n  text-shadow: 0 1px 0 #eee;\n  vertical-align: middle;\n}\n.sp-container button:hover {\n    background-color: #dddddd;\n    background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);\n    background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);\n    background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);\n    background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);\n    background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);\n    border: 1px solid #bbb;\n    border-bottom: 1px solid #999;\n    cursor: pointer;\n    text-shadow: 0 1px 0 #ddd;\n}\n.sp-container button:active {\n    border: 1px solid #aaa;\n    border-bottom: 1px solid #888;\n    -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;\n    -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;\n    -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;\n    -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;\n    box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;\n}\n.sp-cancel {\n    font-size: 11px;\n    color: #d93f3f !important;\n    margin:0;\n    padding:2px;\n    margin-right: 5px;\n    vertical-align: middle;\n    text-decoration:none;\n\n}\n.sp-cancel:hover {\n    color: #d93f3f !important;\n    text-decoration: underline;\n}\n\n\n.sp-palette span:hover, .sp-palette span.sp-thumb-active {\n    border-color: #000;\n}\n\n.sp-preview, .sp-alpha, .sp-thumb-el {\n    position:relative;\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);\n}\n.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner {\n    display:block;\n    position:absolute;\n    top:0;left:0;bottom:0;right:0;\n}\n\n.sp-palette .sp-thumb-inner {\n    background-position: 50% 50%;\n    background-repeat: no-repeat;\n}\n\n.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);\n}\n\n.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);\n}\n\n.sp-clear-display {\n    background-repeat:no-repeat;\n    background-position: center;\n    background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==);\n}\n", ""]);


/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./src/css/layout.css":
/*!****************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--4-1!./src/css/layout.css ***!
  \****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, ".wrapper{\n\theight: calc(100vh - 30px);\n\tmargin: 0;\n\tposition:relative;\n\toverflow: hidden;\n}\n.trn{}\n.toggle{\n\tcursor: pointer;\n}\n.hidden{\n\tdisplay:none;\n}\n.pointer{\n\tcursor: pointer;\n}\n.clear{\n\tclear:both;\n}\n.displayBlock{\n\tdisplay: block;\n}\n.bold{\n\tfont-weight: bold;\n}\n.left{\n\tfloat: left;\n}\n.right{\n\tfloat: right;\n}\n.grey{\n\tcolor:grey;\n}\n.external{\n\tpadding-right: 15px;\n}\n.external:after{\n\tposition:absolute;\n\tcontent: \"\";\n\twidth:10px;\n\theight:10px;\n\tmargin-left: 5px;\n\tbackground: url(images/sprites.png) no-repeat -700px 0;\n\topacity: 0.3;\n}\n.noselect {\n\t-webkit-touch-callout: none; /* iOS Safari */\n    -webkit-user-select: none; /* Safari */\n\t-khtml-user-select: none; /* Konqueror HTML */\n\t-moz-user-select: none; /* Firefox */\n\t-ms-user-select: none; /* Internet Explorer/Edge */\n\tuser-select: none; /* Non-prefixed version */\n}\n.block{\n\tposition: relative;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--background-color-area);\n\tborder: 1px solid rgba(0, 0, 0, 0.5);\n\tborder: 1px solid var(--border-color);\n\tmargin-bottom: 10px;\n\tuser-select: none;\n}\n.sidebar_right .block{\n\tbackground-color: #68727b;\n\tbackground-color: var(--background-color-section);\n}\n.block:last-child{\n\tmargin-bottom: 0;\n}\n.block h2{\n\tposition: relative;\n\tpadding: 2px 5px;\n\tmargin: 0;\n\tfont-size: 110%;\n\tbackground-color: rgba(255, 255, 255, 0.3);\n\tbackground-color: var(--background-color-header);\n\tborder-bottom: #555;\n}\n.block.toggled h2, .block h2.toggled:after{\n\tborder: none;\n}\n.block h2.toggle:before{\n\t/* icon */\n\tposition:absolute;\n\tcontent:'';\n\twidth: 0;\n\theight: 0;\n\tright: 10px;\n\ttop: 10px;\n\tborder-style: solid;\n\tborder-width: 0 5px 6px 5px;\n\tborder-color: transparent transparent #333333 transparent;\n}\n.block h2.toggled:before{\n\t/* icon */\n\tborder-width: 6px 5px 0 5px;\n\tborder-color: #333333 transparent transparent transparent;\n}\n.block .content{\n\tpadding:5px;\n}\n.error{\n\tpadding:20px;\n\tmargin:10px;\n\tborder:1px solid #ff0000;\n\tbackground-color:#ffffff;\n\twidth:500px;\n\tfont-weight:bold;\n}\n\n/* color chooser */\nbody .sp-replacer{\n\twidth: 100%;\n\theight: 40px;\n}\nbody .sp-preview{\n\twidth: calc(100% - 20px);\n\theight: 100%;\n}\n\n/* ========== header ======================================================== */\n\n.logo{\n\tposition: relative;\n\tdisplay: inline-block;\n\tfloat: left;\n\theight: 30px;\n\twidth: 110px;\n\tpadding: 5px 5px 5px 36px;\n\tmargin: 5px;\n\tfont-size: 14px;\n\ttext-decoration: none;\n\tfont-weight: bold;\n\tcolor: #ffffff;\n\tcolor: var(--text-color);\n\tvisibility: hidden;\n}\n.logo:after{\n\tposition:absolute;\n\tcontent:\"\";\n\tleft: 0;\n\ttop: 0;\n\twidth: 31px;\n\theight: 30px;\n\tbackground: url(images/sprites.png) -50px -100px no-repeat;\n}\n.logo:hover:after{\n\tanimation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97);\n}\n.about-logo{\n\tmargin-left:22%;\n\tanimation:shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97);;\n}\n.about-name{\n\tfont-size:15px;\n\tcolor:#006900;\n\tfont-weight:bold;\n}\n@keyframes shake{\n\t10%, 90%{\n\t\ttransform: translate(2px, 0px);\n\t}\n\t20%, 80%{\n\t\ttransform: translate(5px 0px);\n\t}\n\t30%, 50%, 70%{\n\t\ttransform: translate(0px 0px);\n\t}\n\t40%, 60%{\n\t\ttransform: translate(6px 0px);\n\t}\n}\n/* ========== sub-header ==================================================== */\n\n.submenu{\n\theight:40px;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--background-color-section);\n\toverflow: hidden;\n}\n.attributes{\n\tfloat: left;\n\twidth: calc(100% - 125px);\n\theight: 30px;\n\tmargin-top: 5px;\n\tpadding: 3px 10px 0 10px;\n\tborder: 0;\n}\n.attributes .item{\n\tdisplay: inline-block;\n\tmargin-right: 20px;\n}\n.attributes input[type=\"number\"]{\n\twidth: 60px;\n\tmargin-right: 5px;\n}\n.attributes button{\n\tdisplay: inline-block;\n\tpadding: 3px 10px;\n\tborder: 1px solid #444;\n\tborder-color: var(--border-color);\n\tbackground-color: var(--background-color-button);\n\tmargin-right: 5px;\n}\n.attributes button:hover{\n\tbackground-color: rgba(255, 255, 255, 0.3);\n\tbackground-color: var(--background-color-hover);\n}\n.attributes button.active{\n\tbackground-color: #419147;\n\tbackground-color: var(--background-color-active);\n}\n\n/* ========== left sidebar ================================================== */\n\n.sidebar_left{\n\tposition: absolute;\n\tleft:0px;\n\ttop: 45px;\n\twidth: 40px;\n\tpadding: 0 5px;\n\tbackground-color: var(--background-color-section);\n}\n.sidebar_left .item{\n\tdisplay:block;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--background-color-area);\n\tbackground-image: url(images/sprites.png);\n\tbackground-repeat: no-repeat;\n\theight: 25px;\n\tmargin: 5px 0 5px 0;\n\toverflow: hidden;\n\tcursor: pointer;\n}\n.sidebar_left .item:hover{\n\tbackground-color: rgba(255, 255, 255, 0.5);\n\tbackground-color: var(--background-color-hover);\n}\n.sidebar_left .item.active{\n\tbackground-color: #419147;\n\tbackground-color: var(--background-color-active);\n}\n\n.sidebar_left .select{ background-position: -342px 2px; }\n.sidebar_left .selection{ background-position: -43px -47px; }\n.sidebar_left .magic_wand{ background-position: -294px -48px; }\n.sidebar_left .brush{ background-position: 5px 3px; }\n.sidebar_left .erase{ background-position: -444px 3px; }\n.sidebar_left .fill{ background-position: -145px 2px; }\n.sidebar_left .pick_color{ background-position: -643px 4px; }\n.sidebar_left .pencil{ background-position: -594px 3px; }\n.sidebar_left .line{ background-position: -193px -46px; }\n.sidebar_left .text{ background-position: -394px 4px; }\n.sidebar_left .rectangle{ background-position: -94px -45px; }\n.sidebar_left .circle{ background-position:  -547px 2px; }\n.sidebar_left .blur{ background-position: -41px 2px; }\n.sidebar_left .sharpen{ background-position: 6px -47px; }\n.sidebar_left .desaturate{ background-position: -195px 3px; }\n.sidebar_left .bulge_pinch{ background-position: -93px 5px; }\n.sidebar_left .clone{ background-position: -493px 2px; }\n.sidebar_left .gradient{ background-position: -243px 5px; }\n.sidebar_left .crop{ background-position: -294px 3px; }\n.sidebar_left .animation{ background-position: -244px -47px; }\n.sidebar_left .media{ background-position: -145px -47px; }\n\n@media screen and (max-width:550px){\n\t#sidebar_left{\n\t\tleft: -110px;\n\t}\n}\n\n/* ========== right sidebar ================================================= */\n\n.sidebar_right{\n\tposition: absolute;\n\tz-index: 2;\n\tdisplay: flex;\n\tflex-direction: column;\n\tright: 5px;\n\ttop: 45px;\n\twidth: 200px;\n\theight: calc(100vh - 80px);\n\tbackground-color: #424F5A;\n\tbackground-color: var(--background-color);\n\ttransition: 0.2s;\n}\n.sidebar_right.active{\n\tright:0 !important;\n}\n.sidebar_right .block.layers{\n\tflex: 1;\n\toverflow-y: auto;\n}\n\n/* preview */\n.canvas_preview_wrapper{\n\tposition:relative;\n\theight:100px;\n\tmargin: 5px 5px 10px 5px;\n}\n.canvas_preview_details{\n\tpadding: 0 5px;\n}\n.preview canvas{\n\tcursor: pointer;\n}\n.details input{\n\tpadding: 5px 10px;\n}\n\n/* color */\n.color_area{\n\tborder: 1px solid #444;\n\twidth: calc(100% - 10px);\n\theight: 40px;\n\tcursor: pointer;\n\tmargin: 5px;\n}\n.colors .content{\n\tmargin-top: 10px;\n}\n.main_color_alt{\n\tborder:1px solid #393939;\n\tmargin-top:10px;\n\twidth:100%;\n\theight:40px;\n}\n.main_color_rgb{\n\tmargin-top:10px;\n}\n.main_color_rgb div{\n\tdisplay: inline-block;\n\twidth: calc(50% - 3px);\n\tvertical-align: top;\n}\n.main_color_rgb span, .hex{\n\tdisplay: inline-block;\n\tfont-weight: bold;\n\twidth: 35px;\n}\n.main_color_rgb input{\n\twidth:50px;\n}\n.main_color_rgb .red{ color:#aa0000; }\n.main_color_rgb .green{ color:#00aa00; }\n.main_color_rgb .blue{ color:#0000aa; }\n.main_color_rgb .alpha{ color: #333333; }\n\n.color_hex{\n\twidth: calc(100% - 41px);\n}\n#all_colors{\n\tmargin-top:10px;\n\tpadding:3px 0px 3px 3px;\n}\n\n/* layers */\n.layers_list{\n\tmargin-top: 10px;\n}\n.layers_arrow{\n\tdisplay:inline-block;\n\tfloat:right;\n\tmargin-left:5px;\n\tpadding:1px 8px;\n\tborder:1px solid #444;\n\tborder-color: var(--border-color);\n\ttext-decoration:none;\n\tcolor:#000000;\n\tfont-size:12px;\n}\n.layer_add{\n\tdisplay:inline-block;\n\tpadding:1px 8px;\n\tbackground-color: #419147;\n\tbackground-color: var(--background-color-active);\n\tborder:1px solid #444;\n\tborder-color: var(--border-color);\n\tcursor:pointer;\n\ttext-decoration:none;\n}\n.layers_list .item{\n\tmargin-bottom:2px;\n}\n.layers_list .layer_name{\n\tdisplay:block;\n\tpadding:1px 5px 3px 5px;\n\theight:19px;\n\toverflow:hidden;\n\tbackground-color:#989898;\n\tbackground-color: var(--background-color-area);\n\tborder:1px solid #393939;\n\tborder-color: var(--border-color);\n\tborder-radius:3px;\n\tcursor:pointer;\n\toverflow:hidden;\n\tfont-size: 12px;\n\tcolor:#333333;\n\twhite-space: nowrap;\n}\n.layers_list .item.active .layer_name{\n\tbackground-color: #419147;\n\tbackground-color: var(--background-color-active);\n}\n.layers_list .visibility{\n\tfloat:left;\n\tcursor:pointer;\n\tpadding:0px 3px 0px 3px;\n\tmargin-right: 5px;\n\twidth:20px;\n\theight:19px;\n\tbackground: url('images/sprites.png') no-repeat -148px -99px;\n\topacity:0.1;\n\tfilter: drop-shadow(0px 0px 2px white);\n}\n.layers_list .visible{ opacity:0.4; }\n.layers_list .delete{\n\tfloat:right;\n\tcursor:pointer;\n\tpadding:0px 3px 0px 3px;\n\twidth:12px;\n\theight:19px;\n\tmargin-left: 5px;\n\tbackground: url('images/sprites.png') no-repeat -100px -96px;\n}\n/* filters */\n.layers_list .filters{\n\tmargin-bottom: 5px;\n}\n.layers_list .filter{\n\tmargin-bottom: 2px;\n\tmargin-left: 30px;\n\topacity: 0.7;\n}\n.layers_list .filter .layer_name{\n\tposition: relative;\n}\n.layers_list .filter .layer_name:after{\n\tposition:absolute;\n\tcontent:\"fx\";\n\tright: -4px;\n\ttop:1px;\n\tbottom:0;\n\twidth: 20px;\n}\n.sidebar_right .label{\n\tdisplay: inline-block;\n\twidth: 60px;\n}\n.info .toggle.toggled{\n\tmargin-bottom: -3px;\n}\n.block.details .row{\n\tclear:both;\n\tmargin-bottom: 2px;\n}\n.block.details input{\n\twidth: 70px;\n\tpadding: 3px 5px;\n}\n.block.details select{\n\twidth: calc(100% - 70px);\n\theight: 23px;\n}\n.block.details button{\n\theight: 23px;\n\tborder: 1px solid #444;\n}\n.block.details button.reset{\n\twidth: 25px;\n\toverflow: hidden;\n\topacity: 0.3;\n\tbackground-image: url(images/sprites.png);\n\tbackground-repeat: no-repeat;\n\tbackground-position: -747px 2px;\n\tcolor: transparent;\n}\n.block.details button.active{\n\tbackground-color:  var(--background-color-active);\n}\n\n@media screen and (max-width:700px){\n\t.sidebar_right{\n\t\tright: -200px;\n\t}\n\t.sidebar_right.active{\n\t\tbox-shadow: -5px 0px 10px 0px rgba(0,0,0,0.75);\n\t}\n}\n\n/* ========== content ======================================================= */\n\n.main_wrapper{\n\theight: calc(100vh - 80px);\n\tmargin: 5px 210px 5px 45px;\n\toverflow: hidden;\n}\n.canvas_wrapper{\n\tposition:relative;\n}\n.canvas_wrapper canvas{\n\tposition: absolute;\n\tborder: 1px solid var(--border-color);\n\tbox-sizing: content-box;\n}\n#mouse{\n\tposition:absolute;\n\tpointer-events:none;\n\twidth:10px;\n\theight:10px;\n\tz-index:10;\n}\n#mouse.rect{\n\tborder:1px solid rgba(0,0,0,0.5);\n}\n#mouse.circle{\n\tborder:1px solid rgba(0,0,0,0.5);\n\tborder-radius:50%;\n}\n.transparent-grid{\n\twidth: 100%;\n\theight: 100%;\n\tposition: absolute;\n\tpointer-events: none;\n\t/*background: url(images/grid.png) repeat top left;*/\n\tbackground: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQElEQVQ4T2N89+7dfwYigKCgIBGqGBgYRw3EGU6jYYgzaIZAsvn//z9ROeX9+/fE5ZRRA3GG02gY4s4pgz7ZAAAnSWvHPkHXaAAAAABJRU5ErkJggg==') repeat top left;\n\tz-index:1;\n\t/* disable antialiasing */\n\timage-rendering: optimizeSpeed;\n\timage-rendering: -moz-crisp-edges;\n\timage-rendering: -webkit-optimize-contrast;\n\timage-rendering: -o-crisp-edges;\n\timage-rendering: pixelated;\n\t-ms-interpolation-mode: nearest-neighbor;\n}\n.transparent-grid.white{\n\tbackground:white;\n}\n.transparent-grid.green{\n\tbackground: #5be471;\n}\n.transparent-grid.grey{\n\tbackground: #dfdfdf;\n}\ncanvas{\n\tposition:relative;\n\tz-index:2;\n}\n#canvas_back{\n\tposition: absolute;\n\tbackground-color:#ffffff;\n\toutline: none;\n}\n#canvas_grid{\n\tpointer-events:none;\n}\n.group{\n\tborder:1px solid #999999;\n\tmargin: 5px 0px 5px 0px;\n\tpadding:5px 8px;\n}\n.flex-container{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\n.flex-container .item{\n\tflex: auto;\n\tmargin: 2px 0;\n\twidth: 150px;\n}\n.flex-container .item:empty{\n\theight: 0;\n\tborder: none;\n}\n.alertify-notifier{\n\tcolor: black;\n}\n\n@media screen and (max-width:700px){\n\tbody{\n\t\tpadding-top:50px;\n\t}\n\t.main_wrapper{\n\t\tmargin-right: 5px;\n\t}\n}\n@media screen and (max-width:550px){\n\t.canvas_wrapper{\n\t\tmargin-left: 0px;\n\t}\n}\n@media screen and (max-height: 720px){\n\t.sidebar_left{\n\t\twidth: 79px;\n\t\tpadding: 4px 2px 0px 2px;\n\t}\n\t.sidebar_left .item{\n\t\tdisplay: inline-block;\n\t\twidth: 30px;\n\t\tmargin-right: 5px;\n\t\tmargin: 1px 3px 0 3px;\n\t}\n\t.main_wrapper{\n\t\tmargin-left: 85px;\n\t}\t\n}\n", ""]);


/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./src/css/menu.css":
/*!**************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--4-1!./src/css/menu.css ***!
  \**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, ".mobile_menu{\n\tdisplay:none;\n\tposition: absolute;\n\twidth:100%;\n\ttop: 0;\n}\n.left_mobile_menu, .right_mobile_menu{\n\tposition:absolute;\n\twidth:50px;\n\theight:50px;\n\tbackground: url(\"images/sprites.png\") no-repeat 11px -86px;\n\tfilter: invert(1);\n\tdisplay:block;\n\ttop:0;\n\tz-index:200;\n\tborder:0;\n\toutline:0;\n\tcursor: pointer;\n}\n.left_mobile_menu{left:0;}\n.right_mobile_menu{right:0;}\n\n.ddsmoothmenu{\n\tposition:fixed;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\tfont:12px Arial,sans-serif;\n\tbackground: #2D2D2D;\n\tbackground: var(--background-color-menu);\n\twidth: 100%;\n\tpadding-left:10px;\n\tz-index:100;\n}\n.ddsmoothmenu ul{\n\tz-index:100;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style-type: none;\n\theight:30px;\n}\n.ddsmoothmenu ul li{\n\tposition: relative;\t\n\tdisplay: inline-block;\n\tfloat: left;\n\tcolor: #2d2b2b;\n\theight:100%;\n}\n.ddsmoothmenu ul ul li a{\n\twidth:100%;\n}\n.ddsmoothmenu .rightarrowclass{\n\tdisplay:none !important;\n}\n.ddsmoothmenu ul li a{\t\n\tdisplay: inline-block;\n\tcolor: #cccccc;\n\tcolor: var(--text-color-menu);\n\ttext-decoration: none;\n\ttext-align:center;\n\tpadding: 7px 10px 8px 10px !important;\n}\n.ddsmoothmenu ul ul li a{\t\n\tpadding-right: 25px !important;\n}\n.ddsmoothmenu ul li a.selected{\n\tbackground-color: #FFFFFF !important;\n\tcolor: #2d2b2b;\n}\n.ddsmoothmenu ul li ul li a.selected{\n\tbackground-color:#E4EBF8 !important;\n}\n.ddsmoothmenu ul li a:hover{\n\tbackground-color: #E4EBF8;\n\tcolor: #2D2D2D;\n}\n.ddsmoothmenu .hide_ul{\n\tposition: absolute;\n\tleft: -3000px;\n\tdisplay: none;\n\tvisibility: hidden;\n\tborder:1px solid #5680C1;\n\tborder-top:0px;\n}\n.ddsmoothmenu ul li ul{\n\tposition: absolute;\n\tleft: -3000px;\n\tdisplay: none;\n\tvisibility: hidden;\n\tborder:1px solid #5680C1;\n\tborder-top:0px;\n\tmargin-left: -1px;\n\theight:auto;\n\tmin-width:140px;\n\twidth:auto !important;\n\ttop:30px !important;\n}\n.ddsmoothmenu ul li ul li{\n\tdisplay: list-item;\n\tbackground: #ffffff;\n\tfloat: none;\n\theight:auto;\n\twidth:100%;\n}\n.ddsmoothmenu ul li ul li a{\n\ttext-align:left;\n}\n.ddsmoothmenu ul li ul li ul{\n\ttop: 0;\n\tborder-top:1px solid #5680C1;\n}\n.ddsmoothmenu ul li ul li a{\n\tpadding-left: 5px;\n\tpadding-right:5px;\n\tmargin: 0;\n\tcolor: #2D2D2D;\n\twhite-space: nowrap;\n}\n.ddsmoothmenu ul li ul li ul{\n\ttop:0 !important;\n}\n.ddsmoothmenu .downarrowclass{\n\tposition: absolute;\n\ttop: 12px;\n\tright: 7px;\n}\n.ddsmoothmenu .ddshadow{ \n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\twidth: 0;\n\theight: 0;\n\tbackground-color: #ccc;\n}\n.ddsmoothmenu .mid-line{\n\tbackground-color:#ff0000;\n\tborder-top:1px solid #e5e5e5;\n\tfont-size:0;\n\tpadding:0 8px 0 8px;\n}\n.ddsmoothmenu ul li ul li.more > a{\n\tposition:relative;\n}\n.ddsmoothmenu ul li ul li.more > a:before{\n\tposition: absolute;\n\tcontent:\">\";\n\tright: 9px;\n\twidth: 5px;\n\theight: 14px;\n\ttransform: scaleY(2);\n\tcolor: #808080;\n}\n.ddsmoothmenu ul li ul li ul{\n\tleft: calc(100% + 1px) !important;\n}\n.ddsmoothmenu .dots::after{\n\tcontent: \" ...\";\n}\n.ddsmoothmenu a[data-key]:after{\n\tposition: absolute;\n\tcontent: attr(data-key) \" \";\n\tcolor: #aaa;\n\tfont-size: 12px;\n\tmargin-left: 8px;\n\tright:10px;\n}\n\n@media screen and (max-width:700px){\n\t.mobile_menu{\n\t\tdisplay:block;\n\t}\n\t.left_mobile_menu{\n\t\tdisplay:none;\n\t}\n\t.ddsmoothmenu{\n\t\theight:50px;\n\t}\n\t.ddsmoothmenu ul{\n\t\twidth: calc(100% - 50px);\n\t\theight:50px;\n\t}\n\t.ddsmoothmenu > ul > li > a{\n\t\theight:50px;\n\t\tpadding-top: 15px !important;\n\t}\n\t.ddsmoothmenu ul li ul{\n\t\ttop:50px !important;\n\t}\n\t.ddsmoothmenu ul li ul li{\n\t\theight:auto;\n\t}\n\t.ddsmoothmenu ul li ul li a{\n\t\theight:30px;\n\t}\n}\n@media screen and (max-width:550px){\n\t.ddsmoothmenu{\n\t\tpadding-left:0;\n\t}\n\t.ddsmoothmenu ul{\n\t\twidth: calc(100% - 50px);\n\t}\n\t.ddsmoothmenu > ul > li{\n\t\twidth: calc(100% / 7);\n\t}\n\t.ddsmoothmenu > ul > li > a{\n\t\twidth:100%;\n\t\tpadding-left: 3px !important;\n\t\tpadding-right: 3px !important;\n\t\toverflow: hidden;\n\t}\n\t.left_mobile_menu{\n\t\tdisplay:block;\n\t}\n}\n", ""]);


/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./src/css/popup.css":
/*!***************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--4-1!./src/css/popup.css ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "#popup{\n\tposition:fixed;\n\tdisplay:none;\n\ttop: 20vh;\n\tleft: calc(50% - 500px / 2);\n\tbackground-color: #7A838B;\n\tbackground-color: var(--background-color-section);\n\tborder: 1px solid rgba(0, 0, 0, 0.5);\n\tborder: 1px solid var(--border-color);\n\twidth:500px;\n\tmax-width: 100%;\n\tmax-height: calc(80vh);\n\tmargin:0px auto 0px auto;\n\tpadding:10px;\n\tbox-shadow: 0 0 20px rgba(0,0,0,0.5);\n\tz-index: 100;\n\toverflow-y: auto;\n\tfont-size: 13px;\n\toverflow-y: scroll;\n}\n#popup.wide{\n\ttop: 15vh;\n\twidth: 800px;\n\tleft: calc(50% - 800px / 2);\n}\n#popup a{\n\tcolor: #000080;\n}\n#popup h2{\n\tmargin: -10px -10px 5px -10px;\n\tpadding: 6px 10px;\n\tfont-size: 18px;\n\tbackground-color: rgba(255, 255, 255, 0.3);\n\tbackground-color: var(--background-color-header);\n\t/*cursor:move;*/\n}\n#popup .buttons{\n\ttext-align:center;\n\tmargin-top:20px;\n\tmargin-bottom:5px;\n}\n#popup .close{\n\tfloat: right;\n\tmin-width: 0;\n\tpadding: 5px;\n\tline-height: 0.5;\n\tfont-size: 16px;\n\tmargin-left: 10px;\n\tborder: none;\n\tbackground: none;\n}\n#popup td, #popup th{\n\theight: 25px;\n}\n#popup td{\n\tvertical-align: middle;\n}\n#popup th{\n\ttext-align:left;\n\tpadding: 5px 5px 5px 0;\n\twidth: 130px;\n}\n#popup textarea{\n\tcolor:#000000;\n\twidth:100%;\n\tborder:1px solid #393939;\n\tpadding-left:5px;\n}\n#popup .button{\n\tmargin: 0 3px;\n\tbackground-color: rgba(255, 255, 255, 0.2);\n\tbackground-color: var(--background-color-button);\n\tmin-width:60px;\n\tborder:1px solid rgba(0, 0, 0, 0.5);\n\tborder:1px solid var(--border-color);\n\tpadding: 5px 10px;\n}\n#popup input[type=\"text\"], #popup input[type=\"number\"], #popup textarea{\n\twidth:100%;\n}\n#popup input[type=\"number\"]{\n\twidth:100px;\n}\n#popup input[type=\"radio\"], #popup input[type=\"checkbox\"]{\n\tmargin-left: 0;\n}\n#popup label span{\n\tcolor:#444444;\n}\n#popup .checkbox label{\n\tmargin-top: 5px;\n\tcolor:#444444;\n}\n@media screen and (max-width:500px){\n\t#popup{\n\t\tleft: 0;\n\t\twidth: 100%;\n\t}\n\t#canvas_preview_container{\n\t\tclear:both;\n\t}\n}\n@media screen and (max-height:650px){\n\t#popup{\n\t\ttop: 0;\n\t\tmax-height: 100vh;\n\t}\n\t#canvas_preview_container{\n\t\tclear:both;\n\t}\n}\n\n", ""]);


/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./src/css/print.css":
/*!***************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--4-1!./src/css/print.css ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "@media print{\n\tbody{\n\t\tbackground:none !important;\n\t\tbackground: #fff;\n\t\tbackground-color: #fff;\n\t\tfont-family: Arial,Helvetica,Verdana;\n\t\twidth:auto !important;\n\t\tpadding:5px !important;\n\t\tfont-size: 12px;\n\t}\n\tprogress,\n\t.menu,\n\t.sidebar_left,\n\t.sidebar_right,\n\t.submenu,\n\t.ddsmoothmenu{\n\t\tdisplay: none;\n\t\theight: 0;\n\t\twidth: 0;\n\t}\n\t.main_wrapper{\n\t\tmargin:0px;\n\t\tpadding:0px;\n\t}\n\tcanvas{\n\t\tborder:0px;\n\t\tposition: absolute;\n\t\ttop:0px;\n\t\tleft:0px;\n\t}\n\t.canvas_wrapper canvas{\n\t\tborder:0;\n\t}\n}", ""]);


/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./src/css/reset.css":
/*!***************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--4-1!./src/css/reset.css ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "*{\n\tbox-sizing: border-box;\n\tbackground-repeat: no-repeat;\n}\n:root {\n\t/* original - default */\n\t--background: #424F5A;\n\t--text-color: #000000;\n\t--background-color-section: #68727b;\n\t--background-color-area: #868e95;\n\t--background-color-header: #a2a8ae;\n\t--background-color-button: #959ca2;\n\t--background-color-menu: #2D2D2D;\n\t--text-color-menu: #cccccc;\n\t--background-color-active: #419147;\n\t--background-color-hover: #b4b9bd;\n\t--border-color: #3c3c3c;\n}\nbody.theme-light{\n\t/* light */\n\t--background: #f9f9fa;\n\t--text-color: #0c0c0d;\n\t--background-color-section: #f1f1f1;\n\t--background-color-area: #ccc;\n\t--background-color-header: #dcdcdc;\n\t--background-color-button: #f9f9fa;\n\t--background-color-menu: #f1f1f1;\n\t--text-color-menu: #333333;\n\t--background-color-active: #0a84ff;\n\t--background-color-hover: #e1e1e2;\n\t--border-color: #c1c1c1;\n}\nbody.theme-green{\n\t/* green */\n\t--background: #050702;\n\t--text-color: #acc3a9;\n\t--background-color-section: #1c2e04;\n\t--background-color-area: #3b5f11;\n\t--background-color-header: #2b460f;\n\t--background-color-button: #2e4a0d;\n\t--background-color-menu: #1c2e04;\n\t--text-color-menu: #acc3a9;\n\t--background-color-active: #58960e;\n\t--background-color-hover: #58960e;\n\t--border-color: #4d6b1e;\n}\nbody{\n\tmargin: 0px;\n\tpadding: 0px;\n\tpadding-top: 30px;\n\tbackground-color: #424F5A;\n\tbackground: var(--background);\n\tfont-size: 13px;\n\tfont-family: Arial, Helvetica, sans-serif;\n\tcolor: #000000;\n\tcolor: var(--text-color);\n\tline-height: 1.4;\n\tfont-weight: normal;\n\toverflow: hidden;\n}\ncanvas{\n\toutline: none;\n\t/* disable select canvas */\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\t-webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n\t/* disable antialiasing */\n\timage-rendering: optimizeSpeed;\n\timage-rendering: -moz-crisp-edges;\n\timage-rendering: -webkit-optimize-contrast;\n\timage-rendering: -o-crisp-edges;\n\timage-rendering: pixelated;\n\t-ms-interpolation-mode: nearest-neighbor;\n}\nimg{\n\tborder: none;\n}\ntd, th{\n\tvertical-align:top;\n}\ntable{\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tvertical-align: baseline;\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n\twidth:100%;\n}\nhr{\n\tborder-color: rgba(0,0,0,0.3);\n\tborder-bottom: 0;\n}\ninput[type=\"text\"], input[type=\"button\"], select, input[type=\"number\"], textarea{\n\tborder:1px solid #393939;\n\tborder-color: var(--border-color);\n\tpadding: 3px 5px;\n\tfont-size: 13px;\n}\ninput:disabled {\n\topacity: 0.3;\n}\nselect{\n\tpadding: 2px 4px;\n}\ninput[type=\"range\"]{\n\tmargin-left:0px;\n\twidth:100%;\n}\ninput[type=\"button\"]{\n\tbackground: #dddddd;\n}\ninput[type=\"button\"]:disabled{\n\tvisibility:hidden;\n}\nbutton{\n\tborder-radius: 0;\n\tcursor: pointer;\n\tbackground-color: var(--background-color-button);\n\tcolor: var(--color-text);\n}\nlabel{\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tmargin-top: 7px;\n}\n::-webkit-scrollbar {\n    width: 12px;\n    height: 12px;\n}\n::-webkit-scrollbar-track-piece {\n    background: rgba(0,0,0,0.3);\n}\n::-webkit-scrollbar-thumb {\n    background: rgba(0,0,0,0.6);\n}\n@supports (zoom:2) {\n\tinput[type=\"radio\"],  input[type=checkbox]{\n\t\tzoom: 1.5;\n\t}\n}\n@supports not (zoom:2) {\n\tinput[type=\"radio\"],  input[type=checkbox]{\n\t\ttransform: scale(1.5);\n\t\tmargin: 8px;\n\t}\n}", ""]);


/***/ }),

/***/ "./node_modules/css-loader/dist/runtime/api.js":
/*!*****************************************************!*\
  !*** ./node_modules/css-loader/dist/runtime/api.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
// eslint-disable-next-line func-names
module.exports = function (useSourceMap) {
  var list = []; // return the list of modules as css string

  list.toString = function toString() {
    return this.map(function (item) {
      var content = cssWithMappingToString(item, useSourceMap);

      if (item[2]) {
        return "@media ".concat(item[2], "{").concat(content, "}");
      }

      return content;
    }).join('');
  }; // import a list of modules into the list
  // eslint-disable-next-line func-names


  list.i = function (modules, mediaQuery) {
    if (typeof modules === 'string') {
      // eslint-disable-next-line no-param-reassign
      modules = [[null, modules, '']];
    }

    var alreadyImportedModules = {};

    for (var i = 0; i < this.length; i++) {
      // eslint-disable-next-line prefer-destructuring
      var id = this[i][0];

      if (id != null) {
        alreadyImportedModules[id] = true;
      }
    }

    for (var _i = 0; _i < modules.length; _i++) {
      var item = modules[_i]; // skip already imported module
      // this implementation is not 100% perfect for weird media query combinations
      // when a module is imported multiple times with different media queries.
      // I hope this will never occur (Hey this way we have smaller bundles)

      if (item[0] == null || !alreadyImportedModules[item[0]]) {
        if (mediaQuery && !item[2]) {
          item[2] = mediaQuery;
        } else if (mediaQuery) {
          item[2] = "(".concat(item[2], ") and (").concat(mediaQuery, ")");
        }

        list.push(item);
      }
    }
  };

  return list;
};

function cssWithMappingToString(item, useSourceMap) {
  var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring

  var cssMapping = item[3];

  if (!cssMapping) {
    return content;
  }

  if (useSourceMap && typeof btoa === 'function') {
    var sourceMapping = toComment(cssMapping);
    var sourceURLs = cssMapping.sources.map(function (source) {
      return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */");
    });
    return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  }

  return [content].join('\n');
} // Adapted from convert-source-map (MIT)


function toComment(sourceMap) {
  // eslint-disable-next-line no-undef
  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
  return "/*# ".concat(data, " */");
}

/***/ }),

/***/ "./node_modules/exif-js/exif.js":
/*!**************************************!*\
  !*** ./node_modules/exif-js/exif.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function() {

    var debug = false;

    var root = this;

    var EXIF = function(obj) {
        if (obj instanceof EXIF) return obj;
        if (!(this instanceof EXIF)) return new EXIF(obj);
        this.EXIFwrapped = obj;
    };

    if (true) {
        if ( true && module.exports) {
            exports = module.exports = EXIF;
        }
        exports.EXIF = EXIF;
    } else {}

    var ExifTags = EXIF.Tags = {

        // version tags
        0x9000 : "ExifVersion",             // EXIF version
        0xA000 : "FlashpixVersion",         // Flashpix format version

        // colorspace tags
        0xA001 : "ColorSpace",              // Color space information tag

        // image configuration
        0xA002 : "PixelXDimension",         // Valid width of meaningful image
        0xA003 : "PixelYDimension",         // Valid height of meaningful image
        0x9101 : "ComponentsConfiguration", // Information about channels
        0x9102 : "CompressedBitsPerPixel",  // Compressed bits per pixel

        // user information
        0x927C : "MakerNote",               // Any desired information written by the manufacturer
        0x9286 : "UserComment",             // Comments by user

        // related file
        0xA004 : "RelatedSoundFile",        // Name of related sound file

        // date and time
        0x9003 : "DateTimeOriginal",        // Date and time when the original image was generated
        0x9004 : "DateTimeDigitized",       // Date and time when the image was stored digitally
        0x9290 : "SubsecTime",              // Fractions of seconds for DateTime
        0x9291 : "SubsecTimeOriginal",      // Fractions of seconds for DateTimeOriginal
        0x9292 : "SubsecTimeDigitized",     // Fractions of seconds for DateTimeDigitized

        // picture-taking conditions
        0x829A : "ExposureTime",            // Exposure time (in seconds)
        0x829D : "FNumber",                 // F number
        0x8822 : "ExposureProgram",         // Exposure program
        0x8824 : "SpectralSensitivity",     // Spectral sensitivity
        0x8827 : "ISOSpeedRatings",         // ISO speed rating
        0x8828 : "OECF",                    // Optoelectric conversion factor
        0x9201 : "ShutterSpeedValue",       // Shutter speed
        0x9202 : "ApertureValue",           // Lens aperture
        0x9203 : "BrightnessValue",         // Value of brightness
        0x9204 : "ExposureBias",            // Exposure bias
        0x9205 : "MaxApertureValue",        // Smallest F number of lens
        0x9206 : "SubjectDistance",         // Distance to subject in meters
        0x9207 : "MeteringMode",            // Metering mode
        0x9208 : "LightSource",             // Kind of light source
        0x9209 : "Flash",                   // Flash status
        0x9214 : "SubjectArea",             // Location and area of main subject
        0x920A : "FocalLength",             // Focal length of the lens in mm
        0xA20B : "FlashEnergy",             // Strobe energy in BCPS
        0xA20C : "SpatialFrequencyResponse",    //
        0xA20E : "FocalPlaneXResolution",   // Number of pixels in width direction per FocalPlaneResolutionUnit
        0xA20F : "FocalPlaneYResolution",   // Number of pixels in height direction per FocalPlaneResolutionUnit
        0xA210 : "FocalPlaneResolutionUnit",    // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution
        0xA214 : "SubjectLocation",         // Location of subject in image
        0xA215 : "ExposureIndex",           // Exposure index selected on camera
        0xA217 : "SensingMethod",           // Image sensor type
        0xA300 : "FileSource",              // Image source (3 == DSC)
        0xA301 : "SceneType",               // Scene type (1 == directly photographed)
        0xA302 : "CFAPattern",              // Color filter array geometric pattern
        0xA401 : "CustomRendered",          // Special processing
        0xA402 : "ExposureMode",            // Exposure mode
        0xA403 : "WhiteBalance",            // 1 = auto white balance, 2 = manual
        0xA404 : "DigitalZoomRation",       // Digital zoom ratio
        0xA405 : "FocalLengthIn35mmFilm",   // Equivalent foacl length assuming 35mm film camera (in mm)
        0xA406 : "SceneCaptureType",        // Type of scene
        0xA407 : "GainControl",             // Degree of overall image gain adjustment
        0xA408 : "Contrast",                // Direction of contrast processing applied by camera
        0xA409 : "Saturation",              // Direction of saturation processing applied by camera
        0xA40A : "Sharpness",               // Direction of sharpness processing applied by camera
        0xA40B : "DeviceSettingDescription",    //
        0xA40C : "SubjectDistanceRange",    // Distance to subject

        // other tags
        0xA005 : "InteroperabilityIFDPointer",
        0xA420 : "ImageUniqueID"            // Identifier assigned uniquely to each image
    };

    var TiffTags = EXIF.TiffTags = {
        0x0100 : "ImageWidth",
        0x0101 : "ImageHeight",
        0x8769 : "ExifIFDPointer",
        0x8825 : "GPSInfoIFDPointer",
        0xA005 : "InteroperabilityIFDPointer",
        0x0102 : "BitsPerSample",
        0x0103 : "Compression",
        0x0106 : "PhotometricInterpretation",
        0x0112 : "Orientation",
        0x0115 : "SamplesPerPixel",
        0x011C : "PlanarConfiguration",
        0x0212 : "YCbCrSubSampling",
        0x0213 : "YCbCrPositioning",
        0x011A : "XResolution",
        0x011B : "YResolution",
        0x0128 : "ResolutionUnit",
        0x0111 : "StripOffsets",
        0x0116 : "RowsPerStrip",
        0x0117 : "StripByteCounts",
        0x0201 : "JPEGInterchangeFormat",
        0x0202 : "JPEGInterchangeFormatLength",
        0x012D : "TransferFunction",
        0x013E : "WhitePoint",
        0x013F : "PrimaryChromaticities",
        0x0211 : "YCbCrCoefficients",
        0x0214 : "ReferenceBlackWhite",
        0x0132 : "DateTime",
        0x010E : "ImageDescription",
        0x010F : "Make",
        0x0110 : "Model",
        0x0131 : "Software",
        0x013B : "Artist",
        0x8298 : "Copyright"
    };

    var GPSTags = EXIF.GPSTags = {
        0x0000 : "GPSVersionID",
        0x0001 : "GPSLatitudeRef",
        0x0002 : "GPSLatitude",
        0x0003 : "GPSLongitudeRef",
        0x0004 : "GPSLongitude",
        0x0005 : "GPSAltitudeRef",
        0x0006 : "GPSAltitude",
        0x0007 : "GPSTimeStamp",
        0x0008 : "GPSSatellites",
        0x0009 : "GPSStatus",
        0x000A : "GPSMeasureMode",
        0x000B : "GPSDOP",
        0x000C : "GPSSpeedRef",
        0x000D : "GPSSpeed",
        0x000E : "GPSTrackRef",
        0x000F : "GPSTrack",
        0x0010 : "GPSImgDirectionRef",
        0x0011 : "GPSImgDirection",
        0x0012 : "GPSMapDatum",
        0x0013 : "GPSDestLatitudeRef",
        0x0014 : "GPSDestLatitude",
        0x0015 : "GPSDestLongitudeRef",
        0x0016 : "GPSDestLongitude",
        0x0017 : "GPSDestBearingRef",
        0x0018 : "GPSDestBearing",
        0x0019 : "GPSDestDistanceRef",
        0x001A : "GPSDestDistance",
        0x001B : "GPSProcessingMethod",
        0x001C : "GPSAreaInformation",
        0x001D : "GPSDateStamp",
        0x001E : "GPSDifferential"
    };

     // EXIF 2.3 Spec
    var IFD1Tags = EXIF.IFD1Tags = {
        0x0100: "ImageWidth",
        0x0101: "ImageHeight",
        0x0102: "BitsPerSample",
        0x0103: "Compression",
        0x0106: "PhotometricInterpretation",
        0x0111: "StripOffsets",
        0x0112: "Orientation",
        0x0115: "SamplesPerPixel",
        0x0116: "RowsPerStrip",
        0x0117: "StripByteCounts",
        0x011A: "XResolution",
        0x011B: "YResolution",
        0x011C: "PlanarConfiguration",
        0x0128: "ResolutionUnit",
        0x0201: "JpegIFOffset",    // When image format is JPEG, this value show offset to JPEG data stored.(aka "ThumbnailOffset" or "JPEGInterchangeFormat")
        0x0202: "JpegIFByteCount", // When image format is JPEG, this value shows data size of JPEG image (aka "ThumbnailLength" or "JPEGInterchangeFormatLength")
        0x0211: "YCbCrCoefficients",
        0x0212: "YCbCrSubSampling",
        0x0213: "YCbCrPositioning",
        0x0214: "ReferenceBlackWhite"
    };

    var StringValues = EXIF.StringValues = {
        ExposureProgram : {
            0 : "Not defined",
            1 : "Manual",
            2 : "Normal program",
            3 : "Aperture priority",
            4 : "Shutter priority",
            5 : "Creative program",
            6 : "Action program",
            7 : "Portrait mode",
            8 : "Landscape mode"
        },
        MeteringMode : {
            0 : "Unknown",
            1 : "Average",
            2 : "CenterWeightedAverage",
            3 : "Spot",
            4 : "MultiSpot",
            5 : "Pattern",
            6 : "Partial",
            255 : "Other"
        },
        LightSource : {
            0 : "Unknown",
            1 : "Daylight",
            2 : "Fluorescent",
            3 : "Tungsten (incandescent light)",
            4 : "Flash",
            9 : "Fine weather",
            10 : "Cloudy weather",
            11 : "Shade",
            12 : "Daylight fluorescent (D 5700 - 7100K)",
            13 : "Day white fluorescent (N 4600 - 5400K)",
            14 : "Cool white fluorescent (W 3900 - 4500K)",
            15 : "White fluorescent (WW 3200 - 3700K)",
            17 : "Standard light A",
            18 : "Standard light B",
            19 : "Standard light C",
            20 : "D55",
            21 : "D65",
            22 : "D75",
            23 : "D50",
            24 : "ISO studio tungsten",
            255 : "Other"
        },
        Flash : {
            0x0000 : "Flash did not fire",
            0x0001 : "Flash fired",
            0x0005 : "Strobe return light not detected",
            0x0007 : "Strobe return light detected",
            0x0009 : "Flash fired, compulsory flash mode",
            0x000D : "Flash fired, compulsory flash mode, return light not detected",
            0x000F : "Flash fired, compulsory flash mode, return light detected",
            0x0010 : "Flash did not fire, compulsory flash mode",
            0x0018 : "Flash did not fire, auto mode",
            0x0019 : "Flash fired, auto mode",
            0x001D : "Flash fired, auto mode, return light not detected",
            0x001F : "Flash fired, auto mode, return light detected",
            0x0020 : "No flash function",
            0x0041 : "Flash fired, red-eye reduction mode",
            0x0045 : "Flash fired, red-eye reduction mode, return light not detected",
            0x0047 : "Flash fired, red-eye reduction mode, return light detected",
            0x0049 : "Flash fired, compulsory flash mode, red-eye reduction mode",
            0x004D : "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",
            0x004F : "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",
            0x0059 : "Flash fired, auto mode, red-eye reduction mode",
            0x005D : "Flash fired, auto mode, return light not detected, red-eye reduction mode",
            0x005F : "Flash fired, auto mode, return light detected, red-eye reduction mode"
        },
        SensingMethod : {
            1 : "Not defined",
            2 : "One-chip color area sensor",
            3 : "Two-chip color area sensor",
            4 : "Three-chip color area sensor",
            5 : "Color sequential area sensor",
            7 : "Trilinear sensor",
            8 : "Color sequential linear sensor"
        },
        SceneCaptureType : {
            0 : "Standard",
            1 : "Landscape",
            2 : "Portrait",
            3 : "Night scene"
        },
        SceneType : {
            1 : "Directly photographed"
        },
        CustomRendered : {
            0 : "Normal process",
            1 : "Custom process"
        },
        WhiteBalance : {
            0 : "Auto white balance",
            1 : "Manual white balance"
        },
        GainControl : {
            0 : "None",
            1 : "Low gain up",
            2 : "High gain up",
            3 : "Low gain down",
            4 : "High gain down"
        },
        Contrast : {
            0 : "Normal",
            1 : "Soft",
            2 : "Hard"
        },
        Saturation : {
            0 : "Normal",
            1 : "Low saturation",
            2 : "High saturation"
        },
        Sharpness : {
            0 : "Normal",
            1 : "Soft",
            2 : "Hard"
        },
        SubjectDistanceRange : {
            0 : "Unknown",
            1 : "Macro",
            2 : "Close view",
            3 : "Distant view"
        },
        FileSource : {
            3 : "DSC"
        },

        Components : {
            0 : "",
            1 : "Y",
            2 : "Cb",
            3 : "Cr",
            4 : "R",
            5 : "G",
            6 : "B"
        }
    };

    function addEvent(element, event, handler) {
        if (element.addEventListener) {
            element.addEventListener(event, handler, false);
        } else if (element.attachEvent) {
            element.attachEvent("on" + event, handler);
        }
    }

    function imageHasData(img) {
        return !!(img.exifdata);
    }


    function base64ToArrayBuffer(base64, contentType) {
        contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/mi)[1] || ''; // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'
        base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, '');
        var binary = atob(base64);
        var len = binary.length;
        var buffer = new ArrayBuffer(len);
        var view = new Uint8Array(buffer);
        for (var i = 0; i < len; i++) {
            view[i] = binary.charCodeAt(i);
        }
        return buffer;
    }

    function objectURLToBlob(url, callback) {
        var http = new XMLHttpRequest();
        http.open("GET", url, true);
        http.responseType = "blob";
        http.onload = function(e) {
            if (this.status == 200 || this.status === 0) {
                callback(this.response);
            }
        };
        http.send();
    }

    function getImageData(img, callback) {
        function handleBinaryFile(binFile) {
            var data = findEXIFinJPEG(binFile);
            img.exifdata = data || {};
            var iptcdata = findIPTCinJPEG(binFile);
            img.iptcdata = iptcdata || {};
            if (EXIF.isXmpEnabled) {
               var xmpdata= findXMPinJPEG(binFile);
               img.xmpdata = xmpdata || {};               
            }
            if (callback) {
                callback.call(img);
            }
        }

        if (img.src) {
            if (/^data\:/i.test(img.src)) { // Data URI
                var arrayBuffer = base64ToArrayBuffer(img.src);
                handleBinaryFile(arrayBuffer);

            } else if (/^blob\:/i.test(img.src)) { // Object URL
                var fileReader = new FileReader();
                fileReader.onload = function(e) {
                    handleBinaryFile(e.target.result);
                };
                objectURLToBlob(img.src, function (blob) {
                    fileReader.readAsArrayBuffer(blob);
                });
            } else {
                var http = new XMLHttpRequest();
                http.onload = function() {
                    if (this.status == 200 || this.status === 0) {
                        handleBinaryFile(http.response);
                    } else {
                        throw "Could not load image";
                    }
                    http = null;
                };
                http.open("GET", img.src, true);
                http.responseType = "arraybuffer";
                http.send(null);
            }
        } else if (self.FileReader && (img instanceof self.Blob || img instanceof self.File)) {
            var fileReader = new FileReader();
            fileReader.onload = function(e) {
                if (debug) console.log("Got file of length " + e.target.result.byteLength);
                handleBinaryFile(e.target.result);
            };

            fileReader.readAsArrayBuffer(img);
        }
    }

    function findEXIFinJPEG(file) {
        var dataView = new DataView(file);

        if (debug) console.log("Got file of length " + file.byteLength);
        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
            if (debug) console.log("Not a valid JPEG");
            return false; // not a valid jpeg
        }

        var offset = 2,
            length = file.byteLength,
            marker;

        while (offset < length) {
            if (dataView.getUint8(offset) != 0xFF) {
                if (debug) console.log("Not a valid marker at offset " + offset + ", found: " + dataView.getUint8(offset));
                return false; // not a valid marker, something is wrong
            }

            marker = dataView.getUint8(offset + 1);
            if (debug) console.log(marker);

            // we could implement handling for other markers here,
            // but we're only looking for 0xFFE1 for EXIF data

            if (marker == 225) {
                if (debug) console.log("Found 0xFFE1 marker");

                return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);

                // offset += 2 + file.getShortAt(offset+2, true);

            } else {
                offset += 2 + dataView.getUint16(offset+2);
            }

        }

    }

    function findIPTCinJPEG(file) {
        var dataView = new DataView(file);

        if (debug) console.log("Got file of length " + file.byteLength);
        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
            if (debug) console.log("Not a valid JPEG");
            return false; // not a valid jpeg
        }

        var offset = 2,
            length = file.byteLength;


        var isFieldSegmentStart = function(dataView, offset){
            return (
                dataView.getUint8(offset) === 0x38 &&
                dataView.getUint8(offset+1) === 0x42 &&
                dataView.getUint8(offset+2) === 0x49 &&
                dataView.getUint8(offset+3) === 0x4D &&
                dataView.getUint8(offset+4) === 0x04 &&
                dataView.getUint8(offset+5) === 0x04
            );
        };

        while (offset < length) {

            if ( isFieldSegmentStart(dataView, offset )){

                // Get the length of the name header (which is padded to an even number of bytes)
                var nameHeaderLength = dataView.getUint8(offset+7);
                if(nameHeaderLength % 2 !== 0) nameHeaderLength += 1;
                // Check for pre photoshop 6 format
                if(nameHeaderLength === 0) {
                    // Always 4
                    nameHeaderLength = 4;
                }

                var startOffset = offset + 8 + nameHeaderLength;
                var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);

                return readIPTCData(file, startOffset, sectionLength);

                break;

            }


            // Not the marker, continue searching
            offset++;

        }

    }
    var IptcFieldMap = {
        0x78 : 'caption',
        0x6E : 'credit',
        0x19 : 'keywords',
        0x37 : 'dateCreated',
        0x50 : 'byline',
        0x55 : 'bylineTitle',
        0x7A : 'captionWriter',
        0x69 : 'headline',
        0x74 : 'copyright',
        0x0F : 'category'
    };
    function readIPTCData(file, startOffset, sectionLength){
        var dataView = new DataView(file);
        var data = {};
        var fieldValue, fieldName, dataSize, segmentType, segmentSize;
        var segmentStartPos = startOffset;
        while(segmentStartPos < startOffset+sectionLength) {
            if(dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos+1) === 0x02){
                segmentType = dataView.getUint8(segmentStartPos+2);
                if(segmentType in IptcFieldMap) {
                    dataSize = dataView.getInt16(segmentStartPos+3);
                    segmentSize = dataSize + 5;
                    fieldName = IptcFieldMap[segmentType];
                    fieldValue = getStringFromDB(dataView, segmentStartPos+5, dataSize);
                    // Check if we already stored a value with this name
                    if(data.hasOwnProperty(fieldName)) {
                        // Value already stored with this name, create multivalue field
                        if(data[fieldName] instanceof Array) {
                            data[fieldName].push(fieldValue);
                        }
                        else {
                            data[fieldName] = [data[fieldName], fieldValue];
                        }
                    }
                    else {
                        data[fieldName] = fieldValue;
                    }
                }

            }
            segmentStartPos++;
        }
        return data;
    }



    function readTags(file, tiffStart, dirStart, strings, bigEnd) {
        var entries = file.getUint16(dirStart, !bigEnd),
            tags = {},
            entryOffset, tag,
            i;

        for (i=0;i<entries;i++) {
            entryOffset = dirStart + i*12 + 2;
            tag = strings[file.getUint16(entryOffset, !bigEnd)];
            if (!tag && debug) console.log("Unknown tag: " + file.getUint16(entryOffset, !bigEnd));
            tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);
        }
        return tags;
    }


    function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {
        var type = file.getUint16(entryOffset+2, !bigEnd),
            numValues = file.getUint32(entryOffset+4, !bigEnd),
            valueOffset = file.getUint32(entryOffset+8, !bigEnd) + tiffStart,
            offset,
            vals, val, n,
            numerator, denominator;

        switch (type) {
            case 1: // byte, 8-bit unsigned int
            case 7: // undefined, 8-bit byte, value depending on field
                if (numValues == 1) {
                    return file.getUint8(entryOffset + 8, !bigEnd);
                } else {
                    offset = numValues > 4 ? valueOffset : (entryOffset + 8);
                    vals = [];
                    for (n=0;n<numValues;n++) {
                        vals[n] = file.getUint8(offset + n);
                    }
                    return vals;
                }

            case 2: // ascii, 8-bit byte
                offset = numValues > 4 ? valueOffset : (entryOffset + 8);
                return getStringFromDB(file, offset, numValues-1);

            case 3: // short, 16 bit int
                if (numValues == 1) {
                    return file.getUint16(entryOffset + 8, !bigEnd);
                } else {
                    offset = numValues > 2 ? valueOffset : (entryOffset + 8);
                    vals = [];
                    for (n=0;n<numValues;n++) {
                        vals[n] = file.getUint16(offset + 2*n, !bigEnd);
                    }
                    return vals;
                }

            case 4: // long, 32 bit int
                if (numValues == 1) {
                    return file.getUint32(entryOffset + 8, !bigEnd);
                } else {
                    vals = [];
                    for (n=0;n<numValues;n++) {
                        vals[n] = file.getUint32(valueOffset + 4*n, !bigEnd);
                    }
                    return vals;
                }

            case 5:    // rational = two long values, first is numerator, second is denominator
                if (numValues == 1) {
                    numerator = file.getUint32(valueOffset, !bigEnd);
                    denominator = file.getUint32(valueOffset+4, !bigEnd);
                    val = new Number(numerator / denominator);
                    val.numerator = numerator;
                    val.denominator = denominator;
                    return val;
                } else {
                    vals = [];
                    for (n=0;n<numValues;n++) {
                        numerator = file.getUint32(valueOffset + 8*n, !bigEnd);
                        denominator = file.getUint32(valueOffset+4 + 8*n, !bigEnd);
                        vals[n] = new Number(numerator / denominator);
                        vals[n].numerator = numerator;
                        vals[n].denominator = denominator;
                    }
                    return vals;
                }

            case 9: // slong, 32 bit signed int
                if (numValues == 1) {
                    return file.getInt32(entryOffset + 8, !bigEnd);
                } else {
                    vals = [];
                    for (n=0;n<numValues;n++) {
                        vals[n] = file.getInt32(valueOffset + 4*n, !bigEnd);
                    }
                    return vals;
                }

            case 10: // signed rational, two slongs, first is numerator, second is denominator
                if (numValues == 1) {
                    return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset+4, !bigEnd);
                } else {
                    vals = [];
                    for (n=0;n<numValues;n++) {
                        vals[n] = file.getInt32(valueOffset + 8*n, !bigEnd) / file.getInt32(valueOffset+4 + 8*n, !bigEnd);
                    }
                    return vals;
                }
        }
    }

    /**
    * Given an IFD (Image File Directory) start offset
    * returns an offset to next IFD or 0 if it's the last IFD.
    */
    function getNextIFDOffset(dataView, dirStart, bigEnd){
        //the first 2bytes means the number of directory entries contains in this IFD
        var entries = dataView.getUint16(dirStart, !bigEnd);

        // After last directory entry, there is a 4bytes of data,
        // it means an offset to next IFD.
        // If its value is '0x00000000', it means this is the last IFD and there is no linked IFD.

        return dataView.getUint32(dirStart + 2 + entries * 12, !bigEnd); // each entry is 12 bytes long
    }

    function readThumbnailImage(dataView, tiffStart, firstIFDOffset, bigEnd){
        // get the IFD1 offset
        var IFD1OffsetPointer = getNextIFDOffset(dataView, tiffStart+firstIFDOffset, bigEnd);

        if (!IFD1OffsetPointer) {
            // console.log('******** IFD1Offset is empty, image thumb not found ********');
            return {};
        }
        else if (IFD1OffsetPointer > dataView.byteLength) { // this should not happen
            // console.log('******** IFD1Offset is outside the bounds of the DataView ********');
            return {};
        }
        // console.log('*******  thumbnail IFD offset (IFD1) is: %s', IFD1OffsetPointer);

        var thumbTags = readTags(dataView, tiffStart, tiffStart + IFD1OffsetPointer, IFD1Tags, bigEnd)

        // EXIF 2.3 specification for JPEG format thumbnail

        // If the value of Compression(0x0103) Tag in IFD1 is '6', thumbnail image format is JPEG.
        // Most of Exif image uses JPEG format for thumbnail. In that case, you can get offset of thumbnail
        // by JpegIFOffset(0x0201) Tag in IFD1, size of thumbnail by JpegIFByteCount(0x0202) Tag.
        // Data format is ordinary JPEG format, starts from 0xFFD8 and ends by 0xFFD9. It seems that
        // JPEG format and 160x120pixels of size are recommended thumbnail format for Exif2.1 or later.

        if (thumbTags['Compression']) {
            // console.log('Thumbnail image found!');

            switch (thumbTags['Compression']) {
                case 6:
                    // console.log('Thumbnail image format is JPEG');
                    if (thumbTags.JpegIFOffset && thumbTags.JpegIFByteCount) {
                    // extract the thumbnail
                        var tOffset = tiffStart + thumbTags.JpegIFOffset;
                        var tLength = thumbTags.JpegIFByteCount;
                        thumbTags['blob'] = new Blob([new Uint8Array(dataView.buffer, tOffset, tLength)], {
                            type: 'image/jpeg'
                        });
                    }
                break;

            case 1:
                console.log("Thumbnail image format is TIFF, which is not implemented.");
                break;
            default:
                console.log("Unknown thumbnail image format '%s'", thumbTags['Compression']);
            }
        }
        else if (thumbTags['PhotometricInterpretation'] == 2) {
            console.log("Thumbnail image format is RGB, which is not implemented.");
        }
        return thumbTags;
    }

    function getStringFromDB(buffer, start, length) {
        var outstr = "";
        for (n = start; n < start+length; n++) {
            outstr += String.fromCharCode(buffer.getUint8(n));
        }
        return outstr;
    }

    function readEXIFData(file, start) {
        if (getStringFromDB(file, start, 4) != "Exif") {
            if (debug) console.log("Not valid EXIF data! " + getStringFromDB(file, start, 4));
            return false;
        }

        var bigEnd,
            tags, tag,
            exifData, gpsData,
            tiffOffset = start + 6;

        // test for TIFF validity and endianness
        if (file.getUint16(tiffOffset) == 0x4949) {
            bigEnd = false;
        } else if (file.getUint16(tiffOffset) == 0x4D4D) {
            bigEnd = true;
        } else {
            if (debug) console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)");
            return false;
        }

        if (file.getUint16(tiffOffset+2, !bigEnd) != 0x002A) {
            if (debug) console.log("Not valid TIFF data! (no 0x002A)");
            return false;
        }

        var firstIFDOffset = file.getUint32(tiffOffset+4, !bigEnd);

        if (firstIFDOffset < 0x00000008) {
            if (debug) console.log("Not valid TIFF data! (First offset less than 8)", file.getUint32(tiffOffset+4, !bigEnd));
            return false;
        }

        tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);

        if (tags.ExifIFDPointer) {
            exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);
            for (tag in exifData) {
                switch (tag) {
                    case "LightSource" :
                    case "Flash" :
                    case "MeteringMode" :
                    case "ExposureProgram" :
                    case "SensingMethod" :
                    case "SceneCaptureType" :
                    case "SceneType" :
                    case "CustomRendered" :
                    case "WhiteBalance" :
                    case "GainControl" :
                    case "Contrast" :
                    case "Saturation" :
                    case "Sharpness" :
                    case "SubjectDistanceRange" :
                    case "FileSource" :
                        exifData[tag] = StringValues[tag][exifData[tag]];
                        break;

                    case "ExifVersion" :
                    case "FlashpixVersion" :
                        exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);
                        break;

                    case "ComponentsConfiguration" :
                        exifData[tag] =
                            StringValues.Components[exifData[tag][0]] +
                            StringValues.Components[exifData[tag][1]] +
                            StringValues.Components[exifData[tag][2]] +
                            StringValues.Components[exifData[tag][3]];
                        break;
                }
                tags[tag] = exifData[tag];
            }
        }

        if (tags.GPSInfoIFDPointer) {
            gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);
            for (tag in gpsData) {
                switch (tag) {
                    case "GPSVersionID" :
                        gpsData[tag] = gpsData[tag][0] +
                            "." + gpsData[tag][1] +
                            "." + gpsData[tag][2] +
                            "." + gpsData[tag][3];
                        break;
                }
                tags[tag] = gpsData[tag];
            }
        }

        // extract thumbnail
        tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);

        return tags;
    }

   function findXMPinJPEG(file) {

        if (!('DOMParser' in self)) {
            // console.warn('XML parsing not supported without DOMParser');
            return;
        }
        var dataView = new DataView(file);

        if (debug) console.log("Got file of length " + file.byteLength);
        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
           if (debug) console.log("Not a valid JPEG");
           return false; // not a valid jpeg
        }

        var offset = 2,
            length = file.byteLength,
            dom = new DOMParser();

        while (offset < (length-4)) {
            if (getStringFromDB(dataView, offset, 4) == "http") {
                var startOffset = offset - 1;
                var sectionLength = dataView.getUint16(offset - 2) - 1;
                var xmpString = getStringFromDB(dataView, startOffset, sectionLength)
                var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8;
                xmpString = xmpString.substring( xmpString.indexOf( '<x:xmpmeta' ), xmpEndIndex );

                var indexOfXmp = xmpString.indexOf('x:xmpmeta') + 10
                //Many custom written programs embed xmp/xml without any namespace. Following are some of them.
                //Without these namespaces, XML is thought to be invalid by parsers
                xmpString = xmpString.slice(0, indexOfXmp)
                            + 'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" '
                            + 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
                            + 'xmlns:tiff="http://ns.adobe.com/tiff/1.0/" '
                            + 'xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" '
                            + 'xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" '
                            + 'xmlns:exif="http://ns.adobe.com/exif/1.0/" '
                            + 'xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" '
                            + 'xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" '
                            + 'xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" '
                            + 'xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" '
                            + 'xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '
                            + xmpString.slice(indexOfXmp)

                var domDocument = dom.parseFromString( xmpString, 'text/xml' );
                return xml2Object(domDocument);
            } else{
             offset++;
            }
        }
    }

    function xml2json(xml) {
        var json = {};
      
        if (xml.nodeType == 1) { // element node
          if (xml.attributes.length > 0) {
            json['@attributes'] = {};
            for (var j = 0; j < xml.attributes.length; j++) {
              var attribute = xml.attributes.item(j);
              json['@attributes'][attribute.nodeName] = attribute.nodeValue;
            }
          }
        } else if (xml.nodeType == 3) { // text node
          return xml.nodeValue;
        }
      
        // deal with children
        if (xml.hasChildNodes()) {
          for(var i = 0; i < xml.childNodes.length; i++) {
            var child = xml.childNodes.item(i);
            var nodeName = child.nodeName;
            if (json[nodeName] == null) {
              json[nodeName] = xml2json(child);
            } else {
              if (json[nodeName].push == null) {
                var old = json[nodeName];
                json[nodeName] = [];
                json[nodeName].push(old);
              }
              json[nodeName].push(xml2json(child));
            }
          }
        }
        
        return json;
    }

    function xml2Object(xml) {
        try {
            var obj = {};
            if (xml.children.length > 0) {
              for (var i = 0; i < xml.children.length; i++) {
                var item = xml.children.item(i);
                var attributes = item.attributes;
                for(var idx in attributes) {
                    var itemAtt = attributes[idx];
                    var dataKey = itemAtt.nodeName;
                    var dataValue = itemAtt.nodeValue;

                    if(dataKey !== undefined) {
                        obj[dataKey] = dataValue;
                    }
                }
                var nodeName = item.nodeName;

                if (typeof (obj[nodeName]) == "undefined") {
                  obj[nodeName] = xml2json(item);
                } else {
                  if (typeof (obj[nodeName].push) == "undefined") {
                    var old = obj[nodeName];

                    obj[nodeName] = [];
                    obj[nodeName].push(old);
                  }
                  obj[nodeName].push(xml2json(item));
                }
              }
            } else {
              obj = xml.textContent;
            }
            return obj;
          } catch (e) {
              console.log(e.message);
          }
    }

    EXIF.enableXmp = function() {
        EXIF.isXmpEnabled = true;
    }

    EXIF.disableXmp = function() {
        EXIF.isXmpEnabled = false;
    }

    EXIF.getData = function(img, callback) {
        if (((self.Image && img instanceof self.Image)
            || (self.HTMLImageElement && img instanceof self.HTMLImageElement))
            && !img.complete)
            return false;

        if (!imageHasData(img)) {
            getImageData(img, callback);
        } else {
            if (callback) {
                callback.call(img);
            }
        }
        return true;
    }

    EXIF.getTag = function(img, tag) {
        if (!imageHasData(img)) return;
        return img.exifdata[tag];
    }
    
    EXIF.getIptcTag = function(img, tag) {
        if (!imageHasData(img)) return;
        return img.iptcdata[tag];
    }

    EXIF.getAllTags = function(img) {
        if (!imageHasData(img)) return {};
        var a,
            data = img.exifdata,
            tags = {};
        for (a in data) {
            if (data.hasOwnProperty(a)) {
                tags[a] = data[a];
            }
        }
        return tags;
    }
    
    EXIF.getAllIptcTags = function(img) {
        if (!imageHasData(img)) return {};
        var a,
            data = img.iptcdata,
            tags = {};
        for (a in data) {
            if (data.hasOwnProperty(a)) {
                tags[a] = data[a];
            }
        }
        return tags;
    }

    EXIF.pretty = function(img) {
        if (!imageHasData(img)) return "";
        var a,
            data = img.exifdata,
            strPretty = "";
        for (a in data) {
            if (data.hasOwnProperty(a)) {
                if (typeof data[a] == "object") {
                    if (data[a] instanceof Number) {
                        strPretty += a + " : " + data[a] + " [" + data[a].numerator + "/" + data[a].denominator + "]\r\n";
                    } else {
                        strPretty += a + " : [" + data[a].length + " values]\r\n";
                    }
                } else {
                    strPretty += a + " : " + data[a] + "\r\n";
                }
            }
        }
        return strPretty;
    }

    EXIF.readFromBinaryFile = function(file) {
        return findEXIFinJPEG(file);
    }

    if (true) {
        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
            return EXIF;
        }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    }
}.call(this));



/***/ }),

/***/ "./node_modules/file-saver/FileSaver.min.js":
/*!**************************************************!*\
  !*** ./node_modules/file-saver/FileSaver.min.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_RESULT__;/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if( true&&module.exports){module.exports.saveAs=saveAs}else if( true&&__webpack_require__(/*! !webpack amd define */ "./node_modules/webpack/buildin/amd-define.js")!==null&&__webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js")!==null){!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return saveAs}).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))}


/***/ }),

/***/ "./node_modules/hermite-resize/dist/hermite.npm.js":
/*!*********************************************************!*\
  !*** ./node_modules/hermite-resize/dist/hermite.npm.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

/**
 * hermite-resize - Canvas image resize/resample using Hermite filter with JavaScript.
 * @version v2.2.7
 * @link https://github.com/viliusle/miniPaint
 * @license MIT
 */
function Hermite_class(){var w,p,_=[];this.init=void(w=navigator.hardwareConcurrency||4),this.getCores=function(){return w},this.resample_auto=function(t,a,e,r,h){var i=this.getCores();window.Worker&&1<i?this.resample(t,a,e,r,h):(this.resample_single(t,a,e,!0),null!=h&&h())},this.resize_image=function(t,a,e,r,h){var i=document.getElementById(t),n=document.createElement("canvas");if(n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0),null==a&&null==e&&null!=r&&(a=i.width/100*r,e=i.height/100*r),null==e){var o=i.width/a;e=i.height/o}a=Math.round(a),e=Math.round(e);var l=function(){var t=n.toDataURL();i.width=a,i.height=e,i.src=t,n=t=null};null==h||1==h?this.resample(n,a,e,!0,l):(this.resample_single(n,a,e,!0),l())},this.resample=function(t,r,a,e,h){var i=t.width,n=t.height;r=Math.round(r);var o=n/(a=Math.round(a));if(0<_.length)for(var l=0;l<w;l++)null!=_[l]&&(_[l].terminate(),delete _[l]);_=new Array(w);var s=t.getContext("2d"),c=[],g=2*Math.ceil(n/w/2),d=-1;for(l=0;l<w;l++){var u=d+1;if(!(n<=u)){d=u+g-1,d=Math.min(d,n-1);var f;f=Math.min(g,n-u),c[l]={},c[l].source=s.getImageData(0,u,i,g),c[l].target=!0,c[l].start_y=Math.ceil(u/o),c[l].height=f}}!0===e?(t.width=r,t.height=a):s.clearRect(0,0,i,n);var M=0;for(l=0;l<w;l++)if(null!=c[l]){M++;var v=new Worker(p);(_[l]=v).onmessage=function(t){M--;var a=t.data.core;_[a].terminate(),delete _[a];var e=Math.ceil(c[a].height/o);c[a].target=s.createImageData(r,e),c[a].target.data.set(t.data.target),s.putImageData(c[a].target,0,c[a].start_y),M<=0&&null!=h&&h()};var m={width_source:i,height_source:c[l].height,width:r,height:Math.ceil(c[l].height/o),core:l,source:c[l].source.data.buffer};v.postMessage(m,[m.source])}},p=window.URL.createObjectURL(new Blob(["(",function(){onmessage=function(t){for(var a=t.data.core,e=t.data.width_source,r=t.data.height_source,h=t.data.width,i=t.data.height,n=e/h,o=r/i,l=Math.ceil(n/2),s=Math.ceil(o/2),c=new Uint8ClampedArray(t.data.source),g=(c.length,h*i*4),d=new ArrayBuffer(g),u=new Uint8ClampedArray(d,0,g),f=0;f<i;f++)for(var M=0;M<h;M++){var v=4*(M+f*h),m=0,w=0,p=0,_=0,y=0,b=0,C=0,I=f*o,D=Math.floor(M*n),R=Math.ceil((M+1)*n),U=Math.floor(f*o),A=Math.ceil((f+1)*o);R=Math.min(R,e),A=Math.min(A,r);for(var x=U;x<A;x++)for(var B=Math.abs(I-x)/s,L=M*n,j=B*B,k=D;k<R;k++){var q=Math.abs(L-k)/l,E=Math.sqrt(j+q*q);if(!(1<=E)){var W=4*(k+x*e);C+=(m=2*E*E*E-3*E*E+1)*c[W+3],p+=m,c[W+3]<255&&(m=m*c[W+3]/250),_+=m*c[W],y+=m*c[W+1],b+=m*c[W+2],w+=m}}u[v]=_/w,u[v+1]=y/w,u[v+2]=b/w,u[v+3]=C/p}postMessage({core:a,target:u},[u.buffer])}}.toString(),")()"],{type:"application/javascript"})),this.resample_single=function(t,a,e,r){for(var h=t.width,i=t.height,n=h/(a=Math.round(a)),o=i/(e=Math.round(e)),l=Math.ceil(n/2),s=Math.ceil(o/2),c=t.getContext("2d"),g=c.getImageData(0,0,h,i),d=c.createImageData(a,e),u=g.data,f=d.data,M=0;M<e;M++)for(var v=0;v<a;v++){var m=4*(v+M*a),w=0,p=0,_=0,y=0,b=0,C=0,I=0,D=M*o,R=Math.floor(v*n),U=Math.ceil((v+1)*n),A=Math.floor(M*o),x=Math.ceil((M+1)*o);U=Math.min(U,h),x=Math.min(x,i);for(var B=A;B<x;B++)for(var L=Math.abs(D-B)/s,j=v*n,k=L*L,q=R;q<U;q++){var E=Math.abs(j-q)/l,W=Math.sqrt(k+E*E);if(!(1<=W)){var z=4*(q+B*h);I+=(w=2*W*W*W-3*W*W+1)*u[z+3],_+=w,u[z+3]<255&&(w=w*u[z+3]/250),y+=w*u[z],b+=w*u[z+1],C+=w*u[z+2],p+=w}}f[m]=y/p,f[m+1]=b/p,f[m+2]=C/p,f[m+3]=I/_}!0===r?(t.width=a,t.height=e):c.clearRect(0,0,h,i),c.putImageData(d,0,0)}}
module.exports = Hermite_class;


/***/ }),

/***/ "./node_modules/jquery/dist/jquery.js":
/*!********************************************!*\
  !*** ./node_modules/jquery/dist/jquery.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2019-05-01T21:04Z
 */
( function( global, factory ) {

	"use strict";

	if (  true && typeof module.exports === "object" ) {

		// For CommonJS and CommonJS-like environments where a proper `window`
		// is present, execute the factory and get jQuery.
		// For environments that do not have a `window` with a `document`
		// (such as Node.js), expose a factory as module.exports.
		// This accentuates the need for the creation of a real `window`.
		// e.g. var jQuery = require("jquery")(window);
		// See ticket #14549 for more info.
		module.exports = global.document ?
			factory( global, true ) :
			function( w ) {
				if ( !w.document ) {
					throw new Error( "jQuery requires a window with a document" );
				}
				return factory( w );
			};
	} else {
		factory( global );
	}

// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
// enough that all such attempts are guarded in a try block.
"use strict";

var arr = [];

var document = window.document;

var getProto = Object.getPrototypeOf;

var slice = arr.slice;

var concat = arr.concat;

var push = arr.push;

var indexOf = arr.indexOf;

var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var fnToString = hasOwn.toString;

var ObjectFunctionString = fnToString.call( Object );

var support = {};

var isFunction = function isFunction( obj ) {

      // Support: Chrome <=57, Firefox <=52
      // In some browsers, typeof returns "function" for HTML <object> elements
      // (i.e., `typeof document.createElement( "object" ) === "function"`).
      // We don't want to classify *any* DOM node as a function.
      return typeof obj === "function" && typeof obj.nodeType !== "number";
  };


var isWindow = function isWindow( obj ) {
		return obj != null && obj === obj.window;
	};




	var preservedScriptAttributes = {
		type: true,
		src: true,
		nonce: true,
		noModule: true
	};

	function DOMEval( code, node, doc ) {
		doc = doc || document;

		var i, val,
			script = doc.createElement( "script" );

		script.text = code;
		if ( node ) {
			for ( i in preservedScriptAttributes ) {

				// Support: Firefox 64+, Edge 18+
				// Some browsers don't support the "nonce" property on scripts.
				// On the other hand, just using `getAttribute` is not enough as
				// the `nonce` attribute is reset to an empty string whenever it
				// becomes browsing-context connected.
				// See https://github.com/whatwg/html/issues/2369
				// See https://html.spec.whatwg.org/#nonce-attributes
				// The `node.getAttribute` check was added for the sake of
				// `jQuery.globalEval` so that it can fake a nonce-containing node
				// via an object.
				val = node[ i ] || node.getAttribute && node.getAttribute( i );
				if ( val ) {
					script.setAttribute( i, val );
				}
			}
		}
		doc.head.appendChild( script ).parentNode.removeChild( script );
	}


function toType( obj ) {
	if ( obj == null ) {
		return obj + "";
	}

	// Support: Android <=2.3 only (functionish RegExp)
	return typeof obj === "object" || typeof obj === "function" ?
		class2type[ toString.call( obj ) ] || "object" :
		typeof obj;
}
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module



var
	version = "3.4.1",

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {

		// The jQuery object is actually just the init constructor 'enhanced'
		// Need init if jQuery is called (just allow error to be thrown if not included)
		return new jQuery.fn.init( selector, context );
	},

	// Support: Android <=4.0 only
	// Make sure we trim BOM and NBSP
	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;

jQuery.fn = jQuery.prototype = {

	// The current version of jQuery being used
	jquery: version,

	constructor: jQuery,

	// The default length of a jQuery object is 0
	length: 0,

	toArray: function() {
		return slice.call( this );
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {

		// Return all the elements in a clean array
		if ( num == null ) {
			return slice.call( this );
		}

		// Return just the one element from the set
		return num < 0 ? this[ num + this.length ] : this[ num ];
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	each: function( callback ) {
		return jQuery.each( this, callback );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map( this, function( elem, i ) {
			return callback.call( elem, i, elem );
		} ) );
	},

	slice: function() {
		return this.pushStack( slice.apply( this, arguments ) );
	},

	first: function() {
		return this.eq( 0 );
	},

	last: function() {
		return this.eq( -1 );
	},

	eq: function( i ) {
		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
	},

	end: function() {
		return this.prevObject || this.constructor();
	},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: push,
	sort: arr.sort,
	splice: arr.splice
};

jQuery.extend = jQuery.fn.extend = function() {
	var options, name, src, copy, copyIsArray, clone,
		target = arguments[ 0 ] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;

		// Skip the boolean and the target
		target = arguments[ i ] || {};
		i++;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && !isFunction( target ) ) {
		target = {};
	}

	// Extend jQuery itself if only one argument is passed
	if ( i === length ) {
		target = this;
		i--;
	}

	for ( ; i < length; i++ ) {

		// Only deal with non-null/undefined values
		if ( ( options = arguments[ i ] ) != null ) {

			// Extend the base object
			for ( name in options ) {
				copy = options[ name ];

				// Prevent Object.prototype pollution
				// Prevent never-ending loop
				if ( name === "__proto__" || target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
					( copyIsArray = Array.isArray( copy ) ) ) ) {
					src = target[ name ];

					// Ensure proper type for the source value
					if ( copyIsArray && !Array.isArray( src ) ) {
						clone = [];
					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
						clone = {};
					} else {
						clone = src;
					}
					copyIsArray = false;

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

jQuery.extend( {

	// Unique for each copy of jQuery on the page
	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

	// Assume jQuery is ready without the ready module
	isReady: true,

	error: function( msg ) {
		throw new Error( msg );
	},

	noop: function() {},

	isPlainObject: function( obj ) {
		var proto, Ctor;

		// Detect obvious negatives
		// Use toString instead of jQuery.type to catch host objects
		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
			return false;
		}

		proto = getProto( obj );

		// Objects with no prototype (e.g., `Object.create( null )`) are plain
		if ( !proto ) {
			return true;
		}

		// Objects with prototype are plain iff they were constructed by a global Object function
		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
	},

	isEmptyObject: function( obj ) {
		var name;

		for ( name in obj ) {
			return false;
		}
		return true;
	},

	// Evaluates a script in a global context
	globalEval: function( code, options ) {
		DOMEval( code, { nonce: options && options.nonce } );
	},

	each: function( obj, callback ) {
		var length, i = 0;

		if ( isArrayLike( obj ) ) {
			length = obj.length;
			for ( ; i < length; i++ ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		} else {
			for ( i in obj ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		}

		return obj;
	},

	// Support: Android <=4.0 only
	trim: function( text ) {
		return text == null ?
			"" :
			( text + "" ).replace( rtrim, "" );
	},

	// results is for internal usage only
	makeArray: function( arr, results ) {
		var ret = results || [];

		if ( arr != null ) {
			if ( isArrayLike( Object( arr ) ) ) {
				jQuery.merge( ret,
					typeof arr === "string" ?
					[ arr ] : arr
				);
			} else {
				push.call( ret, arr );
			}
		}

		return ret;
	},

	inArray: function( elem, arr, i ) {
		return arr == null ? -1 : indexOf.call( arr, elem, i );
	},

	// Support: Android <=4.0 only, PhantomJS 1 only
	// push.apply(_, arraylike) throws on ancient WebKit
	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		for ( ; j < len; j++ ) {
			first[ i++ ] = second[ j ];
		}

		first.length = i;

		return first;
	},

	grep: function( elems, callback, invert ) {
		var callbackInverse,
			matches = [],
			i = 0,
			length = elems.length,
			callbackExpect = !invert;

		// Go through the array, only saving the items
		// that pass the validator function
		for ( ; i < length; i++ ) {
			callbackInverse = !callback( elems[ i ], i );
			if ( callbackInverse !== callbackExpect ) {
				matches.push( elems[ i ] );
			}
		}

		return matches;
	},

	// arg is for internal usage only
	map: function( elems, callback, arg ) {
		var length, value,
			i = 0,
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArrayLike( elems ) ) {
			length = elems.length;
			for ( ; i < length; i++ ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}

		// Go through every key on the object,
		} else {
			for ( i in elems ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}
		}

		// Flatten any nested arrays
		return concat.apply( [], ret );
	},

	// A global GUID counter for objects
	guid: 1,

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
} );

if ( typeof Symbol === "function" ) {
	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
function( i, name ) {
	class2type[ "[object " + name + "]" ] = name.toLowerCase();
} );

function isArrayLike( obj ) {

	// Support: real iOS 8.2 only (not reproducible in simulator)
	// `in` check used to prevent JIT error (gh-2145)
	// hasOwn isn't used here due to false negatives
	// regarding Nodelist length in IE
	var length = !!obj && "length" in obj && obj.length,
		type = toType( obj );

	if ( isFunction( obj ) || isWindow( obj ) ) {
		return false;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*!
 * Sizzle CSS Selector Engine v2.3.4
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2019-04-08
 */
(function( window ) {

var i,
	support,
	Expr,
	getText,
	isXML,
	tokenize,
	compile,
	select,
	outermostContext,
	sortInput,
	hasDuplicate,

	// Local document vars
	setDocument,
	document,
	docElem,
	documentIsHTML,
	rbuggyQSA,
	rbuggyMatches,
	matches,
	contains,

	// Instance-specific data
	expando = "sizzle" + 1 * new Date(),
	preferredDoc = window.document,
	dirruns = 0,
	done = 0,
	classCache = createCache(),
	tokenCache = createCache(),
	compilerCache = createCache(),
	nonnativeSelectorCache = createCache(),
	sortOrder = function( a, b ) {
		if ( a === b ) {
			hasDuplicate = true;
		}
		return 0;
	},

	// Instance methods
	hasOwn = ({}).hasOwnProperty,
	arr = [],
	pop = arr.pop,
	push_native = arr.push,
	push = arr.push,
	slice = arr.slice,
	// Use a stripped-down indexOf as it's faster than native
	// https://jsperf.com/thor-indexof-vs-for/5
	indexOf = function( list, elem ) {
		var i = 0,
			len = list.length;
		for ( ; i < len; i++ ) {
			if ( list[i] === elem ) {
				return i;
			}
		}
		return -1;
	},

	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",

	// Regular expressions

	// http://www.w3.org/TR/css3-selectors/#whitespace
	whitespace = "[\\x20\\t\\r\\n\\f]",

	// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
	identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",

	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
		// Operator (capture 2)
		"*([*^$|!~]?=)" + whitespace +
		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
		"*\\]",

	pseudos = ":(" + identifier + ")(?:\\((" +
		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
		// 1. quoted (capture 3; capture 4 or capture 5)
		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
		// 2. simple (capture 6)
		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
		// 3. anything else (capture 2)
		".*" +
		")\\)|)",

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),
	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),

	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
	rdescend = new RegExp( whitespace + "|>" ),

	rpseudo = new RegExp( pseudos ),
	ridentifier = new RegExp( "^" + identifier + "$" ),

	matchExpr = {
		"ID": new RegExp( "^#(" + identifier + ")" ),
		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
		"ATTR": new RegExp( "^" + attributes ),
		"PSEUDO": new RegExp( "^" + pseudos ),
		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
		// For use in libraries implementing .is()
		// We use this for POS matching in `select`
		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
	},

	rhtml = /HTML$/i,
	rinputs = /^(?:input|select|textarea|button)$/i,
	rheader = /^h\d$/i,

	rnative = /^[^{]+\{\s*\[native \w/,

	// Easily-parseable/retrievable ID or TAG or CLASS selectors
	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

	rsibling = /[+~]/,

	// CSS escapes
	// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
	funescape = function( _, escaped, escapedWhitespace ) {
		var high = "0x" + escaped - 0x10000;
		// NaN means non-codepoint
		// Support: Firefox<24
		// Workaround erroneous numeric interpretation of +"0x"
		return high !== high || escapedWhitespace ?
			escaped :
			high < 0 ?
				// BMP codepoint
				String.fromCharCode( high + 0x10000 ) :
				// Supplemental Plane codepoint (surrogate pair)
				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
	},

	// CSS string/identifier serialization
	// https://drafts.csswg.org/cssom/#common-serializing-idioms
	rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
	fcssescape = function( ch, asCodePoint ) {
		if ( asCodePoint ) {

			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
			if ( ch === "\0" ) {
				return "\uFFFD";
			}

			// Control characters and (dependent upon position) numbers get escaped as code points
			return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
		}

		// Other potentially-special ASCII characters get backslash-escaped
		return "\\" + ch;
	},

	// Used for iframes
	// See setDocument()
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE
	unloadHandler = function() {
		setDocument();
	},

	inDisabledFieldset = addCombinator(
		function( elem ) {
			return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
		},
		{ dir: "parentNode", next: "legend" }
	);

// Optimize for push.apply( _, NodeList )
try {
	push.apply(
		(arr = slice.call( preferredDoc.childNodes )),
		preferredDoc.childNodes
	);
	// Support: Android<4.0
	// Detect silently failing push.apply
	arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
	push = { apply: arr.length ?

		// Leverage slice if possible
		function( target, els ) {
			push_native.apply( target, slice.call(els) );
		} :

		// Support: IE<9
		// Otherwise append directly
		function( target, els ) {
			var j = target.length,
				i = 0;
			// Can't trust NodeList.length
			while ( (target[j++] = els[i++]) ) {}
			target.length = j - 1;
		}
	};
}

function Sizzle( selector, context, results, seed ) {
	var m, i, elem, nid, match, groups, newSelector,
		newContext = context && context.ownerDocument,

		// nodeType defaults to 9, since context defaults to document
		nodeType = context ? context.nodeType : 9;

	results = results || [];

	// Return early from calls with invalid selector or context
	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	// Try to shortcut find operations (as opposed to filters) in HTML documents
	if ( !seed ) {

		if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
			setDocument( context );
		}
		context = context || document;

		if ( documentIsHTML ) {

			// If the selector is sufficiently simple, try using a "get*By*" DOM method
			// (excepting DocumentFragment context, where the methods don't exist)
			if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {

				// ID selector
				if ( (m = match[1]) ) {

					// Document context
					if ( nodeType === 9 ) {
						if ( (elem = context.getElementById( m )) ) {

							// Support: IE, Opera, Webkit
							// TODO: identify versions
							// getElementById can match elements by name instead of ID
							if ( elem.id === m ) {
								results.push( elem );
								return results;
							}
						} else {
							return results;
						}

					// Element context
					} else {

						// Support: IE, Opera, Webkit
						// TODO: identify versions
						// getElementById can match elements by name instead of ID
						if ( newContext && (elem = newContext.getElementById( m )) &&
							contains( context, elem ) &&
							elem.id === m ) {

							results.push( elem );
							return results;
						}
					}

				// Type selector
				} else if ( match[2] ) {
					push.apply( results, context.getElementsByTagName( selector ) );
					return results;

				// Class selector
				} else if ( (m = match[3]) && support.getElementsByClassName &&
					context.getElementsByClassName ) {

					push.apply( results, context.getElementsByClassName( m ) );
					return results;
				}
			}

			// Take advantage of querySelectorAll
			if ( support.qsa &&
				!nonnativeSelectorCache[ selector + " " ] &&
				(!rbuggyQSA || !rbuggyQSA.test( selector )) &&

				// Support: IE 8 only
				// Exclude object elements
				(nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) {

				newSelector = selector;
				newContext = context;

				// qSA considers elements outside a scoping root when evaluating child or
				// descendant combinators, which is not what we want.
				// In such cases, we work around the behavior by prefixing every selector in the
				// list with an ID selector referencing the scope context.
				// Thanks to Andrew Dupont for this technique.
				if ( nodeType === 1 && rdescend.test( selector ) ) {

					// Capture the context ID, setting it first if necessary
					if ( (nid = context.getAttribute( "id" )) ) {
						nid = nid.replace( rcssescape, fcssescape );
					} else {
						context.setAttribute( "id", (nid = expando) );
					}

					// Prefix every selector in the list
					groups = tokenize( selector );
					i = groups.length;
					while ( i-- ) {
						groups[i] = "#" + nid + " " + toSelector( groups[i] );
					}
					newSelector = groups.join( "," );

					// Expand context for sibling selectors
					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
						context;
				}

				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch ( qsaError ) {
					nonnativeSelectorCache( selector, true );
				} finally {
					if ( nid === expando ) {
						context.removeAttribute( "id" );
					}
				}
			}
		}
	}

	// All others
	return select( selector.replace( rtrim, "$1" ), context, results, seed );
}

/**
 * Create key-value caches of limited size
 * @returns {function(string, object)} Returns the Object data after storing it on itself with
 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 *	deleting the oldest entry
 */
function createCache() {
	var keys = [];

	function cache( key, value ) {
		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
		if ( keys.push( key + " " ) > Expr.cacheLength ) {
			// Only keep the most recent entries
			delete cache[ keys.shift() ];
		}
		return (cache[ key + " " ] = value);
	}
	return cache;
}

/**
 * Mark a function for special use by Sizzle
 * @param {Function} fn The function to mark
 */
function markFunction( fn ) {
	fn[ expando ] = true;
	return fn;
}

/**
 * Support testing using an element
 * @param {Function} fn Passed the created element and returns a boolean result
 */
function assert( fn ) {
	var el = document.createElement("fieldset");

	try {
		return !!fn( el );
	} catch (e) {
		return false;
	} finally {
		// Remove from its parent by default
		if ( el.parentNode ) {
			el.parentNode.removeChild( el );
		}
		// release memory in IE
		el = null;
	}
}

/**
 * Adds the same handler for all of the specified attrs
 * @param {String} attrs Pipe-separated list of attributes
 * @param {Function} handler The method that will be applied
 */
function addHandle( attrs, handler ) {
	var arr = attrs.split("|"),
		i = arr.length;

	while ( i-- ) {
		Expr.attrHandle[ arr[i] ] = handler;
	}
}

/**
 * Checks document order of two siblings
 * @param {Element} a
 * @param {Element} b
 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
 */
function siblingCheck( a, b ) {
	var cur = b && a,
		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
			a.sourceIndex - b.sourceIndex;

	// Use IE sourceIndex if available on both nodes
	if ( diff ) {
		return diff;
	}

	// Check if b follows a
	if ( cur ) {
		while ( (cur = cur.nextSibling) ) {
			if ( cur === b ) {
				return -1;
			}
		}
	}

	return a ? 1 : -1;
}

/**
 * Returns a function to use in pseudos for input types
 * @param {String} type
 */
function createInputPseudo( type ) {
	return function( elem ) {
		var name = elem.nodeName.toLowerCase();
		return name === "input" && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for buttons
 * @param {String} type
 */
function createButtonPseudo( type ) {
	return function( elem ) {
		var name = elem.nodeName.toLowerCase();
		return (name === "input" || name === "button") && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for :enabled/:disabled
 * @param {Boolean} disabled true for :disabled; false for :enabled
 */
function createDisabledPseudo( disabled ) {

	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
	return function( elem ) {

		// Only certain elements can match :enabled or :disabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
		if ( "form" in elem ) {

			// Check for inherited disabledness on relevant non-disabled elements:
			// * listed form-associated elements in a disabled fieldset
			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
			// * option elements in a disabled optgroup
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
			// All such elements have a "form" property.
			if ( elem.parentNode && elem.disabled === false ) {

				// Option elements defer to a parent optgroup if present
				if ( "label" in elem ) {
					if ( "label" in elem.parentNode ) {
						return elem.parentNode.disabled === disabled;
					} else {
						return elem.disabled === disabled;
					}
				}

				// Support: IE 6 - 11
				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
				return elem.isDisabled === disabled ||

					// Where there is no isDisabled, check manually
					/* jshint -W018 */
					elem.isDisabled !== !disabled &&
						inDisabledFieldset( elem ) === disabled;
			}

			return elem.disabled === disabled;

		// Try to winnow out elements that can't be disabled before trusting the disabled property.
		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
		// even exist on them, let alone have a boolean value.
		} else if ( "label" in elem ) {
			return elem.disabled === disabled;
		}

		// Remaining elements are neither :enabled nor :disabled
		return false;
	};
}

/**
 * Returns a function to use in pseudos for positionals
 * @param {Function} fn
 */
function createPositionalPseudo( fn ) {
	return markFunction(function( argument ) {
		argument = +argument;
		return markFunction(function( seed, matches ) {
			var j,
				matchIndexes = fn( [], seed.length, argument ),
				i = matchIndexes.length;

			// Match elements found at the specified indexes
			while ( i-- ) {
				if ( seed[ (j = matchIndexes[i]) ] ) {
					seed[j] = !(matches[j] = seed[j]);
				}
			}
		});
	});
}

/**
 * Checks a node for validity as a Sizzle context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}

// Expose support vars for convenience
support = Sizzle.support = {};

/**
 * Detects XML nodes
 * @param {Element|Object} elem An element or a document
 * @returns {Boolean} True iff elem is a non-HTML XML node
 */
isXML = Sizzle.isXML = function( elem ) {
	var namespace = elem.namespaceURI,
		docElem = (elem.ownerDocument || elem).documentElement;

	// Support: IE <=8
	// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
	// https://bugs.jquery.com/ticket/4833
	return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
};

/**
 * Sets document-related variables once based on the current document
 * @param {Element|Object} [doc] An element or document object to use to set the document
 * @returns {Object} Returns the current document
 */
setDocument = Sizzle.setDocument = function( node ) {
	var hasCompare, subWindow,
		doc = node ? node.ownerDocument || node : preferredDoc;

	// Return early if doc is invalid or already selected
	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
		return document;
	}

	// Update global variables
	document = doc;
	docElem = document.documentElement;
	documentIsHTML = !isXML( document );

	// Support: IE 9-11, Edge
	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
	if ( preferredDoc !== document &&
		(subWindow = document.defaultView) && subWindow.top !== subWindow ) {

		// Support: IE 11, Edge
		if ( subWindow.addEventListener ) {
			subWindow.addEventListener( "unload", unloadHandler, false );

		// Support: IE 9 - 10 only
		} else if ( subWindow.attachEvent ) {
			subWindow.attachEvent( "onunload", unloadHandler );
		}
	}

	/* Attributes
	---------------------------------------------------------------------- */

	// Support: IE<8
	// Verify that getAttribute really returns attributes and not properties
	// (excepting IE8 booleans)
	support.attributes = assert(function( el ) {
		el.className = "i";
		return !el.getAttribute("className");
	});

	/* getElement(s)By*
	---------------------------------------------------------------------- */

	// Check if getElementsByTagName("*") returns only elements
	support.getElementsByTagName = assert(function( el ) {
		el.appendChild( document.createComment("") );
		return !el.getElementsByTagName("*").length;
	});

	// Support: IE<9
	support.getElementsByClassName = rnative.test( document.getElementsByClassName );

	// Support: IE<10
	// Check if getElementById returns elements by name
	// The broken getElementById methods don't pick up programmatically-set names,
	// so use a roundabout getElementsByName test
	support.getById = assert(function( el ) {
		docElem.appendChild( el ).id = expando;
		return !document.getElementsByName || !document.getElementsByName( expando ).length;
	});

	// ID filter and find
	if ( support.getById ) {
		Expr.filter["ID"] = function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				return elem.getAttribute("id") === attrId;
			};
		};
		Expr.find["ID"] = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var elem = context.getElementById( id );
				return elem ? [ elem ] : [];
			}
		};
	} else {
		Expr.filter["ID"] =  function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				var node = typeof elem.getAttributeNode !== "undefined" &&
					elem.getAttributeNode("id");
				return node && node.value === attrId;
			};
		};

		// Support: IE 6 - 7 only
		// getElementById is not reliable as a find shortcut
		Expr.find["ID"] = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var node, i, elems,
					elem = context.getElementById( id );

				if ( elem ) {

					// Verify the id attribute
					node = elem.getAttributeNode("id");
					if ( node && node.value === id ) {
						return [ elem ];
					}

					// Fall back on getElementsByName
					elems = context.getElementsByName( id );
					i = 0;
					while ( (elem = elems[i++]) ) {
						node = elem.getAttributeNode("id");
						if ( node && node.value === id ) {
							return [ elem ];
						}
					}
				}

				return [];
			}
		};
	}

	// Tag
	Expr.find["TAG"] = support.getElementsByTagName ?
		function( tag, context ) {
			if ( typeof context.getElementsByTagName !== "undefined" ) {
				return context.getElementsByTagName( tag );

			// DocumentFragment nodes don't have gEBTN
			} else if ( support.qsa ) {
				return context.querySelectorAll( tag );
			}
		} :

		function( tag, context ) {
			var elem,
				tmp = [],
				i = 0,
				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
				results = context.getElementsByTagName( tag );

			// Filter out possible comments
			if ( tag === "*" ) {
				while ( (elem = results[i++]) ) {
					if ( elem.nodeType === 1 ) {
						tmp.push( elem );
					}
				}

				return tmp;
			}
			return results;
		};

	// Class
	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
			return context.getElementsByClassName( className );
		}
	};

	/* QSA/matchesSelector
	---------------------------------------------------------------------- */

	// QSA and matchesSelector support

	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
	rbuggyMatches = [];

	// qSa(:focus) reports false when true (Chrome 21)
	// We allow this because of a bug in IE8/9 that throws an error
	// whenever `document.activeElement` is accessed on an iframe
	// So, we allow :focus to pass through QSA all the time to avoid the IE error
	// See https://bugs.jquery.com/ticket/13378
	rbuggyQSA = [];

	if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
		// Build QSA regex
		// Regex strategy adopted from Diego Perini
		assert(function( el ) {
			// Select is set to empty string on purpose
			// This is to test IE's treatment of not explicitly
			// setting a boolean content attribute,
			// since its presence should be enough
			// https://bugs.jquery.com/ticket/12359
			docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
				"<option selected=''></option></select>";

			// Support: IE8, Opera 11-12.16
			// Nothing should be selected when empty strings follow ^= or $= or *=
			// The test attribute must be unknown in Opera but "safe" for WinRT
			// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
			if ( el.querySelectorAll("[msallowcapture^='']").length ) {
				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
			}

			// Support: IE8
			// Boolean attributes and "value" are not treated correctly
			if ( !el.querySelectorAll("[selected]").length ) {
				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
			}

			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
			if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
				rbuggyQSA.push("~=");
			}

			// Webkit/Opera - :checked should return selected option elements
			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			// IE8 throws error here and will not see later tests
			if ( !el.querySelectorAll(":checked").length ) {
				rbuggyQSA.push(":checked");
			}

			// Support: Safari 8+, iOS 8+
			// https://bugs.webkit.org/show_bug.cgi?id=136851
			// In-page `selector#id sibling-combinator selector` fails
			if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
				rbuggyQSA.push(".#.+[+~]");
			}
		});

		assert(function( el ) {
			el.innerHTML = "<a href='' disabled='disabled'></a>" +
				"<select disabled='disabled'><option/></select>";

			// Support: Windows 8 Native Apps
			// The type and name attributes are restricted during .innerHTML assignment
			var input = document.createElement("input");
			input.setAttribute( "type", "hidden" );
			el.appendChild( input ).setAttribute( "name", "D" );

			// Support: IE8
			// Enforce case-sensitivity of name attribute
			if ( el.querySelectorAll("[name=d]").length ) {
				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
			}

			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
			// IE8 throws error here and will not see later tests
			if ( el.querySelectorAll(":enabled").length !== 2 ) {
				rbuggyQSA.push( ":enabled", ":disabled" );
			}

			// Support: IE9-11+
			// IE's :disabled selector does not pick up the children of disabled fieldsets
			docElem.appendChild( el ).disabled = true;
			if ( el.querySelectorAll(":disabled").length !== 2 ) {
				rbuggyQSA.push( ":enabled", ":disabled" );
			}

			// Opera 10-11 does not throw on post-comma invalid pseudos
			el.querySelectorAll("*,:x");
			rbuggyQSA.push(",.*:");
		});
	}

	if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
		docElem.webkitMatchesSelector ||
		docElem.mozMatchesSelector ||
		docElem.oMatchesSelector ||
		docElem.msMatchesSelector) )) ) {

		assert(function( el ) {
			// Check to see if it's possible to do matchesSelector
			// on a disconnected node (IE 9)
			support.disconnectedMatch = matches.call( el, "*" );

			// This should fail with an exception
			// Gecko does not error, returns false instead
			matches.call( el, "[s!='']:x" );
			rbuggyMatches.push( "!=", pseudos );
		});
	}

	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );

	/* Contains
	---------------------------------------------------------------------- */
	hasCompare = rnative.test( docElem.compareDocumentPosition );

	// Element contains another
	// Purposefully self-exclusive
	// As in, an element does not contain itself
	contains = hasCompare || rnative.test( docElem.contains ) ?
		function( a, b ) {
			var adown = a.nodeType === 9 ? a.documentElement : a,
				bup = b && b.parentNode;
			return a === bup || !!( bup && bup.nodeType === 1 && (
				adown.contains ?
					adown.contains( bup ) :
					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
			));
		} :
		function( a, b ) {
			if ( b ) {
				while ( (b = b.parentNode) ) {
					if ( b === a ) {
						return true;
					}
				}
			}
			return false;
		};

	/* Sorting
	---------------------------------------------------------------------- */

	// Document order sorting
	sortOrder = hasCompare ?
	function( a, b ) {

		// Flag for duplicate removal
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		// Sort on method existence if only one input has compareDocumentPosition
		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
		if ( compare ) {
			return compare;
		}

		// Calculate position if both inputs belong to the same document
		compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
			a.compareDocumentPosition( b ) :

			// Otherwise we know they are disconnected
			1;

		// Disconnected nodes
		if ( compare & 1 ||
			(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {

			// Choose the first element that is related to our preferred document
			if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
				return -1;
			}
			if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
				return 1;
			}

			// Maintain original order
			return sortInput ?
				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
				0;
		}

		return compare & 4 ? -1 : 1;
	} :
	function( a, b ) {
		// Exit early if the nodes are identical
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		var cur,
			i = 0,
			aup = a.parentNode,
			bup = b.parentNode,
			ap = [ a ],
			bp = [ b ];

		// Parentless nodes are either documents or disconnected
		if ( !aup || !bup ) {
			return a === document ? -1 :
				b === document ? 1 :
				aup ? -1 :
				bup ? 1 :
				sortInput ?
				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
				0;

		// If the nodes are siblings, we can do a quick check
		} else if ( aup === bup ) {
			return siblingCheck( a, b );
		}

		// Otherwise we need full lists of their ancestors for comparison
		cur = a;
		while ( (cur = cur.parentNode) ) {
			ap.unshift( cur );
		}
		cur = b;
		while ( (cur = cur.parentNode) ) {
			bp.unshift( cur );
		}

		// Walk down the tree looking for a discrepancy
		while ( ap[i] === bp[i] ) {
			i++;
		}

		return i ?
			// Do a sibling check if the nodes have a common ancestor
			siblingCheck( ap[i], bp[i] ) :

			// Otherwise nodes in our document sort first
			ap[i] === preferredDoc ? -1 :
			bp[i] === preferredDoc ? 1 :
			0;
	};

	return document;
};

Sizzle.matches = function( expr, elements ) {
	return Sizzle( expr, null, null, elements );
};

Sizzle.matchesSelector = function( elem, expr ) {
	// Set document vars if needed
	if ( ( elem.ownerDocument || elem ) !== document ) {
		setDocument( elem );
	}

	if ( support.matchesSelector && documentIsHTML &&
		!nonnativeSelectorCache[ expr + " " ] &&
		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {

		try {
			var ret = matches.call( elem, expr );

			// IE 9's matchesSelector returns false on disconnected nodes
			if ( ret || support.disconnectedMatch ||
					// As well, disconnected nodes are said to be in a document
					// fragment in IE 9
					elem.document && elem.document.nodeType !== 11 ) {
				return ret;
			}
		} catch (e) {
			nonnativeSelectorCache( expr, true );
		}
	}

	return Sizzle( expr, document, null, [ elem ] ).length > 0;
};

Sizzle.contains = function( context, elem ) {
	// Set document vars if needed
	if ( ( context.ownerDocument || context ) !== document ) {
		setDocument( context );
	}
	return contains( context, elem );
};

Sizzle.attr = function( elem, name ) {
	// Set document vars if needed
	if ( ( elem.ownerDocument || elem ) !== document ) {
		setDocument( elem );
	}

	var fn = Expr.attrHandle[ name.toLowerCase() ],
		// Don't get fooled by Object.prototype properties (jQuery #13807)
		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
			fn( elem, name, !documentIsHTML ) :
			undefined;

	return val !== undefined ?
		val :
		support.attributes || !documentIsHTML ?
			elem.getAttribute( name ) :
			(val = elem.getAttributeNode(name)) && val.specified ?
				val.value :
				null;
};

Sizzle.escape = function( sel ) {
	return (sel + "").replace( rcssescape, fcssescape );
};

Sizzle.error = function( msg ) {
	throw new Error( "Syntax error, unrecognized expression: " + msg );
};

/**
 * Document sorting and removing duplicates
 * @param {ArrayLike} results
 */
Sizzle.uniqueSort = function( results ) {
	var elem,
		duplicates = [],
		j = 0,
		i = 0;

	// Unless we *know* we can detect duplicates, assume their presence
	hasDuplicate = !support.detectDuplicates;
	sortInput = !support.sortStable && results.slice( 0 );
	results.sort( sortOrder );

	if ( hasDuplicate ) {
		while ( (elem = results[i++]) ) {
			if ( elem === results[ i ] ) {
				j = duplicates.push( i );
			}
		}
		while ( j-- ) {
			results.splice( duplicates[ j ], 1 );
		}
	}

	// Clear input after sorting to release objects
	// See https://github.com/jquery/sizzle/pull/225
	sortInput = null;

	return results;
};

/**
 * Utility function for retrieving the text value of an array of DOM nodes
 * @param {Array|Element} elem
 */
getText = Sizzle.getText = function( elem ) {
	var node,
		ret = "",
		i = 0,
		nodeType = elem.nodeType;

	if ( !nodeType ) {
		// If no nodeType, this is expected to be an array
		while ( (node = elem[i++]) ) {
			// Do not traverse comment nodes
			ret += getText( node );
		}
	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
		// Use textContent for elements
		// innerText usage removed for consistency of new lines (jQuery #11153)
		if ( typeof elem.textContent === "string" ) {
			return elem.textContent;
		} else {
			// Traverse its children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				ret += getText( elem );
			}
		}
	} else if ( nodeType === 3 || nodeType === 4 ) {
		return elem.nodeValue;
	}
	// Do not include comment or processing instruction nodes

	return ret;
};

Expr = Sizzle.selectors = {

	// Can be adjusted by the user
	cacheLength: 50,

	createPseudo: markFunction,

	match: matchExpr,

	attrHandle: {},

	find: {},

	relative: {
		">": { dir: "parentNode", first: true },
		" ": { dir: "parentNode" },
		"+": { dir: "previousSibling", first: true },
		"~": { dir: "previousSibling" }
	},

	preFilter: {
		"ATTR": function( match ) {
			match[1] = match[1].replace( runescape, funescape );

			// Move the given value to match[3] whether quoted or unquoted
			match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );

			if ( match[2] === "~=" ) {
				match[3] = " " + match[3] + " ";
			}

			return match.slice( 0, 4 );
		},

		"CHILD": function( match ) {
			/* matches from matchExpr["CHILD"]
				1 type (only|nth|...)
				2 what (child|of-type)
				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
				4 xn-component of xn+y argument ([+-]?\d*n|)
				5 sign of xn-component
				6 x of xn-component
				7 sign of y-component
				8 y of y-component
			*/
			match[1] = match[1].toLowerCase();

			if ( match[1].slice( 0, 3 ) === "nth" ) {
				// nth-* requires argument
				if ( !match[3] ) {
					Sizzle.error( match[0] );
				}

				// numeric x and y parameters for Expr.filter.CHILD
				// remember that false/true cast respectively to 0/1
				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );

			// other types prohibit arguments
			} else if ( match[3] ) {
				Sizzle.error( match[0] );
			}

			return match;
		},

		"PSEUDO": function( match ) {
			var excess,
				unquoted = !match[6] && match[2];

			if ( matchExpr["CHILD"].test( match[0] ) ) {
				return null;
			}

			// Accept quoted arguments as-is
			if ( match[3] ) {
				match[2] = match[4] || match[5] || "";

			// Strip excess characters from unquoted arguments
			} else if ( unquoted && rpseudo.test( unquoted ) &&
				// Get excess from tokenize (recursively)
				(excess = tokenize( unquoted, true )) &&
				// advance to the next closing parenthesis
				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {

				// excess is a negative index
				match[0] = match[0].slice( 0, excess );
				match[2] = unquoted.slice( 0, excess );
			}

			// Return only captures needed by the pseudo filter method (type and argument)
			return match.slice( 0, 3 );
		}
	},

	filter: {

		"TAG": function( nodeNameSelector ) {
			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
			return nodeNameSelector === "*" ?
				function() { return true; } :
				function( elem ) {
					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
				};
		},

		"CLASS": function( className ) {
			var pattern = classCache[ className + " " ];

			return pattern ||
				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
				classCache( className, function( elem ) {
					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
				});
		},

		"ATTR": function( name, operator, check ) {
			return function( elem ) {
				var result = Sizzle.attr( elem, name );

				if ( result == null ) {
					return operator === "!=";
				}
				if ( !operator ) {
					return true;
				}

				result += "";

				return operator === "=" ? result === check :
					operator === "!=" ? result !== check :
					operator === "^=" ? check && result.indexOf( check ) === 0 :
					operator === "*=" ? check && result.indexOf( check ) > -1 :
					operator === "$=" ? check && result.slice( -check.length ) === check :
					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
					false;
			};
		},

		"CHILD": function( type, what, argument, first, last ) {
			var simple = type.slice( 0, 3 ) !== "nth",
				forward = type.slice( -4 ) !== "last",
				ofType = what === "of-type";

			return first === 1 && last === 0 ?

				// Shortcut for :nth-*(n)
				function( elem ) {
					return !!elem.parentNode;
				} :

				function( elem, context, xml ) {
					var cache, uniqueCache, outerCache, node, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType,
						diff = false;

					if ( parent ) {

						// :(first|last|only)-(child|of-type)
						if ( simple ) {
							while ( dir ) {
								node = elem;
								while ( (node = node[ dir ]) ) {
									if ( ofType ?
										node.nodeName.toLowerCase() === name :
										node.nodeType === 1 ) {

										return false;
									}
								}
								// Reverse direction for :only-* (if we haven't yet done so)
								start = dir = type === "only" && !start && "nextSibling";
							}
							return true;
						}

						start = [ forward ? parent.firstChild : parent.lastChild ];

						// non-xml :nth-child(...) stores cache data on `parent`
						if ( forward && useCache ) {

							// Seek `elem` from a previously-cached index

							// ...in a gzip-friendly way
							node = parent;
							outerCache = node[ expando ] || (node[ expando ] = {});

							// Support: IE <9 only
							// Defend against cloned attroperties (jQuery gh-1709)
							uniqueCache = outerCache[ node.uniqueID ] ||
								(outerCache[ node.uniqueID ] = {});

							cache = uniqueCache[ type ] || [];
							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
							diff = nodeIndex && cache[ 2 ];
							node = nodeIndex && parent.childNodes[ nodeIndex ];

							while ( (node = ++nodeIndex && node && node[ dir ] ||

								// Fallback to seeking `elem` from the start
								(diff = nodeIndex = 0) || start.pop()) ) {

								// When found, cache indexes on `parent` and break
								if ( node.nodeType === 1 && ++diff && node === elem ) {
									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						} else {
							// Use previously-cached element index if available
							if ( useCache ) {
								// ...in a gzip-friendly way
								node = elem;
								outerCache = node[ expando ] || (node[ expando ] = {});

								// Support: IE <9 only
								// Defend against cloned attroperties (jQuery gh-1709)
								uniqueCache = outerCache[ node.uniqueID ] ||
									(outerCache[ node.uniqueID ] = {});

								cache = uniqueCache[ type ] || [];
								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
								diff = nodeIndex;
							}

							// xml :nth-child(...)
							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
							if ( diff === false ) {
								// Use the same loop as above to seek `elem` from the start
								while ( (node = ++nodeIndex && node && node[ dir ] ||
									(diff = nodeIndex = 0) || start.pop()) ) {

									if ( ( ofType ?
										node.nodeName.toLowerCase() === name :
										node.nodeType === 1 ) &&
										++diff ) {

										// Cache the index of each encountered element
										if ( useCache ) {
											outerCache = node[ expando ] || (node[ expando ] = {});

											// Support: IE <9 only
											// Defend against cloned attroperties (jQuery gh-1709)
											uniqueCache = outerCache[ node.uniqueID ] ||
												(outerCache[ node.uniqueID ] = {});

											uniqueCache[ type ] = [ dirruns, diff ];
										}

										if ( node === elem ) {
											break;
										}
									}
								}
							}
						}

						// Incorporate the offset, then check against cycle size
						diff -= last;
						return diff === first || ( diff % first === 0 && diff / first >= 0 );
					}
				};
		},

		"PSEUDO": function( pseudo, argument ) {
			// pseudo-class names are case-insensitive
			// http://www.w3.org/TR/selectors/#pseudo-classes
			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
			// Remember that setFilters inherits from pseudos
			var args,
				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
					Sizzle.error( "unsupported pseudo: " + pseudo );

			// The user may use createPseudo to indicate that
			// arguments are needed to create the filter function
			// just as Sizzle does
			if ( fn[ expando ] ) {
				return fn( argument );
			}

			// But maintain support for old signatures
			if ( fn.length > 1 ) {
				args = [ pseudo, pseudo, "", argument ];
				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
					markFunction(function( seed, matches ) {
						var idx,
							matched = fn( seed, argument ),
							i = matched.length;
						while ( i-- ) {
							idx = indexOf( seed, matched[i] );
							seed[ idx ] = !( matches[ idx ] = matched[i] );
						}
					}) :
					function( elem ) {
						return fn( elem, 0, args );
					};
			}

			return fn;
		}
	},

	pseudos: {
		// Potentially complex pseudos
		"not": markFunction(function( selector ) {
			// Trim the selector passed to compile
			// to avoid treating leading and trailing
			// spaces as combinators
			var input = [],
				results = [],
				matcher = compile( selector.replace( rtrim, "$1" ) );

			return matcher[ expando ] ?
				markFunction(function( seed, matches, context, xml ) {
					var elem,
						unmatched = matcher( seed, null, xml, [] ),
						i = seed.length;

					// Match elements unmatched by `matcher`
					while ( i-- ) {
						if ( (elem = unmatched[i]) ) {
							seed[i] = !(matches[i] = elem);
						}
					}
				}) :
				function( elem, context, xml ) {
					input[0] = elem;
					matcher( input, null, xml, results );
					// Don't keep the element (issue #299)
					input[0] = null;
					return !results.pop();
				};
		}),

		"has": markFunction(function( selector ) {
			return function( elem ) {
				return Sizzle( selector, elem ).length > 0;
			};
		}),

		"contains": markFunction(function( text ) {
			text = text.replace( runescape, funescape );
			return function( elem ) {
				return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
			};
		}),

		// "Whether an element is represented by a :lang() selector
		// is based solely on the element's language value
		// being equal to the identifier C,
		// or beginning with the identifier C immediately followed by "-".
		// The matching of C against the element's language value is performed case-insensitively.
		// The identifier C does not have to be a valid language name."
		// http://www.w3.org/TR/selectors/#lang-pseudo
		"lang": markFunction( function( lang ) {
			// lang value must be a valid identifier
			if ( !ridentifier.test(lang || "") ) {
				Sizzle.error( "unsupported lang: " + lang );
			}
			lang = lang.replace( runescape, funescape ).toLowerCase();
			return function( elem ) {
				var elemLang;
				do {
					if ( (elemLang = documentIsHTML ?
						elem.lang :
						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {

						elemLang = elemLang.toLowerCase();
						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
					}
				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
				return false;
			};
		}),

		// Miscellaneous
		"target": function( elem ) {
			var hash = window.location && window.location.hash;
			return hash && hash.slice( 1 ) === elem.id;
		},

		"root": function( elem ) {
			return elem === docElem;
		},

		"focus": function( elem ) {
			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
		},

		// Boolean properties
		"enabled": createDisabledPseudo( false ),
		"disabled": createDisabledPseudo( true ),

		"checked": function( elem ) {
			// In CSS3, :checked should return both checked and selected elements
			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			var nodeName = elem.nodeName.toLowerCase();
			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
		},

		"selected": function( elem ) {
			// Accessing this property makes selected-by-default
			// options in Safari work properly
			if ( elem.parentNode ) {
				elem.parentNode.selectedIndex;
			}

			return elem.selected === true;
		},

		// Contents
		"empty": function( elem ) {
			// http://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;
				}
			}
			return true;
		},

		"parent": function( elem ) {
			return !Expr.pseudos["empty"]( elem );
		},

		// Element/input types
		"header": function( elem ) {
			return rheader.test( elem.nodeName );
		},

		"input": function( elem ) {
			return rinputs.test( elem.nodeName );
		},

		"button": function( elem ) {
			var name = elem.nodeName.toLowerCase();
			return name === "input" && elem.type === "button" || name === "button";
		},

		"text": function( elem ) {
			var attr;
			return elem.nodeName.toLowerCase() === "input" &&
				elem.type === "text" &&

				// Support: IE<8
				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
		},

		// Position-in-collection
		"first": createPositionalPseudo(function() {
			return [ 0 ];
		}),

		"last": createPositionalPseudo(function( matchIndexes, length ) {
			return [ length - 1 ];
		}),

		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
			return [ argument < 0 ? argument + length : argument ];
		}),

		"even": createPositionalPseudo(function( matchIndexes, length ) {
			var i = 0;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		}),

		"odd": createPositionalPseudo(function( matchIndexes, length ) {
			var i = 1;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		}),

		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
			var i = argument < 0 ?
				argument + length :
				argument > length ?
					length :
					argument;
			for ( ; --i >= 0; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		}),

		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; ++i < length; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		})
	}
};

Expr.pseudos["nth"] = Expr.pseudos["eq"];

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
	Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
	Expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();

tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
	var matched, match, tokens, type,
		soFar, groups, preFilters,
		cached = tokenCache[ selector + " " ];

	if ( cached ) {
		return parseOnly ? 0 : cached.slice( 0 );
	}

	soFar = selector;
	groups = [];
	preFilters = Expr.preFilter;

	while ( soFar ) {

		// Comma and first run
		if ( !matched || (match = rcomma.exec( soFar )) ) {
			if ( match ) {
				// Don't consume trailing commas as valid
				soFar = soFar.slice( match[0].length ) || soFar;
			}
			groups.push( (tokens = []) );
		}

		matched = false;

		// Combinators
		if ( (match = rcombinators.exec( soFar )) ) {
			matched = match.shift();
			tokens.push({
				value: matched,
				// Cast descendant combinators to space
				type: match[0].replace( rtrim, " " )
			});
			soFar = soFar.slice( matched.length );
		}

		// Filters
		for ( type in Expr.filter ) {
			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
				(match = preFilters[ type ]( match ))) ) {
				matched = match.shift();
				tokens.push({
					value: matched,
					type: type,
					matches: match
				});
				soFar = soFar.slice( matched.length );
			}
		}

		if ( !matched ) {
			break;
		}
	}

	// Return the length of the invalid excess
	// if we're just parsing
	// Otherwise, throw an error or return tokens
	return parseOnly ?
		soFar.length :
		soFar ?
			Sizzle.error( selector ) :
			// Cache the tokens
			tokenCache( selector, groups ).slice( 0 );
};

function toSelector( tokens ) {
	var i = 0,
		len = tokens.length,
		selector = "";
	for ( ; i < len; i++ ) {
		selector += tokens[i].value;
	}
	return selector;
}

function addCombinator( matcher, combinator, base ) {
	var dir = combinator.dir,
		skip = combinator.next,
		key = skip || dir,
		checkNonElements = base && key === "parentNode",
		doneName = done++;

	return combinator.first ?
		// Check against closest ancestor/preceding element
		function( elem, context, xml ) {
			while ( (elem = elem[ dir ]) ) {
				if ( elem.nodeType === 1 || checkNonElements ) {
					return matcher( elem, context, xml );
				}
			}
			return false;
		} :

		// Check against all ancestor/preceding elements
		function( elem, context, xml ) {
			var oldCache, uniqueCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
			if ( xml ) {
				while ( (elem = elem[ dir ]) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( (elem = elem[ dir ]) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ expando ] || (elem[ expando ] = {});

						// Support: IE <9 only
						// Defend against cloned attroperties (jQuery gh-1709)
						uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});

						if ( skip && skip === elem.nodeName.toLowerCase() ) {
							elem = elem[ dir ] || elem;
						} else if ( (oldCache = uniqueCache[ key ]) &&
							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {

							// Assign to newCache so results back-propagate to previous elements
							return (newCache[ 2 ] = oldCache[ 2 ]);
						} else {
							// Reuse newcache so results back-propagate to previous elements
							uniqueCache[ key ] = newCache;

							// A match means we're done; a fail means we have to keep checking
							if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
								return true;
							}
						}
					}
				}
			}
			return false;
		};
}

function elementMatcher( matchers ) {
	return matchers.length > 1 ?
		function( elem, context, xml ) {
			var i = matchers.length;
			while ( i-- ) {
				if ( !matchers[i]( elem, context, xml ) ) {
					return false;
				}
			}
			return true;
		} :
		matchers[0];
}

function multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		Sizzle( selector, contexts[i], results );
	}
	return results;
}

function condense( unmatched, map, filter, context, xml ) {
	var elem,
		newUnmatched = [],
		i = 0,
		len = unmatched.length,
		mapped = map != null;

	for ( ; i < len; i++ ) {
		if ( (elem = unmatched[i]) ) {
			if ( !filter || filter( elem, context, xml ) ) {
				newUnmatched.push( elem );
				if ( mapped ) {
					map.push( i );
				}
			}
		}
	}

	return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
	if ( postFilter && !postFilter[ expando ] ) {
		postFilter = setMatcher( postFilter );
	}
	if ( postFinder && !postFinder[ expando ] ) {
		postFinder = setMatcher( postFinder, postSelector );
	}
	return markFunction(function( seed, results, context, xml ) {
		var temp, i, elem,
			preMap = [],
			postMap = [],
			preexisting = results.length,

			// Get initial elements from seed or context
			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),

			// Prefilter to get matcher input, preserving a map for seed-results synchronization
			matcherIn = preFilter && ( seed || !selector ) ?
				condense( elems, preMap, preFilter, context, xml ) :
				elems,

			matcherOut = matcher ?
				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?

					// ...intermediate processing is necessary
					[] :

					// ...otherwise use results directly
					results :
				matcherIn;

		// Find primary matches
		if ( matcher ) {
			matcher( matcherIn, matcherOut, context, xml );
		}

		// Apply postFilter
		if ( postFilter ) {
			temp = condense( matcherOut, postMap );
			postFilter( temp, [], context, xml );

			// Un-match failing elements by moving them back to matcherIn
			i = temp.length;
			while ( i-- ) {
				if ( (elem = temp[i]) ) {
					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
				}
			}
		}

		if ( seed ) {
			if ( postFinder || preFilter ) {
				if ( postFinder ) {
					// Get the final matcherOut by condensing this intermediate into postFinder contexts
					temp = [];
					i = matcherOut.length;
					while ( i-- ) {
						if ( (elem = matcherOut[i]) ) {
							// Restore matcherIn since elem is not yet a final match
							temp.push( (matcherIn[i] = elem) );
						}
					}
					postFinder( null, (matcherOut = []), temp, xml );
				}

				// Move matched elements from seed to results to keep them synchronized
				i = matcherOut.length;
				while ( i-- ) {
					if ( (elem = matcherOut[i]) &&
						(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {

						seed[temp] = !(results[temp] = elem);
					}
				}
			}

		// Add elements to results, through postFinder if defined
		} else {
			matcherOut = condense(
				matcherOut === results ?
					matcherOut.splice( preexisting, matcherOut.length ) :
					matcherOut
			);
			if ( postFinder ) {
				postFinder( null, results, matcherOut, xml );
			} else {
				push.apply( results, matcherOut );
			}
		}
	});
}

function matcherFromTokens( tokens ) {
	var checkContext, matcher, j,
		len = tokens.length,
		leadingRelative = Expr.relative[ tokens[0].type ],
		implicitRelative = leadingRelative || Expr.relative[" "],
		i = leadingRelative ? 1 : 0,

		// The foundational matcher ensures that elements are reachable from top-level context(s)
		matchContext = addCombinator( function( elem ) {
			return elem === checkContext;
		}, implicitRelative, true ),
		matchAnyContext = addCombinator( function( elem ) {
			return indexOf( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {
			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
				(checkContext = context).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );
			// Avoid hanging onto element (issue #299)
			checkContext = null;
			return ret;
		} ];

	for ( ; i < len; i++ ) {
		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
		} else {
			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );

			// Return special upon seeing a positional matcher
			if ( matcher[ expando ] ) {
				// Find the next relative operator (if any) for proper handling
				j = ++i;
				for ( ; j < len; j++ ) {
					if ( Expr.relative[ tokens[j].type ] ) {
						break;
					}
				}
				return setMatcher(
					i > 1 && elementMatcher( matchers ),
					i > 1 && toSelector(
						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
					).replace( rtrim, "$1" ),
					matcher,
					i < j && matcherFromTokens( tokens.slice( i, j ) ),
					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
					j < len && toSelector( tokens )
				);
			}
			matchers.push( matcher );
		}
	}

	return elementMatcher( matchers );
}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
	var bySet = setMatchers.length > 0,
		byElement = elementMatchers.length > 0,
		superMatcher = function( seed, context, xml, results, outermost ) {
			var elem, j, matcher,
				matchedCount = 0,
				i = "0",
				unmatched = seed && [],
				setMatched = [],
				contextBackup = outermostContext,
				// We must always have either seed elements or outermost context
				elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
				// Use integer dirruns iff this is the outermost matcher
				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
				len = elems.length;

			if ( outermost ) {
				outermostContext = context === document || context || outermost;
			}

			// Add elements passing elementMatchers directly to results
			// Support: IE<9, Safari
			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
			for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
				if ( byElement && elem ) {
					j = 0;
					if ( !context && elem.ownerDocument !== document ) {
						setDocument( elem );
						xml = !documentIsHTML;
					}
					while ( (matcher = elementMatchers[j++]) ) {
						if ( matcher( elem, context || document, xml) ) {
							results.push( elem );
							break;
						}
					}
					if ( outermost ) {
						dirruns = dirrunsUnique;
					}
				}

				// Track unmatched elements for set filters
				if ( bySet ) {
					// They will have gone through all possible matchers
					if ( (elem = !matcher && elem) ) {
						matchedCount--;
					}

					// Lengthen the array for every element, matched or not
					if ( seed ) {
						unmatched.push( elem );
					}
				}
			}

			// `i` is now the count of elements visited above, and adding it to `matchedCount`
			// makes the latter nonnegative.
			matchedCount += i;

			// Apply set filters to unmatched elements
			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
			// no element matchers and no seed.
			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
			// numerically zero.
			if ( bySet && i !== matchedCount ) {
				j = 0;
				while ( (matcher = setMatchers[j++]) ) {
					matcher( unmatched, setMatched, context, xml );
				}

				if ( seed ) {
					// Reintegrate element matches to eliminate the need for sorting
					if ( matchedCount > 0 ) {
						while ( i-- ) {
							if ( !(unmatched[i] || setMatched[i]) ) {
								setMatched[i] = pop.call( results );
							}
						}
					}

					// Discard index placeholder values to get only actual matches
					setMatched = condense( setMatched );
				}

				// Add matches to results
				push.apply( results, setMatched );

				// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					Sizzle.uniqueSort( results );
				}
			}

			// Override manipulation of globals by nested matchers
			if ( outermost ) {
				dirruns = dirrunsUnique;
				outermostContext = contextBackup;
			}

			return unmatched;
		};

	return bySet ?
		markFunction( superMatcher ) :
		superMatcher;
}

compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
	var i,
		setMatchers = [],
		elementMatchers = [],
		cached = compilerCache[ selector + " " ];

	if ( !cached ) {
		// Generate a function of recursive functions that can be used to check each element
		if ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[i] );
			if ( cached[ expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
};

/**
 * A low-level selection function that works with Sizzle's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with Sizzle.compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
select = Sizzle.select = function( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( (selector = compiled.selector || selector) );

	results = results || [];

	// Try to minimize operations if there is only one selector in the list and no seed
	// (the latter of which guarantees us context)
	if ( match.length === 1 ) {

		// Reduce context if the leading compound selector is an ID
		tokens = match[0] = match[0].slice( 0 );
		if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
				context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {

			context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
			if ( !context ) {
				return results;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			selector = selector.slice( tokens.shift().value.length );
		}

		// Fetch a seed set for right-to-left matching
		i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
		while ( i-- ) {
			token = tokens[i];

			// Abort if we hit a combinator
			if ( Expr.relative[ (type = token.type) ] ) {
				break;
			}
			if ( (find = Expr.find[ type ]) ) {
				// Search, expanding context for leading sibling combinators
				if ( (seed = find(
					token.matches[0].replace( runescape, funescape ),
					rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
				)) ) {

					// If seed is empty or no tokens remain, we can return early
					tokens.splice( i, 1 );
					selector = seed.length && toSelector( tokens );
					if ( !selector ) {
						push.apply( results, seed );
						return results;
					}

					break;
				}
			}
		}
	}

	// Compile and execute a filtering function if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
	);
	return results;
};

// One-time assignments

// Sort stability
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;

// Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;

// Initialize against the default document
setDocument();

// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert(function( el ) {
	// Should return 1, but returns 4 (following)
	return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
});

// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert(function( el ) {
	el.innerHTML = "<a href='#'></a>";
	return el.firstChild.getAttribute("href") === "#" ;
}) ) {
	addHandle( "type|href|height|width", function( elem, name, isXML ) {
		if ( !isXML ) {
			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
		}
	});
}

// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert(function( el ) {
	el.innerHTML = "<input/>";
	el.firstChild.setAttribute( "value", "" );
	return el.firstChild.getAttribute( "value" ) === "";
}) ) {
	addHandle( "value", function( elem, name, isXML ) {
		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
			return elem.defaultValue;
		}
	});
}

// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert(function( el ) {
	return el.getAttribute("disabled") == null;
}) ) {
	addHandle( booleans, function( elem, name, isXML ) {
		var val;
		if ( !isXML ) {
			return elem[ name ] === true ? name.toLowerCase() :
					(val = elem.getAttributeNode( name )) && val.specified ?
					val.value :
				null;
		}
	});
}

return Sizzle;

})( window );



jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;

// Deprecated
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
jQuery.escapeSelector = Sizzle.escape;




var dir = function( elem, dir, until ) {
	var matched = [],
		truncate = until !== undefined;

	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
		if ( elem.nodeType === 1 ) {
			if ( truncate && jQuery( elem ).is( until ) ) {
				break;
			}
			matched.push( elem );
		}
	}
	return matched;
};


var siblings = function( n, elem ) {
	var matched = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType === 1 && n !== elem ) {
			matched.push( n );
		}
	}

	return matched;
};


var rneedsContext = jQuery.expr.match.needsContext;



function nodeName( elem, name ) {

  return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();

};
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );



// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
	if ( isFunction( qualifier ) ) {
		return jQuery.grep( elements, function( elem, i ) {
			return !!qualifier.call( elem, i, elem ) !== not;
		} );
	}

	// Single element
	if ( qualifier.nodeType ) {
		return jQuery.grep( elements, function( elem ) {
			return ( elem === qualifier ) !== not;
		} );
	}

	// Arraylike of elements (jQuery, arguments, Array)
	if ( typeof qualifier !== "string" ) {
		return jQuery.grep( elements, function( elem ) {
			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
		} );
	}

	// Filtered directly for both simple and complex selectors
	return jQuery.filter( qualifier, elements, not );
}

jQuery.filter = function( expr, elems, not ) {
	var elem = elems[ 0 ];

	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	if ( elems.length === 1 && elem.nodeType === 1 ) {
		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
	}

	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
		return elem.nodeType === 1;
	} ) );
};

jQuery.fn.extend( {
	find: function( selector ) {
		var i, ret,
			len = this.length,
			self = this;

		if ( typeof selector !== "string" ) {
			return this.pushStack( jQuery( selector ).filter( function() {
				for ( i = 0; i < len; i++ ) {
					if ( jQuery.contains( self[ i ], this ) ) {
						return true;
					}
				}
			} ) );
		}

		ret = this.pushStack( [] );

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
	},
	filter: function( selector ) {
		return this.pushStack( winnow( this, selector || [], false ) );
	},
	not: function( selector ) {
		return this.pushStack( winnow( this, selector || [], true ) );
	},
	is: function( selector ) {
		return !!winnow(
			this,

			// If this is a positional/relative selector, check membership in the returned set
			// so $("p:first").is("p:last") won't return true for a doc with two "p".
			typeof selector === "string" && rneedsContext.test( selector ) ?
				jQuery( selector ) :
				selector || [],
			false
		).length;
	}
} );


// Initialize a jQuery object


// A central reference to the root jQuery(document)
var rootjQuery,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
	// Strict HTML recognition (#11290: must start with <)
	// Shortcut simple #id case for speed
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

	init = jQuery.fn.init = function( selector, context, root ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// Method init() accepts an alternate rootjQuery
		// so migrate can support jQuery.sub (gh-2101)
		root = root || rootjQuery;

		// Handle HTML strings
		if ( typeof selector === "string" ) {
			if ( selector[ 0 ] === "<" &&
				selector[ selector.length - 1 ] === ">" &&
				selector.length >= 3 ) {

				// Assume that strings that start and end with <> are HTML and skip the regex check
				match = [ null, selector, null ];

			} else {
				match = rquickExpr.exec( selector );
			}

			// Match html or make sure no context is specified for #id
			if ( match && ( match[ 1 ] || !context ) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[ 1 ] ) {
					context = context instanceof jQuery ? context[ 0 ] : context;

					// Option to run scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					jQuery.merge( this, jQuery.parseHTML(
						match[ 1 ],
						context && context.nodeType ? context.ownerDocument || context : document,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
						for ( match in context ) {

							// Properties of context are called as methods if possible
							if ( isFunction( this[ match ] ) ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document.getElementById( match[ 2 ] );

					if ( elem ) {

						// Inject the element directly into the jQuery object
						this[ 0 ] = elem;
						this.length = 1;
					}
					return this;
				}

			// HANDLE: $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || root ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}

		// HANDLE: $(DOMElement)
		} else if ( selector.nodeType ) {
			this[ 0 ] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( isFunction( selector ) ) {
			return root.ready !== undefined ?
				root.ready( selector ) :

				// Execute immediately if ready is not present
				selector( jQuery );
		}

		return jQuery.makeArray( selector, this );
	};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference
rootjQuery = jQuery( document );


var rparentsprev = /^(?:parents|prev(?:Until|All))/,

	// Methods guaranteed to produce a unique set when starting from a unique set
	guaranteedUnique = {
		children: true,
		contents: true,
		next: true,
		prev: true
	};

jQuery.fn.extend( {
	has: function( target ) {
		var targets = jQuery( target, this ),
			l = targets.length;

		return this.filter( function() {
			var i = 0;
			for ( ; i < l; i++ ) {
				if ( jQuery.contains( this, targets[ i ] ) ) {
					return true;
				}
			}
		} );
	},

	closest: function( selectors, context ) {
		var cur,
			i = 0,
			l = this.length,
			matched = [],
			targets = typeof selectors !== "string" && jQuery( selectors );

		// Positional selectors never match, since there's no _selection_ context
		if ( !rneedsContext.test( selectors ) ) {
			for ( ; i < l; i++ ) {
				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {

					// Always skip document fragments
					if ( cur.nodeType < 11 && ( targets ?
						targets.index( cur ) > -1 :

						// Don't pass non-elements to Sizzle
						cur.nodeType === 1 &&
							jQuery.find.matchesSelector( cur, selectors ) ) ) {

						matched.push( cur );
						break;
					}
				}
			}
		}

		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
	},

	// Determine the position of an element within the set
	index: function( elem ) {

		// No argument, return index in parent
		if ( !elem ) {
			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
		}

		// Index in selector
		if ( typeof elem === "string" ) {
			return indexOf.call( jQuery( elem ), this[ 0 ] );
		}

		// Locate the position of the desired element
		return indexOf.call( this,

			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[ 0 ] : elem
		);
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.uniqueSort(
				jQuery.merge( this.get(), jQuery( selector, context ) )
			)
		);
	},

	addBack: function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter( selector )
		);
	}
} );

function sibling( cur, dir ) {
	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
	return cur;
}

jQuery.each( {
	parent: function( elem ) {
		var parent = elem.parentNode;
		return parent && parent.nodeType !== 11 ? parent : null;
	},
	parents: function( elem ) {
		return dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, i, until ) {
		return dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, i, until ) {
		return dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, i, until ) {
		return dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return siblings( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return siblings( elem.firstChild );
	},
	contents: function( elem ) {
		if ( typeof elem.contentDocument !== "undefined" ) {
			return elem.contentDocument;
		}

		// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
		// Treat the template element as a regular one in browsers that
		// don't support it.
		if ( nodeName( elem, "template" ) ) {
			elem = elem.content || elem;
		}

		return jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var matched = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			matched = jQuery.filter( selector, matched );
		}

		if ( this.length > 1 ) {

			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				jQuery.uniqueSort( matched );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				matched.reverse();
			}
		}

		return this.pushStack( matched );
	};
} );
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );



// Convert String-formatted options into Object-formatted ones
function createOptions( options ) {
	var object = {};
	jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
		object[ flag ] = true;
	} );
	return object;
}

/*
 * Create a callback list using the following parameters:
 *
 *	options: an optional list of space-separated options that will change how
 *			the callback list behaves or a more traditional option object
 *
 * By default a callback list will act like an event callback list and can be
 * "fired" multiple times.
 *
 * Possible options:
 *
 *	once:			will ensure the callback list can only be fired once (like a Deferred)
 *
 *	memory:			will keep track of previous values and will call any callback added
 *					after the list has been fired right away with the latest "memorized"
 *					values (like a Deferred)
 *
 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
 *
 *	stopOnFalse:	interrupt callings when a callback returns false
 *
 */
jQuery.Callbacks = function( options ) {

	// Convert options from String-formatted to Object-formatted if needed
	// (we check in cache first)
	options = typeof options === "string" ?
		createOptions( options ) :
		jQuery.extend( {}, options );

	var // Flag to know if list is currently firing
		firing,

		// Last fire value for non-forgettable lists
		memory,

		// Flag to know if list was already fired
		fired,

		// Flag to prevent firing
		locked,

		// Actual callback list
		list = [],

		// Queue of execution data for repeatable lists
		queue = [],

		// Index of currently firing callback (modified by add/remove as needed)
		firingIndex = -1,

		// Fire callbacks
		fire = function() {

			// Enforce single-firing
			locked = locked || options.once;

			// Execute callbacks for all pending executions,
			// respecting firingIndex overrides and runtime changes
			fired = firing = true;
			for ( ; queue.length; firingIndex = -1 ) {
				memory = queue.shift();
				while ( ++firingIndex < list.length ) {

					// Run callback and check for early termination
					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
						options.stopOnFalse ) {

						// Jump to end and forget the data so .add doesn't re-fire
						firingIndex = list.length;
						memory = false;
					}
				}
			}

			// Forget the data if we're done with it
			if ( !options.memory ) {
				memory = false;
			}

			firing = false;

			// Clean up if we're done firing for good
			if ( locked ) {

				// Keep an empty list if we have data for future add calls
				if ( memory ) {
					list = [];

				// Otherwise, this object is spent
				} else {
					list = "";
				}
			}
		},

		// Actual Callbacks object
		self = {

			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {

					// If we have memory from a past run, we should fire after adding
					if ( memory && !firing ) {
						firingIndex = list.length - 1;
						queue.push( memory );
					}

					( function add( args ) {
						jQuery.each( args, function( _, arg ) {
							if ( isFunction( arg ) ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && toType( arg ) !== "string" ) {

								// Inspect recursively
								add( arg );
							}
						} );
					} )( arguments );

					if ( memory && !firing ) {
						fire();
					}
				}
				return this;
			},

			// Remove a callback from the list
			remove: function() {
				jQuery.each( arguments, function( _, arg ) {
					var index;
					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
						list.splice( index, 1 );

						// Handle firing indexes
						if ( index <= firingIndex ) {
							firingIndex--;
						}
					}
				} );
				return this;
			},

			// Check if a given callback is in the list.
			// If no argument is given, return whether or not list has callbacks attached.
			has: function( fn ) {
				return fn ?
					jQuery.inArray( fn, list ) > -1 :
					list.length > 0;
			},

			// Remove all callbacks from the list
			empty: function() {
				if ( list ) {
					list = [];
				}
				return this;
			},

			// Disable .fire and .add
			// Abort any current/pending executions
			// Clear all callbacks and values
			disable: function() {
				locked = queue = [];
				list = memory = "";
				return this;
			},
			disabled: function() {
				return !list;
			},

			// Disable .fire
			// Also disable .add unless we have memory (since it would have no effect)
			// Abort any pending executions
			lock: function() {
				locked = queue = [];
				if ( !memory && !firing ) {
					list = memory = "";
				}
				return this;
			},
			locked: function() {
				return !!locked;
			},

			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( !locked ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					queue.push( args );
					if ( !firing ) {
						fire();
					}
				}
				return this;
			},

			// Call all the callbacks with the given arguments
			fire: function() {
				self.fireWith( this, arguments );
				return this;
			},

			// To know if the callbacks have already been called at least once
			fired: function() {
				return !!fired;
			}
		};

	return self;
};


function Identity( v ) {
	return v;
}
function Thrower( ex ) {
	throw ex;
}

function adoptValue( value, resolve, reject, noValue ) {
	var method;

	try {

		// Check for promise aspect first to privilege synchronous behavior
		if ( value && isFunction( ( method = value.promise ) ) ) {
			method.call( value ).done( resolve ).fail( reject );

		// Other thenables
		} else if ( value && isFunction( ( method = value.then ) ) ) {
			method.call( value, resolve, reject );

		// Other non-thenables
		} else {

			// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
			// * false: [ value ].slice( 0 ) => resolve( value )
			// * true: [ value ].slice( 1 ) => resolve()
			resolve.apply( undefined, [ value ].slice( noValue ) );
		}

	// For Promises/A+, convert exceptions into rejections
	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
	// Deferred#then to conditionally suppress rejection.
	} catch ( value ) {

		// Support: Android 4.0 only
		// Strict mode functions invoked without .call/.apply get global-object context
		reject.apply( undefined, [ value ] );
	}
}

jQuery.extend( {

	Deferred: function( func ) {
		var tuples = [

				// action, add listener, callbacks,
				// ... .then handlers, argument index, [final state]
				[ "notify", "progress", jQuery.Callbacks( "memory" ),
					jQuery.Callbacks( "memory" ), 2 ],
				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
			],
			state = "pending",
			promise = {
				state: function() {
					return state;
				},
				always: function() {
					deferred.done( arguments ).fail( arguments );
					return this;
				},
				"catch": function( fn ) {
					return promise.then( null, fn );
				},

				// Keep pipe for back-compat
				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
					var fns = arguments;

					return jQuery.Deferred( function( newDefer ) {
						jQuery.each( tuples, function( i, tuple ) {

							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
							var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];

							// deferred.progress(function() { bind to newDefer or newDefer.notify })
							// deferred.done(function() { bind to newDefer or newDefer.resolve })
							// deferred.fail(function() { bind to newDefer or newDefer.reject })
							deferred[ tuple[ 1 ] ]( function() {
								var returned = fn && fn.apply( this, arguments );
								if ( returned && isFunction( returned.promise ) ) {
									returned.promise()
										.progress( newDefer.notify )
										.done( newDefer.resolve )
										.fail( newDefer.reject );
								} else {
									newDefer[ tuple[ 0 ] + "With" ](
										this,
										fn ? [ returned ] : arguments
									);
								}
							} );
						} );
						fns = null;
					} ).promise();
				},
				then: function( onFulfilled, onRejected, onProgress ) {
					var maxDepth = 0;
					function resolve( depth, deferred, handler, special ) {
						return function() {
							var that = this,
								args = arguments,
								mightThrow = function() {
									var returned, then;

									// Support: Promises/A+ section 2.3.3.3.3
									// https://promisesaplus.com/#point-59
									// Ignore double-resolution attempts
									if ( depth < maxDepth ) {
										return;
									}

									returned = handler.apply( that, args );

									// Support: Promises/A+ section 2.3.1
									// https://promisesaplus.com/#point-48
									if ( returned === deferred.promise() ) {
										throw new TypeError( "Thenable self-resolution" );
									}

									// Support: Promises/A+ sections 2.3.3.1, 3.5
									// https://promisesaplus.com/#point-54
									// https://promisesaplus.com/#point-75
									// Retrieve `then` only once
									then = returned &&

										// Support: Promises/A+ section 2.3.4
										// https://promisesaplus.com/#point-64
										// Only check objects and functions for thenability
										( typeof returned === "object" ||
											typeof returned === "function" ) &&
										returned.then;

									// Handle a returned thenable
									if ( isFunction( then ) ) {

										// Special processors (notify) just wait for resolution
										if ( special ) {
											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special )
											);

										// Normal processors (resolve) also hook into progress
										} else {

											// ...and disregard older resolution values
											maxDepth++;

											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special ),
												resolve( maxDepth, deferred, Identity,
													deferred.notifyWith )
											);
										}

									// Handle all other returned values
									} else {

										// Only substitute handlers pass on context
										// and multiple values (non-spec behavior)
										if ( handler !== Identity ) {
											that = undefined;
											args = [ returned ];
										}

										// Process the value(s)
										// Default process is resolve
										( special || deferred.resolveWith )( that, args );
									}
								},

								// Only normal processors (resolve) catch and reject exceptions
								process = special ?
									mightThrow :
									function() {
										try {
											mightThrow();
										} catch ( e ) {

											if ( jQuery.Deferred.exceptionHook ) {
												jQuery.Deferred.exceptionHook( e,
													process.stackTrace );
											}

											// Support: Promises/A+ section 2.3.3.3.4.1
											// https://promisesaplus.com/#point-61
											// Ignore post-resolution exceptions
											if ( depth + 1 >= maxDepth ) {

												// Only substitute handlers pass on context
												// and multiple values (non-spec behavior)
												if ( handler !== Thrower ) {
													that = undefined;
													args = [ e ];
												}

												deferred.rejectWith( that, args );
											}
										}
									};

							// Support: Promises/A+ section 2.3.3.3.1
							// https://promisesaplus.com/#point-57
							// Re-resolve promises immediately to dodge false rejection from
							// subsequent errors
							if ( depth ) {
								process();
							} else {

								// Call an optional hook to record the stack, in case of exception
								// since it's otherwise lost when execution goes async
								if ( jQuery.Deferred.getStackHook ) {
									process.stackTrace = jQuery.Deferred.getStackHook();
								}
								window.setTimeout( process );
							}
						};
					}

					return jQuery.Deferred( function( newDefer ) {

						// progress_handlers.add( ... )
						tuples[ 0 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onProgress ) ?
									onProgress :
									Identity,
								newDefer.notifyWith
							)
						);

						// fulfilled_handlers.add( ... )
						tuples[ 1 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onFulfilled ) ?
									onFulfilled :
									Identity
							)
						);

						// rejected_handlers.add( ... )
						tuples[ 2 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onRejected ) ?
									onRejected :
									Thrower
							)
						);
					} ).promise();
				},

				// Get a promise for this deferred
				// If obj is provided, the promise aspect is added to the object
				promise: function( obj ) {
					return obj != null ? jQuery.extend( obj, promise ) : promise;
				}
			},
			deferred = {};

		// Add list-specific methods
		jQuery.each( tuples, function( i, tuple ) {
			var list = tuple[ 2 ],
				stateString = tuple[ 5 ];

			// promise.progress = list.add
			// promise.done = list.add
			// promise.fail = list.add
			promise[ tuple[ 1 ] ] = list.add;

			// Handle state
			if ( stateString ) {
				list.add(
					function() {

						// state = "resolved" (i.e., fulfilled)
						// state = "rejected"
						state = stateString;
					},

					// rejected_callbacks.disable
					// fulfilled_callbacks.disable
					tuples[ 3 - i ][ 2 ].disable,

					// rejected_handlers.disable
					// fulfilled_handlers.disable
					tuples[ 3 - i ][ 3 ].disable,

					// progress_callbacks.lock
					tuples[ 0 ][ 2 ].lock,

					// progress_handlers.lock
					tuples[ 0 ][ 3 ].lock
				);
			}

			// progress_handlers.fire
			// fulfilled_handlers.fire
			// rejected_handlers.fire
			list.add( tuple[ 3 ].fire );

			// deferred.notify = function() { deferred.notifyWith(...) }
			// deferred.resolve = function() { deferred.resolveWith(...) }
			// deferred.reject = function() { deferred.rejectWith(...) }
			deferred[ tuple[ 0 ] ] = function() {
				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
				return this;
			};

			// deferred.notifyWith = list.fireWith
			// deferred.resolveWith = list.fireWith
			// deferred.rejectWith = list.fireWith
			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
		} );

		// Make the deferred a promise
		promise.promise( deferred );

		// Call given func if any
		if ( func ) {
			func.call( deferred, deferred );
		}

		// All done!
		return deferred;
	},

	// Deferred helper
	when: function( singleValue ) {
		var

			// count of uncompleted subordinates
			remaining = arguments.length,

			// count of unprocessed arguments
			i = remaining,

			// subordinate fulfillment data
			resolveContexts = Array( i ),
			resolveValues = slice.call( arguments ),

			// the master Deferred
			master = jQuery.Deferred(),

			// subordinate callback factory
			updateFunc = function( i ) {
				return function( value ) {
					resolveContexts[ i ] = this;
					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
					if ( !( --remaining ) ) {
						master.resolveWith( resolveContexts, resolveValues );
					}
				};
			};

		// Single- and empty arguments are adopted like Promise.resolve
		if ( remaining <= 1 ) {
			adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
				!remaining );

			// Use .then() to unwrap secondary thenables (cf. gh-3000)
			if ( master.state() === "pending" ||
				isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {

				return master.then();
			}
		}

		// Multiple arguments are aggregated like Promise.all array elements
		while ( i-- ) {
			adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
		}

		return master.promise();
	}
} );


// These usually indicate a programmer mistake during development,
// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;

jQuery.Deferred.exceptionHook = function( error, stack ) {

	// Support: IE 8 - 9 only
	// Console exists when dev tools are open, which can happen at any time
	if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
		window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
	}
};




jQuery.readyException = function( error ) {
	window.setTimeout( function() {
		throw error;
	} );
};




// The deferred used on DOM ready
var readyList = jQuery.Deferred();

jQuery.fn.ready = function( fn ) {

	readyList
		.then( fn )

		// Wrap jQuery.readyException in a function so that the lookup
		// happens at the time of error handling instead of callback
		// registration.
		.catch( function( error ) {
			jQuery.readyException( error );
		} );

	return this;
};

jQuery.extend( {

	// Is the DOM ready to be used? Set to true once it occurs.
	isReady: false,

	// A counter to track how many items to wait for before
	// the ready event fires. See #6781
	readyWait: 1,

	// Handle when the DOM is ready
	ready: function( wait ) {

		// Abort if there are pending holds or we're already ready
		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
			return;
		}

		// Remember that the DOM is ready
		jQuery.isReady = true;

		// If a normal DOM Ready event fired, decrement, and wait if need be
		if ( wait !== true && --jQuery.readyWait > 0 ) {
			return;
		}

		// If there are functions bound, to execute
		readyList.resolveWith( document, [ jQuery ] );
	}
} );

jQuery.ready.then = readyList.then;

// The ready event handler and self cleanup method
function completed() {
	document.removeEventListener( "DOMContentLoaded", completed );
	window.removeEventListener( "load", completed );
	jQuery.ready();
}

// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
// Support: IE <=9 - 10 only
// Older IE sometimes signals "interactive" too soon
if ( document.readyState === "complete" ||
	( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {

	// Handle it asynchronously to allow scripts the opportunity to delay ready
	window.setTimeout( jQuery.ready );

} else {

	// Use the handy event callback
	document.addEventListener( "DOMContentLoaded", completed );

	// A fallback to window.onload, that will always work
	window.addEventListener( "load", completed );
}




// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		len = elems.length,
		bulk = key == null;

	// Sets many values
	if ( toType( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			access( elems, fn, i, key[ i ], true, emptyGet, raw );
		}

	// Sets one value
	} else if ( value !== undefined ) {
		chainable = true;

		if ( !isFunction( value ) ) {
			raw = true;
		}

		if ( bulk ) {

			// Bulk operations run against the entire set
			if ( raw ) {
				fn.call( elems, value );
				fn = null;

			// ...except when executing function values
			} else {
				bulk = fn;
				fn = function( elem, key, value ) {
					return bulk.call( jQuery( elem ), value );
				};
			}
		}

		if ( fn ) {
			for ( ; i < len; i++ ) {
				fn(
					elems[ i ], key, raw ?
					value :
					value.call( elems[ i ], i, fn( elems[ i ], key ) )
				);
			}
		}
	}

	if ( chainable ) {
		return elems;
	}

	// Gets
	if ( bulk ) {
		return fn.call( elems );
	}

	return len ? fn( elems[ 0 ], key ) : emptyGet;
};


// Matches dashed string for camelizing
var rmsPrefix = /^-ms-/,
	rdashAlpha = /-([a-z])/g;

// Used by camelCase as callback to replace()
function fcamelCase( all, letter ) {
	return letter.toUpperCase();
}

// Convert dashed to camelCase; used by the css and data modules
// Support: IE <=9 - 11, Edge 12 - 15
// Microsoft forgot to hump their vendor prefix (#9572)
function camelCase( string ) {
	return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
}
var acceptData = function( owner ) {

	// Accepts only:
	//  - Node
	//    - Node.ELEMENT_NODE
	//    - Node.DOCUMENT_NODE
	//  - Object
	//    - Any
	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};




function Data() {
	this.expando = jQuery.expando + Data.uid++;
}

Data.uid = 1;

Data.prototype = {

	cache: function( owner ) {

		// Check if the owner object already has a cache
		var value = owner[ this.expando ];

		// If not, create one
		if ( !value ) {
			value = {};

			// We can accept data for non-element nodes in modern browsers,
			// but we should not, see #8335.
			// Always return an empty object.
			if ( acceptData( owner ) ) {

				// If it is a node unlikely to be stringify-ed or looped over
				// use plain assignment
				if ( owner.nodeType ) {
					owner[ this.expando ] = value;

				// Otherwise secure it in a non-enumerable property
				// configurable must be true to allow the property to be
				// deleted when data is removed
				} else {
					Object.defineProperty( owner, this.expando, {
						value: value,
						configurable: true
					} );
				}
			}
		}

		return value;
	},
	set: function( owner, data, value ) {
		var prop,
			cache = this.cache( owner );

		// Handle: [ owner, key, value ] args
		// Always use camelCase key (gh-2257)
		if ( typeof data === "string" ) {
			cache[ camelCase( data ) ] = value;

		// Handle: [ owner, { properties } ] args
		} else {

			// Copy the properties one-by-one to the cache object
			for ( prop in data ) {
				cache[ camelCase( prop ) ] = data[ prop ];
			}
		}
		return cache;
	},
	get: function( owner, key ) {
		return key === undefined ?
			this.cache( owner ) :

			// Always use camelCase key (gh-2257)
			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
	},
	access: function( owner, key, value ) {

		// In cases where either:
		//
		//   1. No key was specified
		//   2. A string key was specified, but no value provided
		//
		// Take the "read" path and allow the get method to determine
		// which value to return, respectively either:
		//
		//   1. The entire cache object
		//   2. The data stored at the key
		//
		if ( key === undefined ||
				( ( key && typeof key === "string" ) && value === undefined ) ) {

			return this.get( owner, key );
		}

		// When the key is not a string, or both a key and value
		// are specified, set or extend (existing objects) with either:
		//
		//   1. An object of properties
		//   2. A key and value
		//
		this.set( owner, key, value );

		// Since the "set" path can have two possible entry points
		// return the expected data based on which path was taken[*]
		return value !== undefined ? value : key;
	},
	remove: function( owner, key ) {
		var i,
			cache = owner[ this.expando ];

		if ( cache === undefined ) {
			return;
		}

		if ( key !== undefined ) {

			// Support array or space separated string of keys
			if ( Array.isArray( key ) ) {

				// If key is an array of keys...
				// We always set camelCase keys, so remove that.
				key = key.map( camelCase );
			} else {
				key = camelCase( key );

				// If a key with the spaces exists, use it.
				// Otherwise, create an array by matching non-whitespace
				key = key in cache ?
					[ key ] :
					( key.match( rnothtmlwhite ) || [] );
			}

			i = key.length;

			while ( i-- ) {
				delete cache[ key[ i ] ];
			}
		}

		// Remove the expando if there's no more data
		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {

			// Support: Chrome <=35 - 45
			// Webkit & Blink performance suffers when deleting properties
			// from DOM nodes, so set to undefined instead
			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
			if ( owner.nodeType ) {
				owner[ this.expando ] = undefined;
			} else {
				delete owner[ this.expando ];
			}
		}
	},
	hasData: function( owner ) {
		var cache = owner[ this.expando ];
		return cache !== undefined && !jQuery.isEmptyObject( cache );
	}
};
var dataPriv = new Data();

var dataUser = new Data();



//	Implementation Summary
//
//	1. Enforce API surface and semantic compatibility with 1.9.x branch
//	2. Improve the module's maintainability by reducing the storage
//		paths to a single mechanism.
//	3. Use the same single mechanism to support "private" and "user" data.
//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
//	5. Avoid exposing implementation details on user objects (eg. expando properties)
//	6. Provide a clear path for implementation upgrade to WeakMap in 2014

var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /[A-Z]/g;

function getData( data ) {
	if ( data === "true" ) {
		return true;
	}

	if ( data === "false" ) {
		return false;
	}

	if ( data === "null" ) {
		return null;
	}

	// Only convert to a number if it doesn't change the string
	if ( data === +data + "" ) {
		return +data;
	}

	if ( rbrace.test( data ) ) {
		return JSON.parse( data );
	}

	return data;
}

function dataAttr( elem, key, data ) {
	var name;

	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {
		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
		data = elem.getAttribute( name );

		if ( typeof data === "string" ) {
			try {
				data = getData( data );
			} catch ( e ) {}

			// Make sure we set the data so it isn't changed later
			dataUser.set( elem, key, data );
		} else {
			data = undefined;
		}
	}
	return data;
}

jQuery.extend( {
	hasData: function( elem ) {
		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
	},

	data: function( elem, name, data ) {
		return dataUser.access( elem, name, data );
	},

	removeData: function( elem, name ) {
		dataUser.remove( elem, name );
	},

	// TODO: Now that all calls to _data and _removeData have been replaced
	// with direct calls to dataPriv methods, these can be deprecated.
	_data: function( elem, name, data ) {
		return dataPriv.access( elem, name, data );
	},

	_removeData: function( elem, name ) {
		dataPriv.remove( elem, name );
	}
} );

jQuery.fn.extend( {
	data: function( key, value ) {
		var i, name, data,
			elem = this[ 0 ],
			attrs = elem && elem.attributes;

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = dataUser.get( elem );

				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE 11 only
						// The attrs elements can be null (#14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = camelCase( name.slice( 5 ) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					dataPriv.set( elem, "hasDataAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each( function() {
				dataUser.set( this, key );
			} );
		}

		return access( this, function( value ) {
			var data;

			// The calling jQuery object (element matches) is not empty
			// (and therefore has an element appears at this[ 0 ]) and the
			// `value` parameter was not undefined. An empty jQuery object
			// will result in `undefined` for elem = this[ 0 ] which will
			// throw an exception if an attempt to read a data cache is made.
			if ( elem && value === undefined ) {

				// Attempt to get data from the cache
				// The key will always be camelCased in Data
				data = dataUser.get( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to "discover" the data in
				// HTML5 custom data-* attrs
				data = dataAttr( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// We tried really hard, but the data doesn't exist.
				return;
			}

			// Set the data...
			this.each( function() {

				// We always store the camelCased key
				dataUser.set( this, key, value );
			} );
		}, null, value, arguments.length > 1, null, true );
	},

	removeData: function( key ) {
		return this.each( function() {
			dataUser.remove( this, key );
		} );
	}
} );


jQuery.extend( {
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = dataPriv.get( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || Array.isArray( data ) ) {
					queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
				} else {
					queue.push( data );
				}
			}
			return queue || [];
		}
	},

	dequeue: function( elem, type ) {
		type = type || "fx";

		var queue = jQuery.queue( elem, type ),
			startLength = queue.length,
			fn = queue.shift(),
			hooks = jQuery._queueHooks( elem, type ),
			next = function() {
				jQuery.dequeue( elem, type );
			};

		// If the fx queue is dequeued, always remove the progress sentinel
		if ( fn === "inprogress" ) {
			fn = queue.shift();
			startLength--;
		}

		if ( fn ) {

			// Add a progress sentinel to prevent the fx queue from being
			// automatically dequeued
			if ( type === "fx" ) {
				queue.unshift( "inprogress" );
			}

			// Clear up the last queue stop function
			delete hooks.stop;
			fn.call( elem, next, hooks );
		}

		if ( !startLength && hooks ) {
			hooks.empty.fire();
		}
	},

	// Not public - generate a queueHooks object, or return the current one
	_queueHooks: function( elem, type ) {
		var key = type + "queueHooks";
		return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
			empty: jQuery.Callbacks( "once memory" ).add( function() {
				dataPriv.remove( elem, [ type + "queue", key ] );
			} )
		} );
	}
} );

jQuery.fn.extend( {
	queue: function( type, data ) {
		var setter = 2;

		if ( typeof type !== "string" ) {
			data = type;
			type = "fx";
			setter--;
		}

		if ( arguments.length < setter ) {
			return jQuery.queue( this[ 0 ], type );
		}

		return data === undefined ?
			this :
			this.each( function() {
				var queue = jQuery.queue( this, type, data );

				// Ensure a hooks for this queue
				jQuery._queueHooks( this, type );

				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
					jQuery.dequeue( this, type );
				}
			} );
	},
	dequeue: function( type ) {
		return this.each( function() {
			jQuery.dequeue( this, type );
		} );
	},
	clearQueue: function( type ) {
		return this.queue( type || "fx", [] );
	},

	// Get a promise resolved when queues of a certain type
	// are emptied (fx is the type by default)
	promise: function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
} );
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;

var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );


var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var documentElement = document.documentElement;



	var isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem );
		},
		composed = { composed: true };

	// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
	// Check attachment across shadow DOM boundaries when possible (gh-3504)
	// Support: iOS 10.0-10.2 only
	// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
	// leading to errors. We need to check for `getRootNode`.
	if ( documentElement.getRootNode ) {
		isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem ) ||
				elem.getRootNode( composed ) === elem.ownerDocument;
		};
	}
var isHiddenWithinTree = function( elem, el ) {

		// isHiddenWithinTree might be called from jQuery#filter function;
		// in that case, element will be second argument
		elem = el || elem;

		// Inline style trumps all
		return elem.style.display === "none" ||
			elem.style.display === "" &&

			// Otherwise, check computed style
			// Support: Firefox <=43 - 45
			// Disconnected elements can have computed display: none, so first confirm that elem is
			// in the document.
			isAttached( elem ) &&

			jQuery.css( elem, "display" ) === "none";
	};

var swap = function( elem, options, callback, args ) {
	var ret, name,
		old = {};

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.apply( elem, args || [] );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
};




function adjustCSS( elem, prop, valueParts, tween ) {
	var adjusted, scale,
		maxIterations = 20,
		currentValue = tween ?
			function() {
				return tween.cur();
			} :
			function() {
				return jQuery.css( elem, prop, "" );
			},
		initial = currentValue(),
		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

		// Starting value computation is required for potential unit mismatches
		initialInUnit = elem.nodeType &&
			( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
			rcssNum.exec( jQuery.css( elem, prop ) );

	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

		// Support: Firefox <=54
		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
		initial = initial / 2;

		// Trust units reported by jQuery.css
		unit = unit || initialInUnit[ 3 ];

		// Iteratively approximate from a nonzero starting point
		initialInUnit = +initial || 1;

		while ( maxIterations-- ) {

			// Evaluate and update our best guess (doubling guesses that zero out).
			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
			jQuery.style( elem, prop, initialInUnit + unit );
			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
				maxIterations = 0;
			}
			initialInUnit = initialInUnit / scale;

		}

		initialInUnit = initialInUnit * 2;
		jQuery.style( elem, prop, initialInUnit + unit );

		// Make sure we update the tween properties later on
		valueParts = valueParts || [];
	}

	if ( valueParts ) {
		initialInUnit = +initialInUnit || +initial || 0;

		// Apply relative offset (+=/-=) if specified
		adjusted = valueParts[ 1 ] ?
			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
			+valueParts[ 2 ];
		if ( tween ) {
			tween.unit = unit;
			tween.start = initialInUnit;
			tween.end = adjusted;
		}
	}
	return adjusted;
}


var defaultDisplayMap = {};

function getDefaultDisplay( elem ) {
	var temp,
		doc = elem.ownerDocument,
		nodeName = elem.nodeName,
		display = defaultDisplayMap[ nodeName ];

	if ( display ) {
		return display;
	}

	temp = doc.body.appendChild( doc.createElement( nodeName ) );
	display = jQuery.css( temp, "display" );

	temp.parentNode.removeChild( temp );

	if ( display === "none" ) {
		display = "block";
	}
	defaultDisplayMap[ nodeName ] = display;

	return display;
}

function showHide( elements, show ) {
	var display, elem,
		values = [],
		index = 0,
		length = elements.length;

	// Determine new display value for elements that need to change
	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		display = elem.style.display;
		if ( show ) {

			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
			// check is required in this first loop unless we have a nonempty display value (either
			// inline or about-to-be-restored)
			if ( display === "none" ) {
				values[ index ] = dataPriv.get( elem, "display" ) || null;
				if ( !values[ index ] ) {
					elem.style.display = "";
				}
			}
			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
				values[ index ] = getDefaultDisplay( elem );
			}
		} else {
			if ( display !== "none" ) {
				values[ index ] = "none";

				// Remember what we're overwriting
				dataPriv.set( elem, "display", display );
			}
		}
	}

	// Set the display of the elements in a second loop to avoid constant reflow
	for ( index = 0; index < length; index++ ) {
		if ( values[ index ] != null ) {
			elements[ index ].style.display = values[ index ];
		}
	}

	return elements;
}

jQuery.fn.extend( {
	show: function() {
		return showHide( this, true );
	},
	hide: function() {
		return showHide( this );
	},
	toggle: function( state ) {
		if ( typeof state === "boolean" ) {
			return state ? this.show() : this.hide();
		}

		return this.each( function() {
			if ( isHiddenWithinTree( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		} );
	}
} );
var rcheckableType = ( /^(?:checkbox|radio)$/i );

var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );

var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );



// We have to close these tags to support XHTML (#13200)
var wrapMap = {

	// Support: IE <=9 only
	option: [ 1, "<select multiple='multiple'>", "</select>" ],

	// XHTML parsers do not magically insert elements in the
	// same way that tag soup parsers do. So we cannot shorten
	// this by omitting <tbody> or other required elements.
	thead: [ 1, "<table>", "</table>" ],
	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],

	_default: [ 0, "", "" ]
};

// Support: IE <=9 only
wrapMap.optgroup = wrapMap.option;

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;


function getAll( context, tag ) {

	// Support: IE <=9 - 11 only
	// Use typeof to avoid zero-argument method invocation on host objects (#15151)
	var ret;

	if ( typeof context.getElementsByTagName !== "undefined" ) {
		ret = context.getElementsByTagName( tag || "*" );

	} else if ( typeof context.querySelectorAll !== "undefined" ) {
		ret = context.querySelectorAll( tag || "*" );

	} else {
		ret = [];
	}

	if ( tag === undefined || tag && nodeName( context, tag ) ) {
		return jQuery.merge( [ context ], ret );
	}

	return ret;
}


// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		dataPriv.set(
			elems[ i ],
			"globalEval",
			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
		);
	}
}


var rhtml = /<|&#?\w+;/;

function buildFragment( elems, context, scripts, selection, ignored ) {
	var elem, tmp, tag, wrap, attached, j,
		fragment = context.createDocumentFragment(),
		nodes = [],
		i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		elem = elems[ i ];

		if ( elem || elem === 0 ) {

			// Add nodes directly
			if ( toType( elem ) === "object" ) {

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );

			// Convert non-html into a text node
			} else if ( !rhtml.test( elem ) ) {
				nodes.push( context.createTextNode( elem ) );

			// Convert html into DOM nodes
			} else {
				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );

				// Deserialize a standard representation
				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
				wrap = wrapMap[ tag ] || wrapMap._default;
				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];

				// Descend through wrappers to the right content
				j = wrap[ 0 ];
				while ( j-- ) {
					tmp = tmp.lastChild;
				}

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, tmp.childNodes );

				// Remember the top-level container
				tmp = fragment.firstChild;

				// Ensure the created nodes are orphaned (#12392)
				tmp.textContent = "";
			}
		}
	}

	// Remove wrapper from fragment
	fragment.textContent = "";

	i = 0;
	while ( ( elem = nodes[ i++ ] ) ) {

		// Skip elements already in the context collection (trac-4087)
		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
			if ( ignored ) {
				ignored.push( elem );
			}
			continue;
		}

		attached = isAttached( elem );

		// Append to fragment
		tmp = getAll( fragment.appendChild( elem ), "script" );

		// Preserve script evaluation history
		if ( attached ) {
			setGlobalEval( tmp );
		}

		// Capture executables
		if ( scripts ) {
			j = 0;
			while ( ( elem = tmp[ j++ ] ) ) {
				if ( rscriptType.test( elem.type || "" ) ) {
					scripts.push( elem );
				}
			}
		}
	}

	return fragment;
}


( function() {
	var fragment = document.createDocumentFragment(),
		div = fragment.appendChild( document.createElement( "div" ) ),
		input = document.createElement( "input" );

	// Support: Android 4.0 - 4.3 only
	// Check state lost if the name is set (#11217)
	// Support: Windows Web Apps (WWA)
	// `name` and `type` must use .setAttribute for WWA (#14901)
	input.setAttribute( "type", "radio" );
	input.setAttribute( "checked", "checked" );
	input.setAttribute( "name", "t" );

	div.appendChild( input );

	// Support: Android <=4.1 only
	// Older WebKit doesn't clone checked state correctly in fragments
	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

	// Support: IE <=11 only
	// Make sure textarea (and checkbox) defaultValue is properly cloned
	div.innerHTML = "<textarea>x</textarea>";
	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
} )();


var
	rkeyEvent = /^key/,
	rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
	rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

// Support: IE <=9 - 11+
// focus() and blur() are asynchronous, except when they are no-op.
// So expect focus to be synchronous when the element is already active,
// and blur to be synchronous when the element is not already active.
// (focus and blur are always synchronous in other supported browsers,
// this just defines when we can count on it).
function expectSync( elem, type ) {
	return ( elem === safeActiveElement() ) === ( type === "focus" );
}

// Support: IE <=9 only
// Accessing document.activeElement can throw unexpectedly
// https://bugs.jquery.com/ticket/13393
function safeActiveElement() {
	try {
		return document.activeElement;
	} catch ( err ) { }
}

function on( elem, types, selector, data, fn, one ) {
	var origFn, type;

	// Types can be a map of types/handlers
	if ( typeof types === "object" ) {

		// ( types-Object, selector, data )
		if ( typeof selector !== "string" ) {

			// ( types-Object, data )
			data = data || selector;
			selector = undefined;
		}
		for ( type in types ) {
			on( elem, type, selector, data, types[ type ], one );
		}
		return elem;
	}

	if ( data == null && fn == null ) {

		// ( types, fn )
		fn = selector;
		data = selector = undefined;
	} else if ( fn == null ) {
		if ( typeof selector === "string" ) {

			// ( types, selector, fn )
			fn = data;
			data = undefined;
		} else {

			// ( types, data, fn )
			fn = data;
			data = selector;
			selector = undefined;
		}
	}
	if ( fn === false ) {
		fn = returnFalse;
	} else if ( !fn ) {
		return elem;
	}

	if ( one === 1 ) {
		origFn = fn;
		fn = function( event ) {

			// Can use an empty set, since event contains the info
			jQuery().off( event );
			return origFn.apply( this, arguments );
		};

		// Use same guid so caller can remove using origFn
		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
	}
	return elem.each( function() {
		jQuery.event.add( this, types, fn, data, selector );
	} );
}

/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
jQuery.event = {

	global: {},

	add: function( elem, types, handler, data, selector ) {

		var handleObjIn, eventHandle, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.get( elem );

		// Don't attach events to noData or text/comment nodes (but allow plain objects)
		if ( !elemData ) {
			return;
		}

		// Caller can pass in an object of custom data in lieu of the handler
		if ( handler.handler ) {
			handleObjIn = handler;
			handler = handleObjIn.handler;
			selector = handleObjIn.selector;
		}

		// Ensure that invalid selectors throw exceptions at attach time
		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
		if ( selector ) {
			jQuery.find.matchesSelector( documentElement, selector );
		}

		// Make sure that the handler has a unique ID, used to find/remove it later
		if ( !handler.guid ) {
			handler.guid = jQuery.guid++;
		}

		// Init the element's event structure and main handler, if this is the first
		if ( !( events = elemData.events ) ) {
			events = elemData.events = {};
		}
		if ( !( eventHandle = elemData.handle ) ) {
			eventHandle = elemData.handle = function( e ) {

				// Discard the second event of a jQuery.event.trigger() and
				// when an event is called after a page has unloaded
				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
			};
		}

		// Handle multiple events separated by a space
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// There *must* be a type, no attaching namespace-only handlers
			if ( !type ) {
				continue;
			}

			// If event changes its type, use the special event handlers for the changed type
			special = jQuery.event.special[ type ] || {};

			// If selector defined, determine special event api type, otherwise given type
			type = ( selector ? special.delegateType : special.bindType ) || type;

			// Update special based on newly reset type
			special = jQuery.event.special[ type ] || {};

			// handleObj is passed to all event handlers
			handleObj = jQuery.extend( {
				type: type,
				origType: origType,
				data: data,
				handler: handler,
				guid: handler.guid,
				selector: selector,
				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
				namespace: namespaces.join( "." )
			}, handleObjIn );

			// Init the event handler queue if we're the first
			if ( !( handlers = events[ type ] ) ) {
				handlers = events[ type ] = [];
				handlers.delegateCount = 0;

				// Only use addEventListener if the special events handler returns false
				if ( !special.setup ||
					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {

					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle );
					}
				}
			}

			if ( special.add ) {
				special.add.call( elem, handleObj );

				if ( !handleObj.handler.guid ) {
					handleObj.handler.guid = handler.guid;
				}
			}

			// Add to the element's handler list, delegates in front
			if ( selector ) {
				handlers.splice( handlers.delegateCount++, 0, handleObj );
			} else {
				handlers.push( handleObj );
			}

			// Keep track of which events have ever been used, for event optimization
			jQuery.event.global[ type ] = true;
		}

	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {

		var j, origCount, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );

		if ( !elemData || !( events = elemData.events ) ) {
			return;
		}

		// Once for each type.namespace in types; type may be omitted
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// Unbind all events (on this namespace, if provided) for the element
			if ( !type ) {
				for ( type in events ) {
					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
				}
				continue;
			}

			special = jQuery.event.special[ type ] || {};
			type = ( selector ? special.delegateType : special.bindType ) || type;
			handlers = events[ type ] || [];
			tmp = tmp[ 2 ] &&
				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );

			// Remove matching events
			origCount = j = handlers.length;
			while ( j-- ) {
				handleObj = handlers[ j ];

				if ( ( mappedTypes || origType === handleObj.origType ) &&
					( !handler || handler.guid === handleObj.guid ) &&
					( !tmp || tmp.test( handleObj.namespace ) ) &&
					( !selector || selector === handleObj.selector ||
						selector === "**" && handleObj.selector ) ) {
					handlers.splice( j, 1 );

					if ( handleObj.selector ) {
						handlers.delegateCount--;
					}
					if ( special.remove ) {
						special.remove.call( elem, handleObj );
					}
				}
			}

			// Remove generic event handler if we removed something and no more handlers exist
			// (avoids potential for endless recursion during removal of special event handlers)
			if ( origCount && !handlers.length ) {
				if ( !special.teardown ||
					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {

					jQuery.removeEvent( elem, type, elemData.handle );
				}

				delete events[ type ];
			}
		}

		// Remove data and the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			dataPriv.remove( elem, "handle events" );
		}
	},

	dispatch: function( nativeEvent ) {

		// Make a writable jQuery.Event from the native event object
		var event = jQuery.event.fix( nativeEvent );

		var i, j, ret, matched, handleObj, handlerQueue,
			args = new Array( arguments.length ),
			handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
			special = jQuery.event.special[ event.type ] || {};

		// Use the fix-ed jQuery.Event rather than the (read-only) native event
		args[ 0 ] = event;

		for ( i = 1; i < arguments.length; i++ ) {
			args[ i ] = arguments[ i ];
		}

		event.delegateTarget = this;

		// Call the preDispatch hook for the mapped type, and let it bail if desired
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
			return;
		}

		// Determine handlers
		handlerQueue = jQuery.event.handlers.call( this, event, handlers );

		// Run delegates first; they may want to stop propagation beneath us
		i = 0;
		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
			event.currentTarget = matched.elem;

			j = 0;
			while ( ( handleObj = matched.handlers[ j++ ] ) &&
				!event.isImmediatePropagationStopped() ) {

				// If the event is namespaced, then each handler is only invoked if it is
				// specially universal or its namespaces are a superset of the event's.
				if ( !event.rnamespace || handleObj.namespace === false ||
					event.rnamespace.test( handleObj.namespace ) ) {

					event.handleObj = handleObj;
					event.data = handleObj.data;

					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
						handleObj.handler ).apply( matched.elem, args );

					if ( ret !== undefined ) {
						if ( ( event.result = ret ) === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}
				}
			}
		}

		// Call the postDispatch hook for the mapped type
		if ( special.postDispatch ) {
			special.postDispatch.call( this, event );
		}

		return event.result;
	},

	handlers: function( event, handlers ) {
		var i, handleObj, sel, matchedHandlers, matchedSelectors,
			handlerQueue = [],
			delegateCount = handlers.delegateCount,
			cur = event.target;

		// Find delegate handlers
		if ( delegateCount &&

			// Support: IE <=9
			// Black-hole SVG <use> instance trees (trac-13180)
			cur.nodeType &&

			// Support: Firefox <=42
			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
			// Support: IE 11 only
			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
			!( event.type === "click" && event.button >= 1 ) ) {

			for ( ; cur !== this; cur = cur.parentNode || this ) {

				// Don't check non-elements (#13208)
				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
					matchedHandlers = [];
					matchedSelectors = {};
					for ( i = 0; i < delegateCount; i++ ) {
						handleObj = handlers[ i ];

						// Don't conflict with Object.prototype properties (#13203)
						sel = handleObj.selector + " ";

						if ( matchedSelectors[ sel ] === undefined ) {
							matchedSelectors[ sel ] = handleObj.needsContext ?
								jQuery( sel, this ).index( cur ) > -1 :
								jQuery.find( sel, this, null, [ cur ] ).length;
						}
						if ( matchedSelectors[ sel ] ) {
							matchedHandlers.push( handleObj );
						}
					}
					if ( matchedHandlers.length ) {
						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
					}
				}
			}
		}

		// Add the remaining (directly-bound) handlers
		cur = this;
		if ( delegateCount < handlers.length ) {
			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
		}

		return handlerQueue;
	},

	addProp: function( name, hook ) {
		Object.defineProperty( jQuery.Event.prototype, name, {
			enumerable: true,
			configurable: true,

			get: isFunction( hook ) ?
				function() {
					if ( this.originalEvent ) {
							return hook( this.originalEvent );
					}
				} :
				function() {
					if ( this.originalEvent ) {
							return this.originalEvent[ name ];
					}
				},

			set: function( value ) {
				Object.defineProperty( this, name, {
					enumerable: true,
					configurable: true,
					writable: true,
					value: value
				} );
			}
		} );
	},

	fix: function( originalEvent ) {
		return originalEvent[ jQuery.expando ] ?
			originalEvent :
			new jQuery.Event( originalEvent );
	},

	special: {
		load: {

			// Prevent triggered image.load events from bubbling to window.load
			noBubble: true
		},
		click: {

			// Utilize native event to ensure correct state for checkable inputs
			setup: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Claim the first handler
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					// dataPriv.set( el, "click", ... )
					leverageNative( el, "click", returnTrue );
				}

				// Return false to allow normal processing in the caller
				return false;
			},
			trigger: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Force setup before triggering a click
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					leverageNative( el, "click" );
				}

				// Return non-false to allow normal event-path propagation
				return true;
			},

			// For cross-browser consistency, suppress native .click() on links
			// Also prevent it if we're currently inside a leveraged native-event stack
			_default: function( event ) {
				var target = event.target;
				return rcheckableType.test( target.type ) &&
					target.click && nodeName( target, "input" ) &&
					dataPriv.get( target, "click" ) ||
					nodeName( target, "a" );
			}
		},

		beforeunload: {
			postDispatch: function( event ) {

				// Support: Firefox 20+
				// Firefox doesn't alert if the returnValue field is not set.
				if ( event.result !== undefined && event.originalEvent ) {
					event.originalEvent.returnValue = event.result;
				}
			}
		}
	}
};

// Ensure the presence of an event listener that handles manually-triggered
// synthetic events by interrupting progress until reinvoked in response to
// *native* events that it fires directly, ensuring that state changes have
// already occurred before other listeners are invoked.
function leverageNative( el, type, expectSync ) {

	// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
	if ( !expectSync ) {
		if ( dataPriv.get( el, type ) === undefined ) {
			jQuery.event.add( el, type, returnTrue );
		}
		return;
	}

	// Register the controller as a special universal handler for all event namespaces
	dataPriv.set( el, type, false );
	jQuery.event.add( el, type, {
		namespace: false,
		handler: function( event ) {
			var notAsync, result,
				saved = dataPriv.get( this, type );

			if ( ( event.isTrigger & 1 ) && this[ type ] ) {

				// Interrupt processing of the outer synthetic .trigger()ed event
				// Saved data should be false in such cases, but might be a leftover capture object
				// from an async native handler (gh-4350)
				if ( !saved.length ) {

					// Store arguments for use when handling the inner native event
					// There will always be at least one argument (an event object), so this array
					// will not be confused with a leftover capture object.
					saved = slice.call( arguments );
					dataPriv.set( this, type, saved );

					// Trigger the native event and capture its result
					// Support: IE <=9 - 11+
					// focus() and blur() are asynchronous
					notAsync = expectSync( this, type );
					this[ type ]();
					result = dataPriv.get( this, type );
					if ( saved !== result || notAsync ) {
						dataPriv.set( this, type, false );
					} else {
						result = {};
					}
					if ( saved !== result ) {

						// Cancel the outer synthetic event
						event.stopImmediatePropagation();
						event.preventDefault();
						return result.value;
					}

				// If this is an inner synthetic event for an event with a bubbling surrogate
				// (focus or blur), assume that the surrogate already propagated from triggering the
				// native event and prevent that from happening again here.
				// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
				// bubbling surrogate propagates *after* the non-bubbling base), but that seems
				// less bad than duplication.
				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
					event.stopPropagation();
				}

			// If this is a native event triggered above, everything is now in order
			// Fire an inner synthetic event with the original arguments
			} else if ( saved.length ) {

				// ...and capture the result
				dataPriv.set( this, type, {
					value: jQuery.event.trigger(

						// Support: IE <=9 - 11+
						// Extend with the prototype to reset the above stopImmediatePropagation()
						jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
						saved.slice( 1 ),
						this
					)
				} );

				// Abort handling of the native event
				event.stopImmediatePropagation();
			}
		}
	} );
}

jQuery.removeEvent = function( elem, type, handle ) {

	// This "if" is needed for plain objects
	if ( elem.removeEventListener ) {
		elem.removeEventListener( type, handle );
	}
};

jQuery.Event = function( src, props ) {

	// Allow instantiation without the 'new' keyword
	if ( !( this instanceof jQuery.Event ) ) {
		return new jQuery.Event( src, props );
	}

	// Event object
	if ( src && src.type ) {
		this.originalEvent = src;
		this.type = src.type;

		// Events bubbling up the document may have been marked as prevented
		// by a handler lower down the tree; reflect the correct value.
		this.isDefaultPrevented = src.defaultPrevented ||
				src.defaultPrevented === undefined &&

				// Support: Android <=2.3 only
				src.returnValue === false ?
			returnTrue :
			returnFalse;

		// Create target properties
		// Support: Safari <=6 - 7 only
		// Target should not be a text node (#504, #13143)
		this.target = ( src.target && src.target.nodeType === 3 ) ?
			src.target.parentNode :
			src.target;

		this.currentTarget = src.currentTarget;
		this.relatedTarget = src.relatedTarget;

	// Event type
	} else {
		this.type = src;
	}

	// Put explicitly provided properties onto the event object
	if ( props ) {
		jQuery.extend( this, props );
	}

	// Create a timestamp if incoming event doesn't have one
	this.timeStamp = src && src.timeStamp || Date.now();

	// Mark it as fixed
	this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	constructor: jQuery.Event,
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,
	isSimulated: false,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;

		if ( e && !this.isSimulated ) {
			e.preventDefault();
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopPropagation();
		}
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
	altKey: true,
	bubbles: true,
	cancelable: true,
	changedTouches: true,
	ctrlKey: true,
	detail: true,
	eventPhase: true,
	metaKey: true,
	pageX: true,
	pageY: true,
	shiftKey: true,
	view: true,
	"char": true,
	code: true,
	charCode: true,
	key: true,
	keyCode: true,
	button: true,
	buttons: true,
	clientX: true,
	clientY: true,
	offsetX: true,
	offsetY: true,
	pointerId: true,
	pointerType: true,
	screenX: true,
	screenY: true,
	targetTouches: true,
	toElement: true,
	touches: true,

	which: function( event ) {
		var button = event.button;

		// Add which for key events
		if ( event.which == null && rkeyEvent.test( event.type ) ) {
			return event.charCode != null ? event.charCode : event.keyCode;
		}

		// Add which for click: 1 === left; 2 === middle; 3 === right
		if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
			if ( button & 1 ) {
				return 1;
			}

			if ( button & 2 ) {
				return 3;
			}

			if ( button & 4 ) {
				return 2;
			}

			return 0;
		}

		return event.which;
	}
}, jQuery.event.addProp );

jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
	jQuery.event.special[ type ] = {

		// Utilize native event if possible so blur/focus sequence is correct
		setup: function() {

			// Claim the first handler
			// dataPriv.set( this, "focus", ... )
			// dataPriv.set( this, "blur", ... )
			leverageNative( this, type, expectSync );

			// Return false to allow normal processing in the caller
			return false;
		},
		trigger: function() {

			// Force setup before trigger
			leverageNative( this, type );

			// Return non-false to allow normal event-path propagation
			return true;
		},

		delegateType: delegateType
	};
} );

// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
//
// Support: Safari 7 only
// Safari sends mouseenter too often; see:
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
// for the description of the bug (it existed in older Chrome versions as well).
jQuery.each( {
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, function( orig, fix ) {
	jQuery.event.special[ orig ] = {
		delegateType: fix,
		bindType: fix,

		handle: function( event ) {
			var ret,
				target = this,
				related = event.relatedTarget,
				handleObj = event.handleObj;

			// For mouseenter/leave call the handler if related is outside the target.
			// NB: No relatedTarget if the mouse left/entered the browser window
			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
				event.type = handleObj.origType;
				ret = handleObj.handler.apply( this, arguments );
				event.type = fix;
			}
			return ret;
		}
	};
} );

jQuery.fn.extend( {

	on: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn );
	},
	one: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn, 1 );
	},
	off: function( types, selector, fn ) {
		var handleObj, type;
		if ( types && types.preventDefault && types.handleObj ) {

			// ( event )  dispatched jQuery.Event
			handleObj = types.handleObj;
			jQuery( types.delegateTarget ).off(
				handleObj.namespace ?
					handleObj.origType + "." + handleObj.namespace :
					handleObj.origType,
				handleObj.selector,
				handleObj.handler
			);
			return this;
		}
		if ( typeof types === "object" ) {

			// ( types-object [, selector] )
			for ( type in types ) {
				this.off( type, selector, types[ type ] );
			}
			return this;
		}
		if ( selector === false || typeof selector === "function" ) {

			// ( types [, fn] )
			fn = selector;
			selector = undefined;
		}
		if ( fn === false ) {
			fn = returnFalse;
		}
		return this.each( function() {
			jQuery.event.remove( this, types, fn, selector );
		} );
	}
} );


var

	/* eslint-disable max-len */

	// See https://github.com/eslint/eslint/issues/3229
	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,

	/* eslint-enable */

	// Support: IE <=10 - 11, Edge 12 - 13 only
	// In IE/Edge using regex groups here causes severe slowdowns.
	// See https://connect.microsoft.com/IE/feedback/details/1736512/
	rnoInnerhtml = /<script|<style|<link/i,

	// checked="checked" or checked
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;

// Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) {
	if ( nodeName( elem, "table" ) &&
		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {

		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
	}

	return elem;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
	return elem;
}
function restoreScript( elem ) {
	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
		elem.type = elem.type.slice( 5 );
	} else {
		elem.removeAttribute( "type" );
	}

	return elem;
}

function cloneCopyEvent( src, dest ) {
	var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;

	if ( dest.nodeType !== 1 ) {
		return;
	}

	// 1. Copy private data: events, handlers, etc.
	if ( dataPriv.hasData( src ) ) {
		pdataOld = dataPriv.access( src );
		pdataCur = dataPriv.set( dest, pdataOld );
		events = pdataOld.events;

		if ( events ) {
			delete pdataCur.handle;
			pdataCur.events = {};

			for ( type in events ) {
				for ( i = 0, l = events[ type ].length; i < l; i++ ) {
					jQuery.event.add( dest, type, events[ type ][ i ] );
				}
			}
		}
	}

	// 2. Copy user data
	if ( dataUser.hasData( src ) ) {
		udataOld = dataUser.access( src );
		udataCur = jQuery.extend( {}, udataOld );

		dataUser.set( dest, udataCur );
	}
}

// Fix IE bugs, see support tests
function fixInput( src, dest ) {
	var nodeName = dest.nodeName.toLowerCase();

	// Fails to persist the checked state of a cloned checkbox or radio button.
	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
		dest.checked = src.checked;

	// Fails to return the selected option to the default selected state when cloning options
	} else if ( nodeName === "input" || nodeName === "textarea" ) {
		dest.defaultValue = src.defaultValue;
	}
}

function domManip( collection, args, callback, ignored ) {

	// Flatten any nested arrays
	args = concat.apply( [], args );

	var fragment, first, scripts, hasScripts, node, doc,
		i = 0,
		l = collection.length,
		iNoClone = l - 1,
		value = args[ 0 ],
		valueIsFunction = isFunction( value );

	// We can't cloneNode fragments that contain checked, in WebKit
	if ( valueIsFunction ||
			( l > 1 && typeof value === "string" &&
				!support.checkClone && rchecked.test( value ) ) ) {
		return collection.each( function( index ) {
			var self = collection.eq( index );
			if ( valueIsFunction ) {
				args[ 0 ] = value.call( this, index, self.html() );
			}
			domManip( self, args, callback, ignored );
		} );
	}

	if ( l ) {
		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
		first = fragment.firstChild;

		if ( fragment.childNodes.length === 1 ) {
			fragment = first;
		}

		// Require either new content or an interest in ignored elements to invoke the callback
		if ( first || ignored ) {
			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
			hasScripts = scripts.length;

			// Use the original fragment for the last item
			// instead of the first because it can end up
			// being emptied incorrectly in certain situations (#8070).
			for ( ; i < l; i++ ) {
				node = fragment;

				if ( i !== iNoClone ) {
					node = jQuery.clone( node, true, true );

					// Keep references to cloned scripts for later restoration
					if ( hasScripts ) {

						// Support: Android <=4.0 only, PhantomJS 1 only
						// push.apply(_, arraylike) throws on ancient WebKit
						jQuery.merge( scripts, getAll( node, "script" ) );
					}
				}

				callback.call( collection[ i ], node, i );
			}

			if ( hasScripts ) {
				doc = scripts[ scripts.length - 1 ].ownerDocument;

				// Reenable scripts
				jQuery.map( scripts, restoreScript );

				// Evaluate executable scripts on first document insertion
				for ( i = 0; i < hasScripts; i++ ) {
					node = scripts[ i ];
					if ( rscriptType.test( node.type || "" ) &&
						!dataPriv.access( node, "globalEval" ) &&
						jQuery.contains( doc, node ) ) {

						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {

							// Optional AJAX dependency, but won't run scripts if not present
							if ( jQuery._evalUrl && !node.noModule ) {
								jQuery._evalUrl( node.src, {
									nonce: node.nonce || node.getAttribute( "nonce" )
								} );
							}
						} else {
							DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
						}
					}
				}
			}
		}
	}

	return collection;
}

function remove( elem, selector, keepData ) {
	var node,
		nodes = selector ? jQuery.filter( selector, elem ) : elem,
		i = 0;

	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
		if ( !keepData && node.nodeType === 1 ) {
			jQuery.cleanData( getAll( node ) );
		}

		if ( node.parentNode ) {
			if ( keepData && isAttached( node ) ) {
				setGlobalEval( getAll( node, "script" ) );
			}
			node.parentNode.removeChild( node );
		}
	}

	return elem;
}

jQuery.extend( {
	htmlPrefilter: function( html ) {
		return html.replace( rxhtmlTag, "<$1></$2>" );
	},

	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var i, l, srcElements, destElements,
			clone = elem.cloneNode( true ),
			inPage = isAttached( elem );

		// Fix IE cloning issues
		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
				!jQuery.isXMLDoc( elem ) ) {

			// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
			destElements = getAll( clone );
			srcElements = getAll( elem );

			for ( i = 0, l = srcElements.length; i < l; i++ ) {
				fixInput( srcElements[ i ], destElements[ i ] );
			}
		}

		// Copy the events from the original to the clone
		if ( dataAndEvents ) {
			if ( deepDataAndEvents ) {
				srcElements = srcElements || getAll( elem );
				destElements = destElements || getAll( clone );

				for ( i = 0, l = srcElements.length; i < l; i++ ) {
					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		// Return the cloned set
		return clone;
	},

	cleanData: function( elems ) {
		var data, elem, type,
			special = jQuery.event.special,
			i = 0;

		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
			if ( acceptData( elem ) ) {
				if ( ( data = elem[ dataPriv.expando ] ) ) {
					if ( data.events ) {
						for ( type in data.events ) {
							if ( special[ type ] ) {
								jQuery.event.remove( elem, type );

							// This is a shortcut to avoid jQuery.event.remove's overhead
							} else {
								jQuery.removeEvent( elem, type, data.handle );
							}
						}
					}

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataPriv.expando ] = undefined;
				}
				if ( elem[ dataUser.expando ] ) {

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataUser.expando ] = undefined;
				}
			}
		}
	}
} );

jQuery.fn.extend( {
	detach: function( selector ) {
		return remove( this, selector, true );
	},

	remove: function( selector ) {
		return remove( this, selector );
	},

	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().each( function() {
					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
						this.textContent = value;
					}
				} );
		}, null, value, arguments.length );
	},

	append: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		} );
	},

	prepend: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.insertBefore( elem, target.firstChild );
			}
		} );
	},

	before: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		} );
	},

	after: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		} );
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; ( elem = this[ i ] ) != null; i++ ) {
			if ( elem.nodeType === 1 ) {

				// Prevent memory leaks
				jQuery.cleanData( getAll( elem, false ) );

				// Remove any remaining nodes
				elem.textContent = "";
			}
		}

		return this;
	},

	clone: function( dataAndEvents, deepDataAndEvents ) {
		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

		return this.map( function() {
			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
		} );
	},

	html: function( value ) {
		return access( this, function( value ) {
			var elem = this[ 0 ] || {},
				i = 0,
				l = this.length;

			if ( value === undefined && elem.nodeType === 1 ) {
				return elem.innerHTML;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

				value = jQuery.htmlPrefilter( value );

				try {
					for ( ; i < l; i++ ) {
						elem = this[ i ] || {};

						// Remove element nodes and prevent memory leaks
						if ( elem.nodeType === 1 ) {
							jQuery.cleanData( getAll( elem, false ) );
							elem.innerHTML = value;
						}
					}

					elem = 0;

				// If using innerHTML throws an exception, use the fallback method
				} catch ( e ) {}
			}

			if ( elem ) {
				this.empty().append( value );
			}
		}, null, value, arguments.length );
	},

	replaceWith: function() {
		var ignored = [];

		// Make the changes, replacing each non-ignored context element with the new content
		return domManip( this, arguments, function( elem ) {
			var parent = this.parentNode;

			if ( jQuery.inArray( this, ignored ) < 0 ) {
				jQuery.cleanData( getAll( this ) );
				if ( parent ) {
					parent.replaceChild( elem, this );
				}
			}

		// Force callback invocation
		}, ignored );
	}
} );

jQuery.each( {
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1,
			i = 0;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone( true );
			jQuery( insert[ i ] )[ original ]( elems );

			// Support: Android <=4.0 only, PhantomJS 1 only
			// .get() because push.apply(_, arraylike) throws on ancient WebKit
			push.apply( ret, elems.get() );
		}

		return this.pushStack( ret );
	};
} );
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var getStyles = function( elem ) {

		// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
		// IE throws on elements created in popups
		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
		var view = elem.ownerDocument.defaultView;

		if ( !view || !view.opener ) {
			view = window;
		}

		return view.getComputedStyle( elem );
	};

var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );



( function() {

	// Executing both pixelPosition & boxSizingReliable tests require only one layout
	// so they're executed at the same time to save the second computation.
	function computeStyleTests() {

		// This is a singleton, we need to execute it only once
		if ( !div ) {
			return;
		}

		container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
			"margin-top:1px;padding:0;border:0";
		div.style.cssText =
			"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
			"margin:auto;border:1px;padding:1px;" +
			"width:60%;top:1%";
		documentElement.appendChild( container ).appendChild( div );

		var divStyle = window.getComputedStyle( div );
		pixelPositionVal = divStyle.top !== "1%";

		// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
		reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;

		// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
		// Some styles come back with percentage values, even though they shouldn't
		div.style.right = "60%";
		pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;

		// Support: IE 9 - 11 only
		// Detect misreporting of content dimensions for box-sizing:border-box elements
		boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;

		// Support: IE 9 only
		// Detect overflow:scroll screwiness (gh-3699)
		// Support: Chrome <=64
		// Don't get tricked when zoom affects offsetWidth (gh-4029)
		div.style.position = "absolute";
		scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;

		documentElement.removeChild( container );

		// Nullify the div so it wouldn't be stored in the memory and
		// it will also be a sign that checks already performed
		div = null;
	}

	function roundPixelMeasures( measure ) {
		return Math.round( parseFloat( measure ) );
	}

	var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
		reliableMarginLeftVal,
		container = document.createElement( "div" ),
		div = document.createElement( "div" );

	// Finish early in limited (non-browser) environments
	if ( !div.style ) {
		return;
	}

	// Support: IE <=9 - 11 only
	// Style of cloned element affects source element cloned (#8908)
	div.style.backgroundClip = "content-box";
	div.cloneNode( true ).style.backgroundClip = "";
	support.clearCloneStyle = div.style.backgroundClip === "content-box";

	jQuery.extend( support, {
		boxSizingReliable: function() {
			computeStyleTests();
			return boxSizingReliableVal;
		},
		pixelBoxStyles: function() {
			computeStyleTests();
			return pixelBoxStylesVal;
		},
		pixelPosition: function() {
			computeStyleTests();
			return pixelPositionVal;
		},
		reliableMarginLeft: function() {
			computeStyleTests();
			return reliableMarginLeftVal;
		},
		scrollboxSize: function() {
			computeStyleTests();
			return scrollboxSizeVal;
		}
	} );
} )();


function curCSS( elem, name, computed ) {
	var width, minWidth, maxWidth, ret,

		// Support: Firefox 51+
		// Retrieving style before computed somehow
		// fixes an issue with getting wrong values
		// on detached elements
		style = elem.style;

	computed = computed || getStyles( elem );

	// getPropertyValue is needed for:
	//   .css('filter') (IE 9 only, #12537)
	//   .css('--customProperty) (#3144)
	if ( computed ) {
		ret = computed.getPropertyValue( name ) || computed[ name ];

		if ( ret === "" && !isAttached( elem ) ) {
			ret = jQuery.style( elem, name );
		}

		// A tribute to the "awesome hack by Dean Edwards"
		// Android Browser returns percentage for some values,
		// but width seems to be reliably pixels.
		// This is against the CSSOM draft spec:
		// https://drafts.csswg.org/cssom/#resolved-values
		if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {

			// Remember the original values
			width = style.width;
			minWidth = style.minWidth;
			maxWidth = style.maxWidth;

			// Put in the new values to get a computed value out
			style.minWidth = style.maxWidth = style.width = ret;
			ret = computed.width;

			// Revert the changed values
			style.width = width;
			style.minWidth = minWidth;
			style.maxWidth = maxWidth;
		}
	}

	return ret !== undefined ?

		// Support: IE <=9 - 11 only
		// IE returns zIndex value as an integer.
		ret + "" :
		ret;
}


function addGetHookIf( conditionFn, hookFn ) {

	// Define the hook, we'll check on the first run if it's really needed.
	return {
		get: function() {
			if ( conditionFn() ) {

				// Hook not needed (or it's not possible to use it due
				// to missing dependency), remove it.
				delete this.get;
				return;
			}

			// Hook needed; redefine it so that the support test is not executed again.
			return ( this.get = hookFn ).apply( this, arguments );
		}
	};
}


var cssPrefixes = [ "Webkit", "Moz", "ms" ],
	emptyStyle = document.createElement( "div" ).style,
	vendorProps = {};

// Return a vendor-prefixed property or undefined
function vendorPropName( name ) {

	// Check for vendor prefixed names
	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}

// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
function finalPropName( name ) {
	var final = jQuery.cssProps[ name ] || vendorProps[ name ];

	if ( final ) {
		return final;
	}
	if ( name in emptyStyle ) {
		return name;
	}
	return vendorProps[ name ] = vendorPropName( name ) || name;
}


var

	// Swappable if display is none or starts with table
	// except "table", "table-cell", or "table-caption"
	// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
	rcustomProp = /^--/,
	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	};

function setPositiveNumber( elem, value, subtract ) {

	// Any relative (+/-) values have already been
	// normalized at this point
	var matches = rcssNum.exec( value );
	return matches ?

		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
		value;
}

function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
	var i = dimension === "width" ? 1 : 0,
		extra = 0,
		delta = 0;

	// Adjustment may not be necessary
	if ( box === ( isBorderBox ? "border" : "content" ) ) {
		return 0;
	}

	for ( ; i < 4; i += 2 ) {

		// Both box models exclude margin
		if ( box === "margin" ) {
			delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
		}

		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
		if ( !isBorderBox ) {

			// Add padding
			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );

			// For "border" or "margin", add border
			if ( box !== "padding" ) {
				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );

			// But still keep track of it otherwise
			} else {
				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}

		// If we get here with a border-box (content + padding + border), we're seeking "content" or
		// "padding" or "margin"
		} else {

			// For "content", subtract padding
			if ( box === "content" ) {
				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
			}

			// For "content" or "padding", subtract border
			if ( box !== "margin" ) {
				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		}
	}

	// Account for positive content-box scroll gutter when requested by providing computedVal
	if ( !isBorderBox && computedVal >= 0 ) {

		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
		// Assuming integer scroll gutter, subtract the rest and round down
		delta += Math.max( 0, Math.ceil(
			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
			computedVal -
			delta -
			extra -
			0.5

		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
		// Use an explicit zero to avoid NaN (gh-3964)
		) ) || 0;
	}

	return delta;
}

function getWidthOrHeight( elem, dimension, extra ) {

	// Start with computed style
	var styles = getStyles( elem ),

		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
		// Fake content-box until we know it's needed to know the true value.
		boxSizingNeeded = !support.boxSizingReliable() || extra,
		isBorderBox = boxSizingNeeded &&
			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
		valueIsBorderBox = isBorderBox,

		val = curCSS( elem, dimension, styles ),
		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );

	// Support: Firefox <=54
	// Return a confounding non-pixel value or feign ignorance, as appropriate.
	if ( rnumnonpx.test( val ) ) {
		if ( !extra ) {
			return val;
		}
		val = "auto";
	}


	// Fall back to offsetWidth/offsetHeight when value is "auto"
	// This happens for inline elements with no explicit setting (gh-3571)
	// Support: Android <=4.1 - 4.3 only
	// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
	// Support: IE 9-11 only
	// Also use offsetWidth/offsetHeight for when box sizing is unreliable
	// We use getClientRects() to check for hidden/disconnected.
	// In those cases, the computed value can be trusted to be border-box
	if ( ( !support.boxSizingReliable() && isBorderBox ||
		val === "auto" ||
		!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
		elem.getClientRects().length ) {

		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
		// retrieved value as a content box dimension.
		valueIsBorderBox = offsetProp in elem;
		if ( valueIsBorderBox ) {
			val = elem[ offsetProp ];
		}
	}

	// Normalize "" and auto
	val = parseFloat( val ) || 0;

	// Adjust for the element's box model
	return ( val +
		boxModelAdjustment(
			elem,
			dimension,
			extra || ( isBorderBox ? "border" : "content" ),
			valueIsBorderBox,
			styles,

			// Provide the current computed size to request scroll gutter calculation (gh-3589)
			val
		)
	) + "px";
}

jQuery.extend( {

	// Add in style property hooks for overriding the default
	// behavior of getting and setting a style property
	cssHooks: {
		opacity: {
			get: function( elem, computed ) {
				if ( computed ) {

					// We should always get a number back from opacity
					var ret = curCSS( elem, "opacity" );
					return ret === "" ? "1" : ret;
				}
			}
		}
	},

	// Don't automatically add "px" to these possibly-unitless properties
	cssNumber: {
		"animationIterationCount": true,
		"columnCount": true,
		"fillOpacity": true,
		"flexGrow": true,
		"flexShrink": true,
		"fontWeight": true,
		"gridArea": true,
		"gridColumn": true,
		"gridColumnEnd": true,
		"gridColumnStart": true,
		"gridRow": true,
		"gridRowEnd": true,
		"gridRowStart": true,
		"lineHeight": true,
		"opacity": true,
		"order": true,
		"orphans": true,
		"widows": true,
		"zIndex": true,
		"zoom": true
	},

	// Add in properties whose names you wish to fix before
	// setting or getting the value
	cssProps: {},

	// Get and set the style property on a DOM Node
	style: function( elem, name, value, extra ) {

		// Don't set styles on text and comment nodes
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
			return;
		}

		// Make sure that we're working with the right name
		var ret, type, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name ),
			style = elem.style;

		// Make sure that we're working with the right name. We don't
		// want to query the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Gets hook for the prefixed version, then unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// Convert "+=" or "-=" to relative numbers (#7345)
			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
				value = adjustCSS( elem, name, ret );

				// Fixes bug #9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set (#7116)
			if ( value == null || value !== value ) {
				return;
			}

			// If a number was passed in, add the unit (except for certain CSS properties)
			// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
			// "px" to a few hardcoded values.
			if ( type === "number" && !isCustomProp ) {
				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
			}

			// background-* props affect original clone's values
			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
				style[ name ] = "inherit";
			}

			// If a hook was provided, use that value, otherwise just set the specified value
			if ( !hooks || !( "set" in hooks ) ||
				( value = hooks.set( elem, value, extra ) ) !== undefined ) {

				if ( isCustomProp ) {
					style.setProperty( name, value );
				} else {
					style[ name ] = value;
				}
			}

		} else {

			// If a hook was provided get the non-computed value from there
			if ( hooks && "get" in hooks &&
				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {

				return ret;
			}

			// Otherwise just get the value from the style object
			return style[ name ];
		}
	},

	css: function( elem, name, extra, styles ) {
		var val, num, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name );

		// Make sure that we're working with the right name. We don't
		// want to modify the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Try prefixed name followed by the unprefixed name
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// If a hook was provided get the computed value from there
		if ( hooks && "get" in hooks ) {
			val = hooks.get( elem, true, extra );
		}

		// Otherwise, if a way to get the computed value exists, use that
		if ( val === undefined ) {
			val = curCSS( elem, name, styles );
		}

		// Convert "normal" to computed value
		if ( val === "normal" && name in cssNormalTransform ) {
			val = cssNormalTransform[ name ];
		}

		// Make numeric if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || isFinite( num ) ? num || 0 : val;
		}

		return val;
	}
} );

jQuery.each( [ "height", "width" ], function( i, dimension ) {
	jQuery.cssHooks[ dimension ] = {
		get: function( elem, computed, extra ) {
			if ( computed ) {

				// Certain elements can have dimension info if we invisibly show them
				// but it must have a current display style that would benefit
				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&

					// Support: Safari 8+
					// Table columns in Safari have non-zero offsetWidth & zero
					// getBoundingClientRect().width unless display is changed.
					// Support: IE <=11 only
					// Running getBoundingClientRect on a disconnected node
					// in IE throws an error.
					( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
						swap( elem, cssShow, function() {
							return getWidthOrHeight( elem, dimension, extra );
						} ) :
						getWidthOrHeight( elem, dimension, extra );
			}
		},

		set: function( elem, value, extra ) {
			var matches,
				styles = getStyles( elem ),

				// Only read styles.position if the test has a chance to fail
				// to avoid forcing a reflow.
				scrollboxSizeBuggy = !support.scrollboxSize() &&
					styles.position === "absolute",

				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
				boxSizingNeeded = scrollboxSizeBuggy || extra,
				isBorderBox = boxSizingNeeded &&
					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
				subtract = extra ?
					boxModelAdjustment(
						elem,
						dimension,
						extra,
						isBorderBox,
						styles
					) :
					0;

			// Account for unreliable border-box dimensions by comparing offset* to computed and
			// faking a content-box to get border and padding (gh-3699)
			if ( isBorderBox && scrollboxSizeBuggy ) {
				subtract -= Math.ceil(
					elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
					parseFloat( styles[ dimension ] ) -
					boxModelAdjustment( elem, dimension, "border", false, styles ) -
					0.5
				);
			}

			// Convert to pixels if value adjustment is needed
			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
				( matches[ 3 ] || "px" ) !== "px" ) {

				elem.style[ dimension ] = value;
				value = jQuery.css( elem, dimension );
			}

			return setPositiveNumber( elem, value, subtract );
		}
	};
} );

jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
	function( elem, computed ) {
		if ( computed ) {
			return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
				elem.getBoundingClientRect().left -
					swap( elem, { marginLeft: 0 }, function() {
						return elem.getBoundingClientRect().left;
					} )
				) + "px";
		}
	}
);

// These hooks are used by animate to expand properties
jQuery.each( {
	margin: "",
	padding: "",
	border: "Width"
}, function( prefix, suffix ) {
	jQuery.cssHooks[ prefix + suffix ] = {
		expand: function( value ) {
			var i = 0,
				expanded = {},

				// Assumes a single number if not a string
				parts = typeof value === "string" ? value.split( " " ) : [ value ];

			for ( ; i < 4; i++ ) {
				expanded[ prefix + cssExpand[ i ] + suffix ] =
					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
			}

			return expanded;
		}
	};

	if ( prefix !== "margin" ) {
		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
	}
} );

jQuery.fn.extend( {
	css: function( name, value ) {
		return access( this, function( elem, name, value ) {
			var styles, len,
				map = {},
				i = 0;

			if ( Array.isArray( name ) ) {
				styles = getStyles( elem );
				len = name.length;

				for ( ; i < len; i++ ) {
					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
				}

				return map;
			}

			return value !== undefined ?
				jQuery.style( elem, name, value ) :
				jQuery.css( elem, name );
		}, name, value, arguments.length > 1 );
	}
} );


function Tween( elem, options, prop, end, easing ) {
	return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;

Tween.prototype = {
	constructor: Tween,
	init: function( elem, options, prop, end, easing, unit ) {
		this.elem = elem;
		this.prop = prop;
		this.easing = easing || jQuery.easing._default;
		this.options = options;
		this.start = this.now = this.cur();
		this.end = end;
		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
	},
	cur: function() {
		var hooks = Tween.propHooks[ this.prop ];

		return hooks && hooks.get ?
			hooks.get( this ) :
			Tween.propHooks._default.get( this );
	},
	run: function( percent ) {
		var eased,
			hooks = Tween.propHooks[ this.prop ];

		if ( this.options.duration ) {
			this.pos = eased = jQuery.easing[ this.easing ](
				percent, this.options.duration * percent, 0, 1, this.options.duration
			);
		} else {
			this.pos = eased = percent;
		}
		this.now = ( this.end - this.start ) * eased + this.start;

		if ( this.options.step ) {
			this.options.step.call( this.elem, this.now, this );
		}

		if ( hooks && hooks.set ) {
			hooks.set( this );
		} else {
			Tween.propHooks._default.set( this );
		}
		return this;
	}
};

Tween.prototype.init.prototype = Tween.prototype;

Tween.propHooks = {
	_default: {
		get: function( tween ) {
			var result;

			// Use a property on the element directly when it is not a DOM element,
			// or when there is no matching style property that exists.
			if ( tween.elem.nodeType !== 1 ||
				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
				return tween.elem[ tween.prop ];
			}

			// Passing an empty string as a 3rd parameter to .css will automatically
			// attempt a parseFloat and fallback to a string if the parse fails.
			// Simple values such as "10px" are parsed to Float;
			// complex values such as "rotate(1rad)" are returned as-is.
			result = jQuery.css( tween.elem, tween.prop, "" );

			// Empty strings, null, undefined and "auto" are converted to 0.
			return !result || result === "auto" ? 0 : result;
		},
		set: function( tween ) {

			// Use step hook for back compat.
			// Use cssHook if its there.
			// Use .style if available and use plain properties where available.
			if ( jQuery.fx.step[ tween.prop ] ) {
				jQuery.fx.step[ tween.prop ]( tween );
			} else if ( tween.elem.nodeType === 1 && (
					jQuery.cssHooks[ tween.prop ] ||
					tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
			} else {
				tween.elem[ tween.prop ] = tween.now;
			}
		}
	}
};

// Support: IE <=9 only
// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
	set: function( tween ) {
		if ( tween.elem.nodeType && tween.elem.parentNode ) {
			tween.elem[ tween.prop ] = tween.now;
		}
	}
};

jQuery.easing = {
	linear: function( p ) {
		return p;
	},
	swing: function( p ) {
		return 0.5 - Math.cos( p * Math.PI ) / 2;
	},
	_default: "swing"
};

jQuery.fx = Tween.prototype.init;

// Back compat <1.8 extension point
jQuery.fx.step = {};




var
	fxNow, inProgress,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rrun = /queueHooks$/;

function schedule() {
	if ( inProgress ) {
		if ( document.hidden === false && window.requestAnimationFrame ) {
			window.requestAnimationFrame( schedule );
		} else {
			window.setTimeout( schedule, jQuery.fx.interval );
		}

		jQuery.fx.tick();
	}
}

// Animations created synchronously will run synchronously
function createFxNow() {
	window.setTimeout( function() {
		fxNow = undefined;
	} );
	return ( fxNow = Date.now() );
}

// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
	var which,
		i = 0,
		attrs = { height: type };

	// If we include width, step value is 1 to do all cssExpand values,
	// otherwise step value is 2 to skip over Left and Right
	includeWidth = includeWidth ? 1 : 0;
	for ( ; i < 4; i += 2 - includeWidth ) {
		which = cssExpand[ i ];
		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
	}

	if ( includeWidth ) {
		attrs.opacity = attrs.width = type;
	}

	return attrs;
}

function createTween( value, prop, animation ) {
	var tween,
		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
		index = 0,
		length = collection.length;
	for ( ; index < length; index++ ) {
		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {

			// We're done with this property
			return tween;
		}
	}
}

function defaultPrefilter( elem, props, opts ) {
	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
		isBox = "width" in props || "height" in props,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHiddenWithinTree( elem ),
		dataShow = dataPriv.get( elem, "fxshow" );

	// Queue-skipping animations hijack the fx hooks
	if ( !opts.queue ) {
		hooks = jQuery._queueHooks( elem, "fx" );
		if ( hooks.unqueued == null ) {
			hooks.unqueued = 0;
			oldfire = hooks.empty.fire;
			hooks.empty.fire = function() {
				if ( !hooks.unqueued ) {
					oldfire();
				}
			};
		}
		hooks.unqueued++;

		anim.always( function() {

			// Ensure the complete handler is called before this completes
			anim.always( function() {
				hooks.unqueued--;
				if ( !jQuery.queue( elem, "fx" ).length ) {
					hooks.empty.fire();
				}
			} );
		} );
	}

	// Detect show/hide animations
	for ( prop in props ) {
		value = props[ prop ];
		if ( rfxtypes.test( value ) ) {
			delete props[ prop ];
			toggle = toggle || value === "toggle";
			if ( value === ( hidden ? "hide" : "show" ) ) {

				// Pretend to be hidden if this is a "show" and
				// there is still data from a stopped show/hide
				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
					hidden = true;

				// Ignore all other no-op show/hide data
				} else {
					continue;
				}
			}
			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
		}
	}

	// Bail out if this is a no-op like .hide().hide()
	propTween = !jQuery.isEmptyObject( props );
	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
		return;
	}

	// Restrict "overflow" and "display" styles during box animations
	if ( isBox && elem.nodeType === 1 ) {

		// Support: IE <=9 - 11, Edge 12 - 15
		// Record all 3 overflow attributes because IE does not infer the shorthand
		// from identically-valued overflowX and overflowY and Edge just mirrors
		// the overflowX value there.
		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

		// Identify a display type, preferring old show/hide data over the CSS cascade
		restoreDisplay = dataShow && dataShow.display;
		if ( restoreDisplay == null ) {
			restoreDisplay = dataPriv.get( elem, "display" );
		}
		display = jQuery.css( elem, "display" );
		if ( display === "none" ) {
			if ( restoreDisplay ) {
				display = restoreDisplay;
			} else {

				// Get nonempty value(s) by temporarily forcing visibility
				showHide( [ elem ], true );
				restoreDisplay = elem.style.display || restoreDisplay;
				display = jQuery.css( elem, "display" );
				showHide( [ elem ] );
			}
		}

		// Animate inline elements as inline-block
		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
			if ( jQuery.css( elem, "float" ) === "none" ) {

				// Restore the original display value at the end of pure show/hide animations
				if ( !propTween ) {
					anim.done( function() {
						style.display = restoreDisplay;
					} );
					if ( restoreDisplay == null ) {
						display = style.display;
						restoreDisplay = display === "none" ? "" : display;
					}
				}
				style.display = "inline-block";
			}
		}
	}

	if ( opts.overflow ) {
		style.overflow = "hidden";
		anim.always( function() {
			style.overflow = opts.overflow[ 0 ];
			style.overflowX = opts.overflow[ 1 ];
			style.overflowY = opts.overflow[ 2 ];
		} );
	}

	// Implement show/hide animations
	propTween = false;
	for ( prop in orig ) {

		// General show/hide setup for this element animation
		if ( !propTween ) {
			if ( dataShow ) {
				if ( "hidden" in dataShow ) {
					hidden = dataShow.hidden;
				}
			} else {
				dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
			}

			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
			if ( toggle ) {
				dataShow.hidden = !hidden;
			}

			// Show elements before animating them
			if ( hidden ) {
				showHide( [ elem ], true );
			}

			/* eslint-disable no-loop-func */

			anim.done( function() {

			/* eslint-enable no-loop-func */

				// The final step of a "hide" animation is actually hiding the element
				if ( !hidden ) {
					showHide( [ elem ] );
				}
				dataPriv.remove( elem, "fxshow" );
				for ( prop in orig ) {
					jQuery.style( elem, prop, orig[ prop ] );
				}
			} );
		}

		// Per-property setup
		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
		if ( !( prop in dataShow ) ) {
			dataShow[ prop ] = propTween.start;
			if ( hidden ) {
				propTween.end = propTween.start;
				propTween.start = 0;
			}
		}
	}
}

function propFilter( props, specialEasing ) {
	var index, name, easing, value, hooks;

	// camelCase, specialEasing and expand cssHook pass
	for ( index in props ) {
		name = camelCase( index );
		easing = specialEasing[ name ];
		value = props[ index ];
		if ( Array.isArray( value ) ) {
			easing = value[ 1 ];
			value = props[ index ] = value[ 0 ];
		}

		if ( index !== name ) {
			props[ name ] = value;
			delete props[ index ];
		}

		hooks = jQuery.cssHooks[ name ];
		if ( hooks && "expand" in hooks ) {
			value = hooks.expand( value );
			delete props[ name ];

			// Not quite $.extend, this won't overwrite existing keys.
			// Reusing 'index' because we have the correct "name"
			for ( index in value ) {
				if ( !( index in props ) ) {
					props[ index ] = value[ index ];
					specialEasing[ index ] = easing;
				}
			}
		} else {
			specialEasing[ name ] = easing;
		}
	}
}

function Animation( elem, properties, options ) {
	var result,
		stopped,
		index = 0,
		length = Animation.prefilters.length,
		deferred = jQuery.Deferred().always( function() {

			// Don't match elem in the :animated selector
			delete tick.elem;
		} ),
		tick = function() {
			if ( stopped ) {
				return false;
			}
			var currentTime = fxNow || createFxNow(),
				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),

				// Support: Android 2.3 only
				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
				temp = remaining / animation.duration || 0,
				percent = 1 - temp,
				index = 0,
				length = animation.tweens.length;

			for ( ; index < length; index++ ) {
				animation.tweens[ index ].run( percent );
			}

			deferred.notifyWith( elem, [ animation, percent, remaining ] );

			// If there's more to do, yield
			if ( percent < 1 && length ) {
				return remaining;
			}

			// If this was an empty animation, synthesize a final progress notification
			if ( !length ) {
				deferred.notifyWith( elem, [ animation, 1, 0 ] );
			}

			// Resolve the animation and report its conclusion
			deferred.resolveWith( elem, [ animation ] );
			return false;
		},
		animation = deferred.promise( {
			elem: elem,
			props: jQuery.extend( {}, properties ),
			opts: jQuery.extend( true, {
				specialEasing: {},
				easing: jQuery.easing._default
			}, options ),
			originalProperties: properties,
			originalOptions: options,
			startTime: fxNow || createFxNow(),
			duration: options.duration,
			tweens: [],
			createTween: function( prop, end ) {
				var tween = jQuery.Tween( elem, animation.opts, prop, end,
						animation.opts.specialEasing[ prop ] || animation.opts.easing );
				animation.tweens.push( tween );
				return tween;
			},
			stop: function( gotoEnd ) {
				var index = 0,

					// If we are going to the end, we want to run all the tweens
					// otherwise we skip this part
					length = gotoEnd ? animation.tweens.length : 0;
				if ( stopped ) {
					return this;
				}
				stopped = true;
				for ( ; index < length; index++ ) {
					animation.tweens[ index ].run( 1 );
				}

				// Resolve when we played the last frame; otherwise, reject
				if ( gotoEnd ) {
					deferred.notifyWith( elem, [ animation, 1, 0 ] );
					deferred.resolveWith( elem, [ animation, gotoEnd ] );
				} else {
					deferred.rejectWith( elem, [ animation, gotoEnd ] );
				}
				return this;
			}
		} ),
		props = animation.props;

	propFilter( props, animation.opts.specialEasing );

	for ( ; index < length; index++ ) {
		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
		if ( result ) {
			if ( isFunction( result.stop ) ) {
				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
					result.stop.bind( result );
			}
			return result;
		}
	}

	jQuery.map( props, createTween, animation );

	if ( isFunction( animation.opts.start ) ) {
		animation.opts.start.call( elem, animation );
	}

	// Attach callbacks from options
	animation
		.progress( animation.opts.progress )
		.done( animation.opts.done, animation.opts.complete )
		.fail( animation.opts.fail )
		.always( animation.opts.always );

	jQuery.fx.timer(
		jQuery.extend( tick, {
			elem: elem,
			anim: animation,
			queue: animation.opts.queue
		} )
	);

	return animation;
}

jQuery.Animation = jQuery.extend( Animation, {

	tweeners: {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value );
			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
			return tween;
		} ]
	},

	tweener: function( props, callback ) {
		if ( isFunction( props ) ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.match( rnothtmlwhite );
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length; index++ ) {
			prop = props[ index ];
			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
			Animation.tweeners[ prop ].unshift( callback );
		}
	},

	prefilters: [ defaultPrefilter ],

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			Animation.prefilters.unshift( callback );
		} else {
			Animation.prefilters.push( callback );
		}
	}
} );

jQuery.speed = function( speed, easing, fn ) {
	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
		complete: fn || !fn && easing ||
			isFunction( speed ) && speed,
		duration: speed,
		easing: fn && easing || easing && !isFunction( easing ) && easing
	};

	// Go to the end state if fx are off
	if ( jQuery.fx.off ) {
		opt.duration = 0;

	} else {
		if ( typeof opt.duration !== "number" ) {
			if ( opt.duration in jQuery.fx.speeds ) {
				opt.duration = jQuery.fx.speeds[ opt.duration ];

			} else {
				opt.duration = jQuery.fx.speeds._default;
			}
		}
	}

	// Normalize opt.queue - true/undefined/null -> "fx"
	if ( opt.queue == null || opt.queue === true ) {
		opt.queue = "fx";
	}

	// Queueing
	opt.old = opt.complete;

	opt.complete = function() {
		if ( isFunction( opt.old ) ) {
			opt.old.call( this );
		}

		if ( opt.queue ) {
			jQuery.dequeue( this, opt.queue );
		}
	};

	return opt;
};

jQuery.fn.extend( {
	fadeTo: function( speed, to, easing, callback ) {

		// Show any hidden elements after setting opacity to 0
		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()

			// Animate to the value specified
			.end().animate( { opacity: to }, speed, easing, callback );
	},
	animate: function( prop, speed, easing, callback ) {
		var empty = jQuery.isEmptyObject( prop ),
			optall = jQuery.speed( speed, easing, callback ),
			doAnimation = function() {

				// Operate on a copy of prop so per-property easing won't be lost
				var anim = Animation( this, jQuery.extend( {}, prop ), optall );

				// Empty animations, or finishing resolves immediately
				if ( empty || dataPriv.get( this, "finish" ) ) {
					anim.stop( true );
				}
			};
			doAnimation.finish = doAnimation;

		return empty || optall.queue === false ?
			this.each( doAnimation ) :
			this.queue( optall.queue, doAnimation );
	},
	stop: function( type, clearQueue, gotoEnd ) {
		var stopQueue = function( hooks ) {
			var stop = hooks.stop;
			delete hooks.stop;
			stop( gotoEnd );
		};

		if ( typeof type !== "string" ) {
			gotoEnd = clearQueue;
			clearQueue = type;
			type = undefined;
		}
		if ( clearQueue && type !== false ) {
			this.queue( type || "fx", [] );
		}

		return this.each( function() {
			var dequeue = true,
				index = type != null && type + "queueHooks",
				timers = jQuery.timers,
				data = dataPriv.get( this );

			if ( index ) {
				if ( data[ index ] && data[ index ].stop ) {
					stopQueue( data[ index ] );
				}
			} else {
				for ( index in data ) {
					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
						stopQueue( data[ index ] );
					}
				}
			}

			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this &&
					( type == null || timers[ index ].queue === type ) ) {

					timers[ index ].anim.stop( gotoEnd );
					dequeue = false;
					timers.splice( index, 1 );
				}
			}

			// Start the next in the queue if the last step wasn't forced.
			// Timers currently will call their complete callbacks, which
			// will dequeue but only if they were gotoEnd.
			if ( dequeue || !gotoEnd ) {
				jQuery.dequeue( this, type );
			}
		} );
	},
	finish: function( type ) {
		if ( type !== false ) {
			type = type || "fx";
		}
		return this.each( function() {
			var index,
				data = dataPriv.get( this ),
				queue = data[ type + "queue" ],
				hooks = data[ type + "queueHooks" ],
				timers = jQuery.timers,
				length = queue ? queue.length : 0;

			// Enable finishing flag on private data
			data.finish = true;

			// Empty the queue first
			jQuery.queue( this, type, [] );

			if ( hooks && hooks.stop ) {
				hooks.stop.call( this, true );
			}

			// Look for any active animations, and finish them
			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
					timers[ index ].anim.stop( true );
					timers.splice( index, 1 );
				}
			}

			// Look for any animations in the old queue and finish them
			for ( index = 0; index < length; index++ ) {
				if ( queue[ index ] && queue[ index ].finish ) {
					queue[ index ].finish.call( this );
				}
			}

			// Turn off finishing flag
			delete data.finish;
		} );
	}
} );

jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
	var cssFn = jQuery.fn[ name ];
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return speed == null || typeof speed === "boolean" ?
			cssFn.apply( this, arguments ) :
			this.animate( genFx( name, true ), speed, easing, callback );
	};
} );

// Generate shortcuts for custom animations
jQuery.each( {
	slideDown: genFx( "show" ),
	slideUp: genFx( "hide" ),
	slideToggle: genFx( "toggle" ),
	fadeIn: { opacity: "show" },
	fadeOut: { opacity: "hide" },
	fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return this.animate( props, speed, easing, callback );
	};
} );

jQuery.timers = [];
jQuery.fx.tick = function() {
	var timer,
		i = 0,
		timers = jQuery.timers;

	fxNow = Date.now();

	for ( ; i < timers.length; i++ ) {
		timer = timers[ i ];

		// Run the timer and safely remove it when done (allowing for external removal)
		if ( !timer() && timers[ i ] === timer ) {
			timers.splice( i--, 1 );
		}
	}

	if ( !timers.length ) {
		jQuery.fx.stop();
	}
	fxNow = undefined;
};

jQuery.fx.timer = function( timer ) {
	jQuery.timers.push( timer );
	jQuery.fx.start();
};

jQuery.fx.interval = 13;
jQuery.fx.start = function() {
	if ( inProgress ) {
		return;
	}

	inProgress = true;
	schedule();
};

jQuery.fx.stop = function() {
	inProgress = null;
};

jQuery.fx.speeds = {
	slow: 600,
	fast: 200,

	// Default speed
	_default: 400
};


// Based off of the plugin by Clint Helfers, with permission.
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
jQuery.fn.delay = function( time, type ) {
	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
	type = type || "fx";

	return this.queue( type, function( next, hooks ) {
		var timeout = window.setTimeout( next, time );
		hooks.stop = function() {
			window.clearTimeout( timeout );
		};
	} );
};


( function() {
	var input = document.createElement( "input" ),
		select = document.createElement( "select" ),
		opt = select.appendChild( document.createElement( "option" ) );

	input.type = "checkbox";

	// Support: Android <=4.3 only
	// Default value for a checkbox should be "on"
	support.checkOn = input.value !== "";

	// Support: IE <=11 only
	// Must access selectedIndex to make default options select
	support.optSelected = opt.selected;

	// Support: IE <=11 only
	// An input loses its value after becoming a radio
	input = document.createElement( "input" );
	input.value = "t";
	input.type = "radio";
	support.radioValue = input.value === "t";
} )();


var boolHook,
	attrHandle = jQuery.expr.attrHandle;

jQuery.fn.extend( {
	attr: function( name, value ) {
		return access( this, jQuery.attr, name, value, arguments.length > 1 );
	},

	removeAttr: function( name ) {
		return this.each( function() {
			jQuery.removeAttr( this, name );
		} );
	}
} );

jQuery.extend( {
	attr: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set attributes on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === "undefined" ) {
			return jQuery.prop( elem, name, value );
		}

		// Attribute hooks are determined by the lowercase version
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
				( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
		}

		if ( value !== undefined ) {
			if ( value === null ) {
				jQuery.removeAttr( elem, name );
				return;
			}

			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			elem.setAttribute( name, value + "" );
			return value;
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		ret = jQuery.find.attr( elem, name );

		// Non-existent attributes return null, we normalize to undefined
		return ret == null ? undefined : ret;
	},

	attrHooks: {
		type: {
			set: function( elem, value ) {
				if ( !support.radioValue && value === "radio" &&
					nodeName( elem, "input" ) ) {
					var val = elem.value;
					elem.setAttribute( "type", value );
					if ( val ) {
						elem.value = val;
					}
					return value;
				}
			}
		}
	},

	removeAttr: function( elem, value ) {
		var name,
			i = 0,

			// Attribute names can contain non-HTML whitespace characters
			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
			attrNames = value && value.match( rnothtmlwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( ( name = attrNames[ i++ ] ) ) {
				elem.removeAttribute( name );
			}
		}
	}
} );

// Hooks for boolean attributes
boolHook = {
	set: function( elem, value, name ) {
		if ( value === false ) {

			// Remove boolean attributes when set to false
			jQuery.removeAttr( elem, name );
		} else {
			elem.setAttribute( name, name );
		}
		return name;
	}
};

jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
	var getter = attrHandle[ name ] || jQuery.find.attr;

	attrHandle[ name ] = function( elem, name, isXML ) {
		var ret, handle,
			lowercaseName = name.toLowerCase();

		if ( !isXML ) {

			// Avoid an infinite loop by temporarily removing this function from the getter
			handle = attrHandle[ lowercaseName ];
			attrHandle[ lowercaseName ] = ret;
			ret = getter( elem, name, isXML ) != null ?
				lowercaseName :
				null;
			attrHandle[ lowercaseName ] = handle;
		}
		return ret;
	};
} );




var rfocusable = /^(?:input|select|textarea|button)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		return this.each( function() {
			delete this[ jQuery.propFix[ name ] || name ];
		} );
	}
} );

jQuery.extend( {
	prop: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set properties on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {

			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			return ( elem[ name ] = value );
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		return elem[ name ];
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {

				// Support: IE <=9 - 11 only
				// elem.tabIndex doesn't always return the
				// correct value when it hasn't been explicitly set
				// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
				// Use proper attribute retrieval(#12072)
				var tabindex = jQuery.find.attr( elem, "tabindex" );

				if ( tabindex ) {
					return parseInt( tabindex, 10 );
				}

				if (
					rfocusable.test( elem.nodeName ) ||
					rclickable.test( elem.nodeName ) &&
					elem.href
				) {
					return 0;
				}

				return -1;
			}
		}
	},

	propFix: {
		"for": "htmlFor",
		"class": "className"
	}
} );

// Support: IE <=11 only
// Accessing the selectedIndex property
// forces the browser to respect setting selected
// on the option
// The getter ensures a default option is selected
// when in an optgroup
// eslint rule "no-unused-expressions" is disabled for this code
// since it considers such accessions noop
if ( !support.optSelected ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent && parent.parentNode ) {
				parent.parentNode.selectedIndex;
			}
			return null;
		},
		set: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent ) {
				parent.selectedIndex;

				if ( parent.parentNode ) {
					parent.parentNode.selectedIndex;
				}
			}
		}
	};
}

jQuery.each( [
	"tabIndex",
	"readOnly",
	"maxLength",
	"cellSpacing",
	"cellPadding",
	"rowSpan",
	"colSpan",
	"useMap",
	"frameBorder",
	"contentEditable"
], function() {
	jQuery.propFix[ this.toLowerCase() ] = this;
} );




	// Strip and collapse whitespace according to HTML spec
	// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
	function stripAndCollapse( value ) {
		var tokens = value.match( rnothtmlwhite ) || [];
		return tokens.join( " " );
	}


function getClass( elem ) {
	return elem.getAttribute && elem.getAttribute( "class" ) || "";
}

function classesToArray( value ) {
	if ( Array.isArray( value ) ) {
		return value;
	}
	if ( typeof value === "string" ) {
		return value.match( rnothtmlwhite ) || [];
	}
	return [];
}

jQuery.fn.extend( {
	addClass: function( value ) {
		var classes, elem, cur, curValue, clazz, j, finalValue,
			i = 0;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		classes = classesToArray( value );

		if ( classes.length ) {
			while ( ( elem = this[ i++ ] ) ) {
				curValue = getClass( elem );
				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					j = 0;
					while ( ( clazz = classes[ j++ ] ) ) {
						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
							cur += clazz + " ";
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						elem.setAttribute( "class", finalValue );
					}
				}
			}
		}

		return this;
	},

	removeClass: function( value ) {
		var classes, elem, cur, curValue, clazz, j, finalValue,
			i = 0;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( !arguments.length ) {
			return this.attr( "class", "" );
		}

		classes = classesToArray( value );

		if ( classes.length ) {
			while ( ( elem = this[ i++ ] ) ) {
				curValue = getClass( elem );

				// This expression is here for better compressibility (see addClass)
				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					j = 0;
					while ( ( clazz = classes[ j++ ] ) ) {

						// Remove *all* instances
						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
							cur = cur.replace( " " + clazz + " ", " " );
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						elem.setAttribute( "class", finalValue );
					}
				}
			}
		}

		return this;
	},

	toggleClass: function( value, stateVal ) {
		var type = typeof value,
			isValidValue = type === "string" || Array.isArray( value );

		if ( typeof stateVal === "boolean" && isValidValue ) {
			return stateVal ? this.addClass( value ) : this.removeClass( value );
		}

		if ( isFunction( value ) ) {
			return this.each( function( i ) {
				jQuery( this ).toggleClass(
					value.call( this, i, getClass( this ), stateVal ),
					stateVal
				);
			} );
		}

		return this.each( function() {
			var className, i, self, classNames;

			if ( isValidValue ) {

				// Toggle individual class names
				i = 0;
				self = jQuery( this );
				classNames = classesToArray( value );

				while ( ( className = classNames[ i++ ] ) ) {

					// Check each className given, space separated list
					if ( self.hasClass( className ) ) {
						self.removeClass( className );
					} else {
						self.addClass( className );
					}
				}

			// Toggle whole class name
			} else if ( value === undefined || type === "boolean" ) {
				className = getClass( this );
				if ( className ) {

					// Store className if set
					dataPriv.set( this, "__className__", className );
				}

				// If the element has a class name or if we're passed `false`,
				// then remove the whole classname (if there was one, the above saved it).
				// Otherwise bring back whatever was previously saved (if anything),
				// falling back to the empty string if nothing was stored.
				if ( this.setAttribute ) {
					this.setAttribute( "class",
						className || value === false ?
						"" :
						dataPriv.get( this, "__className__" ) || ""
					);
				}
			}
		} );
	},

	hasClass: function( selector ) {
		var className, elem,
			i = 0;

		className = " " + selector + " ";
		while ( ( elem = this[ i++ ] ) ) {
			if ( elem.nodeType === 1 &&
				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
					return true;
			}
		}

		return false;
	}
} );




var rreturn = /\r/g;

jQuery.fn.extend( {
	val: function( value ) {
		var hooks, ret, valueIsFunction,
			elem = this[ 0 ];

		if ( !arguments.length ) {
			if ( elem ) {
				hooks = jQuery.valHooks[ elem.type ] ||
					jQuery.valHooks[ elem.nodeName.toLowerCase() ];

				if ( hooks &&
					"get" in hooks &&
					( ret = hooks.get( elem, "value" ) ) !== undefined
				) {
					return ret;
				}

				ret = elem.value;

				// Handle most common string cases
				if ( typeof ret === "string" ) {
					return ret.replace( rreturn, "" );
				}

				// Handle cases where value is null/undef or number
				return ret == null ? "" : ret;
			}

			return;
		}

		valueIsFunction = isFunction( value );

		return this.each( function( i ) {
			var val;

			if ( this.nodeType !== 1 ) {
				return;
			}

			if ( valueIsFunction ) {
				val = value.call( this, i, jQuery( this ).val() );
			} else {
				val = value;
			}

			// Treat null/undefined as ""; convert numbers to string
			if ( val == null ) {
				val = "";

			} else if ( typeof val === "number" ) {
				val += "";

			} else if ( Array.isArray( val ) ) {
				val = jQuery.map( val, function( value ) {
					return value == null ? "" : value + "";
				} );
			}

			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];

			// If set returns undefined, fall back to normal setting
			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
				this.value = val;
			}
		} );
	}
} );

jQuery.extend( {
	valHooks: {
		option: {
			get: function( elem ) {

				var val = jQuery.find.attr( elem, "value" );
				return val != null ?
					val :

					// Support: IE <=10 - 11 only
					// option.text throws exceptions (#14686, #14858)
					// Strip and collapse whitespace
					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
					stripAndCollapse( jQuery.text( elem ) );
			}
		},
		select: {
			get: function( elem ) {
				var value, option, i,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one",
					values = one ? null : [],
					max = one ? index + 1 : options.length;

				if ( index < 0 ) {
					i = max;

				} else {
					i = one ? index : 0;
				}

				// Loop through all the selected options
				for ( ; i < max; i++ ) {
					option = options[ i ];

					// Support: IE <=9 only
					// IE8-9 doesn't update selected after form reset (#2551)
					if ( ( option.selected || i === index ) &&

							// Don't return options that are disabled or in a disabled optgroup
							!option.disabled &&
							( !option.parentNode.disabled ||
								!nodeName( option.parentNode, "optgroup" ) ) ) {

						// Get the specific value for the option
						value = jQuery( option ).val();

						// We don't need an array for one selects
						if ( one ) {
							return value;
						}

						// Multi-Selects return an array
						values.push( value );
					}
				}

				return values;
			},

			set: function( elem, value ) {
				var optionSet, option,
					options = elem.options,
					values = jQuery.makeArray( value ),
					i = options.length;

				while ( i-- ) {
					option = options[ i ];

					/* eslint-disable no-cond-assign */

					if ( option.selected =
						jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
					) {
						optionSet = true;
					}

					/* eslint-enable no-cond-assign */
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}
				return values;
			}
		}
	}
} );

// Radios and checkboxes getter/setter
jQuery.each( [ "radio", "checkbox" ], function() {
	jQuery.valHooks[ this ] = {
		set: function( elem, value ) {
			if ( Array.isArray( value ) ) {
				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
			}
		}
	};
	if ( !support.checkOn ) {
		jQuery.valHooks[ this ].get = function( elem ) {
			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
		};
	}
} );




// Return jQuery for attributes-only inclusion


support.focusin = "onfocusin" in window;


var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	stopPropagationCallback = function( e ) {
		e.stopPropagation();
	};

jQuery.extend( jQuery.event, {

	trigger: function( event, data, elem, onlyHandlers ) {

		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
			eventPath = [ elem || document ],
			type = hasOwn.call( event, "type" ) ? event.type : event,
			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];

		cur = lastElement = tmp = elem = elem || document;

		// Don't do events on text and comment nodes
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
			return;
		}

		// focus/blur morphs to focusin/out; ensure we're not firing them right now
		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
			return;
		}

		if ( type.indexOf( "." ) > -1 ) {

			// Namespaced trigger; create a regexp to match event type in handle()
			namespaces = type.split( "." );
			type = namespaces.shift();
			namespaces.sort();
		}
		ontype = type.indexOf( ":" ) < 0 && "on" + type;

		// Caller can pass in a jQuery.Event object, Object, or just an event type string
		event = event[ jQuery.expando ] ?
			event :
			new jQuery.Event( type, typeof event === "object" && event );

		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
		event.isTrigger = onlyHandlers ? 2 : 3;
		event.namespace = namespaces.join( "." );
		event.rnamespace = event.namespace ?
			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
			null;

		// Clean up the event in case it is being reused
		event.result = undefined;
		if ( !event.target ) {
			event.target = elem;
		}

		// Clone any incoming data and prepend the event, creating the handler arg list
		data = data == null ?
			[ event ] :
			jQuery.makeArray( data, [ event ] );

		// Allow special events to draw outside the lines
		special = jQuery.event.special[ type ] || {};
		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
			return;
		}

		// Determine event propagation path in advance, per W3C events spec (#9951)
		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {

			bubbleType = special.delegateType || type;
			if ( !rfocusMorph.test( bubbleType + type ) ) {
				cur = cur.parentNode;
			}
			for ( ; cur; cur = cur.parentNode ) {
				eventPath.push( cur );
				tmp = cur;
			}

			// Only add window if we got to document (e.g., not plain obj or detached DOM)
			if ( tmp === ( elem.ownerDocument || document ) ) {
				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
			}
		}

		// Fire handlers on the event path
		i = 0;
		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
			lastElement = cur;
			event.type = i > 1 ?
				bubbleType :
				special.bindType || type;

			// jQuery handler
			handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
				dataPriv.get( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && acceptData( cur ) ) {
				event.result = handle.apply( cur, data );
				if ( event.result === false ) {
					event.preventDefault();
				}
			}
		}
		event.type = type;

		// If nobody prevented the default action, do it now
		if ( !onlyHandlers && !event.isDefaultPrevented() ) {

			if ( ( !special._default ||
				special._default.apply( eventPath.pop(), data ) === false ) &&
				acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name as the event.
				// Don't do default actions on window, that's where global variables be (#6170)
				if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {

					// Don't re-trigger an onFOO event when we call its FOO() method
					tmp = elem[ ontype ];

					if ( tmp ) {
						elem[ ontype ] = null;
					}

					// Prevent re-triggering of the same event, since we already bubbled it above
					jQuery.event.triggered = type;

					if ( event.isPropagationStopped() ) {
						lastElement.addEventListener( type, stopPropagationCallback );
					}

					elem[ type ]();

					if ( event.isPropagationStopped() ) {
						lastElement.removeEventListener( type, stopPropagationCallback );
					}

					jQuery.event.triggered = undefined;

					if ( tmp ) {
						elem[ ontype ] = tmp;
					}
				}
			}
		}

		return event.result;
	},

	// Piggyback on a donor event to simulate a different one
	// Used only for `focus(in | out)` events
	simulate: function( type, elem, event ) {
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true
			}
		);

		jQuery.event.trigger( e, null, elem );
	}

} );

jQuery.fn.extend( {

	trigger: function( type, data ) {
		return this.each( function() {
			jQuery.event.trigger( type, data, this );
		} );
	},
	triggerHandler: function( type, data ) {
		var elem = this[ 0 ];
		if ( elem ) {
			return jQuery.event.trigger( type, data, elem, true );
		}
	}
} );


// Support: Firefox <=44
// Firefox doesn't have focus(in | out) events
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
//
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
// focus(in | out) events fire after focus & blur events,
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
if ( !support.focusin ) {
	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {

		// Attach a single capturing handler on the document while someone wants focusin/focusout
		var handler = function( event ) {
			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
		};

		jQuery.event.special[ fix ] = {
			setup: function() {
				var doc = this.ownerDocument || this,
					attaches = dataPriv.access( doc, fix );

				if ( !attaches ) {
					doc.addEventListener( orig, handler, true );
				}
				dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
			},
			teardown: function() {
				var doc = this.ownerDocument || this,
					attaches = dataPriv.access( doc, fix ) - 1;

				if ( !attaches ) {
					doc.removeEventListener( orig, handler, true );
					dataPriv.remove( doc, fix );

				} else {
					dataPriv.access( doc, fix, attaches );
				}
			}
		};
	} );
}
var location = window.location;

var nonce = Date.now();

var rquery = ( /\?/ );



// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE 9 - 11 only
	// IE throws on parseFromString with invalid input.
	try {
		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
	} catch ( e ) {
		xml = undefined;
	}

	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
		jQuery.error( "Invalid XML: " + data );
	}
	return xml;
};


var
	rbracket = /\[\]$/,
	rCRLF = /\r?\n/g,
	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
	rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {
	var name;

	if ( Array.isArray( obj ) ) {

		// Serialize array item.
		jQuery.each( obj, function( i, v ) {
			if ( traditional || rbracket.test( prefix ) ) {

				// Treat each array item as a scalar.
				add( prefix, v );

			} else {

				// Item is non-scalar (array or object), encode its numeric index.
				buildParams(
					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
					v,
					traditional,
					add
				);
			}
		} );

	} else if ( !traditional && toType( obj ) === "object" ) {

		// Serialize object item.
		for ( name in obj ) {
			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
		}

	} else {

		// Serialize scalar item.
		add( prefix, obj );
	}
}

// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
	var prefix,
		s = [],
		add = function( key, valueOrFunction ) {

			// If value is a function, invoke it and use its return value
			var value = isFunction( valueOrFunction ) ?
				valueOrFunction() :
				valueOrFunction;

			s[ s.length ] = encodeURIComponent( key ) + "=" +
				encodeURIComponent( value == null ? "" : value );
		};

	if ( a == null ) {
		return "";
	}

	// If an array was passed in, assume that it is an array of form elements.
	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {

		// Serialize the form elements
		jQuery.each( a, function() {
			add( this.name, this.value );
		} );

	} else {

		// If traditional, encode the "old" way (the way 1.3.2 or older
		// did it), otherwise encode params recursively.
		for ( prefix in a ) {
			buildParams( prefix, a[ prefix ], traditional, add );
		}
	}

	// Return the resulting serialization
	return s.join( "&" );
};

jQuery.fn.extend( {
	serialize: function() {
		return jQuery.param( this.serializeArray() );
	},
	serializeArray: function() {
		return this.map( function() {

			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		} )
		.filter( function() {
			var type = this.type;

			// Use .is( ":disabled" ) so that fieldset[disabled] works
			return this.name && !jQuery( this ).is( ":disabled" ) &&
				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
				( this.checked || !rcheckableType.test( type ) );
		} )
		.map( function( i, elem ) {
			var val = jQuery( this ).val();

			if ( val == null ) {
				return null;
			}

			if ( Array.isArray( val ) ) {
				return jQuery.map( val, function( val ) {
					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
				} );
			}

			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		} ).get();
	}
} );


var
	r20 = /%20/g,
	rhash = /#.*$/,
	rantiCache = /([?&])_=[^&]*/,
	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,

	// #7653, #8125, #8152: local protocol detection
	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
	rnoContent = /^(?:GET|HEAD)$/,
	rprotocol = /^\/\//,

	/* Prefilters
	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
	 * 2) These are called:
	 *    - BEFORE asking for a transport
	 *    - AFTER param serialization (s.data is a string if s.processData is true)
	 * 3) key is the dataType
	 * 4) the catchall symbol "*" can be used
	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
	 */
	prefilters = {},

	/* Transports bindings
	 * 1) key is the dataType
	 * 2) the catchall symbol "*" can be used
	 * 3) selection will start with transport dataType and THEN go to "*" if needed
	 */
	transports = {},

	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
	allTypes = "*/".concat( "*" ),

	// Anchor tag for parsing the document origin
	originAnchor = document.createElement( "a" );
	originAnchor.href = location.href;

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {

	// dataTypeExpression is optional and defaults to "*"
	return function( dataTypeExpression, func ) {

		if ( typeof dataTypeExpression !== "string" ) {
			func = dataTypeExpression;
			dataTypeExpression = "*";
		}

		var dataType,
			i = 0,
			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];

		if ( isFunction( func ) ) {

			// For each dataType in the dataTypeExpression
			while ( ( dataType = dataTypes[ i++ ] ) ) {

				// Prepend if requested
				if ( dataType[ 0 ] === "+" ) {
					dataType = dataType.slice( 1 ) || "*";
					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );

				// Otherwise append
				} else {
					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
				}
			}
		}
	};
}

// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {

	var inspected = {},
		seekingTransport = ( structure === transports );

	function inspect( dataType ) {
		var selected;
		inspected[ dataType ] = true;
		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
			if ( typeof dataTypeOrTransport === "string" &&
				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {

				options.dataTypes.unshift( dataTypeOrTransport );
				inspect( dataTypeOrTransport );
				return false;
			} else if ( seekingTransport ) {
				return !( selected = dataTypeOrTransport );
			}
		} );
		return selected;
	}

	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}

// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
function ajaxExtend( target, src ) {
	var key, deep,
		flatOptions = jQuery.ajaxSettings.flatOptions || {};

	for ( key in src ) {
		if ( src[ key ] !== undefined ) {
			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
		}
	}
	if ( deep ) {
		jQuery.extend( true, target, deep );
	}

	return target;
}

/* Handles responses to an ajax request:
 * - finds the right dataType (mediates between content-type and expected dataType)
 * - returns the corresponding response
 */
function ajaxHandleResponses( s, jqXHR, responses ) {

	var ct, type, finalDataType, firstDataType,
		contents = s.contents,
		dataTypes = s.dataTypes;

	// Remove auto dataType and get content-type in the process
	while ( dataTypes[ 0 ] === "*" ) {
		dataTypes.shift();
		if ( ct === undefined ) {
			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
		}
	}

	// Check if we're dealing with a known content-type
	if ( ct ) {
		for ( type in contents ) {
			if ( contents[ type ] && contents[ type ].test( ct ) ) {
				dataTypes.unshift( type );
				break;
			}
		}
	}

	// Check to see if we have a response for the expected dataType
	if ( dataTypes[ 0 ] in responses ) {
		finalDataType = dataTypes[ 0 ];
	} else {

		// Try convertible dataTypes
		for ( type in responses ) {
			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
				finalDataType = type;
				break;
			}
			if ( !firstDataType ) {
				firstDataType = type;
			}
		}

		// Or just use first one
		finalDataType = finalDataType || firstDataType;
	}

	// If we found a dataType
	// We add the dataType to the list if needed
	// and return the corresponding response
	if ( finalDataType ) {
		if ( finalDataType !== dataTypes[ 0 ] ) {
			dataTypes.unshift( finalDataType );
		}
		return responses[ finalDataType ];
	}
}

/* Chain conversions given the request and the original response
 * Also sets the responseXXX fields on the jqXHR instance
 */
function ajaxConvert( s, response, jqXHR, isSuccess ) {
	var conv2, current, conv, tmp, prev,
		converters = {},

		// Work with a copy of dataTypes in case we need to modify it for conversion
		dataTypes = s.dataTypes.slice();

	// Create converters map with lowercased keys
	if ( dataTypes[ 1 ] ) {
		for ( conv in s.converters ) {
			converters[ conv.toLowerCase() ] = s.converters[ conv ];
		}
	}

	current = dataTypes.shift();

	// Convert to each sequential dataType
	while ( current ) {

		if ( s.responseFields[ current ] ) {
			jqXHR[ s.responseFields[ current ] ] = response;
		}

		// Apply the dataFilter if provided
		if ( !prev && isSuccess && s.dataFilter ) {
			response = s.dataFilter( response, s.dataType );
		}

		prev = current;
		current = dataTypes.shift();

		if ( current ) {

			// There's only work to do if current dataType is non-auto
			if ( current === "*" ) {

				current = prev;

			// Convert response if prev dataType is non-auto and differs from current
			} else if ( prev !== "*" && prev !== current ) {

				// Seek a direct converter
				conv = converters[ prev + " " + current ] || converters[ "* " + current ];

				// If none found, seek a pair
				if ( !conv ) {
					for ( conv2 in converters ) {

						// If conv2 outputs current
						tmp = conv2.split( " " );
						if ( tmp[ 1 ] === current ) {

							// If prev can be converted to accepted input
							conv = converters[ prev + " " + tmp[ 0 ] ] ||
								converters[ "* " + tmp[ 0 ] ];
							if ( conv ) {

								// Condense equivalence converters
								if ( conv === true ) {
									conv = converters[ conv2 ];

								// Otherwise, insert the intermediate dataType
								} else if ( converters[ conv2 ] !== true ) {
									current = tmp[ 0 ];
									dataTypes.unshift( tmp[ 1 ] );
								}
								break;
							}
						}
					}
				}

				// Apply converter (if not an equivalence)
				if ( conv !== true ) {

					// Unless errors are allowed to bubble, catch and return them
					if ( conv && s.throws ) {
						response = conv( response );
					} else {
						try {
							response = conv( response );
						} catch ( e ) {
							return {
								state: "parsererror",
								error: conv ? e : "No conversion from " + prev + " to " + current
							};
						}
					}
				}
			}
		}
	}

	return { state: "success", data: response };
}

jQuery.extend( {

	// Counter for holding the number of active queries
	active: 0,

	// Last-Modified header cache for next request
	lastModified: {},
	etag: {},

	ajaxSettings: {
		url: location.href,
		type: "GET",
		isLocal: rlocalProtocol.test( location.protocol ),
		global: true,
		processData: true,
		async: true,
		contentType: "application/x-www-form-urlencoded; charset=UTF-8",

		/*
		timeout: 0,
		data: null,
		dataType: null,
		username: null,
		password: null,
		cache: null,
		throws: false,
		traditional: false,
		headers: {},
		*/

		accepts: {
			"*": allTypes,
			text: "text/plain",
			html: "text/html",
			xml: "application/xml, text/xml",
			json: "application/json, text/javascript"
		},

		contents: {
			xml: /\bxml\b/,
			html: /\bhtml/,
			json: /\bjson\b/
		},

		responseFields: {
			xml: "responseXML",
			text: "responseText",
			json: "responseJSON"
		},

		// Data converters
		// Keys separate source (or catchall "*") and destination types with a single space
		converters: {

			// Convert anything to text
			"* text": String,

			// Text to html (true = no transformation)
			"text html": true,

			// Evaluate text as a json expression
			"text json": JSON.parse,

			// Parse text as xml
			"text xml": jQuery.parseXML
		},

		// For options that shouldn't be deep extended:
		// you can add your own custom options here if
		// and when you create one that shouldn't be
		// deep extended (see ajaxExtend)
		flatOptions: {
			url: true,
			context: true
		}
	},

	// Creates a full fledged settings object into target
	// with both ajaxSettings and settings fields.
	// If target is omitted, writes into ajaxSettings.
	ajaxSetup: function( target, settings ) {
		return settings ?

			// Building a settings object
			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :

			// Extending ajaxSettings
			ajaxExtend( jQuery.ajaxSettings, target );
	},

	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
	ajaxTransport: addToPrefiltersOrTransports( transports ),

	// Main method
	ajax: function( url, options ) {

		// If url is an object, simulate pre-1.5 signature
		if ( typeof url === "object" ) {
			options = url;
			url = undefined;
		}

		// Force options to be an object
		options = options || {};

		var transport,

			// URL without anti-cache param
			cacheURL,

			// Response headers
			responseHeadersString,
			responseHeaders,

			// timeout handle
			timeoutTimer,

			// Url cleanup var
			urlAnchor,

			// Request state (becomes false upon send and true upon completion)
			completed,

			// To know if global events are to be dispatched
			fireGlobals,

			// Loop variable
			i,

			// uncached part of the url
			uncached,

			// Create the final options object
			s = jQuery.ajaxSetup( {}, options ),

			// Callbacks context
			callbackContext = s.context || s,

			// Context for global events is callbackContext if it is a DOM node or jQuery collection
			globalEventContext = s.context &&
				( callbackContext.nodeType || callbackContext.jquery ) ?
					jQuery( callbackContext ) :
					jQuery.event,

			// Deferreds
			deferred = jQuery.Deferred(),
			completeDeferred = jQuery.Callbacks( "once memory" ),

			// Status-dependent callbacks
			statusCode = s.statusCode || {},

			// Headers (they are sent all at once)
			requestHeaders = {},
			requestHeadersNames = {},

			// Default abort message
			strAbort = "canceled",

			// Fake xhr
			jqXHR = {
				readyState: 0,

				// Builds headers hashtable if needed
				getResponseHeader: function( key ) {
					var match;
					if ( completed ) {
						if ( !responseHeaders ) {
							responseHeaders = {};
							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
								responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
									( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
										.concat( match[ 2 ] );
							}
						}
						match = responseHeaders[ key.toLowerCase() + " " ];
					}
					return match == null ? null : match.join( ", " );
				},

				// Raw string
				getAllResponseHeaders: function() {
					return completed ? responseHeadersString : null;
				},

				// Caches the header
				setRequestHeader: function( name, value ) {
					if ( completed == null ) {
						name = requestHeadersNames[ name.toLowerCase() ] =
							requestHeadersNames[ name.toLowerCase() ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				},

				// Overrides response content-type header
				overrideMimeType: function( type ) {
					if ( completed == null ) {
						s.mimeType = type;
					}
					return this;
				},

				// Status-dependent callbacks
				statusCode: function( map ) {
					var code;
					if ( map ) {
						if ( completed ) {

							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						} else {

							// Lazy-add the new callbacks in a way that preserves old ones
							for ( code in map ) {
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						}
					}
					return this;
				},

				// Cancel the request
				abort: function( statusText ) {
					var finalText = statusText || strAbort;
					if ( transport ) {
						transport.abort( finalText );
					}
					done( 0, finalText );
					return this;
				}
			};

		// Attach deferreds
		deferred.promise( jqXHR );

		// Add protocol if not provided (prefilters might expect it)
		// Handle falsy url in the settings object (#10093: consistency with old signature)
		// We also use the url parameter if available
		s.url = ( ( url || s.url || location.href ) + "" )
			.replace( rprotocol, location.protocol + "//" );

		// Alias method option to type as per ticket #12004
		s.type = options.method || options.type || s.method || s.type;

		// Extract dataTypes list
		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];

		// A cross-domain request is in order when the origin doesn't match the current origin.
		if ( s.crossDomain == null ) {
			urlAnchor = document.createElement( "a" );

			// Support: IE <=8 - 11, Edge 12 - 15
			// IE throws exception on accessing the href property if url is malformed,
			// e.g. http://example.com:80x/
			try {
				urlAnchor.href = s.url;

				// Support: IE <=8 - 11 only
				// Anchor's host property isn't correctly set when s.url is relative
				urlAnchor.href = urlAnchor.href;
				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
					urlAnchor.protocol + "//" + urlAnchor.host;
			} catch ( e ) {

				// If there is an error parsing the URL, assume it is crossDomain,
				// it can be rejected by the transport if it is invalid
				s.crossDomain = true;
			}
		}

		// Convert data if not already a string
		if ( s.data && s.processData && typeof s.data !== "string" ) {
			s.data = jQuery.param( s.data, s.traditional );
		}

		// Apply prefilters
		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );

		// If request was aborted inside a prefilter, stop there
		if ( completed ) {
			return jqXHR;
		}

		// We can fire global events as of now if asked to
		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
		fireGlobals = jQuery.event && s.global;

		// Watch for a new set of requests
		if ( fireGlobals && jQuery.active++ === 0 ) {
			jQuery.event.trigger( "ajaxStart" );
		}

		// Uppercase the type
		s.type = s.type.toUpperCase();

		// Determine if request has content
		s.hasContent = !rnoContent.test( s.type );

		// Save the URL in case we're toying with the If-Modified-Since
		// and/or If-None-Match header later on
		// Remove hash to simplify url manipulation
		cacheURL = s.url.replace( rhash, "" );

		// More options handling for requests with no content
		if ( !s.hasContent ) {

			// Remember the hash so we can put it back
			uncached = s.url.slice( cacheURL.length );

			// If data is available and should be processed, append data to url
			if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;

				// #9682: remove data so that it's not used in an eventual retry
				delete s.data;
			}

			// Add or update anti-cache param if needed
			if ( s.cache === false ) {
				cacheURL = cacheURL.replace( rantiCache, "$1" );
				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
			}

			// Put hash and anti-cache on the URL that will be requested (gh-1732)
			s.url = cacheURL + uncached;

		// Change '%20' to '+' if this is encoded form body content (gh-2658)
		} else if ( s.data && s.processData &&
			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
			s.data = s.data.replace( r20, "+" );
		}

		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
		if ( s.ifModified ) {
			if ( jQuery.lastModified[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
			}
			if ( jQuery.etag[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
			}
		}

		// Set the correct header, if data is being sent
		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
			jqXHR.setRequestHeader( "Content-Type", s.contentType );
		}

		// Set the Accepts header for the server, depending on the dataType
		jqXHR.setRequestHeader(
			"Accept",
			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
				s.accepts[ s.dataTypes[ 0 ] ] +
					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
				s.accepts[ "*" ]
		);

		// Check for headers option
		for ( i in s.headers ) {
			jqXHR.setRequestHeader( i, s.headers[ i ] );
		}

		// Allow custom headers/mimetypes and early abort
		if ( s.beforeSend &&
			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {

			// Abort if not done already and return
			return jqXHR.abort();
		}

		// Aborting is no longer a cancellation
		strAbort = "abort";

		// Install callbacks on deferreds
		completeDeferred.add( s.complete );
		jqXHR.done( s.success );
		jqXHR.fail( s.error );

		// Get transport
		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );

		// If no transport, we auto-abort
		if ( !transport ) {
			done( -1, "No Transport" );
		} else {
			jqXHR.readyState = 1;

			// Send global event
			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
			}

			// If request was aborted inside ajaxSend, stop there
			if ( completed ) {
				return jqXHR;
			}

			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = window.setTimeout( function() {
					jqXHR.abort( "timeout" );
				}, s.timeout );
			}

			try {
				completed = false;
				transport.send( requestHeaders, done );
			} catch ( e ) {

				// Rethrow post-completion exceptions
				if ( completed ) {
					throw e;
				}

				// Propagate others as results
				done( -1, e );
			}
		}

		// Callback for when everything is done
		function done( status, nativeStatusText, responses, headers ) {
			var isSuccess, success, error, response, modified,
				statusText = nativeStatusText;

			// Ignore repeat invocations
			if ( completed ) {
				return;
			}

			completed = true;

			// Clear timeout if it exists
			if ( timeoutTimer ) {
				window.clearTimeout( timeoutTimer );
			}

			// Dereference transport for early garbage collection
			// (no matter how long the jqXHR object will be used)
			transport = undefined;

			// Cache response headers
			responseHeadersString = headers || "";

			// Set readyState
			jqXHR.readyState = status > 0 ? 4 : 0;

			// Determine if successful
			isSuccess = status >= 200 && status < 300 || status === 304;

			// Get response data
			if ( responses ) {
				response = ajaxHandleResponses( s, jqXHR, responses );
			}

			// Convert no matter what (that way responseXXX fields are always set)
			response = ajaxConvert( s, response, jqXHR, isSuccess );

			// If successful, handle type chaining
			if ( isSuccess ) {

				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
				if ( s.ifModified ) {
					modified = jqXHR.getResponseHeader( "Last-Modified" );
					if ( modified ) {
						jQuery.lastModified[ cacheURL ] = modified;
					}
					modified = jqXHR.getResponseHeader( "etag" );
					if ( modified ) {
						jQuery.etag[ cacheURL ] = modified;
					}
				}

				// if no content
				if ( status === 204 || s.type === "HEAD" ) {
					statusText = "nocontent";

				// if not modified
				} else if ( status === 304 ) {
					statusText = "notmodified";

				// If we have data, let's convert it
				} else {
					statusText = response.state;
					success = response.data;
					error = response.error;
					isSuccess = !error;
				}
			} else {

				// Extract error from statusText and normalize for non-aborts
				error = statusText;
				if ( status || !statusText ) {
					statusText = "error";
					if ( status < 0 ) {
						status = 0;
					}
				}
			}

			// Set data for the fake xhr object
			jqXHR.status = status;
			jqXHR.statusText = ( nativeStatusText || statusText ) + "";

			// Success/Error
			if ( isSuccess ) {
				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
			} else {
				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
			}

			// Status-dependent callbacks
			jqXHR.statusCode( statusCode );
			statusCode = undefined;

			if ( fireGlobals ) {
				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
					[ jqXHR, s, isSuccess ? success : error ] );
			}

			// Complete
			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );

			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );

				// Handle the global AJAX counter
				if ( !( --jQuery.active ) ) {
					jQuery.event.trigger( "ajaxStop" );
				}
			}
		}

		return jqXHR;
	},

	getJSON: function( url, data, callback ) {
		return jQuery.get( url, data, callback, "json" );
	},

	getScript: function( url, callback ) {
		return jQuery.get( url, undefined, callback, "script" );
	}
} );

jQuery.each( [ "get", "post" ], function( i, method ) {
	jQuery[ method ] = function( url, data, callback, type ) {

		// Shift arguments if data argument was omitted
		if ( isFunction( data ) ) {
			type = type || callback;
			callback = data;
			data = undefined;
		}

		// The url can be an options object (which then must have .url)
		return jQuery.ajax( jQuery.extend( {
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		}, jQuery.isPlainObject( url ) && url ) );
	};
} );


jQuery._evalUrl = function( url, options ) {
	return jQuery.ajax( {
		url: url,

		// Make this explicit, since user can override this through ajaxSetup (#11264)
		type: "GET",
		dataType: "script",
		cache: true,
		async: false,
		global: false,

		// Only evaluate the response if it is successful (gh-4126)
		// dataFilter is not invoked for failure responses, so using it instead
		// of the default converter is kludgy but it works.
		converters: {
			"text script": function() {}
		},
		dataFilter: function( response ) {
			jQuery.globalEval( response, options );
		}
	} );
};


jQuery.fn.extend( {
	wrapAll: function( html ) {
		var wrap;

		if ( this[ 0 ] ) {
			if ( isFunction( html ) ) {
				html = html.call( this[ 0 ] );
			}

			// The elements to wrap the target around
			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );

			if ( this[ 0 ].parentNode ) {
				wrap.insertBefore( this[ 0 ] );
			}

			wrap.map( function() {
				var elem = this;

				while ( elem.firstElementChild ) {
					elem = elem.firstElementChild;
				}

				return elem;
			} ).append( this );
		}

		return this;
	},

	wrapInner: function( html ) {
		if ( isFunction( html ) ) {
			return this.each( function( i ) {
				jQuery( this ).wrapInner( html.call( this, i ) );
			} );
		}

		return this.each( function() {
			var self = jQuery( this ),
				contents = self.contents();

			if ( contents.length ) {
				contents.wrapAll( html );

			} else {
				self.append( html );
			}
		} );
	},

	wrap: function( html ) {
		var htmlIsFunction = isFunction( html );

		return this.each( function( i ) {
			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
		} );
	},

	unwrap: function( selector ) {
		this.parent( selector ).not( "body" ).each( function() {
			jQuery( this ).replaceWith( this.childNodes );
		} );
		return this;
	}
} );


jQuery.expr.pseudos.hidden = function( elem ) {
	return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};




jQuery.ajaxSettings.xhr = function() {
	try {
		return new window.XMLHttpRequest();
	} catch ( e ) {}
};

var xhrSuccessStatus = {

		// File protocol always yields status code 0, assume 200
		0: 200,

		// Support: IE <=9 only
		// #1450: sometimes IE returns 1223 when it should be 204
		1223: 204
	},
	xhrSupported = jQuery.ajaxSettings.xhr();

support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;

jQuery.ajaxTransport( function( options ) {
	var callback, errorCallback;

	// Cross domain only allowed if supported through XMLHttpRequest
	if ( support.cors || xhrSupported && !options.crossDomain ) {
		return {
			send: function( headers, complete ) {
				var i,
					xhr = options.xhr();

				xhr.open(
					options.type,
					options.url,
					options.async,
					options.username,
					options.password
				);

				// Apply custom fields if provided
				if ( options.xhrFields ) {
					for ( i in options.xhrFields ) {
						xhr[ i ] = options.xhrFields[ i ];
					}
				}

				// Override mime type if needed
				if ( options.mimeType && xhr.overrideMimeType ) {
					xhr.overrideMimeType( options.mimeType );
				}

				// X-Requested-With header
				// For cross-domain requests, seeing as conditions for a preflight are
				// akin to a jigsaw puzzle, we simply never set it to be sure.
				// (it can always be set on a per-request basis or even using ajaxSetup)
				// For same-domain requests, won't change header if already provided.
				if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
					headers[ "X-Requested-With" ] = "XMLHttpRequest";
				}

				// Set headers
				for ( i in headers ) {
					xhr.setRequestHeader( i, headers[ i ] );
				}

				// Callback
				callback = function( type ) {
					return function() {
						if ( callback ) {
							callback = errorCallback = xhr.onload =
								xhr.onerror = xhr.onabort = xhr.ontimeout =
									xhr.onreadystatechange = null;

							if ( type === "abort" ) {
								xhr.abort();
							} else if ( type === "error" ) {

								// Support: IE <=9 only
								// On a manual native abort, IE9 throws
								// errors on any property access that is not readyState
								if ( typeof xhr.status !== "number" ) {
									complete( 0, "error" );
								} else {
									complete(

										// File: protocol always yields status 0; see #8605, #14207
										xhr.status,
										xhr.statusText
									);
								}
							} else {
								complete(
									xhrSuccessStatus[ xhr.status ] || xhr.status,
									xhr.statusText,

									// Support: IE <=9 only
									// IE9 has no XHR2 but throws on binary (trac-11426)
									// For XHR2 non-text, let the caller handle it (gh-2498)
									( xhr.responseType || "text" ) !== "text"  ||
									typeof xhr.responseText !== "string" ?
										{ binary: xhr.response } :
										{ text: xhr.responseText },
									xhr.getAllResponseHeaders()
								);
							}
						}
					};
				};

				// Listen to events
				xhr.onload = callback();
				errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );

				// Support: IE 9 only
				// Use onreadystatechange to replace onabort
				// to handle uncaught aborts
				if ( xhr.onabort !== undefined ) {
					xhr.onabort = errorCallback;
				} else {
					xhr.onreadystatechange = function() {

						// Check readyState before timeout as it changes
						if ( xhr.readyState === 4 ) {

							// Allow onerror to be called first,
							// but that will not handle a native abort
							// Also, save errorCallback to a variable
							// as xhr.onerror cannot be accessed
							window.setTimeout( function() {
								if ( callback ) {
									errorCallback();
								}
							} );
						}
					};
				}

				// Create the abort callback
				callback = callback( "abort" );

				try {

					// Do send the request (this may raise an exception)
					xhr.send( options.hasContent && options.data || null );
				} catch ( e ) {

					// #14683: Only rethrow if this hasn't been notified as an error yet
					if ( callback ) {
						throw e;
					}
				}
			},

			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
	if ( s.crossDomain ) {
		s.contents.script = false;
	}
} );

// Install script dataType
jQuery.ajaxSetup( {
	accepts: {
		script: "text/javascript, application/javascript, " +
			"application/ecmascript, application/x-ecmascript"
	},
	contents: {
		script: /\b(?:java|ecma)script\b/
	},
	converters: {
		"text script": function( text ) {
			jQuery.globalEval( text );
			return text;
		}
	}
} );

// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {
	if ( s.cache === undefined ) {
		s.cache = false;
	}
	if ( s.crossDomain ) {
		s.type = "GET";
	}
} );

// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {

	// This transport only deals with cross domain or forced-by-attrs requests
	if ( s.crossDomain || s.scriptAttrs ) {
		var script, callback;
		return {
			send: function( _, complete ) {
				script = jQuery( "<script>" )
					.attr( s.scriptAttrs || {} )
					.prop( { charset: s.scriptCharset, src: s.url } )
					.on( "load error", callback = function( evt ) {
						script.remove();
						callback = null;
						if ( evt ) {
							complete( evt.type === "error" ? 404 : 200, evt.type );
						}
					} );

				// Use native DOM manipulation to avoid our domManip AJAX trickery
				document.head.appendChild( script[ 0 ] );
			},
			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




var oldCallbacks = [],
	rjsonp = /(=)\?(?=&|$)|\?\?/;

// Default jsonp settings
jQuery.ajaxSetup( {
	jsonp: "callback",
	jsonpCallback: function() {
		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
		this[ callback ] = true;
		return callback;
	}
} );

// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {

	var callbackName, overwritten, responseContainer,
		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
			"url" :
			typeof s.data === "string" &&
				( s.contentType || "" )
					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
				rjsonp.test( s.data ) && "data"
		);

	// Handle iff the expected data type is "jsonp" or we have a parameter to set
	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {

		// Get callback name, remembering preexisting value associated with it
		callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
			s.jsonpCallback() :
			s.jsonpCallback;

		// Insert callback into url or form data
		if ( jsonProp ) {
			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
		} else if ( s.jsonp !== false ) {
			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
		}

		// Use data converter to retrieve json after script execution
		s.converters[ "script json" ] = function() {
			if ( !responseContainer ) {
				jQuery.error( callbackName + " was not called" );
			}
			return responseContainer[ 0 ];
		};

		// Force json dataType
		s.dataTypes[ 0 ] = "json";

		// Install callback
		overwritten = window[ callbackName ];
		window[ callbackName ] = function() {
			responseContainer = arguments;
		};

		// Clean-up function (fires after converters)
		jqXHR.always( function() {

			// If previous value didn't exist - remove it
			if ( overwritten === undefined ) {
				jQuery( window ).removeProp( callbackName );

			// Otherwise restore preexisting value
			} else {
				window[ callbackName ] = overwritten;
			}

			// Save back as free
			if ( s[ callbackName ] ) {

				// Make sure that re-using the options doesn't screw things around
				s.jsonpCallback = originalSettings.jsonpCallback;

				// Save the callback name for future use
				oldCallbacks.push( callbackName );
			}

			// Call if it was a function and we have a response
			if ( responseContainer && isFunction( overwritten ) ) {
				overwritten( responseContainer[ 0 ] );
			}

			responseContainer = overwritten = undefined;
		} );

		// Delegate to script
		return "script";
	}
} );




// Support: Safari 8 only
// In Safari 8 documents created via document.implementation.createHTMLDocument
// collapse sibling forms: the second one becomes a child of the first one.
// Because of that, this security measure has to be disabled in Safari 8.
// https://bugs.webkit.org/show_bug.cgi?id=137337
support.createHTMLDocument = ( function() {
	var body = document.implementation.createHTMLDocument( "" ).body;
	body.innerHTML = "<form></form><form></form>";
	return body.childNodes.length === 2;
} )();


// Argument "data" should be string of html
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
	if ( typeof data !== "string" ) {
		return [];
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}

	var base, parsed, scripts;

	if ( !context ) {

		// Stop scripts or inline event handlers from being executed immediately
		// by using document.implementation
		if ( support.createHTMLDocument ) {
			context = document.implementation.createHTMLDocument( "" );

			// Set the base href for the created document
			// so any parsed elements with URLs
			// are based on the document's URL (gh-2965)
			base = context.createElement( "base" );
			base.href = document.location.href;
			context.head.appendChild( base );
		} else {
			context = document;
		}
	}

	parsed = rsingleTag.exec( data );
	scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[ 1 ] ) ];
	}

	parsed = buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};


/**
 * Load a url into a page
 */
jQuery.fn.load = function( url, params, callback ) {
	var selector, type, response,
		self = this,
		off = url.indexOf( " " );

	if ( off > -1 ) {
		selector = stripAndCollapse( url.slice( off ) );
		url = url.slice( 0, off );
	}

	// If it's a function
	if ( isFunction( params ) ) {

		// We assume that it's the callback
		callback = params;
		params = undefined;

	// Otherwise, build a param string
	} else if ( params && typeof params === "object" ) {
		type = "POST";
	}

	// If we have elements to modify, make the request
	if ( self.length > 0 ) {
		jQuery.ajax( {
			url: url,

			// If "type" variable is undefined, then "GET" method will be used.
			// Make value of this field explicit since
			// user can override it through ajaxSetup method
			type: type || "GET",
			dataType: "html",
			data: params
		} ).done( function( responseText ) {

			// Save response for use in complete callback
			response = arguments;

			self.html( selector ?

				// If a selector was specified, locate the right elements in a dummy div
				// Exclude scripts to avoid IE 'Permission Denied' errors
				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :

				// Otherwise use the full result
				responseText );

		// If the request succeeds, this function gets "data", "status", "jqXHR"
		// but they are ignored because response was set above.
		// If it fails, this function gets "jqXHR", "status", "error"
		} ).always( callback && function( jqXHR, status ) {
			self.each( function() {
				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
			} );
		} );
	}

	return this;
};




// Attach a bunch of functions for handling common AJAX events
jQuery.each( [
	"ajaxStart",
	"ajaxStop",
	"ajaxComplete",
	"ajaxError",
	"ajaxSuccess",
	"ajaxSend"
], function( i, type ) {
	jQuery.fn[ type ] = function( fn ) {
		return this.on( type, fn );
	};
} );




jQuery.expr.pseudos.animated = function( elem ) {
	return jQuery.grep( jQuery.timers, function( fn ) {
		return elem === fn.elem;
	} ).length;
};




jQuery.offset = {
	setOffset: function( elem, options, i ) {
		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
			position = jQuery.css( elem, "position" ),
			curElem = jQuery( elem ),
			props = {};

		// Set position first, in-case top/left are set even on static elem
		if ( position === "static" ) {
			elem.style.position = "relative";
		}

		curOffset = curElem.offset();
		curCSSTop = jQuery.css( elem, "top" );
		curCSSLeft = jQuery.css( elem, "left" );
		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;

		// Need to be able to calculate position if either
		// top or left is auto and position is either absolute or fixed
		if ( calculatePosition ) {
			curPosition = curElem.position();
			curTop = curPosition.top;
			curLeft = curPosition.left;

		} else {
			curTop = parseFloat( curCSSTop ) || 0;
			curLeft = parseFloat( curCSSLeft ) || 0;
		}

		if ( isFunction( options ) ) {

			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
		}

		if ( options.top != null ) {
			props.top = ( options.top - curOffset.top ) + curTop;
		}
		if ( options.left != null ) {
			props.left = ( options.left - curOffset.left ) + curLeft;
		}

		if ( "using" in options ) {
			options.using.call( elem, props );

		} else {
			curElem.css( props );
		}
	}
};

jQuery.fn.extend( {

	// offset() relates an element's border box to the document origin
	offset: function( options ) {

		// Preserve chaining for setter
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each( function( i ) {
					jQuery.offset.setOffset( this, options, i );
				} );
		}

		var rect, win,
			elem = this[ 0 ];

		if ( !elem ) {
			return;
		}

		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
		// Support: IE <=11 only
		// Running getBoundingClientRect on a
		// disconnected node in IE throws an error
		if ( !elem.getClientRects().length ) {
			return { top: 0, left: 0 };
		}

		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
		rect = elem.getBoundingClientRect();
		win = elem.ownerDocument.defaultView;
		return {
			top: rect.top + win.pageYOffset,
			left: rect.left + win.pageXOffset
		};
	},

	// position() relates an element's margin box to its offset parent's padding box
	// This corresponds to the behavior of CSS absolute positioning
	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset, doc,
			elem = this[ 0 ],
			parentOffset = { top: 0, left: 0 };

		// position:fixed elements are offset from the viewport, which itself always has zero offset
		if ( jQuery.css( elem, "position" ) === "fixed" ) {

			// Assume position:fixed implies availability of getBoundingClientRect
			offset = elem.getBoundingClientRect();

		} else {
			offset = this.offset();

			// Account for the *real* offset parent, which can be the document or its root element
			// when a statically positioned element is identified
			doc = elem.ownerDocument;
			offsetParent = elem.offsetParent || doc.documentElement;
			while ( offsetParent &&
				( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
				jQuery.css( offsetParent, "position" ) === "static" ) {

				offsetParent = offsetParent.parentNode;
			}
			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {

				// Incorporate borders into its offset, since they are outside its content origin
				parentOffset = jQuery( offsetParent ).offset();
				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
			}
		}

		// Subtract parent offsets and element margins
		return {
			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
		};
	},

	// This method will return documentElement in the following cases:
	// 1) For the element inside the iframe without offsetParent, this method will return
	//    documentElement of the parent window
	// 2) For the hidden or detached element
	// 3) For body or html element, i.e. in case of the html node - it will return itself
	//
	// but those exceptions were never presented as a real life use-cases
	// and might be considered as more preferable results.
	//
	// This logic, however, is not guaranteed and can change at any point in the future
	offsetParent: function() {
		return this.map( function() {
			var offsetParent = this.offsetParent;

			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
				offsetParent = offsetParent.offsetParent;
			}

			return offsetParent || documentElement;
		} );
	}
} );

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = "pageYOffset" === prop;

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {

			// Coalesce documents and windows
			var win;
			if ( isWindow( elem ) ) {
				win = elem;
			} else if ( elem.nodeType === 9 ) {
				win = elem.defaultView;
			}

			if ( val === undefined ) {
				return win ? win[ prop ] : elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : win.pageXOffset,
					top ? val : win.pageYOffset
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length );
	};
} );

// Support: Safari <=7 - 9.1, Chrome <=37 - 49
// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
// getComputedStyle returns percent when specified for top/left/bottom/right;
// rather than make the css module depend on the offset module, just check for it here
jQuery.each( [ "top", "left" ], function( i, prop ) {
	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
		function( elem, computed ) {
			if ( computed ) {
				computed = curCSS( elem, prop );

				// If curCSS returns percentage, fallback to offset
				return rnumnonpx.test( computed ) ?
					jQuery( elem ).position()[ prop ] + "px" :
					computed;
			}
		}
	);
} );


// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
		function( defaultExtra, funcName ) {

		// Margin is only for outerHeight, outerWidth
		jQuery.fn[ funcName ] = function( margin, value ) {
			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );

			return access( this, function( elem, type, value ) {
				var doc;

				if ( isWindow( elem ) ) {

					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
					return funcName.indexOf( "outer" ) === 0 ?
						elem[ "inner" + name ] :
						elem.document.documentElement[ "client" + name ];
				}

				// Get document width or height
				if ( elem.nodeType === 9 ) {
					doc = elem.documentElement;

					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
					// whichever is greatest
					return Math.max(
						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
						elem.body[ "offset" + name ], doc[ "offset" + name ],
						doc[ "client" + name ]
					);
				}

				return value === undefined ?

					// Get width or height on the element, requesting but not forcing parseFloat
					jQuery.css( elem, type, extra ) :

					// Set width or height on the element
					jQuery.style( elem, type, value, extra );
			}, type, chainable ? margin : undefined, chainable );
		};
	} );
} );


jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
	function( i, name ) {

	// Handle event binding
	jQuery.fn[ name ] = function( data, fn ) {
		return arguments.length > 0 ?
			this.on( name, null, data, fn ) :
			this.trigger( name );
	};
} );

jQuery.fn.extend( {
	hover: function( fnOver, fnOut ) {
		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
	}
} );




jQuery.fn.extend( {

	bind: function( types, data, fn ) {
		return this.on( types, null, data, fn );
	},
	unbind: function( types, fn ) {
		return this.off( types, null, fn );
	},

	delegate: function( selector, types, data, fn ) {
		return this.on( types, selector, data, fn );
	},
	undelegate: function( selector, types, fn ) {

		// ( namespace ) or ( selector, types [, fn] )
		return arguments.length === 1 ?
			this.off( selector, "**" ) :
			this.off( types, selector || "**", fn );
	}
} );

// Bind a function to a context, optionally partially applying any
// arguments.
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
// However, it is not slated for removal any time soon
jQuery.proxy = function( fn, context ) {
	var tmp, args, proxy;

	if ( typeof context === "string" ) {
		tmp = fn[ context ];
		context = fn;
		fn = tmp;
	}

	// Quick check to determine if target is callable, in the spec
	// this throws a TypeError, but we will just return undefined.
	if ( !isFunction( fn ) ) {
		return undefined;
	}

	// Simulated bind
	args = slice.call( arguments, 2 );
	proxy = function() {
		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
	};

	// Set the guid of unique handler to the same of original handler, so it can be removed
	proxy.guid = fn.guid = fn.guid || jQuery.guid++;

	return proxy;
};

jQuery.holdReady = function( hold ) {
	if ( hold ) {
		jQuery.readyWait++;
	} else {
		jQuery.ready( true );
	}
};
jQuery.isArray = Array.isArray;
jQuery.parseJSON = JSON.parse;
jQuery.nodeName = nodeName;
jQuery.isFunction = isFunction;
jQuery.isWindow = isWindow;
jQuery.camelCase = camelCase;
jQuery.type = toType;

jQuery.now = Date.now;

jQuery.isNumeric = function( obj ) {

	// As of jQuery 3.0, isNumeric is limited to
	// strings and numbers (primitives or objects)
	// that can be coerced to finite numbers (gh-2662)
	var type = jQuery.type( obj );
	return ( type === "number" || type === "string" ) &&

		// parseFloat NaNs numeric-cast false positives ("")
		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
		// subtraction forces infinities to NaN
		!isNaN( obj - parseFloat( obj ) );
};




// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

if ( true ) {
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
		return jQuery;
	}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}




var

	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,

	// Map over the $ in case of overwrite
	_$ = window.$;

jQuery.noConflict = function( deep ) {
	if ( window.$ === jQuery ) {
		window.$ = _$;
	}

	if ( deep && window.jQuery === jQuery ) {
		window.jQuery = _jQuery;
	}

	return jQuery;
};

// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( !noGlobal ) {
	window.jQuery = window.$ = jQuery;
}




return jQuery;
} );


/***/ }),

/***/ "./node_modules/pica/dist/pica.js":
/*!****************************************!*\
  !*** ./node_modules/pica/dist/pica.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var require;var require;/* pica 5.1.0 nodeca/pica */(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
// Collection of math functions
//
// 1. Combine components together
// 2. Has async init to load wasm modules
//
'use strict';

var inherits = require('inherits');

var Multimath = require('multimath');

var mm_unsharp_mask = require('multimath/lib/unsharp_mask');

var mm_resize = require('./mm_resize');

function MathLib(requested_features) {
  var __requested_features = requested_features || [];

  var features = {
    js: __requested_features.indexOf('js') >= 0,
    wasm: __requested_features.indexOf('wasm') >= 0
  };
  Multimath.call(this, features);
  this.features = {
    js: features.js,
    wasm: features.wasm && this.has_wasm()
  };
  this.use(mm_unsharp_mask);
  this.use(mm_resize);
}

inherits(MathLib, Multimath);

MathLib.prototype.resizeAndUnsharp = function resizeAndUnsharp(options, cache) {
  var result = this.resize(options, cache);

  if (options.unsharpAmount) {
    this.unsharp_mask(result, options.toWidth, options.toHeight, options.unsharpAmount, options.unsharpRadius, options.unsharpThreshold);
  }

  return result;
};

module.exports = MathLib;

},{"./mm_resize":4,"inherits":15,"multimath":16,"multimath/lib/unsharp_mask":19}],2:[function(require,module,exports){
// Resize convolvers, pure JS implementation
//
'use strict'; // Precision of fixed FP values
//var FIXED_FRAC_BITS = 14;

function clampTo8(i) {
  return i < 0 ? 0 : i > 255 ? 255 : i;
} // Convolve image in horizontal directions and transpose output. In theory,
// transpose allow:
//
// - use the same convolver for both passes (this fails due different
//   types of input array and temporary buffer)
// - making vertical pass by horisonltal lines inprove CPU cache use.
//
// But in real life this doesn't work :)
//


function convolveHorizontally(src, dest, srcW, srcH, destW, filters) {
  var r, g, b, a;
  var filterPtr, filterShift, filterSize;
  var srcPtr, srcY, destX, filterVal;
  var srcOffset = 0,
      destOffset = 0; // For each row

  for (srcY = 0; srcY < srcH; srcY++) {
    filterPtr = 0; // Apply precomputed filters to each destination row point

    for (destX = 0; destX < destW; destX++) {
      // Get the filter that determines the current output pixel.
      filterShift = filters[filterPtr++];
      filterSize = filters[filterPtr++];
      srcPtr = srcOffset + filterShift * 4 | 0;
      r = g = b = a = 0; // Apply the filter to the row to get the destination pixel r, g, b, a

      for (; filterSize > 0; filterSize--) {
        filterVal = filters[filterPtr++]; // Use reverse order to workaround deopts in old v8 (node v.10)
        // Big thanks to @mraleph (Vyacheslav Egorov) for the tip.

        a = a + filterVal * src[srcPtr + 3] | 0;
        b = b + filterVal * src[srcPtr + 2] | 0;
        g = g + filterVal * src[srcPtr + 1] | 0;
        r = r + filterVal * src[srcPtr] | 0;
        srcPtr = srcPtr + 4 | 0;
      } // Bring this value back in range. All of the filter scaling factors
      // are in fixed point with FIXED_FRAC_BITS bits of fractional part.
      //
      // (!) Add 1/2 of value before clamping to get proper rounding. In other
      // case brightness loss will be noticeable if you resize image with white
      // border and place it on white background.
      //


      dest[destOffset + 3] = clampTo8(a + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      dest[destOffset + 2] = clampTo8(b + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      dest[destOffset + 1] = clampTo8(g + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      dest[destOffset] = clampTo8(r + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      destOffset = destOffset + srcH * 4 | 0;
    }

    destOffset = (srcY + 1) * 4 | 0;
    srcOffset = (srcY + 1) * srcW * 4 | 0;
  }
} // Technically, convolvers are the same. But input array and temporary
// buffer can be of different type (especially, in old browsers). So,
// keep code in separate functions to avoid deoptimizations & speed loss.


function convolveVertically(src, dest, srcW, srcH, destW, filters) {
  var r, g, b, a;
  var filterPtr, filterShift, filterSize;
  var srcPtr, srcY, destX, filterVal;
  var srcOffset = 0,
      destOffset = 0; // For each row

  for (srcY = 0; srcY < srcH; srcY++) {
    filterPtr = 0; // Apply precomputed filters to each destination row point

    for (destX = 0; destX < destW; destX++) {
      // Get the filter that determines the current output pixel.
      filterShift = filters[filterPtr++];
      filterSize = filters[filterPtr++];
      srcPtr = srcOffset + filterShift * 4 | 0;
      r = g = b = a = 0; // Apply the filter to the row to get the destination pixel r, g, b, a

      for (; filterSize > 0; filterSize--) {
        filterVal = filters[filterPtr++]; // Use reverse order to workaround deopts in old v8 (node v.10)
        // Big thanks to @mraleph (Vyacheslav Egorov) for the tip.

        a = a + filterVal * src[srcPtr + 3] | 0;
        b = b + filterVal * src[srcPtr + 2] | 0;
        g = g + filterVal * src[srcPtr + 1] | 0;
        r = r + filterVal * src[srcPtr] | 0;
        srcPtr = srcPtr + 4 | 0;
      } // Bring this value back in range. All of the filter scaling factors
      // are in fixed point with FIXED_FRAC_BITS bits of fractional part.
      //
      // (!) Add 1/2 of value before clamping to get proper rounding. In other
      // case brightness loss will be noticeable if you resize image with white
      // border and place it on white background.
      //


      dest[destOffset + 3] = clampTo8(a + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      dest[destOffset + 2] = clampTo8(b + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      dest[destOffset + 1] = clampTo8(g + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      dest[destOffset] = clampTo8(r + (1 << 13) >> 14
      /*FIXED_FRAC_BITS*/
      );
      destOffset = destOffset + srcH * 4 | 0;
    }

    destOffset = (srcY + 1) * 4 | 0;
    srcOffset = (srcY + 1) * srcW * 4 | 0;
  }
}

module.exports = {
  convolveHorizontally: convolveHorizontally,
  convolveVertically: convolveVertically
};

},{}],3:[function(require,module,exports){
// This is autogenerated file from math.wasm, don't edit.
//
'use strict';
/* eslint-disable max-len */

module.exports = 'AGFzbQEAAAABFAJgBn9/f39/fwBgB39/f39/f38AAg8BA2VudgZtZW1vcnkCAAEDAwIAAQQEAXAAAAcZAghjb252b2x2ZQAACmNvbnZvbHZlSFYAAQkBAArmAwLBAwEQfwJAIANFDQAgBEUNACAFQQRqIRVBACEMQQAhDQNAIA0hDkEAIRFBACEHA0AgB0ECaiESAn8gBSAHQQF0IgdqIgZBAmouAQAiEwRAQQAhCEEAIBNrIRQgFSAHaiEPIAAgDCAGLgEAakECdGohEEEAIQlBACEKQQAhCwNAIBAoAgAiB0EYdiAPLgEAIgZsIAtqIQsgB0H/AXEgBmwgCGohCCAHQRB2Qf8BcSAGbCAKaiEKIAdBCHZB/wFxIAZsIAlqIQkgD0ECaiEPIBBBBGohECAUQQFqIhQNAAsgEiATagwBC0EAIQtBACEKQQAhCUEAIQggEgshByABIA5BAnRqIApBgMAAakEOdSIGQf8BIAZB/wFIG0EQdEGAgPwHcUEAIAZBAEobIAtBgMAAakEOdSIGQf8BIAZB/wFIG0EYdEEAIAZBAEobciAJQYDAAGpBDnUiBkH/ASAGQf8BSBtBCHRBgP4DcUEAIAZBAEobciAIQYDAAGpBDnUiBkH/ASAGQf8BSBtB/wFxQQAgBkEAShtyNgIAIA4gA2ohDiARQQFqIhEgBEcNAAsgDCACaiEMIA1BAWoiDSADRw0ACwsLIQACQEEAIAIgAyAEIAUgABAAIAJBACAEIAUgBiABEAALCw==';

},{}],4:[function(require,module,exports){
'use strict';

module.exports = {
  name: 'resize',
  fn: require('./resize'),
  wasm_fn: require('./resize_wasm'),
  wasm_src: require('./convolve_wasm_base64')
};

},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(require,module,exports){
'use strict';

var createFilters = require('./resize_filter_gen');

var convolveHorizontally = require('./convolve').convolveHorizontally;

var convolveVertically = require('./convolve').convolveVertically;

function resetAlpha(dst, width, height) {
  var ptr = 3,
      len = width * height * 4 | 0;

  while (ptr < len) {
    dst[ptr] = 0xFF;
    ptr = ptr + 4 | 0;
  }
}

module.exports = function resize(options) {
  var src = options.src;
  var srcW = options.width;
  var srcH = options.height;
  var destW = options.toWidth;
  var destH = options.toHeight;
  var scaleX = options.scaleX || options.toWidth / options.width;
  var scaleY = options.scaleY || options.toHeight / options.height;
  var offsetX = options.offsetX || 0;
  var offsetY = options.offsetY || 0;
  var dest = options.dest || new Uint8Array(destW * destH * 4);
  var quality = typeof options.quality === 'undefined' ? 3 : options.quality;
  var alpha = options.alpha || false;
  var filtersX = createFilters(quality, srcW, destW, scaleX, offsetX),
      filtersY = createFilters(quality, srcH, destH, scaleY, offsetY);
  var tmp = new Uint8Array(destW * srcH * 4); // To use single function we need src & tmp of the same type.
  // But src can be CanvasPixelArray, and tmp - Uint8Array. So, keep
  // vertical and horizontal passes separately to avoid deoptimization.

  convolveHorizontally(src, tmp, srcW, srcH, destW, filtersX);
  convolveVertically(tmp, dest, srcH, destW, destH, filtersY); // That's faster than doing checks in convolver.
  // !!! Note, canvas data is not premultipled. We don't need other
  // alpha corrections.

  if (!alpha) resetAlpha(dest, destW, destH);
  return dest;
};

},{"./convolve":2,"./resize_filter_gen":6}],6:[function(require,module,exports){
// Calculate convolution filters for each destination point,
// and pack data to Int16Array:
//
// [ shift, length, data..., shift2, length2, data..., ... ]
//
// - shift - offset in src image
// - length - filter length (in src points)
// - data - filter values sequence
//
'use strict';

var FILTER_INFO = require('./resize_filter_info'); // Precision of fixed FP values


var FIXED_FRAC_BITS = 14;

function toFixedPoint(num) {
  return Math.round(num * ((1 << FIXED_FRAC_BITS) - 1));
}

module.exports = function resizeFilterGen(quality, srcSize, destSize, scale, offset) {
  var filterFunction = FILTER_INFO[quality].filter;
  var scaleInverted = 1.0 / scale;
  var scaleClamped = Math.min(1.0, scale); // For upscale
  // Filter window (averaging interval), scaled to src image

  var srcWindow = FILTER_INFO[quality].win / scaleClamped;
  var destPixel, srcPixel, srcFirst, srcLast, filterElementSize, floatFilter, fxpFilter, total, pxl, idx, floatVal, filterTotal, filterVal;
  var leftNotEmpty, rightNotEmpty, filterShift, filterSize;
  var maxFilterElementSize = Math.floor((srcWindow + 1) * 2);
  var packedFilter = new Int16Array((maxFilterElementSize + 2) * destSize);
  var packedFilterPtr = 0;
  var slowCopy = !packedFilter.subarray || !packedFilter.set; // For each destination pixel calculate source range and built filter values

  for (destPixel = 0; destPixel < destSize; destPixel++) {
    // Scaling should be done relative to central pixel point
    srcPixel = (destPixel + 0.5) * scaleInverted + offset;
    srcFirst = Math.max(0, Math.floor(srcPixel - srcWindow));
    srcLast = Math.min(srcSize - 1, Math.ceil(srcPixel + srcWindow));
    filterElementSize = srcLast - srcFirst + 1;
    floatFilter = new Float32Array(filterElementSize);
    fxpFilter = new Int16Array(filterElementSize);
    total = 0.0; // Fill filter values for calculated range

    for (pxl = srcFirst, idx = 0; pxl <= srcLast; pxl++, idx++) {
      floatVal = filterFunction((pxl + 0.5 - srcPixel) * scaleClamped);
      total += floatVal;
      floatFilter[idx] = floatVal;
    } // Normalize filter, convert to fixed point and accumulate conversion error


    filterTotal = 0;

    for (idx = 0; idx < floatFilter.length; idx++) {
      filterVal = floatFilter[idx] / total;
      filterTotal += filterVal;
      fxpFilter[idx] = toFixedPoint(filterVal);
    } // Compensate normalization error, to minimize brightness drift


    fxpFilter[destSize >> 1] += toFixedPoint(1.0 - filterTotal); //
    // Now pack filter to useable form
    //
    // 1. Trim heading and tailing zero values, and compensate shitf/length
    // 2. Put all to single array in this format:
    //
    //    [ pos shift, data length, value1, value2, value3, ... ]
    //

    leftNotEmpty = 0;

    while (leftNotEmpty < fxpFilter.length && fxpFilter[leftNotEmpty] === 0) {
      leftNotEmpty++;
    }

    if (leftNotEmpty < fxpFilter.length) {
      rightNotEmpty = fxpFilter.length - 1;

      while (rightNotEmpty > 0 && fxpFilter[rightNotEmpty] === 0) {
        rightNotEmpty--;
      }

      filterShift = srcFirst + leftNotEmpty;
      filterSize = rightNotEmpty - leftNotEmpty + 1;
      packedFilter[packedFilterPtr++] = filterShift; // shift

      packedFilter[packedFilterPtr++] = filterSize; // size

      if (!slowCopy) {
        packedFilter.set(fxpFilter.subarray(leftNotEmpty, rightNotEmpty + 1), packedFilterPtr);
        packedFilterPtr += filterSize;
      } else {
        // fallback for old IE < 11, without subarray/set methods
        for (idx = leftNotEmpty; idx <= rightNotEmpty; idx++) {
          packedFilter[packedFilterPtr++] = fxpFilter[idx];
        }
      }
    } else {
      // zero data, write header only
      packedFilter[packedFilterPtr++] = 0; // shift

      packedFilter[packedFilterPtr++] = 0; // size
    }
  }

  return packedFilter;
};

},{"./resize_filter_info":7}],7:[function(require,module,exports){
// Filter definitions to build tables for
// resizing convolvers.
//
// Presets for quality 0..3. Filter functions + window size
//
'use strict';

module.exports = [{
  // Nearest neibor (Box)
  win: 0.5,
  filter: function filter(x) {
    return x >= -0.5 && x < 0.5 ? 1.0 : 0.0;
  }
}, {
  // Hamming
  win: 1.0,
  filter: function filter(x) {
    if (x <= -1.0 || x >= 1.0) {
      return 0.0;
    }

    if (x > -1.19209290E-07 && x < 1.19209290E-07) {
      return 1.0;
    }

    var xpi = x * Math.PI;
    return Math.sin(xpi) / xpi * (0.54 + 0.46 * Math.cos(xpi / 1.0));
  }
}, {
  // Lanczos, win = 2
  win: 2.0,
  filter: function filter(x) {
    if (x <= -2.0 || x >= 2.0) {
      return 0.0;
    }

    if (x > -1.19209290E-07 && x < 1.19209290E-07) {
      return 1.0;
    }

    var xpi = x * Math.PI;
    return Math.sin(xpi) / xpi * Math.sin(xpi / 2.0) / (xpi / 2.0);
  }
}, {
  // Lanczos, win = 3
  win: 3.0,
  filter: function filter(x) {
    if (x <= -3.0 || x >= 3.0) {
      return 0.0;
    }

    if (x > -1.19209290E-07 && x < 1.19209290E-07) {
      return 1.0;
    }

    var xpi = x * Math.PI;
    return Math.sin(xpi) / xpi * Math.sin(xpi / 3.0) / (xpi / 3.0);
  }
}];

},{}],8:[function(require,module,exports){
'use strict';

var createFilters = require('./resize_filter_gen');

function resetAlpha(dst, width, height) {
  var ptr = 3,
      len = width * height * 4 | 0;

  while (ptr < len) {
    dst[ptr] = 0xFF;
    ptr = ptr + 4 | 0;
  }
}

function asUint8Array(src) {
  return new Uint8Array(src.buffer, 0, src.byteLength);
}

var IS_LE = true; // should not crash everything on module load in old browsers

try {
  IS_LE = new Uint32Array(new Uint8Array([1, 0, 0, 0]).buffer)[0] === 1;
} catch (__) {}

function copyInt16asLE(src, target, target_offset) {
  if (IS_LE) {
    target.set(asUint8Array(src), target_offset);
    return;
  }

  for (var ptr = target_offset, i = 0; i < src.length; i++) {
    var data = src[i];
    target[ptr++] = data & 0xFF;
    target[ptr++] = data >> 8 & 0xFF;
  }
}

module.exports = function resize_wasm(options) {
  var src = options.src;
  var srcW = options.width;
  var srcH = options.height;
  var destW = options.toWidth;
  var destH = options.toHeight;
  var scaleX = options.scaleX || options.toWidth / options.width;
  var scaleY = options.scaleY || options.toHeight / options.height;
  var offsetX = options.offsetX || 0.0;
  var offsetY = options.offsetY || 0.0;
  var dest = options.dest || new Uint8Array(destW * destH * 4);
  var quality = typeof options.quality === 'undefined' ? 3 : options.quality;
  var alpha = options.alpha || false;
  var filtersX = createFilters(quality, srcW, destW, scaleX, offsetX),
      filtersY = createFilters(quality, srcH, destH, scaleY, offsetY); // destination is 0 too.

  var src_offset = 0; // buffer between convolve passes

  var tmp_offset = this.__align(src_offset + Math.max(src.byteLength, dest.byteLength));

  var filtersX_offset = this.__align(tmp_offset + srcH * destW * 4);

  var filtersY_offset = this.__align(filtersX_offset + filtersX.byteLength);

  var alloc_bytes = filtersY_offset + filtersY.byteLength;

  var instance = this.__instance('resize', alloc_bytes); //
  // Fill memory block with data to process
  //


  var mem = new Uint8Array(this.__memory.buffer);
  var mem32 = new Uint32Array(this.__memory.buffer); // 32-bit copy is much faster in chrome

  var src32 = new Uint32Array(src.buffer);
  mem32.set(src32); // We should guarantee LE bytes order. Filters are not big, so
  // speed difference is not significant vs direct .set()

  copyInt16asLE(filtersX, mem, filtersX_offset);
  copyInt16asLE(filtersY, mem, filtersY_offset); //
  // Now call webassembly method
  // emsdk does method names with '_'

  var fn = instance.exports.convolveHV || instance.exports._convolveHV;
  fn(filtersX_offset, filtersY_offset, tmp_offset, srcW, srcH, destW, destH); //
  // Copy data back to typed array
  //
  // 32-bit copy is much faster in chrome

  var dest32 = new Uint32Array(dest.buffer);
  dest32.set(new Uint32Array(this.__memory.buffer, 0, destH * destW)); // That's faster than doing checks in convolver.
  // !!! Note, canvas data is not premultipled. We don't need other
  // alpha corrections.

  if (!alpha) resetAlpha(dest, destW, destH);
  return dest;
};

},{"./resize_filter_gen":6}],9:[function(require,module,exports){
'use strict';

var GC_INTERVAL = 100;

function Pool(create, idle) {
  this.create = create;
  this.available = [];
  this.acquired = {};
  this.lastId = 1;
  this.timeoutId = 0;
  this.idle = idle || 2000;
}

Pool.prototype.acquire = function () {
  var _this = this;

  var resource;

  if (this.available.length !== 0) {
    resource = this.available.pop();
  } else {
    resource = this.create();
    resource.id = this.lastId++;

    resource.release = function () {
      return _this.release(resource);
    };
  }

  this.acquired[resource.id] = resource;
  return resource;
};

Pool.prototype.release = function (resource) {
  var _this2 = this;

  delete this.acquired[resource.id];
  resource.lastUsed = Date.now();
  this.available.push(resource);

  if (this.timeoutId === 0) {
    this.timeoutId = setTimeout(function () {
      return _this2.gc();
    }, GC_INTERVAL);
  }
};

Pool.prototype.gc = function () {
  var _this3 = this;

  var now = Date.now();
  this.available = this.available.filter(function (resource) {
    if (now - resource.lastUsed > _this3.idle) {
      resource.destroy();
      return false;
    }

    return true;
  });

  if (this.available.length !== 0) {
    this.timeoutId = setTimeout(function () {
      return _this3.gc();
    }, GC_INTERVAL);
  } else {
    this.timeoutId = 0;
  }
};

module.exports = Pool;

},{}],10:[function(require,module,exports){
// Add intermediate resizing steps when scaling down by a very large factor.
//
// For example, when resizing 10000x10000 down to 10x10, it'll resize it to
// 300x300 first.
//
// It's needed because tiler has issues when the entire tile is scaled down
// to a few pixels (1024px source tile with border size 3 should result in
// at least 3+3+2 = 8px target tile, so max scale factor is 128 here).
//
// Also, adding intermediate steps can speed up processing if we use lower
// quality algorithms for first stages.
//
'use strict'; // min size = 0 results in infinite loop,
// min size = 1 can consume large amount of memory

var MIN_INNER_TILE_SIZE = 2;

module.exports = function createStages(fromWidth, fromHeight, toWidth, toHeight, srcTileSize, destTileBorder) {
  var scaleX = toWidth / fromWidth;
  var scaleY = toHeight / fromHeight; // derived from createRegions equation:
  // innerTileWidth = pixelFloor(srcTileSize * scaleX) - 2 * destTileBorder;

  var minScale = (2 * destTileBorder + MIN_INNER_TILE_SIZE + 1) / srcTileSize; // refuse to scale image multiple times by less than twice each time,
  // it could only happen because of invalid options

  if (minScale > 0.5) return [[toWidth, toHeight]];
  var stageCount = Math.ceil(Math.log(Math.min(scaleX, scaleY)) / Math.log(minScale)); // no additional resizes are necessary,
  // stageCount can be zero or be negative when enlarging the image

  if (stageCount <= 1) return [[toWidth, toHeight]];
  var result = [];

  for (var i = 0; i < stageCount; i++) {
    var width = Math.round(Math.pow(Math.pow(fromWidth, stageCount - i - 1) * Math.pow(toWidth, i + 1), 1 / stageCount));
    var height = Math.round(Math.pow(Math.pow(fromHeight, stageCount - i - 1) * Math.pow(toHeight, i + 1), 1 / stageCount));
    result.push([width, height]);
  }

  return result;
};

},{}],11:[function(require,module,exports){
// Split original image into multiple 1024x1024 chunks to reduce memory usage
// (images have to be unpacked into typed arrays for resizing) and allow
// parallel processing of multiple tiles at a time.
//
'use strict';
/*
 * pixelFloor and pixelCeil are modified versions of Math.floor and Math.ceil
 * functions which take into account floating point arithmetic errors.
 * Those errors can cause undesired increments/decrements of sizes and offsets:
 * Math.ceil(36 / (36 / 500)) = 501
 * pixelCeil(36 / (36 / 500)) = 500
 */

var PIXEL_EPSILON = 1e-5;

function pixelFloor(x) {
  var nearest = Math.round(x);

  if (Math.abs(x - nearest) < PIXEL_EPSILON) {
    return nearest;
  }

  return Math.floor(x);
}

function pixelCeil(x) {
  var nearest = Math.round(x);

  if (Math.abs(x - nearest) < PIXEL_EPSILON) {
    return nearest;
  }

  return Math.ceil(x);
}

module.exports = function createRegions(options) {
  var scaleX = options.toWidth / options.width;
  var scaleY = options.toHeight / options.height;
  var innerTileWidth = pixelFloor(options.srcTileSize * scaleX) - 2 * options.destTileBorder;
  var innerTileHeight = pixelFloor(options.srcTileSize * scaleY) - 2 * options.destTileBorder; // prevent infinite loop, this should never happen

  if (innerTileWidth < 1 || innerTileHeight < 1) {
    throw new Error('Internal error in pica: target tile width/height is too small.');
  }

  var x, y;
  var innerX, innerY, toTileWidth, toTileHeight;
  var tiles = [];
  var tile; // we go top-to-down instead of left-to-right to make image displayed from top to
  // doesn in the browser

  for (innerY = 0; innerY < options.toHeight; innerY += innerTileHeight) {
    for (innerX = 0; innerX < options.toWidth; innerX += innerTileWidth) {
      x = innerX - options.destTileBorder;

      if (x < 0) {
        x = 0;
      }

      toTileWidth = innerX + innerTileWidth + options.destTileBorder - x;

      if (x + toTileWidth >= options.toWidth) {
        toTileWidth = options.toWidth - x;
      }

      y = innerY - options.destTileBorder;

      if (y < 0) {
        y = 0;
      }

      toTileHeight = innerY + innerTileHeight + options.destTileBorder - y;

      if (y + toTileHeight >= options.toHeight) {
        toTileHeight = options.toHeight - y;
      }

      tile = {
        toX: x,
        toY: y,
        toWidth: toTileWidth,
        toHeight: toTileHeight,
        toInnerX: innerX,
        toInnerY: innerY,
        toInnerWidth: innerTileWidth,
        toInnerHeight: innerTileHeight,
        offsetX: x / scaleX - pixelFloor(x / scaleX),
        offsetY: y / scaleY - pixelFloor(y / scaleY),
        scaleX: scaleX,
        scaleY: scaleY,
        x: pixelFloor(x / scaleX),
        y: pixelFloor(y / scaleY),
        width: pixelCeil(toTileWidth / scaleX),
        height: pixelCeil(toTileHeight / scaleY)
      };
      tiles.push(tile);
    }
  }

  return tiles;
};

},{}],12:[function(require,module,exports){
'use strict';

function objClass(obj) {
  return Object.prototype.toString.call(obj);
}

module.exports.isCanvas = function isCanvas(element) {
  //return (element.nodeName && element.nodeName.toLowerCase() === 'canvas') ||
  var cname = objClass(element);
  return cname === '[object HTMLCanvasElement]'
  /* browser */
  || cname === '[object Canvas]'
  /* node-canvas */
  ;
};

module.exports.isImage = function isImage(element) {
  //return element.nodeName && element.nodeName.toLowerCase() === 'img';
  return objClass(element) === '[object HTMLImageElement]';
};

module.exports.limiter = function limiter(concurrency) {
  var active = 0,
      queue = [];

  function roll() {
    if (active < concurrency && queue.length) {
      active++;
      queue.shift()();
    }
  }

  return function limit(fn) {
    return new Promise(function (resolve, reject) {
      queue.push(function () {
        fn().then(function (result) {
          resolve(result);
          active--;
          roll();
        }, function (err) {
          reject(err);
          active--;
          roll();
        });
      });
      roll();
    });
  };
};

module.exports.cib_quality_name = function cib_quality_name(num) {
  switch (num) {
    case 0:
      return 'pixelated';

    case 1:
      return 'low';

    case 2:
      return 'medium';
  }

  return 'high';
};

module.exports.cib_support = function cib_support() {
  return Promise.resolve().then(function () {
    if (typeof createImageBitmap === 'undefined' || typeof document === 'undefined') {
      return false;
    }

    var c = document.createElement('canvas');
    c.width = 100;
    c.height = 100;
    return createImageBitmap(c, 0, 0, 100, 100, {
      resizeWidth: 10,
      resizeHeight: 10,
      resizeQuality: 'high'
    }).then(function (bitmap) {
      var status = bitmap.width === 10; // Branch below is filtered on upper level. We do not call resize
      // detection for basic ImageBitmap.
      //
      // https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap
      // old Crome 51 has ImageBitmap without .close(). Then this code
      // will throw and return 'false' as expected.
      //

      bitmap.close();
      c = null;
      return status;
    });
  })["catch"](function () {
    return false;
  });
};

},{}],13:[function(require,module,exports){
// Web Worker wrapper for image resize function
'use strict';

module.exports = function () {
  var MathLib = require('./mathlib');

  var mathLib;
  /* eslint-disable no-undef */

  onmessage = function onmessage(ev) {
    var opts = ev.data.opts;
    if (!mathLib) mathLib = new MathLib(ev.data.features); // Use multimath's sync auto-init. Avoid Promise use in old browsers,
    // because polyfills are not propagated to webworker.

    var result = mathLib.resizeAndUnsharp(opts);
    postMessage({
      result: result
    }, [result.buffer]);
  };
};

},{"./mathlib":1}],14:[function(require,module,exports){
// Calculate Gaussian blur of an image using IIR filter
// The method is taken from Intel's white paper and code example attached to it:
// https://software.intel.com/en-us/articles/iir-gaussian-blur-filter
// -implementation-using-intel-advanced-vector-extensions

var a0, a1, a2, a3, b1, b2, left_corner, right_corner;

function gaussCoef(sigma) {
  if (sigma < 0.5) {
    sigma = 0.5;
  }

  var a = Math.exp(0.726 * 0.726) / sigma,
      g1 = Math.exp(-a),
      g2 = Math.exp(-2 * a),
      k = (1 - g1) * (1 - g1) / (1 + 2 * a * g1 - g2);

  a0 = k;
  a1 = k * (a - 1) * g1;
  a2 = k * (a + 1) * g1;
  a3 = -k * g2;
  b1 = 2 * g1;
  b2 = -g2;
  left_corner = (a0 + a1) / (1 - b1 - b2);
  right_corner = (a2 + a3) / (1 - b1 - b2);

  // Attempt to force type to FP32.
  return new Float32Array([ a0, a1, a2, a3, b1, b2, left_corner, right_corner ]);
}

function convolveMono16(src, out, line, coeff, width, height) {
  // takes src image and writes the blurred and transposed result into out

  var prev_src, curr_src, curr_out, prev_out, prev_prev_out;
  var src_index, out_index, line_index;
  var i, j;
  var coeff_a0, coeff_a1, coeff_b1, coeff_b2;

  for (i = 0; i < height; i++) {
    src_index = i * width;
    out_index = i;
    line_index = 0;

    // left to right
    prev_src = src[src_index];
    prev_prev_out = prev_src * coeff[6];
    prev_out = prev_prev_out;

    coeff_a0 = coeff[0];
    coeff_a1 = coeff[1];
    coeff_b1 = coeff[4];
    coeff_b2 = coeff[5];

    for (j = 0; j < width; j++) {
      curr_src = src[src_index];

      curr_out = curr_src * coeff_a0 +
                 prev_src * coeff_a1 +
                 prev_out * coeff_b1 +
                 prev_prev_out * coeff_b2;

      prev_prev_out = prev_out;
      prev_out = curr_out;
      prev_src = curr_src;

      line[line_index] = prev_out;
      line_index++;
      src_index++;
    }

    src_index--;
    line_index--;
    out_index += height * (width - 1);

    // right to left
    prev_src = src[src_index];
    prev_prev_out = prev_src * coeff[7];
    prev_out = prev_prev_out;
    curr_src = prev_src;

    coeff_a0 = coeff[2];
    coeff_a1 = coeff[3];

    for (j = width - 1; j >= 0; j--) {
      curr_out = curr_src * coeff_a0 +
                 prev_src * coeff_a1 +
                 prev_out * coeff_b1 +
                 prev_prev_out * coeff_b2;

      prev_prev_out = prev_out;
      prev_out = curr_out;

      prev_src = curr_src;
      curr_src = src[src_index];

      out[out_index] = line[line_index] + prev_out;

      src_index--;
      line_index--;
      out_index -= height;
    }
  }
}


function blurMono16(src, width, height, radius) {
  // Quick exit on zero radius
  if (!radius) { return; }

  var out      = new Uint16Array(src.length),
      tmp_line = new Float32Array(Math.max(width, height));

  var coeff = gaussCoef(radius);

  convolveMono16(src, out, tmp_line, coeff, width, height, radius);
  convolveMono16(out, src, tmp_line, coeff, height, width, radius);
}

module.exports = blurMono16;

},{}],15:[function(require,module,exports){
if (typeof Object.create === 'function') {
  // implementation from standard node.js 'util' module
  module.exports = function inherits(ctor, superCtor) {
    if (superCtor) {
      ctor.super_ = superCtor
      ctor.prototype = Object.create(superCtor.prototype, {
        constructor: {
          value: ctor,
          enumerable: false,
          writable: true,
          configurable: true
        }
      })
    }
  };
} else {
  // old school shim for old browsers
  module.exports = function inherits(ctor, superCtor) {
    if (superCtor) {
      ctor.super_ = superCtor
      var TempCtor = function () {}
      TempCtor.prototype = superCtor.prototype
      ctor.prototype = new TempCtor()
      ctor.prototype.constructor = ctor
    }
  }
}

},{}],16:[function(require,module,exports){
'use strict';


var assign         = require('object-assign');
var base64decode   = require('./lib/base64decode');
var hasWebAssembly = require('./lib/wa_detect');


var DEFAULT_OPTIONS = {
  js: true,
  wasm: true
};


function MultiMath(options) {
  if (!(this instanceof MultiMath)) return new MultiMath(options);

  var opts = assign({}, DEFAULT_OPTIONS, options || {});

  this.options         = opts;

  this.__cache         = {};

  this.__init_promise  = null;
  this.__modules       = opts.modules || {};
  this.__memory        = null;
  this.__wasm          = {};

  this.__isLE = ((new Uint32Array((new Uint8Array([ 1, 0, 0, 0 ])).buffer))[0] === 1);

  if (!this.options.js && !this.options.wasm) {
    throw new Error('mathlib: at least "js" or "wasm" should be enabled');
  }
}


MultiMath.prototype.has_wasm = hasWebAssembly;


MultiMath.prototype.use = function (module) {
  this.__modules[module.name] = module;

  // Pin the best possible implementation
  if (this.options.wasm && this.has_wasm() && module.wasm_fn) {
    this[module.name] = module.wasm_fn;
  } else {
    this[module.name] = module.fn;
  }

  return this;
};


MultiMath.prototype.init = function () {
  if (this.__init_promise) return this.__init_promise;

  if (!this.options.js && this.options.wasm && !this.has_wasm()) {
    return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));
  }

  var self = this;

  this.__init_promise = Promise.all(Object.keys(self.__modules).map(function (name) {
    var module = self.__modules[name];

    if (!self.options.wasm || !self.has_wasm() || !module.wasm_fn) return null;

    // If already compiled - exit
    if (self.__wasm[name]) return null;

    // Compile wasm source
    return WebAssembly.compile(self.__base64decode(module.wasm_src))
      .then(function (m) { self.__wasm[name] = m; });
  }))
    .then(function () { return self; });

  return this.__init_promise;
};


////////////////////////////////////////////////////////////////////////////////
// Methods below are for internal use from plugins


// Simple decode base64 to typed array. Useful to load embedded webassembly
// code. You probably don't need to call this method directly.
//
MultiMath.prototype.__base64decode = base64decode;


// Increase current memory to include specified number of bytes. Do nothing if
// size is already ok. You probably don't need to call this method directly,
// because it will be invoked from `.__instance()`.
//
MultiMath.prototype.__reallocate = function mem_grow_to(bytes) {
  if (!this.__memory) {
    this.__memory = new WebAssembly.Memory({
      initial: Math.ceil(bytes / (64 * 1024))
    });
    return this.__memory;
  }

  var mem_size = this.__memory.buffer.byteLength;

  if (mem_size < bytes) {
    this.__memory.grow(Math.ceil((bytes - mem_size) / (64 * 1024)));
  }

  return this.__memory;
};


// Returns instantinated webassembly item by name, with specified memory size
// and environment.
// - use cache if available
// - do sync module init, if async init was not called earlier
// - allocate memory if not enougth
// - can export functions to webassembly via "env_extra",
//   for example, { exp: Math.exp }
//
MultiMath.prototype.__instance = function instance(name, memsize, env_extra) {
  if (memsize) this.__reallocate(memsize);

  // If .init() was not called, do sync compile
  if (!this.__wasm[name]) {
    var module = this.__modules[name];
    this.__wasm[name] = new WebAssembly.Module(this.__base64decode(module.wasm_src));
  }

  if (!this.__cache[name]) {
    var env_base = {
      memoryBase: 0,
      memory: this.__memory,
      tableBase: 0,
      table: new WebAssembly.Table({ initial: 0, element: 'anyfunc' })
    };

    this.__cache[name] = new WebAssembly.Instance(this.__wasm[name], {
      env: assign(env_base, env_extra || {})
    });
  }

  return this.__cache[name];
};


// Helper to calculate memory aligh for pointers. Webassembly does not require
// this, but you may wish to experiment. Default base = 8;
//
MultiMath.prototype.__align = function align(number, base) {
  base = base || 8;
  var reminder = number % base;
  return number + (reminder ? base - reminder : 0);
};


module.exports = MultiMath;

},{"./lib/base64decode":17,"./lib/wa_detect":23,"object-assign":24}],17:[function(require,module,exports){
// base64 decode str -> Uint8Array, to load WA modules
//
'use strict';


var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';


module.exports = function base64decode(str) {
  var input = str.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan
      max   = input.length;

  var out = new Uint8Array((max * 3) >> 2);

  // Collect by 6*4 bits (3 bytes)

  var bits = 0;
  var ptr  = 0;

  for (var idx = 0; idx < max; idx++) {
    if ((idx % 4 === 0) && idx) {
      out[ptr++] = (bits >> 16) & 0xFF;
      out[ptr++] = (bits >> 8) & 0xFF;
      out[ptr++] = bits & 0xFF;
    }

    bits = (bits << 6) | BASE64_MAP.indexOf(input.charAt(idx));
  }

  // Dump tail

  var tailbits = (max % 4) * 6;

  if (tailbits === 0) {
    out[ptr++] = (bits >> 16) & 0xFF;
    out[ptr++] = (bits >> 8) & 0xFF;
    out[ptr++] = bits & 0xFF;
  } else if (tailbits === 18) {
    out[ptr++] = (bits >> 10) & 0xFF;
    out[ptr++] = (bits >> 2) & 0xFF;
  } else if (tailbits === 12) {
    out[ptr++] = (bits >> 4) & 0xFF;
  }

  return out;
};

},{}],18:[function(require,module,exports){
// Calculates 16-bit precision HSL lightness from 8-bit rgba buffer
//
'use strict';


module.exports = function hsl_l16_js(img, width, height) {
  var size = width * height;
  var out = new Uint16Array(size);
  var r, g, b, min, max;
  for (var i = 0; i < size; i++) {
    r = img[4 * i];
    g = img[4 * i + 1];
    b = img[4 * i + 2];
    max = (r >= g && r >= b) ? r : (g >= b && g >= r) ? g : b;
    min = (r <= g && r <= b) ? r : (g <= b && g <= r) ? g : b;
    out[i] = (max + min) * 257 >> 1;
  }
  return out;
};

},{}],19:[function(require,module,exports){
'use strict';

module.exports = {
  name:     'unsharp_mask',
  fn:       require('./unsharp_mask'),
  wasm_fn:  require('./unsharp_mask_wasm'),
  wasm_src: require('./unsharp_mask_wasm_base64')
};

},{"./unsharp_mask":20,"./unsharp_mask_wasm":21,"./unsharp_mask_wasm_base64":22}],20:[function(require,module,exports){
// Unsharp mask filter
//
// http://stackoverflow.com/a/23322820/1031804
// USM(O) = O + (2 * (Amount / 100) * (O - GB))
// GB - gaussian blur.
//
// Image is converted from RGB to HSL, unsharp mask is applied to the
// lightness channel and then image is converted back to RGB.
//
'use strict';


var glur_mono16 = require('glur/mono16');
var hsl_l16     = require('./hsl_l16');


module.exports = function unsharp(img, width, height, amount, radius, threshold) {
  var r, g, b;
  var h, s, l;
  var min, max;
  var m1, m2, hShifted;
  var diff, iTimes4;

  if (amount === 0 || radius < 0.5) {
    return;
  }
  if (radius > 2.0) {
    radius = 2.0;
  }

  var lightness = hsl_l16(img, width, height);

  var blured = new Uint16Array(lightness); // copy, because blur modify src

  glur_mono16(blured, width, height, radius);

  var amountFp = (amount / 100 * 0x1000 + 0.5)|0;
  var thresholdFp = (threshold * 257)|0;

  var size = width * height;

  /* eslint-disable indent */
  for (var i = 0; i < size; i++) {
    diff = 2 * (lightness[i] - blured[i]);

    if (Math.abs(diff) >= thresholdFp) {
      iTimes4 = i * 4;
      r = img[iTimes4];
      g = img[iTimes4 + 1];
      b = img[iTimes4 + 2];

      // convert RGB to HSL
      // take RGB, 8-bit unsigned integer per each channel
      // save HSL, H and L are 16-bit unsigned integers, S is 12-bit unsigned integer
      // math is taken from here: http://www.easyrgb.com/index.php?X=MATH&H=18
      // and adopted to be integer (fixed point in fact) for sake of performance
      max = (r >= g && r >= b) ? r : (g >= r && g >= b) ? g : b; // min and max are in [0..0xff]
      min = (r <= g && r <= b) ? r : (g <= r && g <= b) ? g : b;
      l = (max + min) * 257 >> 1; // l is in [0..0xffff] that is caused by multiplication by 257

      if (min === max) {
        h = s = 0;
      } else {
        s = (l <= 0x7fff) ?
          (((max - min) * 0xfff) / (max + min))|0 :
          (((max - min) * 0xfff) / (2 * 0xff - max - min))|0; // s is in [0..0xfff]
        // h could be less 0, it will be fixed in backward conversion to RGB, |h| <= 0xffff / 6
        h = (r === max) ? (((g - b) * 0xffff) / (6 * (max - min)))|0
          : (g === max) ? 0x5555 + ((((b - r) * 0xffff) / (6 * (max - min)))|0) // 0x5555 == 0xffff / 3
          : 0xaaaa + ((((r - g) * 0xffff) / (6 * (max - min)))|0); // 0xaaaa == 0xffff * 2 / 3
      }

      // add unsharp mask mask to the lightness channel
      l += (amountFp * diff + 0x800) >> 12;
      if (l > 0xffff) {
        l = 0xffff;
      } else if (l < 0) {
        l = 0;
      }

      // convert HSL back to RGB
      // for information about math look above
      if (s === 0) {
        r = g = b = l >> 8;
      } else {
        m2 = (l <= 0x7fff) ? (l * (0x1000 + s) + 0x800) >> 12 :
          l  + (((0xffff - l) * s + 0x800) >>  12);
        m1 = 2 * l - m2 >> 8;
        m2 >>= 8;
        // save result to RGB channels
        // R channel
        hShifted = (h + 0x5555) & 0xffff; // 0x5555 == 0xffff / 3
        r = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3
          : (hShifted >= 0x7fff) ?  m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16)
          : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6
          : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16);
        // G channel
        hShifted = h & 0xffff;
        g = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3
          : (hShifted >= 0x7fff) ?  m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16)
          : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6
          : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16);
        // B channel
        hShifted = (h - 0x5555) & 0xffff;
        b = (hShifted >= 0xaaaa) ? m1 // 0xaaaa == 0xffff * 2 / 3
          : (hShifted >= 0x7fff) ?  m1 + ((m2 - m1) * 6 * (0xaaaa - hShifted) + 0x8000 >> 16)
          : (hShifted >= 0x2aaa) ? m2 // 0x2aaa == 0xffff / 6
          : m1 + ((m2 - m1) * 6 * hShifted + 0x8000 >> 16);
      }

      img[iTimes4] = r;
      img[iTimes4 + 1] = g;
      img[iTimes4 + 2] = b;
    }
  }
};

},{"./hsl_l16":18,"glur/mono16":14}],21:[function(require,module,exports){
'use strict';


module.exports = function unsharp(img, width, height, amount, radius, threshold) {
  if (amount === 0 || radius < 0.5) {
    return;
  }

  if (radius > 2.0) {
    radius = 2.0;
  }

  var pixels = width * height;

  var img_bytes_cnt        = pixels * 4;
  var hsl_bytes_cnt        = pixels * 2;
  var blur_bytes_cnt       = pixels * 2;
  var blur_line_byte_cnt   = Math.max(width, height) * 4; // float32 array
  var blur_coeffs_byte_cnt = 8 * 4; // float32 array

  var img_offset         = 0;
  var hsl_offset         = img_bytes_cnt;
  var blur_offset        = hsl_offset + hsl_bytes_cnt;
  var blur_tmp_offset    = blur_offset + blur_bytes_cnt;
  var blur_line_offset   = blur_tmp_offset + blur_bytes_cnt;
  var blur_coeffs_offset = blur_line_offset + blur_line_byte_cnt;

  var instance = this.__instance(
    'unsharp_mask',
    img_bytes_cnt + hsl_bytes_cnt + blur_bytes_cnt * 2 + blur_line_byte_cnt + blur_coeffs_byte_cnt,
    { exp: Math.exp }
  );

  // 32-bit copy is much faster in chrome
  var img32 = new Uint32Array(img.buffer);
  var mem32 = new Uint32Array(this.__memory.buffer);
  mem32.set(img32);

  // HSL
  var fn = instance.exports.hsl_l16 || instance.exports._hsl_l16;
  fn(img_offset, hsl_offset, width, height);

  // BLUR
  fn = instance.exports.blurMono16 || instance.exports._blurMono16;
  fn(hsl_offset, blur_offset, blur_tmp_offset,
    blur_line_offset, blur_coeffs_offset, width, height, radius);

  // UNSHARP
  fn = instance.exports.unsharp || instance.exports._unsharp;
  fn(img_offset, img_offset, hsl_offset,
    blur_offset, width, height, amount, threshold);

  // 32-bit copy is much faster in chrome
  img32.set(new Uint32Array(this.__memory.buffer, 0, pixels));
};

},{}],22:[function(require,module,exports){
// This is autogenerated file from math.wasm, don't edit.
//
'use strict';

/* eslint-disable max-len */
module.exports = 'AGFzbQEAAAABMQZgAXwBfGACfX8AYAZ/f39/f38AYAh/f39/f39/fQBgBH9/f38AYAh/f39/f39/fwACGQIDZW52A2V4cAAAA2VudgZtZW1vcnkCAAEDBgUBAgMEBQQEAXAAAAdMBRZfX2J1aWxkX2dhdXNzaWFuX2NvZWZzAAEOX19nYXVzczE2X2xpbmUAAgpibHVyTW9ubzE2AAMHaHNsX2wxNgAEB3Vuc2hhcnAABQkBAAqJEAXZAQEGfAJAIAFE24a6Q4Ia+z8gALujIgOaEAAiBCAEoCIGtjgCECABIANEAAAAAAAAAMCiEAAiBbaMOAIUIAFEAAAAAAAA8D8gBKEiAiACoiAEIAMgA6CiRAAAAAAAAPA/oCAFoaMiArY4AgAgASAEIANEAAAAAAAA8L+gIAKioiIHtjgCBCABIAQgA0QAAAAAAADwP6AgAqKiIgO2OAIIIAEgBSACoiIEtow4AgwgASACIAegIAVEAAAAAAAA8D8gBqGgIgKjtjgCGCABIAMgBKEgAqO2OAIcCwu3AwMDfwR9CHwCQCADKgIUIQkgAyoCECEKIAMqAgwhCyADKgIIIQwCQCAEQX9qIgdBAEgiCA0AIAIgAC8BALgiDSADKgIYu6IiDiAJuyIQoiAOIAq7IhGiIA0gAyoCBLsiEqIgAyoCALsiEyANoqCgoCIPtjgCACACQQRqIQIgAEECaiEAIAdFDQAgBCEGA0AgAiAOIBCiIA8iDiARoiANIBKiIBMgAC8BALgiDaKgoKAiD7Y4AgAgAkEEaiECIABBAmohACAGQX9qIgZBAUoNAAsLAkAgCA0AIAEgByAFbEEBdGogAEF+ai8BACIIuCINIAu7IhGiIA0gDLsiEqKgIA0gAyoCHLuiIg4gCrsiE6KgIA4gCbsiFKKgIg8gAkF8aioCALugqzsBACAHRQ0AIAJBeGohAiAAQXxqIQBBACAFQQF0ayEHIAEgBSAEQQF0QXxqbGohBgNAIAghAyAALwEAIQggBiANIBGiIAO4Ig0gEqKgIA8iECAToqAgDiAUoqAiDyACKgIAu6CrOwEAIAYgB2ohBiAAQX5qIQAgAkF8aiECIBAhDiAEQX9qIgRBAUoNAAsLCwvfAgIDfwZ8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIgyaEAAiDSANoCIPtjgCECAEIAxEAAAAAAAAAMCiEAAiDraMOAIUIAREAAAAAAAA8D8gDaEiCyALoiANIAwgDKCiRAAAAAAAAPA/oCAOoaMiC7Y4AgAgBCANIAxEAAAAAAAA8L+gIAuioiIQtjgCBCAEIA0gDEQAAAAAAADwP6AgC6KiIgy2OAIIIAQgDiALoiINtow4AgwgBCALIBCgIA5EAAAAAAAA8D8gD6GgIgujtjgCGCAEIAwgDaEgC6O2OAIcIAYEQCAFQQF0IQogBiEJIAIhCANAIAAgCCADIAQgBSAGEAIgACAKaiEAIAhBAmohCCAJQX9qIgkNAAsLIAVFDQAgBkEBdCEIIAUhAANAIAIgASADIAQgBiAFEAIgAiAIaiECIAFBAmohASAAQX9qIgANAAsLC7wBAQV/IAMgAmwiAwRAQQAgA2shBgNAIAAoAgAiBEEIdiIHQf8BcSECAn8gBEH/AXEiAyAEQRB2IgRB/wFxIgVPBEAgAyIIIAMgAk8NARoLIAQgBCAHIAIgA0kbIAIgBUkbQf8BcQshCAJAIAMgAk0EQCADIAVNDQELIAQgByAEIAMgAk8bIAIgBUsbQf8BcSEDCyAAQQRqIQAgASADIAhqQYECbEEBdjsBACABQQJqIQEgBkEBaiIGDQALCwvTBgEKfwJAIAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6CqIQ0gBSAEbCILBEAgB0GBAmwhDgNAQQAgAi8BACADLwEAayIGQQF0IgdrIAcgBkEASBsgDk8EQCAAQQJqLQAAIQUCfyAALQAAIgYgAEEBai0AACIESSIJRQRAIAYiCCAGIAVPDQEaCyAFIAUgBCAEIAVJGyAGIARLGwshCAJ/IAYgBE0EQCAGIgogBiAFTQ0BGgsgBSAFIAQgBCAFSxsgCRsLIgogCGoiD0GBAmwiEEEBdiERQQAhDAJ/QQAiCSAIIApGDQAaIAggCmsiCUH/H2wgD0H+AyAIayAKayAQQYCABEkbbSEMIAYgCEYEQCAEIAVrQf//A2wgCUEGbG0MAQsgBSAGayAGIARrIAQgCEYiBhtB//8DbCAJQQZsbUHVqgFBqtUCIAYbagshCSARIAcgDWxBgBBqQQx1aiIGQQAgBkEAShsiBkH//wMgBkH//wNIGyEGAkACfwJAIAxB//8DcSIFBEAgBkH//wFKDQEgBUGAIGogBmxBgBBqQQx2DAILIAZBCHYiBiEFIAYhBAwCCyAFIAZB//8Dc2xBgBBqQQx2IAZqCyIFQQh2IQcgBkEBdCAFa0EIdiIGIQQCQCAJQdWqAWpB//8DcSIFQanVAksNACAFQf//AU8EQEGq1QIgBWsgByAGa2xBBmxBgIACakEQdiAGaiEEDAELIAchBCAFQanVAEsNACAFIAcgBmtsQQZsQYCAAmpBEHYgBmohBAsCfyAGIgUgCUH//wNxIghBqdUCSw0AGkGq1QIgCGsgByAGa2xBBmxBgIACakEQdiAGaiAIQf//AU8NABogByIFIAhBqdUASw0AGiAIIAcgBmtsQQZsQYCAAmpBEHYgBmoLIQUgCUGr1QJqQf//A3EiCEGp1QJLDQAgCEH//wFPBEBBqtUCIAhrIAcgBmtsQQZsQYCAAmpBEHYgBmohBgwBCyAIQanVAEsEQCAHIQYMAQsgCCAHIAZrbEEGbEGAgAJqQRB2IAZqIQYLIAEgBDoAACABQQFqIAU6AAAgAUECaiAGOgAACyADQQJqIQMgAkECaiECIABBBGohACABQQRqIQEgC0F/aiILDQALCwsL';

},{}],23:[function(require,module,exports){
// Detect WebAssembly support.
// - Check global WebAssembly object
// - Try to load simple module (can be disabled via CSP)
//
'use strict';


var wa;


module.exports = function hasWebAssembly() {
  // use cache if called before;
  if (typeof wa !== 'undefined') return wa;

  wa = false;

  if (typeof WebAssembly === 'undefined') return wa;

  // If WebAssenbly is disabled, code can throw on compile
  try {
    // https://github.com/brion/min-wasm-fail/blob/master/min-wasm-fail.in.js
    // Additional check that WA internals are correct

    /* eslint-disable comma-spacing, max-len */
    var bin      = new Uint8Array([ 0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11 ]);
    var module   = new WebAssembly.Module(bin);
    var instance = new WebAssembly.Instance(module, {});

    // test storing to and loading from a non-zero location via a parameter.
    // Safari on iOS 11.2.5 returns 0 unexpectedly at non-zero locations
    if (instance.exports.test(4) !== 0) wa = true;

    return wa;
  } catch (__) {}

  return wa;
};

},{}],24:[function(require,module,exports){
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

'use strict';
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;

function toObject(val) {
	if (val === null || val === undefined) {
		throw new TypeError('Object.assign cannot be called with null or undefined');
	}

	return Object(val);
}

function shouldUseNative() {
	try {
		if (!Object.assign) {
			return false;
		}

		// Detect buggy property enumeration order in older V8 versions.

		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
		test1[5] = 'de';
		if (Object.getOwnPropertyNames(test1)[0] === '5') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test2 = {};
		for (var i = 0; i < 10; i++) {
			test2['_' + String.fromCharCode(i)] = i;
		}
		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
			return test2[n];
		});
		if (order2.join('') !== '0123456789') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test3 = {};
		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
			test3[letter] = letter;
		});
		if (Object.keys(Object.assign({}, test3)).join('') !==
				'abcdefghijklmnopqrst') {
			return false;
		}

		return true;
	} catch (err) {
		// We don't expect any of the above to throw, but better to be safe.
		return false;
	}
}

module.exports = shouldUseNative() ? Object.assign : function (target, source) {
	var from;
	var to = toObject(target);
	var symbols;

	for (var s = 1; s < arguments.length; s++) {
		from = Object(arguments[s]);

		for (var key in from) {
			if (hasOwnProperty.call(from, key)) {
				to[key] = from[key];
			}
		}

		if (getOwnPropertySymbols) {
			symbols = getOwnPropertySymbols(from);
			for (var i = 0; i < symbols.length; i++) {
				if (propIsEnumerable.call(from, symbols[i])) {
					to[symbols[i]] = from[symbols[i]];
				}
			}
		}
	}

	return to;
};

},{}],25:[function(require,module,exports){
var bundleFn = arguments[3];
var sources = arguments[4];
var cache = arguments[5];

var stringify = JSON.stringify;

module.exports = function (fn, options) {
    var wkey;
    var cacheKeys = Object.keys(cache);

    for (var i = 0, l = cacheKeys.length; i < l; i++) {
        var key = cacheKeys[i];
        var exp = cache[key].exports;
        // Using babel as a transpiler to use esmodule, the export will always
        // be an object with the default export as a property of it. To ensure
        // the existing api and babel esmodule exports are both supported we
        // check for both
        if (exp === fn || exp && exp.default === fn) {
            wkey = key;
            break;
        }
    }

    if (!wkey) {
        wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);
        var wcache = {};
        for (var i = 0, l = cacheKeys.length; i < l; i++) {
            var key = cacheKeys[i];
            wcache[key] = key;
        }
        sources[wkey] = [
            'function(require,module,exports){' + fn + '(self); }',
            wcache
        ];
    }
    var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);

    var scache = {}; scache[wkey] = wkey;
    sources[skey] = [
        'function(require,module,exports){' +
            // try to call default if defined to also support babel esmodule exports
            'var f = require(' + stringify(wkey) + ');' +
            '(f.default ? f.default : f)(self);' +
        '}',
        scache
    ];

    var workerSources = {};
    resolveSources(skey);

    function resolveSources(key) {
        workerSources[key] = true;

        for (var depPath in sources[key][1]) {
            var depKey = sources[key][1][depPath];
            if (!workerSources[depKey]) {
                resolveSources(depKey);
            }
        }
    }

    var src = '(' + bundleFn + ')({'
        + Object.keys(workerSources).map(function (key) {
            return stringify(key) + ':['
                + sources[key][0]
                + ',' + stringify(sources[key][1]) + ']'
            ;
        }).join(',')
        + '},{},[' + stringify(skey) + '])'
    ;

    var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;

    var blob = new Blob([src], { type: 'text/javascript' });
    if (options && options.bare) { return blob; }
    var workerUrl = URL.createObjectURL(blob);
    var worker = new Worker(workerUrl);
    worker.objectURL = workerUrl;
    return worker;
};

},{}],"/":[function(require,module,exports){
'use strict';

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }

function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

var assign = require('object-assign');

var webworkify = require('webworkify');

var MathLib = require('./lib/mathlib');

var Pool = require('./lib/pool');

var utils = require('./lib/utils');

var worker = require('./lib/worker');

var createStages = require('./lib/stepper');

var createRegions = require('./lib/tiler'); // Deduplicate pools & limiters with the same configs
// when user creates multiple pica instances.


var singletones = {};
var NEED_SAFARI_FIX = false;

try {
  if (typeof navigator !== 'undefined' && navigator.userAgent) {
    NEED_SAFARI_FIX = navigator.userAgent.indexOf('Safari') >= 0;
  }
} catch (e) {}

var concurrency = 1;

if (typeof navigator !== 'undefined') {
  concurrency = Math.min(navigator.hardwareConcurrency || 1, 4);
}

var DEFAULT_PICA_OPTS = {
  tile: 1024,
  concurrency: concurrency,
  features: ['js', 'wasm', 'ww'],
  idle: 2000
};
var DEFAULT_RESIZE_OPTS = {
  quality: 3,
  alpha: false,
  unsharpAmount: 0,
  unsharpRadius: 0.0,
  unsharpThreshold: 0
};
var CAN_NEW_IMAGE_DATA;
var CAN_CREATE_IMAGE_BITMAP;

function workerFabric() {
  return {
    value: webworkify(worker),
    destroy: function destroy() {
      this.value.terminate();

      if (typeof window !== 'undefined') {
        var url = window.URL || window.webkitURL || window.mozURL || window.msURL;

        if (url && url.revokeObjectURL && this.value.objectURL) {
          url.revokeObjectURL(this.value.objectURL);
        }
      }
    }
  };
} ////////////////////////////////////////////////////////////////////////////////
// API methods


function Pica(options) {
  if (!(this instanceof Pica)) return new Pica(options);
  this.options = assign({}, DEFAULT_PICA_OPTS, options || {});
  var limiter_key = "lk_".concat(this.options.concurrency); // Share limiters to avoid multiple parallel workers when user creates
  // multiple pica instances.

  this.__limit = singletones[limiter_key] || utils.limiter(this.options.concurrency);
  if (!singletones[limiter_key]) singletones[limiter_key] = this.__limit; // List of supported features, according to options & browser/node.js

  this.features = {
    js: false,
    // pure JS implementation, can be disabled for testing
    wasm: false,
    // webassembly implementation for heavy functions
    cib: false,
    // resize via createImageBitmap (only FF at this moment)
    ww: false // webworkers

  };
  this.__workersPool = null; // Store requested features for webworkers

  this.__requested_features = [];
  this.__mathlib = null;
}

Pica.prototype.init = function () {
  var _this = this;

  if (this.__initPromise) return this.__initPromise; // Test if we can create ImageData without canvas and memory copy

  if (CAN_NEW_IMAGE_DATA !== false && CAN_NEW_IMAGE_DATA !== true) {
    CAN_NEW_IMAGE_DATA = false;

    if (typeof ImageData !== 'undefined' && typeof Uint8ClampedArray !== 'undefined') {
      try {
        /* eslint-disable no-new */
        new ImageData(new Uint8ClampedArray(400), 10, 10);
        CAN_NEW_IMAGE_DATA = true;
      } catch (__) {}
    }
  } // ImageBitmap can be effective in 2 places:
  //
  // 1. Threaded jpeg unpack (basic)
  // 2. Built-in resize (blocked due problem in chrome, see issue #89)
  //
  // For basic use we also need ImageBitmap wo support .close() method,
  // see https://developer.mozilla.org/ru/docs/Web/API/ImageBitmap


  if (CAN_CREATE_IMAGE_BITMAP !== false && CAN_CREATE_IMAGE_BITMAP !== true) {
    CAN_CREATE_IMAGE_BITMAP = false;

    if (typeof ImageBitmap !== 'undefined') {
      if (ImageBitmap.prototype && ImageBitmap.prototype.close) {
        CAN_CREATE_IMAGE_BITMAP = true;
      } else {
        this.debug('ImageBitmap does not support .close(), disabled');
      }
    }
  }

  var features = this.options.features.slice();

  if (features.indexOf('all') >= 0) {
    features = ['cib', 'wasm', 'js', 'ww'];
  }

  this.__requested_features = features;
  this.__mathlib = new MathLib(features); // Check WebWorker support if requested

  if (features.indexOf('ww') >= 0) {
    if (typeof window !== 'undefined' && 'Worker' in window) {
      // IE <= 11 don't allow to create webworkers from string. We should check it.
      // https://connect.microsoft.com/IE/feedback/details/801810/web-workers-from-blob-urls-in-ie-10-and-11
      try {
        var wkr = require('webworkify')(function () {});

        wkr.terminate();
        this.features.ww = true; // pool uniqueness depends on pool config + webworker config

        var wpool_key = "wp_".concat(JSON.stringify(this.options));

        if (singletones[wpool_key]) {
          this.__workersPool = singletones[wpool_key];
        } else {
          this.__workersPool = new Pool(workerFabric, this.options.idle);
          singletones[wpool_key] = this.__workersPool;
        }
      } catch (__) {}
    }
  }

  var initMath = this.__mathlib.init().then(function (mathlib) {
    // Copy detected features
    assign(_this.features, mathlib.features);
  });

  var checkCibResize;

  if (!CAN_CREATE_IMAGE_BITMAP) {
    checkCibResize = Promise.resolve(false);
  } else {
    checkCibResize = utils.cib_support().then(function (status) {
      if (_this.features.cib && features.indexOf('cib') < 0) {
        _this.debug('createImageBitmap() resize supported, but disabled by config');

        return;
      }

      if (features.indexOf('cib') >= 0) _this.features.cib = status;
    });
  } // Init math lib. That's async because can load some


  this.__initPromise = Promise.all([initMath, checkCibResize]).then(function () {
    return _this;
  });
  return this.__initPromise;
};

Pica.prototype.resize = function (from, to, options) {
  var _this2 = this;

  this.debug('Start resize...');
  var opts = assign({}, DEFAULT_RESIZE_OPTS);

  if (!isNaN(options)) {
    opts = assign(opts, {
      quality: options
    });
  } else if (options) {
    opts = assign(opts, options);
  }

  opts.toWidth = to.width;
  opts.toHeight = to.height;
  opts.width = from.naturalWidth || from.width;
  opts.height = from.naturalHeight || from.height; // Prevent stepper from infinite loop

  if (to.width === 0 || to.height === 0) {
    return Promise.reject(new Error("Invalid output size: ".concat(to.width, "x").concat(to.height)));
  }

  if (opts.unsharpRadius > 2) opts.unsharpRadius = 2;
  var canceled = false;
  var cancelToken = null;

  if (opts.cancelToken) {
    // Wrap cancelToken to avoid successive resolve & set flag
    cancelToken = opts.cancelToken.then(function (data) {
      canceled = true;
      throw data;
    }, function (err) {
      canceled = true;
      throw err;
    });
  }

  var DEST_TILE_BORDER = 3; // Max possible filter window size

  var destTileBorder = Math.ceil(Math.max(DEST_TILE_BORDER, 2.5 * opts.unsharpRadius | 0));
  return this.init().then(function () {
    if (canceled) return cancelToken; // if createImageBitmap supports resize, just do it and return

    if (_this2.features.cib) {
      var toCtx = to.getContext('2d', {
        alpha: Boolean(opts.alpha)
      });

      _this2.debug('Resize via createImageBitmap()');

      return createImageBitmap(from, {
        resizeWidth: opts.toWidth,
        resizeHeight: opts.toHeight,
        resizeQuality: utils.cib_quality_name(opts.quality)
      }).then(function (imageBitmap) {
        if (canceled) return cancelToken; // if no unsharp - draw directly to output canvas

        if (!opts.unsharpAmount) {
          toCtx.drawImage(imageBitmap, 0, 0);
          imageBitmap.close();
          toCtx = null;

          _this2.debug('Finished!');

          return to;
        }

        _this2.debug('Unsharp result');

        var tmpCanvas = document.createElement('canvas');
        tmpCanvas.width = opts.toWidth;
        tmpCanvas.height = opts.toHeight;
        var tmpCtx = tmpCanvas.getContext('2d', {
          alpha: Boolean(opts.alpha)
        });
        tmpCtx.drawImage(imageBitmap, 0, 0);
        imageBitmap.close();
        var iData = tmpCtx.getImageData(0, 0, opts.toWidth, opts.toHeight);

        _this2.__mathlib.unsharp_mask(iData.data, opts.toWidth, opts.toHeight, opts.unsharpAmount, opts.unsharpRadius, opts.unsharpThreshold);

        toCtx.putImageData(iData, 0, 0);
        iData = tmpCtx = tmpCanvas = toCtx = null;

        _this2.debug('Finished!');

        return to;
      });
    } //
    // No easy way, let's resize manually via arrays
    //
    // Share cache between calls:
    //
    // - wasm instance
    // - wasm memory object
    //


    var cache = {}; // Call resizer in webworker or locally, depending on config

    var invokeResize = function invokeResize(opts) {
      return Promise.resolve().then(function () {
        if (!_this2.features.ww) return _this2.__mathlib.resizeAndUnsharp(opts, cache);
        return new Promise(function (resolve, reject) {
          var w = _this2.__workersPool.acquire();

          if (cancelToken) cancelToken["catch"](function (err) {
            return reject(err);
          });

          w.value.onmessage = function (ev) {
            w.release();
            if (ev.data.err) reject(ev.data.err);else resolve(ev.data.result);
          };

          w.value.postMessage({
            opts: opts,
            features: _this2.__requested_features,
            preload: {
              wasm_nodule: _this2.__mathlib.__
            }
          }, [opts.src.buffer]);
        });
      });
    };

    var tileAndResize = function tileAndResize(from, to, opts) {
      var srcCtx;
      var srcImageBitmap;
      var toCtx;

      var processTile = function processTile(tile) {
        return _this2.__limit(function () {
          if (canceled) return cancelToken;
          var srcImageData; // Extract tile RGBA buffer, depending on input type

          if (utils.isCanvas(from)) {
            _this2.debug('Get tile pixel data'); // If input is Canvas - extract region data directly


            srcImageData = srcCtx.getImageData(tile.x, tile.y, tile.width, tile.height);
          } else {
            // If input is Image or decoded to ImageBitmap,
            // draw region to temporary canvas and extract data from it
            //
            // Note! Attempt to reuse this canvas causes significant slowdown in chrome
            //
            _this2.debug('Draw tile imageBitmap/image to temporary canvas');

            var tmpCanvas = document.createElement('canvas');
            tmpCanvas.width = tile.width;
            tmpCanvas.height = tile.height;
            var tmpCtx = tmpCanvas.getContext('2d', {
              alpha: Boolean(opts.alpha)
            });
            tmpCtx.globalCompositeOperation = 'copy';
            tmpCtx.drawImage(srcImageBitmap || from, tile.x, tile.y, tile.width, tile.height, 0, 0, tile.width, tile.height);

            _this2.debug('Get tile pixel data');

            srcImageData = tmpCtx.getImageData(0, 0, tile.width, tile.height);
            tmpCtx = tmpCanvas = null;
          }

          var o = {
            src: srcImageData.data,
            width: tile.width,
            height: tile.height,
            toWidth: tile.toWidth,
            toHeight: tile.toHeight,
            scaleX: tile.scaleX,
            scaleY: tile.scaleY,
            offsetX: tile.offsetX,
            offsetY: tile.offsetY,
            quality: opts.quality,
            alpha: opts.alpha,
            unsharpAmount: opts.unsharpAmount,
            unsharpRadius: opts.unsharpRadius,
            unsharpThreshold: opts.unsharpThreshold
          };

          _this2.debug('Invoke resize math');

          return Promise.resolve().then(function () {
            return invokeResize(o);
          }).then(function (result) {
            if (canceled) return cancelToken;
            srcImageData = null;
            var toImageData;

            _this2.debug('Convert raw rgba tile result to ImageData');

            if (CAN_NEW_IMAGE_DATA) {
              // this branch is for modern browsers
              // If `new ImageData()` & Uint8ClampedArray suported
              toImageData = new ImageData(new Uint8ClampedArray(result), tile.toWidth, tile.toHeight);
            } else {
              // fallback for `node-canvas` and old browsers
              // (IE11 has ImageData but does not support `new ImageData()`)
              toImageData = toCtx.createImageData(tile.toWidth, tile.toHeight);

              if (toImageData.data.set) {
                toImageData.data.set(result);
              } else {
                // IE9 don't have `.set()`
                for (var i = toImageData.data.length - 1; i >= 0; i--) {
                  toImageData.data[i] = result[i];
                }
              }
            }

            _this2.debug('Draw tile');

            if (NEED_SAFARI_FIX) {
              // Safari draws thin white stripes between tiles without this fix
              toCtx.putImageData(toImageData, tile.toX, tile.toY, tile.toInnerX - tile.toX, tile.toInnerY - tile.toY, tile.toInnerWidth + 1e-5, tile.toInnerHeight + 1e-5);
            } else {
              toCtx.putImageData(toImageData, tile.toX, tile.toY, tile.toInnerX - tile.toX, tile.toInnerY - tile.toY, tile.toInnerWidth, tile.toInnerHeight);
            }

            return null;
          });
        });
      }; // Need to normalize data source first. It can be canvas or image.
      // If image - try to decode in background if possible


      return Promise.resolve().then(function () {
        toCtx = to.getContext('2d', {
          alpha: Boolean(opts.alpha)
        });

        if (utils.isCanvas(from)) {
          srcCtx = from.getContext('2d', {
            alpha: Boolean(opts.alpha)
          });
          return null;
        }

        if (utils.isImage(from)) {
          // try do decode image in background for faster next operations
          if (!CAN_CREATE_IMAGE_BITMAP) return null;

          _this2.debug('Decode image via createImageBitmap');

          return createImageBitmap(from).then(function (imageBitmap) {
            srcImageBitmap = imageBitmap;
          });
        }

        throw new Error('".from" should be image or canvas');
      }).then(function () {
        if (canceled) return cancelToken;

        _this2.debug('Calculate tiles'); //
        // Here we are with "normalized" source,
        // follow to tiling
        //


        var regions = createRegions({
          width: opts.width,
          height: opts.height,
          srcTileSize: _this2.options.tile,
          toWidth: opts.toWidth,
          toHeight: opts.toHeight,
          destTileBorder: destTileBorder
        });
        var jobs = regions.map(function (tile) {
          return processTile(tile);
        });

        function cleanup() {
          if (srcImageBitmap) {
            srcImageBitmap.close();
            srcImageBitmap = null;
          }
        }

        _this2.debug('Process tiles');

        return Promise.all(jobs).then(function () {
          _this2.debug('Finished!');

          cleanup();
          return to;
        }, function (err) {
          cleanup();
          throw err;
        });
      });
    };

    var processStages = function processStages(stages, from, to, opts) {
      if (canceled) return cancelToken;

      var _stages$shift = stages.shift(),
          _stages$shift2 = _slicedToArray(_stages$shift, 2),
          toWidth = _stages$shift2[0],
          toHeight = _stages$shift2[1];

      var isLastStage = stages.length === 0;
      opts = assign({}, opts, {
        toWidth: toWidth,
        toHeight: toHeight,
        // only use user-defined quality for the last stage,
        // use simpler (Hamming) filter for the first stages where
        // scale factor is large enough (more than 2-3)
        quality: isLastStage ? opts.quality : Math.min(1, opts.quality)
      });
      var tmpCanvas;

      if (!isLastStage) {
        // create temporary canvas
        tmpCanvas = document.createElement('canvas');
        tmpCanvas.width = toWidth;
        tmpCanvas.height = toHeight;
      }

      return tileAndResize(from, isLastStage ? to : tmpCanvas, opts).then(function () {
        if (isLastStage) return to;
        opts.width = toWidth;
        opts.height = toHeight;
        return processStages(stages, tmpCanvas, to, opts);
      });
    };

    var stages = createStages(opts.width, opts.height, opts.toWidth, opts.toHeight, _this2.options.tile, destTileBorder);
    return processStages(stages, from, to, opts);
  });
}; // RGBA buffer resize
//


Pica.prototype.resizeBuffer = function (options) {
  var _this3 = this;

  var opts = assign({}, DEFAULT_RESIZE_OPTS, options);
  return this.init().then(function () {
    return _this3.__mathlib.resizeAndUnsharp(opts);
  });
};

Pica.prototype.toBlob = function (canvas, mimeType, quality) {
  mimeType = mimeType || 'image/png';
  return new Promise(function (resolve) {
    if (canvas.toBlob) {
      canvas.toBlob(function (blob) {
        return resolve(blob);
      }, mimeType, quality);
      return;
    } // Fallback for old browsers


    var asString = atob(canvas.toDataURL(mimeType, quality).split(',')[1]);
    var len = asString.length;
    var asBuffer = new Uint8Array(len);

    for (var i = 0; i < len; i++) {
      asBuffer[i] = asString.charCodeAt(i);
    }

    resolve(new Blob([asBuffer], {
      type: mimeType
    }));
  });
};

Pica.prototype.debug = function () {};

module.exports = Pica;

},{"./lib/mathlib":1,"./lib/pool":9,"./lib/stepper":10,"./lib/tiler":11,"./lib/utils":12,"./lib/worker":13,"object-assign":24,"webworkify":25}]},{},[])("/")
});


/***/ }),

/***/ "./node_modules/regenerator-runtime/runtime.js":
/*!*****************************************************!*\
  !*** ./node_modules/regenerator-runtime/runtime.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {/**
 * Copyright (c) 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
 * additional grant of patent rights can be found in the PATENTS file in
 * the same directory.
 */

!(function(global) {
  "use strict";

  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";

  var inModule = typeof module === "object";
  var runtime = global.regeneratorRuntime;
  if (runtime) {
    if (inModule) {
      // If regeneratorRuntime is defined globally and we're in a module,
      // make the exports object identical to regeneratorRuntime.
      module.exports = runtime;
    }
    // Don't bother evaluating the rest of this file if the runtime was
    // already defined globally.
    return;
  }

  // Define the runtime globally (as expected by generated code) as either
  // module.exports (if we're in a module) or a new, empty object.
  runtime = global.regeneratorRuntime = inModule ? module.exports : {};

  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);

    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    generator._invoke = makeInvokeMethod(innerFn, self, context);

    return generator;
  }
  runtime.wrap = wrap;

  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }

  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";

  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};

  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}

  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  IteratorPrototype[iteratorSymbol] = function () {
    return this;
  };

  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }

  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  GeneratorFunctionPrototype.constructor = GeneratorFunction;
  GeneratorFunctionPrototype[toStringTagSymbol] =
    GeneratorFunction.displayName = "GeneratorFunction";

  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      prototype[method] = function(arg) {
        return this._invoke(method, arg);
      };
    });
  }

  runtime.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };

  runtime.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      if (!(toStringTagSymbol in genFun)) {
        genFun[toStringTagSymbol] = "GeneratorFunction";
      }
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };

  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  runtime.awrap = function(arg) {
    return { __await: arg };
  };

  function AsyncIterator(generator) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return Promise.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }

        return Promise.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration. If the Promise is rejected, however, the
          // result for this iteration will be rejected with the same
          // reason. Note that rejections of yielded Promises are not
          // thrown back into the generator function, as is the case
          // when an awaited Promise is rejected. This difference in
          // behavior between yield and await is important, because it
          // allows the consumer to decide what to do with the yielded
          // rejection (swallow it and continue, manually .throw it back
          // into the generator, abandon iteration, whatever). With
          // await, by contrast, there is no opportunity to examine the
          // rejection reason outside the generator function, so the
          // only option is to throw it from the await expression, and
          // let the generator function handle the exception.
          result.value = unwrapped;
          resolve(result);
        }, reject);
      }
    }

    if (typeof global.process === "object" && global.process.domain) {
      invoke = global.process.domain.bind(invoke);
    }

    var previousPromise;

    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new Promise(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }

      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }

    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    this._invoke = enqueue;
  }

  defineIteratorMethods(AsyncIterator.prototype);
  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
    return this;
  };
  runtime.AsyncIterator = AsyncIterator;

  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  runtime.async = function(innerFn, outerFn, self, tryLocsList) {
    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList)
    );

    return runtime.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };

  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;

    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }

      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }

        // Be forgiving, per 25.3.3.3.3 of the spec:
        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
        return doneResult();
      }

      context.method = method;
      context.arg = arg;

      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }

        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;

        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }

          context.dispatchException(context.arg);

        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }

        state = GenStateExecuting;

        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;

          if (record.arg === ContinueSentinel) {
            continue;
          }

          return {
            value: record.arg,
            done: context.done
          };

        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }

  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method always terminates the yield* loop.
      context.delegate = null;

      if (context.method === "throw") {
        if (delegate.iterator.return) {
          // If the delegate iterator has a return method, give it a
          // chance to clean up.
          context.method = "return";
          context.arg = undefined;
          maybeInvokeDelegate(delegate, context);

          if (context.method === "throw") {
            // If maybeInvokeDelegate(context) changed context.method from
            // "return" to "throw", let that override the TypeError below.
            return ContinueSentinel;
          }
        }

        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a 'throw' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;

      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;

      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }

    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }

    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }

  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);

  Gp[toStringTagSymbol] = "Generator";

  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  Gp[iteratorSymbol] = function() {
    return this;
  };

  Gp.toString = function() {
    return "[object Generator]";
  };

  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };

    if (1 in locs) {
      entry.catchLoc = locs[1];
    }

    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }

    this.tryEntries.push(entry);
  }

  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }

  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }

  runtime.keys = function(object) {
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();

    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }

      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };

  function values(iterable) {
    if (iterable) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }

      if (typeof iterable.next === "function") {
        return iterable;
      }

      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }

          next.value = undefined;
          next.done = true;

          return next;
        };

        return next.next = next;
      }
    }

    // Return an iterator with no values.
    return { next: doneResult };
  }
  runtime.values = values;

  function doneResult() {
    return { value: undefined, done: true };
  }

  Context.prototype = {
    constructor: Context,

    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;

      this.method = "next";
      this.arg = undefined;

      this.tryEntries.forEach(resetTryEntry);

      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },

    stop: function() {
      this.done = true;

      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }

      return this.rval;
    },

    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }

      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;

        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }

        return !! caught;
      }

      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;

        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }

        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");

          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }

          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },

    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }

      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }

      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;

      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }

      return this.complete(record);
    },

    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }

      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }

      return ContinueSentinel;
    },

    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },

    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }

      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },

    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };

      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }

      return ContinueSentinel;
    }
  };
})(
  // Among the various tricks for obtaining a reference to the global
  // object, this seems to be the most reliable technique that does not
  // use indirect eval (which violates Content Security Policy).
  typeof global === "object" ? global :
  typeof window === "object" ? window :
  typeof self === "object" ? self : this
);

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))

/***/ }),

/***/ "./node_modules/spectrum-colorpicker/spectrum.css":
/*!********************************************************!*\
  !*** ./node_modules/spectrum-colorpicker/spectrum.css ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../css-loader/dist/cjs.js??ref--4-1!./spectrum.css */ "./node_modules/css-loader/dist/cjs.js?!./node_modules/spectrum-colorpicker/spectrum.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./node_modules/spectrum-colorpicker/spectrum.js":
/*!*******************************************************!*\
  !*** ./node_modules/spectrum-colorpicker/spectrum.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Spectrum Colorpicker v1.8.0
// https://github.com/bgrins/spectrum
// Author: Brian Grinstead
// License: MIT

(function (factory) {
    "use strict";

    if (true) { // AMD
        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    }
    else {}
})(function($, undefined) {
    "use strict";

    var defaultOpts = {

        // Callbacks
        beforeShow: noop,
        move: noop,
        change: noop,
        show: noop,
        hide: noop,

        // Options
        color: false,
        flat: false,
        showInput: false,
        allowEmpty: false,
        showButtons: true,
        clickoutFiresChange: true,
        showInitial: false,
        showPalette: false,
        showPaletteOnly: false,
        hideAfterPaletteSelect: false,
        togglePaletteOnly: false,
        showSelectionPalette: true,
        localStorageKey: false,
        appendTo: "body",
        maxSelectionSize: 7,
        cancelText: "cancel",
        chooseText: "choose",
        togglePaletteMoreText: "more",
        togglePaletteLessText: "less",
        clearText: "Clear Color Selection",
        noColorSelectedText: "No Color Selected",
        preferredFormat: false,
        className: "", // Deprecated - use containerClassName and replacerClassName instead.
        containerClassName: "",
        replacerClassName: "",
        showAlpha: false,
        theme: "sp-light",
        palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]],
        selectionPalette: [],
        disabled: false,
        offset: null
    },
    spectrums = [],
    IE = !!/msie/i.exec( window.navigator.userAgent ),
    rgbaSupport = (function() {
        function contains( str, substr ) {
            return !!~('' + str).indexOf(substr);
        }

        var elem = document.createElement('div');
        var style = elem.style;
        style.cssText = 'background-color:rgba(0,0,0,.5)';
        return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
    })(),
    replaceInput = [
        "<div class='sp-replacer'>",
            "<div class='sp-preview'><div class='sp-preview-inner'></div></div>",
            "<div class='sp-dd'>&#9660;</div>",
        "</div>"
    ].join(''),
    markup = (function () {

        // IE does not support gradients with multiple stops, so we need to simulate
        //  that for the rainbow slider with 8 divs that each have a single gradient
        var gradientFix = "";
        if (IE) {
            for (var i = 1; i <= 6; i++) {
                gradientFix += "<div class='sp-" + i + "'></div>";
            }
        }

        return [
            "<div class='sp-container sp-hidden'>",
                "<div class='sp-palette-container'>",
                    "<div class='sp-palette sp-thumb sp-cf'></div>",
                    "<div class='sp-palette-button-container sp-cf'>",
                        "<button type='button' class='sp-palette-toggle'></button>",
                    "</div>",
                "</div>",
                "<div class='sp-picker-container'>",
                    "<div class='sp-top sp-cf'>",
                        "<div class='sp-fill'></div>",
                        "<div class='sp-top-inner'>",
                            "<div class='sp-color'>",
                                "<div class='sp-sat'>",
                                    "<div class='sp-val'>",
                                        "<div class='sp-dragger'></div>",
                                    "</div>",
                                "</div>",
                            "</div>",
                            "<div class='sp-clear sp-clear-display'>",
                            "</div>",
                            "<div class='sp-hue'>",
                                "<div class='sp-slider'></div>",
                                gradientFix,
                            "</div>",
                        "</div>",
                        "<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",
                    "</div>",
                    "<div class='sp-input-container sp-cf'>",
                        "<input class='sp-input' type='text' spellcheck='false'  />",
                    "</div>",
                    "<div class='sp-initial sp-thumb sp-cf'></div>",
                    "<div class='sp-button-container sp-cf'>",
                        "<a class='sp-cancel' href='#'></a>",
                        "<button type='button' class='sp-choose'></button>",
                    "</div>",
                "</div>",
            "</div>"
        ].join("");
    })();

    function paletteTemplate (p, color, className, opts) {
        var html = [];
        for (var i = 0; i < p.length; i++) {
            var current = p[i];
            if(current) {
                var tiny = tinycolor(current);
                var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light";
                c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : "";
                var formattedString = tiny.toString(opts.preferredFormat || "rgb");
                var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter();
                html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span>');
            } else {
                var cls = 'sp-clear-display';
                html.push($('<div />')
                    .append($('<span data-color="" style="background-color:transparent;" class="' + cls + '"></span>')
                        .attr('title', opts.noColorSelectedText)
                    )
                    .html()
                );
            }
        }
        return "<div class='sp-cf " + className + "'>" + html.join('') + "</div>";
    }

    function hideAll() {
        for (var i = 0; i < spectrums.length; i++) {
            if (spectrums[i]) {
                spectrums[i].hide();
            }
        }
    }

    function instanceOptions(o, callbackContext) {
        var opts = $.extend({}, defaultOpts, o);
        opts.callbacks = {
            'move': bind(opts.move, callbackContext),
            'change': bind(opts.change, callbackContext),
            'show': bind(opts.show, callbackContext),
            'hide': bind(opts.hide, callbackContext),
            'beforeShow': bind(opts.beforeShow, callbackContext)
        };

        return opts;
    }

    function spectrum(element, o) {

        var opts = instanceOptions(o, element),
            flat = opts.flat,
            showSelectionPalette = opts.showSelectionPalette,
            localStorageKey = opts.localStorageKey,
            theme = opts.theme,
            callbacks = opts.callbacks,
            resize = throttle(reflow, 10),
            visible = false,
            isDragging = false,
            dragWidth = 0,
            dragHeight = 0,
            dragHelperHeight = 0,
            slideHeight = 0,
            slideWidth = 0,
            alphaWidth = 0,
            alphaSlideHelperWidth = 0,
            slideHelperHeight = 0,
            currentHue = 0,
            currentSaturation = 0,
            currentValue = 0,
            currentAlpha = 1,
            palette = [],
            paletteArray = [],
            paletteLookup = {},
            selectionPalette = opts.selectionPalette.slice(0),
            maxSelectionSize = opts.maxSelectionSize,
            draggingClass = "sp-dragging",
            shiftMovementDirection = null;

        var doc = element.ownerDocument,
            body = doc.body,
            boundElement = $(element),
            disabled = false,
            container = $(markup, doc).addClass(theme),
            pickerContainer = container.find(".sp-picker-container"),
            dragger = container.find(".sp-color"),
            dragHelper = container.find(".sp-dragger"),
            slider = container.find(".sp-hue"),
            slideHelper = container.find(".sp-slider"),
            alphaSliderInner = container.find(".sp-alpha-inner"),
            alphaSlider = container.find(".sp-alpha"),
            alphaSlideHelper = container.find(".sp-alpha-handle"),
            textInput = container.find(".sp-input"),
            paletteContainer = container.find(".sp-palette"),
            initialColorContainer = container.find(".sp-initial"),
            cancelButton = container.find(".sp-cancel"),
            clearButton = container.find(".sp-clear"),
            chooseButton = container.find(".sp-choose"),
            toggleButton = container.find(".sp-palette-toggle"),
            isInput = boundElement.is("input"),
            isInputTypeColor = isInput && boundElement.attr("type") === "color" && inputTypeColorSupport(),
            shouldReplace = isInput && !flat,
            replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName) : $([]),
            offsetElement = (shouldReplace) ? replacer : boundElement,
            previewElement = replacer.find(".sp-preview-inner"),
            initialColor = opts.color || (isInput && boundElement.val()),
            colorOnShow = false,
            currentPreferredFormat = opts.preferredFormat,
            clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,
            isEmpty = !initialColor,
            allowEmpty = opts.allowEmpty && !isInputTypeColor;

        function applyOptions() {

            if (opts.showPaletteOnly) {
                opts.showPalette = true;
            }

            toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);

            if (opts.palette) {
                palette = opts.palette.slice(0);
                paletteArray = $.isArray(palette[0]) ? palette : [palette];
                paletteLookup = {};
                for (var i = 0; i < paletteArray.length; i++) {
                    for (var j = 0; j < paletteArray[i].length; j++) {
                        var rgb = tinycolor(paletteArray[i][j]).toRgbString();
                        paletteLookup[rgb] = true;
                    }
                }
            }

            container.toggleClass("sp-flat", flat);
            container.toggleClass("sp-input-disabled", !opts.showInput);
            container.toggleClass("sp-alpha-enabled", opts.showAlpha);
            container.toggleClass("sp-clear-enabled", allowEmpty);
            container.toggleClass("sp-buttons-disabled", !opts.showButtons);
            container.toggleClass("sp-palette-buttons-disabled", !opts.togglePaletteOnly);
            container.toggleClass("sp-palette-disabled", !opts.showPalette);
            container.toggleClass("sp-palette-only", opts.showPaletteOnly);
            container.toggleClass("sp-initial-disabled", !opts.showInitial);
            container.addClass(opts.className).addClass(opts.containerClassName);

            reflow();
        }

        function initialize() {

            if (IE) {
                container.find("*:not(input)").attr("unselectable", "on");
            }

            applyOptions();

            if (shouldReplace) {
                boundElement.after(replacer).hide();
            }

            if (!allowEmpty) {
                clearButton.hide();
            }

            if (flat) {
                boundElement.after(container).hide();
            }
            else {

                var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo);
                if (appendTo.length !== 1) {
                    appendTo = $("body");
                }

                appendTo.append(container);
            }

            updateSelectionPaletteFromStorage();

            offsetElement.bind("click.spectrum touchstart.spectrum", function (e) {
                if (!disabled) {
                    toggle();
                }

                e.stopPropagation();

                if (!$(e.target).is("input")) {
                    e.preventDefault();
                }
            });

            if(boundElement.is(":disabled") || (opts.disabled === true)) {
                disable();
            }

            // Prevent clicks from bubbling up to document.  This would cause it to be hidden.
            container.click(stopPropagation);

            // Handle user typed input
            textInput.change(setFromTextInput);
            textInput.bind("paste", function () {
                setTimeout(setFromTextInput, 1);
            });
            textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } });

            cancelButton.text(opts.cancelText);
            cancelButton.bind("click.spectrum", function (e) {
                e.stopPropagation();
                e.preventDefault();
                revert();
                hide();
            });

            clearButton.attr("title", opts.clearText);
            clearButton.bind("click.spectrum", function (e) {
                e.stopPropagation();
                e.preventDefault();
                isEmpty = true;
                move();

                if(flat) {
                    //for the flat style, this is a change event
                    updateOriginalInput(true);
                }
            });

            chooseButton.text(opts.chooseText);
            chooseButton.bind("click.spectrum", function (e) {
                e.stopPropagation();
                e.preventDefault();

                if (IE && textInput.is(":focus")) {
                    textInput.trigger('change');
                }

                if (isValid()) {
                    updateOriginalInput(true);
                    hide();
                }
            });

            toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
            toggleButton.bind("click.spectrum", function (e) {
                e.stopPropagation();
                e.preventDefault();

                opts.showPaletteOnly = !opts.showPaletteOnly;

                // To make sure the Picker area is drawn on the right, next to the
                // Palette area (and not below the palette), first move the Palette
                // to the left to make space for the picker, plus 5px extra.
                // The 'applyOptions' function puts the whole container back into place
                // and takes care of the button-text and the sp-palette-only CSS class.
                if (!opts.showPaletteOnly && !flat) {
                    container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));
                }
                applyOptions();
            });

            draggable(alphaSlider, function (dragX, dragY, e) {
                currentAlpha = (dragX / alphaWidth);
                isEmpty = false;
                if (e.shiftKey) {
                    currentAlpha = Math.round(currentAlpha * 10) / 10;
                }

                move();
            }, dragStart, dragStop);

            draggable(slider, function (dragX, dragY) {
                currentHue = parseFloat(dragY / slideHeight);
                isEmpty = false;
                if (!opts.showAlpha) {
                    currentAlpha = 1;
                }
                move();
            }, dragStart, dragStop);

            draggable(dragger, function (dragX, dragY, e) {

                // shift+drag should snap the movement to either the x or y axis.
                if (!e.shiftKey) {
                    shiftMovementDirection = null;
                }
                else if (!shiftMovementDirection) {
                    var oldDragX = currentSaturation * dragWidth;
                    var oldDragY = dragHeight - (currentValue * dragHeight);
                    var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);

                    shiftMovementDirection = furtherFromX ? "x" : "y";
                }

                var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x";
                var setValue = !shiftMovementDirection || shiftMovementDirection === "y";

                if (setSaturation) {
                    currentSaturation = parseFloat(dragX / dragWidth);
                }
                if (setValue) {
                    currentValue = parseFloat((dragHeight - dragY) / dragHeight);
                }

                isEmpty = false;
                if (!opts.showAlpha) {
                    currentAlpha = 1;
                }

                move();

            }, dragStart, dragStop);

            if (!!initialColor) {
                set(initialColor);

                // In case color was black - update the preview UI and set the format
                // since the set function will not run (default color is black).
                updateUI();
                currentPreferredFormat = opts.preferredFormat || tinycolor(initialColor).format;

                addColorToSelectionPalette(initialColor);
            }
            else {
                updateUI();
            }

            if (flat) {
                show();
            }

            function paletteElementClick(e) {
                if (e.data && e.data.ignore) {
                    set($(e.target).closest(".sp-thumb-el").data("color"));
                    move();
                }
                else {
                    set($(e.target).closest(".sp-thumb-el").data("color"));
                    move();
                    updateOriginalInput(true);
                    if (opts.hideAfterPaletteSelect) {
                      hide();
                    }
                }

                return false;
            }

            var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum";
            paletteContainer.delegate(".sp-thumb-el", paletteEvent, paletteElementClick);
            initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, paletteElementClick);
        }

        function updateSelectionPaletteFromStorage() {

            if (localStorageKey && window.localStorage) {

                // Migrate old palettes over to new format.  May want to remove this eventually.
                try {
                    var oldPalette = window.localStorage[localStorageKey].split(",#");
                    if (oldPalette.length > 1) {
                        delete window.localStorage[localStorageKey];
                        $.each(oldPalette, function(i, c) {
                             addColorToSelectionPalette(c);
                        });
                    }
                }
                catch(e) { }

                try {
                    selectionPalette = window.localStorage[localStorageKey].split(";");
                }
                catch (e) { }
            }
        }

        function addColorToSelectionPalette(color) {
            if (showSelectionPalette) {
                var rgb = tinycolor(color).toRgbString();
                if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {
                    selectionPalette.push(rgb);
                    while(selectionPalette.length > maxSelectionSize) {
                        selectionPalette.shift();
                    }
                }

                if (localStorageKey && window.localStorage) {
                    try {
                        window.localStorage[localStorageKey] = selectionPalette.join(";");
                    }
                    catch(e) { }
                }
            }
        }

        function getUniqueSelectionPalette() {
            var unique = [];
            if (opts.showPalette) {
                for (var i = 0; i < selectionPalette.length; i++) {
                    var rgb = tinycolor(selectionPalette[i]).toRgbString();

                    if (!paletteLookup[rgb]) {
                        unique.push(selectionPalette[i]);
                    }
                }
            }

            return unique.reverse().slice(0, opts.maxSelectionSize);
        }

        function drawPalette() {

            var currentColor = get();

            var html = $.map(paletteArray, function (palette, i) {
                return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i, opts);
            });

            updateSelectionPaletteFromStorage();

            if (selectionPalette) {
                html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection", opts));
            }

            paletteContainer.html(html.join(""));
        }

        function drawInitial() {
            if (opts.showInitial) {
                var initial = colorOnShow;
                var current = get();
                initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial", opts));
            }
        }

        function dragStart() {
            if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {
                reflow();
            }
            isDragging = true;
            container.addClass(draggingClass);
            shiftMovementDirection = null;
            boundElement.trigger('dragstart.spectrum', [ get() ]);
        }

        function dragStop() {
            isDragging = false;
            container.removeClass(draggingClass);
            boundElement.trigger('dragstop.spectrum', [ get() ]);
        }

        function setFromTextInput() {

            var value = textInput.val();

            if ((value === null || value === "") && allowEmpty) {
                set(null);
                updateOriginalInput(true);
            }
            else {
                var tiny = tinycolor(value);
                if (tiny.isValid()) {
                    set(tiny);
                    updateOriginalInput(true);
                }
                else {
                    textInput.addClass("sp-validation-error");
                }
            }
        }

        function toggle() {
            if (visible) {
                hide();
            }
            else {
                show();
            }
        }

        function show() {
            var event = $.Event('beforeShow.spectrum');

            if (visible) {
                reflow();
                return;
            }

            boundElement.trigger(event, [ get() ]);

            if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {
                return;
            }

            hideAll();
            visible = true;

            $(doc).bind("keydown.spectrum", onkeydown);
            $(doc).bind("click.spectrum", clickout);
            $(window).bind("resize.spectrum", resize);
            replacer.addClass("sp-active");
            container.removeClass("sp-hidden");

            reflow();
            updateUI();

            colorOnShow = get();

            drawInitial();
            callbacks.show(colorOnShow);
            boundElement.trigger('show.spectrum', [ colorOnShow ]);
        }

        function onkeydown(e) {
            // Close on ESC
            if (e.keyCode === 27) {
                hide();
            }
        }

        function clickout(e) {
            // Return on right click.
            if (e.button == 2) { return; }

            // If a drag event was happening during the mouseup, don't hide
            // on click.
            if (isDragging) { return; }

            if (clickoutFiresChange) {
                updateOriginalInput(true);
            }
            else {
                revert();
            }
            hide();
        }

        function hide() {
            // Return if hiding is unnecessary
            if (!visible || flat) { return; }
            visible = false;

            $(doc).unbind("keydown.spectrum", onkeydown);
            $(doc).unbind("click.spectrum", clickout);
            $(window).unbind("resize.spectrum", resize);

            replacer.removeClass("sp-active");
            container.addClass("sp-hidden");

            callbacks.hide(get());
            boundElement.trigger('hide.spectrum', [ get() ]);
        }

        function revert() {
            set(colorOnShow, true);
        }

        function set(color, ignoreFormatChange) {
            if (tinycolor.equals(color, get())) {
                // Update UI just in case a validation error needs
                // to be cleared.
                updateUI();
                return;
            }

            var newColor, newHsv;
            if (!color && allowEmpty) {
                isEmpty = true;
            } else {
                isEmpty = false;
                newColor = tinycolor(color);
                newHsv = newColor.toHsv();

                currentHue = (newHsv.h % 360) / 360;
                currentSaturation = newHsv.s;
                currentValue = newHsv.v;
                currentAlpha = newHsv.a;
            }
            updateUI();

            if (newColor && newColor.isValid() && !ignoreFormatChange) {
                currentPreferredFormat = opts.preferredFormat || newColor.getFormat();
            }
        }

        function get(opts) {
            opts = opts || { };

            if (allowEmpty && isEmpty) {
                return null;
            }

            return tinycolor.fromRatio({
                h: currentHue,
                s: currentSaturation,
                v: currentValue,
                a: Math.round(currentAlpha * 100) / 100
            }, { format: opts.format || currentPreferredFormat });
        }

        function isValid() {
            return !textInput.hasClass("sp-validation-error");
        }

        function move() {
            updateUI();

            callbacks.move(get());
            boundElement.trigger('move.spectrum', [ get() ]);
        }

        function updateUI() {

            textInput.removeClass("sp-validation-error");

            updateHelperLocations();

            // Update dragger background color (gradients take care of saturation and value).
            var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });
            dragger.css("background-color", flatColor.toHexString());

            // Get a format that alpha will be included in (hex and names ignore alpha)
            var format = currentPreferredFormat;
            if (currentAlpha < 1 && !(currentAlpha === 0 && format === "name")) {
                if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") {
                    format = "rgb";
                }
            }

            var realColor = get({ format: format }),
                displayColor = '';

             //reset background info for preview element
            previewElement.removeClass("sp-clear-display");
            previewElement.css('background-color', 'transparent');

            if (!realColor && allowEmpty) {
                // Update the replaced elements background with icon indicating no color selection
                previewElement.addClass("sp-clear-display");
            }
            else {
                var realHex = realColor.toHexString(),
                    realRgb = realColor.toRgbString();

                // Update the replaced elements background color (with actual selected color)
                if (rgbaSupport || realColor.alpha === 1) {
                    previewElement.css("background-color", realRgb);
                }
                else {
                    previewElement.css("background-color", "transparent");
                    previewElement.css("filter", realColor.toFilter());
                }

                if (opts.showAlpha) {
                    var rgb = realColor.toRgb();
                    rgb.a = 0;
                    var realAlpha = tinycolor(rgb).toRgbString();
                    var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")";

                    if (IE) {
                        alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));
                    }
                    else {
                        alphaSliderInner.css("background", "-webkit-" + gradient);
                        alphaSliderInner.css("background", "-moz-" + gradient);
                        alphaSliderInner.css("background", "-ms-" + gradient);
                        // Use current syntax gradient on unprefixed property.
                        alphaSliderInner.css("background",
                            "linear-gradient(to right, " + realAlpha + ", " + realHex + ")");
                    }
                }

                displayColor = realColor.toString(format);
            }

            // Update the text entry input as it changes happen
            if (opts.showInput) {
                textInput.val(displayColor);
            }

            if (opts.showPalette) {
                drawPalette();
            }

            drawInitial();
        }

        function updateHelperLocations() {
            var s = currentSaturation;
            var v = currentValue;

            if(allowEmpty && isEmpty) {
                //if selected color is empty, hide the helpers
                alphaSlideHelper.hide();
                slideHelper.hide();
                dragHelper.hide();
            }
            else {
                //make sure helpers are visible
                alphaSlideHelper.show();
                slideHelper.show();
                dragHelper.show();

                // Where to show the little circle in that displays your current selected color
                var dragX = s * dragWidth;
                var dragY = dragHeight - (v * dragHeight);
                dragX = Math.max(
                    -dragHelperHeight,
                    Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)
                );
                dragY = Math.max(
                    -dragHelperHeight,
                    Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)
                );
                dragHelper.css({
                    "top": dragY + "px",
                    "left": dragX + "px"
                });

                var alphaX = currentAlpha * alphaWidth;
                alphaSlideHelper.css({
                    "left": (alphaX - (alphaSlideHelperWidth / 2)) + "px"
                });

                // Where to show the bar that displays your current selected hue
                var slideY = (currentHue) * slideHeight;
                slideHelper.css({
                    "top": (slideY - slideHelperHeight) + "px"
                });
            }
        }

        function updateOriginalInput(fireCallback) {
            var color = get(),
                displayColor = '',
                hasChanged = !tinycolor.equals(color, colorOnShow);

            if (color) {
                displayColor = color.toString(currentPreferredFormat);
                // Update the selection palette with the current color
                addColorToSelectionPalette(color);
            }

            if (isInput) {
                boundElement.val(displayColor);
            }

            if (fireCallback && hasChanged) {
                callbacks.change(color);
                boundElement.trigger('change', [ color ]);
            }
        }

        function reflow() {
            if (!visible) {
                return; // Calculations would be useless and wouldn't be reliable anyways
            }
            dragWidth = dragger.width();
            dragHeight = dragger.height();
            dragHelperHeight = dragHelper.height();
            slideWidth = slider.width();
            slideHeight = slider.height();
            slideHelperHeight = slideHelper.height();
            alphaWidth = alphaSlider.width();
            alphaSlideHelperWidth = alphaSlideHelper.width();

            if (!flat) {
                container.css("position", "absolute");
                if (opts.offset) {
                    container.offset(opts.offset);
                } else {
                    container.offset(getOffset(container, offsetElement));
                }
            }

            updateHelperLocations();

            if (opts.showPalette) {
                drawPalette();
            }

            boundElement.trigger('reflow.spectrum');
        }

        function destroy() {
            boundElement.show();
            offsetElement.unbind("click.spectrum touchstart.spectrum");
            container.remove();
            replacer.remove();
            spectrums[spect.id] = null;
        }

        function option(optionName, optionValue) {
            if (optionName === undefined) {
                return $.extend({}, opts);
            }
            if (optionValue === undefined) {
                return opts[optionName];
            }

            opts[optionName] = optionValue;

            if (optionName === "preferredFormat") {
                currentPreferredFormat = opts.preferredFormat;
            }
            applyOptions();
        }

        function enable() {
            disabled = false;
            boundElement.attr("disabled", false);
            offsetElement.removeClass("sp-disabled");
        }

        function disable() {
            hide();
            disabled = true;
            boundElement.attr("disabled", true);
            offsetElement.addClass("sp-disabled");
        }

        function setOffset(coord) {
            opts.offset = coord;
            reflow();
        }

        initialize();

        var spect = {
            show: show,
            hide: hide,
            toggle: toggle,
            reflow: reflow,
            option: option,
            enable: enable,
            disable: disable,
            offset: setOffset,
            set: function (c) {
                set(c);
                updateOriginalInput();
            },
            get: get,
            destroy: destroy,
            container: container
        };

        spect.id = spectrums.push(spect) - 1;

        return spect;
    }

    /**
    * checkOffset - get the offset below/above and left/right element depending on screen position
    * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js
    */
    function getOffset(picker, input) {
        var extraY = 0;
        var dpWidth = picker.outerWidth();
        var dpHeight = picker.outerHeight();
        var inputHeight = input.outerHeight();
        var doc = picker[0].ownerDocument;
        var docElem = doc.documentElement;
        var viewWidth = docElem.clientWidth + $(doc).scrollLeft();
        var viewHeight = docElem.clientHeight + $(doc).scrollTop();
        var offset = input.offset();
        offset.top += inputHeight;

        offset.left -=
            Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
            Math.abs(offset.left + dpWidth - viewWidth) : 0);

        offset.top -=
            Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
            Math.abs(dpHeight + inputHeight - extraY) : extraY));

        return offset;
    }

    /**
    * noop - do nothing
    */
    function noop() {

    }

    /**
    * stopPropagation - makes the code only doing this a little easier to read in line
    */
    function stopPropagation(e) {
        e.stopPropagation();
    }

    /**
    * Create a function bound to a given object
    * Thanks to underscore.js
    */
    function bind(func, obj) {
        var slice = Array.prototype.slice;
        var args = slice.call(arguments, 2);
        return function () {
            return func.apply(obj, args.concat(slice.call(arguments)));
        };
    }

    /**
    * Lightweight drag helper.  Handles containment within the element, so that
    * when dragging, the x is within [0,element.width] and y is within [0,element.height]
    */
    function draggable(element, onmove, onstart, onstop) {
        onmove = onmove || function () { };
        onstart = onstart || function () { };
        onstop = onstop || function () { };
        var doc = document;
        var dragging = false;
        var offset = {};
        var maxHeight = 0;
        var maxWidth = 0;
        var hasTouch = ('ontouchstart' in window);

        var duringDragEvents = {};
        duringDragEvents["selectstart"] = prevent;
        duringDragEvents["dragstart"] = prevent;
        duringDragEvents["touchmove mousemove"] = move;
        duringDragEvents["touchend mouseup"] = stop;

        function prevent(e) {
            if (e.stopPropagation) {
                e.stopPropagation();
            }
            if (e.preventDefault) {
                e.preventDefault();
            }
            e.returnValue = false;
        }

        function move(e) {
            if (dragging) {
                // Mouseup happened outside of window
                if (IE && doc.documentMode < 9 && !e.button) {
                    return stop();
                }

                var t0 = e.originalEvent && e.originalEvent.touches && e.originalEvent.touches[0];
                var pageX = t0 && t0.pageX || e.pageX;
                var pageY = t0 && t0.pageY || e.pageY;

                var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));
                var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));

                if (hasTouch) {
                    // Stop scrolling in iOS
                    prevent(e);
                }

                onmove.apply(element, [dragX, dragY, e]);
            }
        }

        function start(e) {
            var rightclick = (e.which) ? (e.which == 3) : (e.button == 2);

            if (!rightclick && !dragging) {
                if (onstart.apply(element, arguments) !== false) {
                    dragging = true;
                    maxHeight = $(element).height();
                    maxWidth = $(element).width();
                    offset = $(element).offset();

                    $(doc).bind(duringDragEvents);
                    $(doc.body).addClass("sp-dragging");

                    move(e);

                    prevent(e);
                }
            }
        }

        function stop() {
            if (dragging) {
                $(doc).unbind(duringDragEvents);
                $(doc.body).removeClass("sp-dragging");

                // Wait a tick before notifying observers to allow the click event
                // to fire in Chrome.
                setTimeout(function() {
                    onstop.apply(element, arguments);
                }, 0);
            }
            dragging = false;
        }

        $(element).bind("touchstart mousedown", start);
    }

    function throttle(func, wait, debounce) {
        var timeout;
        return function () {
            var context = this, args = arguments;
            var throttler = function () {
                timeout = null;
                func.apply(context, args);
            };
            if (debounce) clearTimeout(timeout);
            if (debounce || !timeout) timeout = setTimeout(throttler, wait);
        };
    }

    function inputTypeColorSupport() {
        return $.fn.spectrum.inputTypeColorSupport();
    }

    /**
    * Define a jQuery plugin
    */
    var dataID = "spectrum.id";
    $.fn.spectrum = function (opts, extra) {

        if (typeof opts == "string") {

            var returnValue = this;
            var args = Array.prototype.slice.call( arguments, 1 );

            this.each(function () {
                var spect = spectrums[$(this).data(dataID)];
                if (spect) {
                    var method = spect[opts];
                    if (!method) {
                        throw new Error( "Spectrum: no such method: '" + opts + "'" );
                    }

                    if (opts == "get") {
                        returnValue = spect.get();
                    }
                    else if (opts == "container") {
                        returnValue = spect.container;
                    }
                    else if (opts == "option") {
                        returnValue = spect.option.apply(spect, args);
                    }
                    else if (opts == "destroy") {
                        spect.destroy();
                        $(this).removeData(dataID);
                    }
                    else {
                        method.apply(spect, args);
                    }
                }
            });

            return returnValue;
        }

        // Initializing a new instance of spectrum
        return this.spectrum("destroy").each(function () {
            var options = $.extend({}, opts, $(this).data());
            var spect = spectrum(this, options);
            $(this).data(dataID, spect.id);
        });
    };

    $.fn.spectrum.load = true;
    $.fn.spectrum.loadOpts = {};
    $.fn.spectrum.draggable = draggable;
    $.fn.spectrum.defaults = defaultOpts;
    $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {
        if (typeof inputTypeColorSupport._cachedResult === "undefined") {
            var colorInput = $("<input type='color'/>")[0]; // if color element is supported, value will default to not null
            inputTypeColorSupport._cachedResult = colorInput.type === "color" && colorInput.value !== "";
        }
        return inputTypeColorSupport._cachedResult;
    };

    $.spectrum = { };
    $.spectrum.localization = { };
    $.spectrum.palettes = { };

    $.fn.spectrum.processNativeColorInputs = function () {
        var colorInputs = $("input[type=color]");
        if (colorInputs.length && !inputTypeColorSupport()) {
            colorInputs.spectrum({
                preferredFormat: "hex6"
            });
        }
    };

    // TinyColor v1.1.2
    // https://github.com/bgrins/TinyColor
    // Brian Grinstead, MIT License

    (function() {

    var trimLeft = /^[\s,#]+/,
        trimRight = /\s+$/,
        tinyCounter = 0,
        math = Math,
        mathRound = math.round,
        mathMin = math.min,
        mathMax = math.max,
        mathRandom = math.random;

    var tinycolor = function(color, opts) {

        color = (color) ? color : '';
        opts = opts || { };

        // If input is already a tinycolor, return itself
        if (color instanceof tinycolor) {
           return color;
        }
        // If we are called as a function, call using new instead
        if (!(this instanceof tinycolor)) {
            return new tinycolor(color, opts);
        }

        var rgb = inputToRGB(color);
        this._originalInput = color,
        this._r = rgb.r,
        this._g = rgb.g,
        this._b = rgb.b,
        this._a = rgb.a,
        this._roundA = mathRound(100*this._a) / 100,
        this._format = opts.format || rgb.format;
        this._gradientType = opts.gradientType;

        // Don't let the range of [0,255] come back in [0,1].
        // Potentially lose a little bit of precision here, but will fix issues where
        // .5 gets interpreted as half of the total, instead of half of 1
        // If it was supposed to be 128, this was already taken care of by `inputToRgb`
        if (this._r < 1) { this._r = mathRound(this._r); }
        if (this._g < 1) { this._g = mathRound(this._g); }
        if (this._b < 1) { this._b = mathRound(this._b); }

        this._ok = rgb.ok;
        this._tc_id = tinyCounter++;
    };

    tinycolor.prototype = {
        isDark: function() {
            return this.getBrightness() < 128;
        },
        isLight: function() {
            return !this.isDark();
        },
        isValid: function() {
            return this._ok;
        },
        getOriginalInput: function() {
          return this._originalInput;
        },
        getFormat: function() {
            return this._format;
        },
        getAlpha: function() {
            return this._a;
        },
        getBrightness: function() {
            var rgb = this.toRgb();
            return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
        },
        setAlpha: function(value) {
            this._a = boundAlpha(value);
            this._roundA = mathRound(100*this._a) / 100;
            return this;
        },
        toHsv: function() {
            var hsv = rgbToHsv(this._r, this._g, this._b);
            return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
        },
        toHsvString: function() {
            var hsv = rgbToHsv(this._r, this._g, this._b);
            var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
            return (this._a == 1) ?
              "hsv("  + h + ", " + s + "%, " + v + "%)" :
              "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
        },
        toHsl: function() {
            var hsl = rgbToHsl(this._r, this._g, this._b);
            return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
        },
        toHslString: function() {
            var hsl = rgbToHsl(this._r, this._g, this._b);
            var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
            return (this._a == 1) ?
              "hsl("  + h + ", " + s + "%, " + l + "%)" :
              "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
        },
        toHex: function(allow3Char) {
            return rgbToHex(this._r, this._g, this._b, allow3Char);
        },
        toHexString: function(allow3Char) {
            return '#' + this.toHex(allow3Char);
        },
        toHex8: function() {
            return rgbaToHex(this._r, this._g, this._b, this._a);
        },
        toHex8String: function() {
            return '#' + this.toHex8();
        },
        toRgb: function() {
            return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
        },
        toRgbString: function() {
            return (this._a == 1) ?
              "rgb("  + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
              "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
        },
        toPercentageRgb: function() {
            return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
        },
        toPercentageRgbString: function() {
            return (this._a == 1) ?
              "rgb("  + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
              "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
        },
        toName: function() {
            if (this._a === 0) {
                return "transparent";
            }

            if (this._a < 1) {
                return false;
            }

            return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
        },
        toFilter: function(secondColor) {
            var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);
            var secondHex8String = hex8String;
            var gradientType = this._gradientType ? "GradientType = 1, " : "";

            if (secondColor) {
                var s = tinycolor(secondColor);
                secondHex8String = s.toHex8String();
            }

            return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
        },
        toString: function(format) {
            var formatSet = !!format;
            format = format || this._format;

            var formattedString = false;
            var hasAlpha = this._a < 1 && this._a >= 0;
            var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "name");

            if (needsAlphaFormat) {
                // Special case for "transparent", all other non-alpha formats
                // will return rgba when there is transparency.
                if (format === "name" && this._a === 0) {
                    return this.toName();
                }
                return this.toRgbString();
            }
            if (format === "rgb") {
                formattedString = this.toRgbString();
            }
            if (format === "prgb") {
                formattedString = this.toPercentageRgbString();
            }
            if (format === "hex" || format === "hex6") {
                formattedString = this.toHexString();
            }
            if (format === "hex3") {
                formattedString = this.toHexString(true);
            }
            if (format === "hex8") {
                formattedString = this.toHex8String();
            }
            if (format === "name") {
                formattedString = this.toName();
            }
            if (format === "hsl") {
                formattedString = this.toHslString();
            }
            if (format === "hsv") {
                formattedString = this.toHsvString();
            }

            return formattedString || this.toHexString();
        },

        _applyModification: function(fn, args) {
            var color = fn.apply(null, [this].concat([].slice.call(args)));
            this._r = color._r;
            this._g = color._g;
            this._b = color._b;
            this.setAlpha(color._a);
            return this;
        },
        lighten: function() {
            return this._applyModification(lighten, arguments);
        },
        brighten: function() {
            return this._applyModification(brighten, arguments);
        },
        darken: function() {
            return this._applyModification(darken, arguments);
        },
        desaturate: function() {
            return this._applyModification(desaturate, arguments);
        },
        saturate: function() {
            return this._applyModification(saturate, arguments);
        },
        greyscale: function() {
            return this._applyModification(greyscale, arguments);
        },
        spin: function() {
            return this._applyModification(spin, arguments);
        },

        _applyCombination: function(fn, args) {
            return fn.apply(null, [this].concat([].slice.call(args)));
        },
        analogous: function() {
            return this._applyCombination(analogous, arguments);
        },
        complement: function() {
            return this._applyCombination(complement, arguments);
        },
        monochromatic: function() {
            return this._applyCombination(monochromatic, arguments);
        },
        splitcomplement: function() {
            return this._applyCombination(splitcomplement, arguments);
        },
        triad: function() {
            return this._applyCombination(triad, arguments);
        },
        tetrad: function() {
            return this._applyCombination(tetrad, arguments);
        }
    };

    // If input is an object, force 1 into "1.0" to handle ratios properly
    // String input requires "1.0" as input, so 1 will be treated as 1
    tinycolor.fromRatio = function(color, opts) {
        if (typeof color == "object") {
            var newColor = {};
            for (var i in color) {
                if (color.hasOwnProperty(i)) {
                    if (i === "a") {
                        newColor[i] = color[i];
                    }
                    else {
                        newColor[i] = convertToPercentage(color[i]);
                    }
                }
            }
            color = newColor;
        }

        return tinycolor(color, opts);
    };

    // Given a string or object, convert that input to RGB
    // Possible string inputs:
    //
    //     "red"
    //     "#f00" or "f00"
    //     "#ff0000" or "ff0000"
    //     "#ff000000" or "ff000000"
    //     "rgb 255 0 0" or "rgb (255, 0, 0)"
    //     "rgb 1.0 0 0" or "rgb (1, 0, 0)"
    //     "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
    //     "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
    //     "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
    //     "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
    //     "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
    //
    function inputToRGB(color) {

        var rgb = { r: 0, g: 0, b: 0 };
        var a = 1;
        var ok = false;
        var format = false;

        if (typeof color == "string") {
            color = stringInputToObject(color);
        }

        if (typeof color == "object") {
            if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) {
                rgb = rgbToRgb(color.r, color.g, color.b);
                ok = true;
                format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
            }
            else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) {
                color.s = convertToPercentage(color.s);
                color.v = convertToPercentage(color.v);
                rgb = hsvToRgb(color.h, color.s, color.v);
                ok = true;
                format = "hsv";
            }
            else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) {
                color.s = convertToPercentage(color.s);
                color.l = convertToPercentage(color.l);
                rgb = hslToRgb(color.h, color.s, color.l);
                ok = true;
                format = "hsl";
            }

            if (color.hasOwnProperty("a")) {
                a = color.a;
            }
        }

        a = boundAlpha(a);

        return {
            ok: ok,
            format: color.format || format,
            r: mathMin(255, mathMax(rgb.r, 0)),
            g: mathMin(255, mathMax(rgb.g, 0)),
            b: mathMin(255, mathMax(rgb.b, 0)),
            a: a
        };
    }


    // Conversion Functions
    // --------------------

    // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
    // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>

    // `rgbToRgb`
    // Handle bounds / percentage checking to conform to CSS color spec
    // <http://www.w3.org/TR/css3-color/>
    // *Assumes:* r, g, b in [0, 255] or [0, 1]
    // *Returns:* { r, g, b } in [0, 255]
    function rgbToRgb(r, g, b){
        return {
            r: bound01(r, 255) * 255,
            g: bound01(g, 255) * 255,
            b: bound01(b, 255) * 255
        };
    }

    // `rgbToHsl`
    // Converts an RGB color value to HSL.
    // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
    // *Returns:* { h, s, l } in [0,1]
    function rgbToHsl(r, g, b) {

        r = bound01(r, 255);
        g = bound01(g, 255);
        b = bound01(b, 255);

        var max = mathMax(r, g, b), min = mathMin(r, g, b);
        var h, s, l = (max + min) / 2;

        if(max == min) {
            h = s = 0; // achromatic
        }
        else {
            var d = max - min;
            s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
            switch(max) {
                case r: h = (g - b) / d + (g < b ? 6 : 0); break;
                case g: h = (b - r) / d + 2; break;
                case b: h = (r - g) / d + 4; break;
            }

            h /= 6;
        }

        return { h: h, s: s, l: l };
    }

    // `hslToRgb`
    // Converts an HSL color value to RGB.
    // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
    // *Returns:* { r, g, b } in the set [0, 255]
    function hslToRgb(h, s, l) {
        var r, g, b;

        h = bound01(h, 360);
        s = bound01(s, 100);
        l = bound01(l, 100);

        function hue2rgb(p, q, t) {
            if(t < 0) t += 1;
            if(t > 1) t -= 1;
            if(t < 1/6) return p + (q - p) * 6 * t;
            if(t < 1/2) return q;
            if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
            return p;
        }

        if(s === 0) {
            r = g = b = l; // achromatic
        }
        else {
            var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
            var p = 2 * l - q;
            r = hue2rgb(p, q, h + 1/3);
            g = hue2rgb(p, q, h);
            b = hue2rgb(p, q, h - 1/3);
        }

        return { r: r * 255, g: g * 255, b: b * 255 };
    }

    // `rgbToHsv`
    // Converts an RGB color value to HSV
    // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
    // *Returns:* { h, s, v } in [0,1]
    function rgbToHsv(r, g, b) {

        r = bound01(r, 255);
        g = bound01(g, 255);
        b = bound01(b, 255);

        var max = mathMax(r, g, b), min = mathMin(r, g, b);
        var h, s, v = max;

        var d = max - min;
        s = max === 0 ? 0 : d / max;

        if(max == min) {
            h = 0; // achromatic
        }
        else {
            switch(max) {
                case r: h = (g - b) / d + (g < b ? 6 : 0); break;
                case g: h = (b - r) / d + 2; break;
                case b: h = (r - g) / d + 4; break;
            }
            h /= 6;
        }
        return { h: h, s: s, v: v };
    }

    // `hsvToRgb`
    // Converts an HSV color value to RGB.
    // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
    // *Returns:* { r, g, b } in the set [0, 255]
     function hsvToRgb(h, s, v) {

        h = bound01(h, 360) * 6;
        s = bound01(s, 100);
        v = bound01(v, 100);

        var i = math.floor(h),
            f = h - i,
            p = v * (1 - s),
            q = v * (1 - f * s),
            t = v * (1 - (1 - f) * s),
            mod = i % 6,
            r = [v, q, p, p, t, v][mod],
            g = [t, v, v, q, p, p][mod],
            b = [p, p, t, v, v, q][mod];

        return { r: r * 255, g: g * 255, b: b * 255 };
    }

    // `rgbToHex`
    // Converts an RGB color to hex
    // Assumes r, g, and b are contained in the set [0, 255]
    // Returns a 3 or 6 character hex
    function rgbToHex(r, g, b, allow3Char) {

        var hex = [
            pad2(mathRound(r).toString(16)),
            pad2(mathRound(g).toString(16)),
            pad2(mathRound(b).toString(16))
        ];

        // Return a 3 character hex if possible
        if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
            return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
        }

        return hex.join("");
    }
        // `rgbaToHex`
        // Converts an RGBA color plus alpha transparency to hex
        // Assumes r, g, b and a are contained in the set [0, 255]
        // Returns an 8 character hex
        function rgbaToHex(r, g, b, a) {

            var hex = [
                pad2(convertDecimalToHex(a)),
                pad2(mathRound(r).toString(16)),
                pad2(mathRound(g).toString(16)),
                pad2(mathRound(b).toString(16))
            ];

            return hex.join("");
        }

    // `equals`
    // Can be called with any tinycolor input
    tinycolor.equals = function (color1, color2) {
        if (!color1 || !color2) { return false; }
        return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
    };
    tinycolor.random = function() {
        return tinycolor.fromRatio({
            r: mathRandom(),
            g: mathRandom(),
            b: mathRandom()
        });
    };


    // Modification Functions
    // ----------------------
    // Thanks to less.js for some of the basics here
    // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>

    function desaturate(color, amount) {
        amount = (amount === 0) ? 0 : (amount || 10);
        var hsl = tinycolor(color).toHsl();
        hsl.s -= amount / 100;
        hsl.s = clamp01(hsl.s);
        return tinycolor(hsl);
    }

    function saturate(color, amount) {
        amount = (amount === 0) ? 0 : (amount || 10);
        var hsl = tinycolor(color).toHsl();
        hsl.s += amount / 100;
        hsl.s = clamp01(hsl.s);
        return tinycolor(hsl);
    }

    function greyscale(color) {
        return tinycolor(color).desaturate(100);
    }

    function lighten (color, amount) {
        amount = (amount === 0) ? 0 : (amount || 10);
        var hsl = tinycolor(color).toHsl();
        hsl.l += amount / 100;
        hsl.l = clamp01(hsl.l);
        return tinycolor(hsl);
    }

    function brighten(color, amount) {
        amount = (amount === 0) ? 0 : (amount || 10);
        var rgb = tinycolor(color).toRgb();
        rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
        rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
        rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
        return tinycolor(rgb);
    }

    function darken (color, amount) {
        amount = (amount === 0) ? 0 : (amount || 10);
        var hsl = tinycolor(color).toHsl();
        hsl.l -= amount / 100;
        hsl.l = clamp01(hsl.l);
        return tinycolor(hsl);
    }

    // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
    // Values outside of this range will be wrapped into this range.
    function spin(color, amount) {
        var hsl = tinycolor(color).toHsl();
        var hue = (mathRound(hsl.h) + amount) % 360;
        hsl.h = hue < 0 ? 360 + hue : hue;
        return tinycolor(hsl);
    }

    // Combination Functions
    // ---------------------
    // Thanks to jQuery xColor for some of the ideas behind these
    // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>

    function complement(color) {
        var hsl = tinycolor(color).toHsl();
        hsl.h = (hsl.h + 180) % 360;
        return tinycolor(hsl);
    }

    function triad(color) {
        var hsl = tinycolor(color).toHsl();
        var h = hsl.h;
        return [
            tinycolor(color),
            tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
            tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
        ];
    }

    function tetrad(color) {
        var hsl = tinycolor(color).toHsl();
        var h = hsl.h;
        return [
            tinycolor(color),
            tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
            tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
            tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
        ];
    }

    function splitcomplement(color) {
        var hsl = tinycolor(color).toHsl();
        var h = hsl.h;
        return [
            tinycolor(color),
            tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
            tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
        ];
    }

    function analogous(color, results, slices) {
        results = results || 6;
        slices = slices || 30;

        var hsl = tinycolor(color).toHsl();
        var part = 360 / slices;
        var ret = [tinycolor(color)];

        for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
            hsl.h = (hsl.h + part) % 360;
            ret.push(tinycolor(hsl));
        }
        return ret;
    }

    function monochromatic(color, results) {
        results = results || 6;
        var hsv = tinycolor(color).toHsv();
        var h = hsv.h, s = hsv.s, v = hsv.v;
        var ret = [];
        var modification = 1 / results;

        while (results--) {
            ret.push(tinycolor({ h: h, s: s, v: v}));
            v = (v + modification) % 1;
        }

        return ret;
    }

    // Utility Functions
    // ---------------------

    tinycolor.mix = function(color1, color2, amount) {
        amount = (amount === 0) ? 0 : (amount || 50);

        var rgb1 = tinycolor(color1).toRgb();
        var rgb2 = tinycolor(color2).toRgb();

        var p = amount / 100;
        var w = p * 2 - 1;
        var a = rgb2.a - rgb1.a;

        var w1;

        if (w * a == -1) {
            w1 = w;
        } else {
            w1 = (w + a) / (1 + w * a);
        }

        w1 = (w1 + 1) / 2;

        var w2 = 1 - w1;

        var rgba = {
            r: rgb2.r * w1 + rgb1.r * w2,
            g: rgb2.g * w1 + rgb1.g * w2,
            b: rgb2.b * w1 + rgb1.b * w2,
            a: rgb2.a * p  + rgb1.a * (1 - p)
        };

        return tinycolor(rgba);
    };


    // Readability Functions
    // ---------------------
    // <http://www.w3.org/TR/AERT#color-contrast>

    // `readability`
    // Analyze the 2 colors and returns an object with the following properties:
    //    `brightness`: difference in brightness between the two colors
    //    `color`: difference in color/hue between the two colors
    tinycolor.readability = function(color1, color2) {
        var c1 = tinycolor(color1);
        var c2 = tinycolor(color2);
        var rgb1 = c1.toRgb();
        var rgb2 = c2.toRgb();
        var brightnessA = c1.getBrightness();
        var brightnessB = c2.getBrightness();
        var colorDiff = (
            Math.max(rgb1.r, rgb2.r) - Math.min(rgb1.r, rgb2.r) +
            Math.max(rgb1.g, rgb2.g) - Math.min(rgb1.g, rgb2.g) +
            Math.max(rgb1.b, rgb2.b) - Math.min(rgb1.b, rgb2.b)
        );

        return {
            brightness: Math.abs(brightnessA - brightnessB),
            color: colorDiff
        };
    };

    // `readable`
    // http://www.w3.org/TR/AERT#color-contrast
    // Ensure that foreground and background color combinations provide sufficient contrast.
    // *Example*
    //    tinycolor.isReadable("#000", "#111") => false
    tinycolor.isReadable = function(color1, color2) {
        var readability = tinycolor.readability(color1, color2);
        return readability.brightness > 125 && readability.color > 500;
    };

    // `mostReadable`
    // Given a base color and a list of possible foreground or background
    // colors for that base, returns the most readable color.
    // *Example*
    //    tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000"
    tinycolor.mostReadable = function(baseColor, colorList) {
        var bestColor = null;
        var bestScore = 0;
        var bestIsReadable = false;
        for (var i=0; i < colorList.length; i++) {

            // We normalize both around the "acceptable" breaking point,
            // but rank brightness constrast higher than hue.

            var readability = tinycolor.readability(baseColor, colorList[i]);
            var readable = readability.brightness > 125 && readability.color > 500;
            var score = 3 * (readability.brightness / 125) + (readability.color / 500);

            if ((readable && ! bestIsReadable) ||
                (readable && bestIsReadable && score > bestScore) ||
                ((! readable) && (! bestIsReadable) && score > bestScore)) {
                bestIsReadable = readable;
                bestScore = score;
                bestColor = tinycolor(colorList[i]);
            }
        }
        return bestColor;
    };


    // Big List of Colors
    // ------------------
    // <http://www.w3.org/TR/css3-color/#svg-color>
    var names = tinycolor.names = {
        aliceblue: "f0f8ff",
        antiquewhite: "faebd7",
        aqua: "0ff",
        aquamarine: "7fffd4",
        azure: "f0ffff",
        beige: "f5f5dc",
        bisque: "ffe4c4",
        black: "000",
        blanchedalmond: "ffebcd",
        blue: "00f",
        blueviolet: "8a2be2",
        brown: "a52a2a",
        burlywood: "deb887",
        burntsienna: "ea7e5d",
        cadetblue: "5f9ea0",
        chartreuse: "7fff00",
        chocolate: "d2691e",
        coral: "ff7f50",
        cornflowerblue: "6495ed",
        cornsilk: "fff8dc",
        crimson: "dc143c",
        cyan: "0ff",
        darkblue: "00008b",
        darkcyan: "008b8b",
        darkgoldenrod: "b8860b",
        darkgray: "a9a9a9",
        darkgreen: "006400",
        darkgrey: "a9a9a9",
        darkkhaki: "bdb76b",
        darkmagenta: "8b008b",
        darkolivegreen: "556b2f",
        darkorange: "ff8c00",
        darkorchid: "9932cc",
        darkred: "8b0000",
        darksalmon: "e9967a",
        darkseagreen: "8fbc8f",
        darkslateblue: "483d8b",
        darkslategray: "2f4f4f",
        darkslategrey: "2f4f4f",
        darkturquoise: "00ced1",
        darkviolet: "9400d3",
        deeppink: "ff1493",
        deepskyblue: "00bfff",
        dimgray: "696969",
        dimgrey: "696969",
        dodgerblue: "1e90ff",
        firebrick: "b22222",
        floralwhite: "fffaf0",
        forestgreen: "228b22",
        fuchsia: "f0f",
        gainsboro: "dcdcdc",
        ghostwhite: "f8f8ff",
        gold: "ffd700",
        goldenrod: "daa520",
        gray: "808080",
        green: "008000",
        greenyellow: "adff2f",
        grey: "808080",
        honeydew: "f0fff0",
        hotpink: "ff69b4",
        indianred: "cd5c5c",
        indigo: "4b0082",
        ivory: "fffff0",
        khaki: "f0e68c",
        lavender: "e6e6fa",
        lavenderblush: "fff0f5",
        lawngreen: "7cfc00",
        lemonchiffon: "fffacd",
        lightblue: "add8e6",
        lightcoral: "f08080",
        lightcyan: "e0ffff",
        lightgoldenrodyellow: "fafad2",
        lightgray: "d3d3d3",
        lightgreen: "90ee90",
        lightgrey: "d3d3d3",
        lightpink: "ffb6c1",
        lightsalmon: "ffa07a",
        lightseagreen: "20b2aa",
        lightskyblue: "87cefa",
        lightslategray: "789",
        lightslategrey: "789",
        lightsteelblue: "b0c4de",
        lightyellow: "ffffe0",
        lime: "0f0",
        limegreen: "32cd32",
        linen: "faf0e6",
        magenta: "f0f",
        maroon: "800000",
        mediumaquamarine: "66cdaa",
        mediumblue: "0000cd",
        mediumorchid: "ba55d3",
        mediumpurple: "9370db",
        mediumseagreen: "3cb371",
        mediumslateblue: "7b68ee",
        mediumspringgreen: "00fa9a",
        mediumturquoise: "48d1cc",
        mediumvioletred: "c71585",
        midnightblue: "191970",
        mintcream: "f5fffa",
        mistyrose: "ffe4e1",
        moccasin: "ffe4b5",
        navajowhite: "ffdead",
        navy: "000080",
        oldlace: "fdf5e6",
        olive: "808000",
        olivedrab: "6b8e23",
        orange: "ffa500",
        orangered: "ff4500",
        orchid: "da70d6",
        palegoldenrod: "eee8aa",
        palegreen: "98fb98",
        paleturquoise: "afeeee",
        palevioletred: "db7093",
        papayawhip: "ffefd5",
        peachpuff: "ffdab9",
        peru: "cd853f",
        pink: "ffc0cb",
        plum: "dda0dd",
        powderblue: "b0e0e6",
        purple: "800080",
        rebeccapurple: "663399",
        red: "f00",
        rosybrown: "bc8f8f",
        royalblue: "4169e1",
        saddlebrown: "8b4513",
        salmon: "fa8072",
        sandybrown: "f4a460",
        seagreen: "2e8b57",
        seashell: "fff5ee",
        sienna: "a0522d",
        silver: "c0c0c0",
        skyblue: "87ceeb",
        slateblue: "6a5acd",
        slategray: "708090",
        slategrey: "708090",
        snow: "fffafa",
        springgreen: "00ff7f",
        steelblue: "4682b4",
        tan: "d2b48c",
        teal: "008080",
        thistle: "d8bfd8",
        tomato: "ff6347",
        turquoise: "40e0d0",
        violet: "ee82ee",
        wheat: "f5deb3",
        white: "fff",
        whitesmoke: "f5f5f5",
        yellow: "ff0",
        yellowgreen: "9acd32"
    };

    // Make it easy to access colors via `hexNames[hex]`
    var hexNames = tinycolor.hexNames = flip(names);


    // Utilities
    // ---------

    // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
    function flip(o) {
        var flipped = { };
        for (var i in o) {
            if (o.hasOwnProperty(i)) {
                flipped[o[i]] = i;
            }
        }
        return flipped;
    }

    // Return a valid alpha value [0,1] with all invalid values being set to 1
    function boundAlpha(a) {
        a = parseFloat(a);

        if (isNaN(a) || a < 0 || a > 1) {
            a = 1;
        }

        return a;
    }

    // Take input from [0, n] and return it as [0, 1]
    function bound01(n, max) {
        if (isOnePointZero(n)) { n = "100%"; }

        var processPercent = isPercentage(n);
        n = mathMin(max, mathMax(0, parseFloat(n)));

        // Automatically convert percentage into number
        if (processPercent) {
            n = parseInt(n * max, 10) / 100;
        }

        // Handle floating point rounding errors
        if ((math.abs(n - max) < 0.000001)) {
            return 1;
        }

        // Convert into [0, 1] range if it isn't already
        return (n % max) / parseFloat(max);
    }

    // Force a number between 0 and 1
    function clamp01(val) {
        return mathMin(1, mathMax(0, val));
    }

    // Parse a base-16 hex value into a base-10 integer
    function parseIntFromHex(val) {
        return parseInt(val, 16);
    }

    // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
    // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
    function isOnePointZero(n) {
        return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
    }

    // Check to see if string passed in is a percentage
    function isPercentage(n) {
        return typeof n === "string" && n.indexOf('%') != -1;
    }

    // Force a hex value to have 2 characters
    function pad2(c) {
        return c.length == 1 ? '0' + c : '' + c;
    }

    // Replace a decimal with it's percentage value
    function convertToPercentage(n) {
        if (n <= 1) {
            n = (n * 100) + "%";
        }

        return n;
    }

    // Converts a decimal to a hex value
    function convertDecimalToHex(d) {
        return Math.round(parseFloat(d) * 255).toString(16);
    }
    // Converts a hex value to a decimal
    function convertHexToDecimal(h) {
        return (parseIntFromHex(h) / 255);
    }

    var matchers = (function() {

        // <http://www.w3.org/TR/css3-values/#integers>
        var CSS_INTEGER = "[-\\+]?\\d+%?";

        // <http://www.w3.org/TR/css3-values/#number-value>
        var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";

        // Allow positive/negative integer/number.  Don't capture the either/or, just the entire outcome.
        var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";

        // Actual matching.
        // Parentheses and commas are optional, but not required.
        // Whitespace can take the place of commas or opening paren
        var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
        var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";

        return {
            rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
            rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
            hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
            hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
            hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
            hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
            hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
            hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
            hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
        };
    })();

    // `stringInputToObject`
    // Permissive string parsing.  Take in a number of formats, and output an object
    // based on detected format.  Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
    function stringInputToObject(color) {

        color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
        var named = false;
        if (names[color]) {
            color = names[color];
            named = true;
        }
        else if (color == 'transparent') {
            return { r: 0, g: 0, b: 0, a: 0, format: "name" };
        }

        // Try to match string input using regular expressions.
        // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
        // Just return an object and let the conversion functions handle that.
        // This way the result will be the same whether the tinycolor is initialized with string or object.
        var match;
        if ((match = matchers.rgb.exec(color))) {
            return { r: match[1], g: match[2], b: match[3] };
        }
        if ((match = matchers.rgba.exec(color))) {
            return { r: match[1], g: match[2], b: match[3], a: match[4] };
        }
        if ((match = matchers.hsl.exec(color))) {
            return { h: match[1], s: match[2], l: match[3] };
        }
        if ((match = matchers.hsla.exec(color))) {
            return { h: match[1], s: match[2], l: match[3], a: match[4] };
        }
        if ((match = matchers.hsv.exec(color))) {
            return { h: match[1], s: match[2], v: match[3] };
        }
        if ((match = matchers.hsva.exec(color))) {
            return { h: match[1], s: match[2], v: match[3], a: match[4] };
        }
        if ((match = matchers.hex8.exec(color))) {
            return {
                a: convertHexToDecimal(match[1]),
                r: parseIntFromHex(match[2]),
                g: parseIntFromHex(match[3]),
                b: parseIntFromHex(match[4]),
                format: named ? "name" : "hex8"
            };
        }
        if ((match = matchers.hex6.exec(color))) {
            return {
                r: parseIntFromHex(match[1]),
                g: parseIntFromHex(match[2]),
                b: parseIntFromHex(match[3]),
                format: named ? "name" : "hex"
            };
        }
        if ((match = matchers.hex3.exec(color))) {
            return {
                r: parseIntFromHex(match[1] + '' + match[1]),
                g: parseIntFromHex(match[2] + '' + match[2]),
                b: parseIntFromHex(match[3] + '' + match[3]),
                format: named ? "name" : "hex"
            };
        }

        return false;
    }

    window.tinycolor = tinycolor;
    })();

    $(function () {
        if ($.fn.spectrum.load) {
            $.fn.spectrum.processNativeColorInputs();
        }
    });

});


/***/ }),

/***/ "./node_modules/style-loader/lib/addStyles.js":
/*!****************************************************!*\
  !*** ./node_modules/style-loader/lib/addStyles.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

var stylesInDom = {};

var	memoize = function (fn) {
	var memo;

	return function () {
		if (typeof memo === "undefined") memo = fn.apply(this, arguments);
		return memo;
	};
};

var isOldIE = memoize(function () {
	// Test for IE <= 9 as proposed by Browserhacks
	// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
	// Tests for existence of standard globals is to allow style-loader
	// to operate correctly into non-standard environments
	// @see https://github.com/webpack-contrib/style-loader/issues/177
	return window && document && document.all && !window.atob;
});

var getTarget = function (target) {
  return document.querySelector(target);
};

var getElement = (function (fn) {
	var memo = {};

	return function(target) {
                // If passing function in options, then use it for resolve "head" element.
                // Useful for Shadow Root style i.e
                // {
                //   insertInto: function () { return document.querySelector("#foo").shadowRoot }
                // }
                if (typeof target === 'function') {
                        return target();
                }
                if (typeof memo[target] === "undefined") {
			var styleTarget = getTarget.call(this, target);
			// Special case to return head of iframe instead of iframe itself
			if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
				try {
					// This will throw an exception if access to iframe is blocked
					// due to cross-origin restrictions
					styleTarget = styleTarget.contentDocument.head;
				} catch(e) {
					styleTarget = null;
				}
			}
			memo[target] = styleTarget;
		}
		return memo[target]
	};
})();

var singleton = null;
var	singletonCounter = 0;
var	stylesInsertedAtTop = [];

var	fixUrls = __webpack_require__(/*! ./urls */ "./node_modules/style-loader/lib/urls.js");

module.exports = function(list, options) {
	if (typeof DEBUG !== "undefined" && DEBUG) {
		if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
	}

	options = options || {};

	options.attrs = typeof options.attrs === "object" ? options.attrs : {};

	// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
	// tags it will allow on a page
	if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();

	// By default, add <style> tags to the <head> element
        if (!options.insertInto) options.insertInto = "head";

	// By default, add <style> tags to the bottom of the target
	if (!options.insertAt) options.insertAt = "bottom";

	var styles = listToStyles(list, options);

	addStylesToDom(styles, options);

	return function update (newList) {
		var mayRemove = [];

		for (var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];

			domStyle.refs--;
			mayRemove.push(domStyle);
		}

		if(newList) {
			var newStyles = listToStyles(newList, options);
			addStylesToDom(newStyles, options);
		}

		for (var i = 0; i < mayRemove.length; i++) {
			var domStyle = mayRemove[i];

			if(domStyle.refs === 0) {
				for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();

				delete stylesInDom[domStyle.id];
			}
		}
	};
};

function addStylesToDom (styles, options) {
	for (var i = 0; i < styles.length; i++) {
		var item = styles[i];
		var domStyle = stylesInDom[item.id];

		if(domStyle) {
			domStyle.refs++;

			for(var j = 0; j < domStyle.parts.length; j++) {
				domStyle.parts[j](item.parts[j]);
			}

			for(; j < item.parts.length; j++) {
				domStyle.parts.push(addStyle(item.parts[j], options));
			}
		} else {
			var parts = [];

			for(var j = 0; j < item.parts.length; j++) {
				parts.push(addStyle(item.parts[j], options));
			}

			stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
		}
	}
}

function listToStyles (list, options) {
	var styles = [];
	var newStyles = {};

	for (var i = 0; i < list.length; i++) {
		var item = list[i];
		var id = options.base ? item[0] + options.base : item[0];
		var css = item[1];
		var media = item[2];
		var sourceMap = item[3];
		var part = {css: css, media: media, sourceMap: sourceMap};

		if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
		else newStyles[id].parts.push(part);
	}

	return styles;
}

function insertStyleElement (options, style) {
	var target = getElement(options.insertInto)

	if (!target) {
		throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
	}

	var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];

	if (options.insertAt === "top") {
		if (!lastStyleElementInsertedAtTop) {
			target.insertBefore(style, target.firstChild);
		} else if (lastStyleElementInsertedAtTop.nextSibling) {
			target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
		} else {
			target.appendChild(style);
		}
		stylesInsertedAtTop.push(style);
	} else if (options.insertAt === "bottom") {
		target.appendChild(style);
	} else if (typeof options.insertAt === "object" && options.insertAt.before) {
		var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
		target.insertBefore(style, nextSibling);
	} else {
		throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
	}
}

function removeStyleElement (style) {
	if (style.parentNode === null) return false;
	style.parentNode.removeChild(style);

	var idx = stylesInsertedAtTop.indexOf(style);
	if(idx >= 0) {
		stylesInsertedAtTop.splice(idx, 1);
	}
}

function createStyleElement (options) {
	var style = document.createElement("style");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}

	addAttrs(style, options.attrs);
	insertStyleElement(options, style);

	return style;
}

function createLinkElement (options) {
	var link = document.createElement("link");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}
	options.attrs.rel = "stylesheet";

	addAttrs(link, options.attrs);
	insertStyleElement(options, link);

	return link;
}

function addAttrs (el, attrs) {
	Object.keys(attrs).forEach(function (key) {
		el.setAttribute(key, attrs[key]);
	});
}

function addStyle (obj, options) {
	var style, update, remove, result;

	// If a transform function was defined, run it on the css
	if (options.transform && obj.css) {
	    result = options.transform(obj.css);

	    if (result) {
	    	// If transform returns a value, use that instead of the original css.
	    	// This allows running runtime transformations on the css.
	    	obj.css = result;
	    } else {
	    	// If the transform function returns a falsy value, don't add this css.
	    	// This allows conditional loading of css
	    	return function() {
	    		// noop
	    	};
	    }
	}

	if (options.singleton) {
		var styleIndex = singletonCounter++;

		style = singleton || (singleton = createStyleElement(options));

		update = applyToSingletonTag.bind(null, style, styleIndex, false);
		remove = applyToSingletonTag.bind(null, style, styleIndex, true);

	} else if (
		obj.sourceMap &&
		typeof URL === "function" &&
		typeof URL.createObjectURL === "function" &&
		typeof URL.revokeObjectURL === "function" &&
		typeof Blob === "function" &&
		typeof btoa === "function"
	) {
		style = createLinkElement(options);
		update = updateLink.bind(null, style, options);
		remove = function () {
			removeStyleElement(style);

			if(style.href) URL.revokeObjectURL(style.href);
		};
	} else {
		style = createStyleElement(options);
		update = applyToTag.bind(null, style);
		remove = function () {
			removeStyleElement(style);
		};
	}

	update(obj);

	return function updateStyle (newObj) {
		if (newObj) {
			if (
				newObj.css === obj.css &&
				newObj.media === obj.media &&
				newObj.sourceMap === obj.sourceMap
			) {
				return;
			}

			update(obj = newObj);
		} else {
			remove();
		}
	};
}

var replaceText = (function () {
	var textStore = [];

	return function (index, replacement) {
		textStore[index] = replacement;

		return textStore.filter(Boolean).join('\n');
	};
})();

function applyToSingletonTag (style, index, remove, obj) {
	var css = remove ? "" : obj.css;

	if (style.styleSheet) {
		style.styleSheet.cssText = replaceText(index, css);
	} else {
		var cssNode = document.createTextNode(css);
		var childNodes = style.childNodes;

		if (childNodes[index]) style.removeChild(childNodes[index]);

		if (childNodes.length) {
			style.insertBefore(cssNode, childNodes[index]);
		} else {
			style.appendChild(cssNode);
		}
	}
}

function applyToTag (style, obj) {
	var css = obj.css;
	var media = obj.media;

	if(media) {
		style.setAttribute("media", media)
	}

	if(style.styleSheet) {
		style.styleSheet.cssText = css;
	} else {
		while(style.firstChild) {
			style.removeChild(style.firstChild);
		}

		style.appendChild(document.createTextNode(css));
	}
}

function updateLink (link, options, obj) {
	var css = obj.css;
	var sourceMap = obj.sourceMap;

	/*
		If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
		and there is no publicPath defined then lets turn convertToAbsoluteUrls
		on by default.  Otherwise default to the convertToAbsoluteUrls option
		directly
	*/
	var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;

	if (options.convertToAbsoluteUrls || autoFixUrls) {
		css = fixUrls(css);
	}

	if (sourceMap) {
		// http://stackoverflow.com/a/26603875
		css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
	}

	var blob = new Blob([css], { type: "text/css" });

	var oldSrc = link.href;

	link.href = URL.createObjectURL(blob);

	if(oldSrc) URL.revokeObjectURL(oldSrc);
}


/***/ }),

/***/ "./node_modules/style-loader/lib/urls.js":
/*!***********************************************!*\
  !*** ./node_modules/style-loader/lib/urls.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {


/**
 * When source maps are enabled, `style-loader` uses a link element with a data-uri to
 * embed the css on the page. This breaks all relative urls because now they are relative to a
 * bundle instead of the current page.
 *
 * One solution is to only use full urls, but that may be impossible.
 *
 * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
 *
 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
 *
 */

module.exports = function (css) {
  // get current location
  var location = typeof window !== "undefined" && window.location;

  if (!location) {
    throw new Error("fixUrls requires window.location");
  }

	// blank or null?
	if (!css || typeof css !== "string") {
	  return css;
  }

  var baseUrl = location.protocol + "//" + location.host;
  var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");

	// convert each url(...)
	/*
	This regular expression is just a way to recursively match brackets within
	a string.

	 /url\s*\(  = Match on the word "url" with any whitespace after it and then a parens
	   (  = Start a capturing group
	     (?:  = Start a non-capturing group
	         [^)(]  = Match anything that isn't a parentheses
	         |  = OR
	         \(  = Match a start parentheses
	             (?:  = Start another non-capturing groups
	                 [^)(]+  = Match anything that isn't a parentheses
	                 |  = OR
	                 \(  = Match a start parentheses
	                     [^)(]*  = Match anything that isn't a parentheses
	                 \)  = Match a end parentheses
	             )  = End Group
              *\) = Match anything and then a close parens
          )  = Close non-capturing group
          *  = Match anything
       )  = Close capturing group
	 \)  = Match a close parens

	 /gi  = Get all matches, not the first.  Be case insensitive.
	 */
	var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
		// strip quotes (if they exist)
		var unquotedOrigUrl = origUrl
			.trim()
			.replace(/^"(.*)"$/, function(o, $1){ return $1; })
			.replace(/^'(.*)'$/, function(o, $1){ return $1; });

		// already a full url? no change
		if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
		  return fullMatch;
		}

		// convert the url to a full url
		var newUrl;

		if (unquotedOrigUrl.indexOf("//") === 0) {
		  	//TODO: should we add protocol?
			newUrl = unquotedOrigUrl;
		} else if (unquotedOrigUrl.indexOf("/") === 0) {
			// path should be relative to the base url
			newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
		} else {
			// path should be relative to current directory
			newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
		}

		// send back the fixed url(...)
		return "url(" + JSON.stringify(newUrl) + ")";
	});

	// send back the fixed css
	return fixedCss;
};


/***/ }),

/***/ "./node_modules/webpack/buildin/amd-define.js":
/*!***************************************!*\
  !*** (webpack)/buildin/amd-define.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function() {
	throw new Error("define cannot be used indirect");
};


/***/ }),

/***/ "./node_modules/webpack/buildin/amd-options.js":
/*!****************************************!*\
  !*** (webpack)/buildin/amd-options.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
module.exports = __webpack_amd_options__;

/* WEBPACK VAR INJECTION */}.call(this, {}))

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || new Function("return this")();
} catch (e) {
	// This works if the window reference is available
	if (typeof window === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),

/***/ "./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
  !*** (webpack)/buildin/module.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function(module) {
	if (!module.webpackPolyfill) {
		module.deprecate = function() {};
		module.paths = [];
		// module.parent = undefined by default
		if (!module.children) module.children = [];
		Object.defineProperty(module, "loaded", {
			enumerable: true,
			get: function() {
				return module.l;
			}
		});
		Object.defineProperty(module, "id", {
			enumerable: true,
			get: function() {
				return module.i;
			}
		});
		module.webpackPolyfill = 1;
	}
	return module;
};


/***/ }),

/***/ "./src/css/layout.css":
/*!****************************!*\
  !*** ./src/css/layout.css ***!
  \****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js??ref--4-1!./layout.css */ "./node_modules/css-loader/dist/cjs.js?!./src/css/layout.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./src/css/menu.css":
/*!**************************!*\
  !*** ./src/css/menu.css ***!
  \**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js??ref--4-1!./menu.css */ "./node_modules/css-loader/dist/cjs.js?!./src/css/menu.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./src/css/popup.css":
/*!***************************!*\
  !*** ./src/css/popup.css ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js??ref--4-1!./popup.css */ "./node_modules/css-loader/dist/cjs.js?!./src/css/popup.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./src/css/print.css":
/*!***************************!*\
  !*** ./src/css/print.css ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js??ref--4-1!./print.css */ "./node_modules/css-loader/dist/cjs.js?!./src/css/print.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./src/css/reset.css":
/*!***************************!*\
  !*** ./src/css/reset.css ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../node_modules/css-loader/dist/cjs.js??ref--4-1!./reset.css */ "./node_modules/css-loader/dist/cjs.js?!./src/css/reset.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./src/js/config-menu.js":
/*!*******************************!*\
  !*** ./src/js/config-menu.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});
var menu_template = "\n\t<ul>\n\t\t<li>\n\t\t\t<a class=\"trn\" href=\"#\">Archivo</a>\n\t\t\t<ul>\n\t\t\t\t<li><a class=\"trn\" data-target=\"file/new.new\" href=\"#\">New</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li class=\"more\">\n\t\t\t\t\t<a class=\"trn\" href=\"#\">Open</a>\n\t\t\t\t\t<ul>\n\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/open.open_file\" data-key=\"Drag&Drop\" href=\"#\">Open File</a></li>\n\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/open.open_dir\" href=\"#\">Open Directory</a></li>\n\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/open.open_webcam\" href=\"#\">Open from Webcam</a></li>\n\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/open.open_url\" href=\"#\">Open URL</a></li>\n\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/open.open_data_url\" href=\"#\">Open Data URL</a></li>\n\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/open.open_template_test\" href=\"#\">Open test template</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/search.search\" href=\"#\">Search images</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/save.save\" data-key=\"S\" href=\"#\">Save as</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/save.save_data_url\" href=\"#\">Save as data URL</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"file/print.print\" data-key=\"Ctrl-P\" href=\"#\">Print</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"file/quicksave.quicksave\" data-key=\"F9\" href=\"#\">Quick save</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"file/quickload.quickload\" data-key=\"F10\" href=\"#\">Quick load</a></li>\n\t\t\t</ul>\n\t\t</li>\n\t\t<li>\n\t\t\t<a class=\"trn\" href=\"#\">Editar</a>\n\t\t\t<ul>\n\t\t\t\t<li><a class=\"trn\" data-target=\"edit/undo.undo\" href=\"#\">Undo</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"edit/selection.delete\" data-key=\"Del\" href=\"#\">Delete selection</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/new.new_selection\" href=\"#\">Copy selection</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"edit/paste.paste\" data-key=\"Ctrl+V\" href=\"#\">Paste</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"edit/selection.select_all\" href=\"#\">Select all</a></li>\n\t\t\t</ul>\n\t\t</li>\n\t\t<li>\n\t\t\t<a class=\"trn\" href=\"#\">Imagen</a>\n\t\t\t<ul>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/information.information\" href=\"#\">Information</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/size.size\" href=\"#\">Size</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/trim.trim\" data-key=\"T\" href=\"#\">Trim</a>\n\t\t\t\t<li class=\"more\">\n\t\t\t\t\t<a class=\"trn\" href=\"#\">Zoom</a>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"image/zoom.in\" href=\"#\">Zoom In</a></li>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"image/zoom.out\" href=\"#\">Zoom Out</a></li>\n\t\t\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"image/zoom.original\" href=\"#\">Original size</a></li>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"image/zoom.auto\" href=\"#\">Fit window</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/resize.resize\" href=\"#\">Resize</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/rotate.rotate\" href=\"#\">Rotate</a></li>\n\t\t\t\t<li class=\"more\">\n\t\t\t\t\t<a class=\"trn\" href=\"#\">Flip</a>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"image/flip.vertical\" href=\"#\">Vertical</a></li>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"image/flip.horizontal\" href=\"#\">Horizontal</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/translate.translate\" href=\"#\">Translate</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/opacity.opacity\" href=\"#\">Opacity</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/color_corrections.color_corrections\" href=\"#\">Color corrections</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"image/auto_adjust.auto_adjust\" href=\"#\">Auto adjust colors</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"image/decrease_colors.decrease_colors\" href=\"#\">Decrease color depth</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/palette.palette\" href=\"#\">Color palette</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/grid.grid\" data-key=\"G\" href=\"#\">Grid</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"image/histogram.histogram\" data-key=\"H\" href=\"#\">Histogram</a></li>\n\t\t\t</ul>\n\t\t</li>\n\t\t<li>\n\t\t\t<a class=\"trn\" href=\"#\">Capas</a>\n\t\t\t<ul>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/new.new\" data-key=\"N\" href=\"#\">New</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/new.new_selection\" href=\"#\">New from selection</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/duplicate.duplicate\" href=\"#\">Duplicate</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/visibility.toggle\" href=\"#\">Show / Hide</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/delete.delete\" href=\"#\">Delete</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/raster.raster\" href=\"#\">Convert to raster</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li class=\"more\">\n\t\t\t\t\t<a class=\"trn\" href=\"#\">Move</a>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"layer/move.up\" href=\"#\">Up</a></li>\n\t\t\t\t\t\t<li><a class=\"trn\" data-target=\"layer/move.down\" href=\"#\">Down</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"layer/composition.composition\" href=\"#\">Composition</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"layer/rename.rename\" href=\"#\">Rename</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/clear.clear\" href=\"#\">Clear</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/differences.differences\" href=\"#\">Differences Down</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/merge.merge\" href=\"#\">Merge Down</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"layer/flatten.flatten\" href=\"#\">Flatten Image</a></li>\n\t\t\t</ul>\n\t\t</li>\n\t\t<li>\n\t\t\t<a class=\"trn\" href=\"#\">Efectos</a>\n\t\t\t<ul id=\"effects_list\">\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li class=\"more\">\n\t\t\t\t\t<a class=\"trn\" href=\"#\">CSS filters</a>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/blur.blur\" href=\"#\">Gaussian Blur</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/brightness.brightness\" href=\"#\">Brightness</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/contrast.contrast\" href=\"#\">Contrast</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/grayscale.grayscale\" href=\"#\">Grayscale</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/hue_rotate.hue_rotate\" href=\"#\">Hue Rotate</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/negative.negative\" href=\"#\">Negative</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/saturate.saturate\" href=\"#\">Saturate</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/sepia.sepia\" href=\"#\">Sepia</a>\n\t\t\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/shadow.shadow\" href=\"#\">Shadow</a>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/black_and_white.black_and_white\" href=\"#\">Black and White</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/blueprint.blueprint\" href=\"#\">Blueprint</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/box_blur.box_blur\" href=\"#\">Box Blur</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/denoise.denoise\" href=\"#\">Denoise</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/dither.dither\" href=\"#\">Dither</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/dot_screen.dot_screen\" href=\"#\">Dot Screen</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/edge.edge\" href=\"#\">Edge</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/emboss.emboss\" href=\"#\">Emboss</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/enrich.enrich\" href=\"#\">Enrich</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/grains.grains\" href=\"#\">Grains</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/heatmap.heatmap\" href=\"#\">Heatmap</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/mosaic.mosaic\" href=\"#\">Mosaic</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/night_vision.night_vision\" href=\"#\">Night Vision</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/oil.oil\" href=\"#\">Oil</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/pencil.pencil\" href=\"#\">Pencil</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/sharpen.sharpen\" href=\"#\">Sharpen</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/solarize.solarize\" href=\"#\">Solarize</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/tilt_shift.tilt_shift\" href=\"#\">Tilt Shift</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/vignette.vignette\" href=\"#\">Vignette</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/vibrance.vibrance\" href=\"#\">Vibrance</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/vintage.vintage\" href=\"#\">Vintage</a>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"effects/zoom_blur.zoom_blur\" href=\"#\">Zoom Blur</a>\n\t\t\t</ul>\n\t\t</li>\n\t\t<li>\n\t\t\t<a class=\"trn\" href=\"#\">Herramientas</a>\n\t\t\t<ul>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"tools/borders.borders\" href=\"#\">Borders</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"tools/sprites.sprites\" href=\"#\">Sprites</a></li>\n\t\t\t\t<li><a class=\"trn\" data-target=\"tools/keypoints.keypoints\" href=\"#\">Key-points</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"tools/content_fill.content_fill\" href=\"#\">Content fill</a></li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"tools/color_to_alpha.color_to_alpha\" href=\"#\">Color to alpha</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"tools/color_zoom.color_zoom\" href=\"#\">Color Zoom</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"tools/replace_color.replace_color\" href=\"#\">Replace Color</a></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"tools/restore_alpha.restore_alpha\" href=\"#\">Restore alpha</a></li>\n\t\t\t\t<li class=\"more\">\n\t\t\t\t\t<a class=\"trn\" href=\"#\">External</a>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a class=\"trn external\" target=\"_blank\" href=\"https://tinypng.com/\">Compress PNG and JPEG</a>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"tools/settings.settings\" href=\"#\">Settings</a></li>\t\n\t\t\t</ul>\n\t\t</li>\n\t\t<li>\n\t\t\t<a class=\"trn\" href=\"#\">Ayuda</a>\n\t\t\t<ul>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"help/shortcuts.shortcuts\" href=\"#\">Keyboard Shortcuts</a></li>\n\t\t\t\t<!--<li><a class=\"trn external\" target=\"_blank\" href=\"https://github.com/viliusle/miniPaint/issues\">Report issues</a></li>-->\n\t\t\t\t<li class=\"more\">\n\t\t\t\t\t<a class=\"trn\" href=\"#\">Language</a>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.en\" href=\"#\">English</a>\n\t\t\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.zh\" href=\"#\">\u7B80\u4F53\u4E2D\u6587\uFF09</a>\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.es\" href=\"#\">Espa\xF1ol</a>\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.fr\" href=\"#\">French</a>\t\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.de\" href=\"#\">German</a>\t\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.it\" href=\"#\">Italiano</a>\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.ja\" href=\"#\">Japanese</a>\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.ko\" href=\"#\">Korean</a>\t\t\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.lt\" href=\"#\">Lietuvi\u0173</a>\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.pt\" href=\"#\">Portuguese</a>\t\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.ru\" href=\"#\">Russian</a>\t\n\t\t\t\t\t\t<li><a data-target=\"help/translate.translate.tr\" href=\"#\">Turkish</a>\t\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<!--\n\t\t\t\t<li><div class=\"mid-line\"></div></li>\n\t\t\t\t<li><a class=\"trn dots\" data-target=\"help/about.about\" href=\"#\">About</a></li>\n\t\t\t\t-->\n\t\t\t</ul>\n\t\t</li>\n\t</ul>\n";

exports.default = menu_template;

/***/ }),

/***/ "./src/js/config.js":
/*!**************************!*\
  !*** ./src/js/config.js ***!
  \**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});
//main config file

var config = {};

config.TRANSPARENCY = false;
config.TRANSPARENCY_TYPE = 'squares'; //squares, green, grey
config.LANG = 'es';
config.WIDTH = null;
config.HEIGHT = null;
config.visible_width = null;
config.visible_height = null;
config.COLOR = '#008000';
config.ALPHA = 255;
config.ZOOM = 1;
config.pixabay_key = '3ca2cd8af3fde33af218bea02-9021417';
config.layers = [];
config.layer = null;
config.need_render = false;
config.mouse = {};

//requires styles in reset.css
config.themes = ['dark'];

config.TOOLS = [{
	name: 'select',
	title: 'Select object tool',
	attributes: {
		auto_select: true
	}
}, {
	name: 'selection',
	title: 'Selection',
	attributes: {},
	on_leave: 'on_leave'
}, {
	name: 'brush',
	title: 'Brush',
	attributes: {
		size: 4,
		smart_brush: true
	}
}, {
	name: 'pencil',
	title: 'Pencil',
	on_update: 'on_params_update',
	attributes: {
		antialiasing: true,
		size: 2
	}
}, {
	name: 'pick_color',
	title: 'Pick Color',
	attributes: {
		global: false
	}
}, {
	name: 'erase',
	title: 'Erase',
	on_update: 'on_params_update',
	attributes: {
		size: 30,
		circle: true,
		strict: true
	}
}, {
	name: 'magic_wand',
	title: 'Magic Wand Tool',
	attributes: {
		power: 15,
		anti_aliasing: true,
		contiguous: false
	}
}, {
	name: 'fill',
	title: 'Fill',
	attributes: {
		power: 5,
		anti_aliasing: false,
		contiguous: false
	}
}, {
	name: 'line',
	title: 'Line',
	attributes: {
		size: 1,
		type: {
			value: 'Simple',
			values: ['Simple', 'Arrow']
		}
	}
}, {
	name: 'rectangle',
	title: 'Rectangle',
	attributes: {
		size: 1,
		radius: 0,
		fill: true,
		square: false
	}
}, {
	name: 'circle',
	title: 'Circle',
	attributes: {
		size: 1,
		fill: true,
		circle: false
	}
}, {
	name: 'media',
	title: 'Search images',
	on_activate: 'on_activate',
	attributes: {
		size: 30
	}
}, {
	name: 'text',
	title: 'Text',
	attributes: {}
}, {
	name: 'gradient',
	title: 'Gradient',
	attributes: {
		color_1: '#008000',
		color_2: '#ffffff',
		alpha: 0,
		radial: false,
		radial_power: 50
	}
}, {
	name: 'clone',
	title: 'Clone tool',
	attributes: {
		size: 30,
		anti_aliasing: true,
		source_layer: {
			value: 'Current',
			values: ['Current', 'Previous']
		}
	}
}, {
	name: 'crop',
	title: 'Crop',
	on_update: 'on_params_update',
	on_leave: 'on_leave',
	attributes: {
		crop: true
	}
}, {
	name: 'blur',
	title: 'Blur tool',
	attributes: {
		size: 30,
		strength: 1
	}
}, {
	name: 'sharpen',
	title: 'Sharpen tool',
	attributes: {
		size: 30
	}
}, {
	name: 'desaturate',
	title: 'Desaturate',
	attributes: {
		size: 50,
		anti_aliasing: true
	}
}, {
	name: 'bulge_pinch',
	title: 'Bulge/Pinch tool',
	attributes: {
		radius: 80,
		power: 50,
		bulge: true
	}
}, {
	name: 'animation',
	title: 'Play animation',
	on_update: 'on_params_update',
	on_leave: 'on_leave',
	attributes: {
		play: false,
		delay: 400
	}
}];

//link to active tool
config.TOOL = config.TOOLS[2];

exports.default = config;

/***/ }),

/***/ "./src/js/core/base-gui.js":
/*!*********************************!*\
  !*** ./src/js/core/base-gui.js ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _guiTools = __webpack_require__(/*! ./gui/gui-tools.js */ "./src/js/core/gui/gui-tools.js");

var _guiTools2 = _interopRequireDefault(_guiTools);

var _guiPreview = __webpack_require__(/*! ./gui/gui-preview.js */ "./src/js/core/gui/gui-preview.js");

var _guiPreview2 = _interopRequireDefault(_guiPreview);

var _guiColors = __webpack_require__(/*! ./gui/gui-colors.js */ "./src/js/core/gui/gui-colors.js");

var _guiColors2 = _interopRequireDefault(_guiColors);

var _guiLayers = __webpack_require__(/*! ./gui/gui-layers.js */ "./src/js/core/gui/gui-layers.js");

var _guiLayers2 = _interopRequireDefault(_guiLayers);

var _guiInformation = __webpack_require__(/*! ./gui/gui-information.js */ "./src/js/core/gui/gui-information.js");

var _guiInformation2 = _interopRequireDefault(_guiInformation);

var _guiDetails = __webpack_require__(/*! ./gui/gui-details.js */ "./src/js/core/gui/gui-details.js");

var _guiDetails2 = _interopRequireDefault(_guiDetails);

var _guiMenu = __webpack_require__(/*! ./gui/gui-menu.js */ "./src/js/core/gui/gui-menu.js");

var _guiMenu2 = _interopRequireDefault(_guiMenu);

var _translate = __webpack_require__(/*! ./../modules/help/translate.js */ "./src/js/modules/help/translate.js");

var _translate2 = _interopRequireDefault(_translate);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

/**
 * Main GUI class
 */

var Base_gui_class = function () {
	function Base_gui_class() {
		_classCallCheck(this, Base_gui_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Helper = new _helpers2.default();

		//last used menu id
		this.last_menu = '';

		//grid dimensions config
		this.grid_size = [50, 50];

		//if grid is visible
		this.grid = false;

		//common image dimensions
		this.common_dimensions = [[640, 480, '480p'], [800, 600, 'SVGA'], [1024, 768, 'XGA'], [1280, 720, 'hdtv, 720p'], [1600, 1200, 'UXGA'], [1920, 1080, 'Full HD, 1080p'], [3840, 2160, '4K UHD']];

		this.GUI_tools = new _guiTools2.default(this);
		this.GUI_preview = new _guiPreview2.default(this);
		this.GUI_colors = new _guiColors2.default(this);
		this.GUI_layers = new _guiLayers2.default(this);
		this.GUI_information = new _guiInformation2.default(this);
		this.GUI_details = new _guiDetails2.default(this);
		this.GUI_menu = new _guiMenu2.default();
		this.Help_translate = new _translate2.default();
		this.modules = {};
	}

	_createClass(Base_gui_class, [{
		key: 'load_modules',
		value: function load_modules() {
			var _this = this;
			var modules_context = __webpack_require__("./src/js/modules sync recursive \\.js$");
			modules_context.keys().forEach(function (key) {
				if (key.indexOf('Base' + '/') < 0) {
					var moduleKey = key.replace('./', '').replace('.js', '');
					var classObj = modules_context(key);
					_this.modules[moduleKey] = new classObj.default();
				}
			});
		}
	}, {
		key: 'load_default_values',
		value: function load_default_values() {
			//transparency
			var transparency_cookie = this.Helper.getCookie('transparency');
			if (transparency_cookie === null) {
				//default
				_config2.default.TRANSPARENCY = false;
			}
			if (transparency_cookie) {
				_config2.default.TRANSPARENCY = true;
			} else {
				_config2.default.TRANSPARENCY = false;
			}

			//transparency_type
			var transparency_type = this.Helper.getCookie('transparency_type');
			if (transparency_type === null) {
				//default
				_config2.default.TRANSPARENCY_TYPE = 'squares';
			}
			if (transparency_type) {
				_config2.default.TRANSPARENCY_TYPE = transparency_type;
			}
		}
	}, {
		key: 'render_main_gui',
		value: function render_main_gui() {
			this.autodetect_dimensions();

			this.change_theme();
			this.prepare_canvas();
			this.GUI_tools.render_main_tools();
			this.GUI_preview.render_main_preview();
			this.GUI_colors.render_main_colors();
			this.GUI_layers.render_main_layers();
			this.GUI_information.render_main_information();
			this.GUI_details.render_main_details();
			this.GUI_menu.render_main();
			this.load_saved_changes();

			this.set_events();
			this.load_translations();
		}
	}, {
		key: 'set_events',
		value: function set_events() {
			var _this = this;
			//menu events
			var targets = document.querySelectorAll('#main_menu a');
			for (var i = 0; i < targets.length; i++) {
				if (targets[i].dataset.target == undefined) continue;
				targets[i].addEventListener('click', function (event) {
					var parts = this.dataset.target.split('.');
					var module = parts[0];
					var function_name = parts[1];
					var param = parts[2];

					//close menu
					var menu = document.querySelector('#main_menu .selected');
					if (menu != undefined) {
						menu.click();
					}

					//call module
					if (_this.modules[module] == undefined) {
						_alertifyMin2.default.error('Modules class not found: ' + module);
						return;
					}
					if (_this.modules[module][function_name] == undefined) {
						_alertifyMin2.default.error('Module function not found. ' + module + '.' + function_name);
						return;
					}
					_this.modules[module][function_name](param);
				});
			}

			//registerToggleAbility
			var targets = document.querySelectorAll('.toggle');
			for (var i = 0; i < targets.length; i++) {
				if (targets[i].dataset.target == undefined) continue;
				targets[i].addEventListener('click', function (event) {
					this.classList.toggle('toggled');
					var target = document.getElementById(this.dataset.target);
					target.classList.toggle('hidden');
					//save
					if (_this.Helper.strpos(target.classList, 'hidden') === false) _this.Helper.setCookie(this.dataset.target, 1);else _this.Helper.setCookie(this.dataset.target, 0);
				});
			}

			document.getElementById('mobile_menu_button').addEventListener('click', function (event) {
				document.querySelector('.sidebar_right').classList.toggle('active');
			});
			window.addEventListener('resize', function (event) {
				//resize
				_this.prepare_canvas();
				_config2.default.need_render = true;
			}, false);
		}
	}, {
		key: 'prepare_canvas',
		value: function prepare_canvas() {
			var canvas = document.getElementById('canvas_minipaint');
			var ctx = canvas.getContext("2d");

			var wrapper = document.getElementById('main_wrapper');
			var page_w = wrapper.clientWidth;
			var page_h = wrapper.clientHeight;

			var w = Math.min(Math.ceil(_config2.default.WIDTH * _config2.default.ZOOM), page_w);
			var h = Math.min(Math.ceil(_config2.default.HEIGHT * _config2.default.ZOOM), page_h);

			canvas.width = w;
			canvas.height = h;

			_config2.default.visible_width = w;
			_config2.default.visible_height = h;

			ctx.webkitImageSmoothingEnabled = false;
			ctx.oImageSmoothingEnabled = false;
			ctx.msImageSmoothingEnabled = false;
			ctx.imageSmoothingEnabled = false;

			this.render_canvas_background('canvas_minipaint');

			//change wrapper dimensions
			document.getElementById('canvas_wrapper').style.width = w + 'px';
			document.getElementById('canvas_wrapper').style.height = h + 'px';
		}
	}, {
		key: 'load_saved_changes',
		value: function load_saved_changes() {
			var targets = document.querySelectorAll('.toggle');
			for (var i = 0; i < targets.length; i++) {
				if (targets[i].dataset.target == undefined) continue;

				var target = document.getElementById(targets[i].dataset.target);
				var saved = this.Helper.getCookie(targets[i].dataset.target);
				if (saved === 0) {
					targets[i].classList.toggle('toggled');
					target.classList.add('hidden');
				}
			}
		}
	}, {
		key: 'load_translations',
		value: function load_translations() {
			var lang = this.Helper.getCookie('language');

			//load from params
			var params = this.Helper.get_url_parameters();
			if (params.lang != undefined) {
				lang = params.lang.replace(/([^a-z]+)/gi, '');
			}

			if (lang != null && lang != _config2.default.LANG) {
				_config2.default.LANG = lang.replace(/([^a-z]+)/gi, '');
				this.Help_translate.translate(_config2.default.LANG);
			}
		}
	}, {
		key: 'autodetect_dimensions',
		value: function autodetect_dimensions() {
			var wrapper = document.getElementById('main_wrapper');
			var page_w = wrapper.clientWidth;
			var page_h = wrapper.clientHeight;
			var auto_size = false;

			var save_resolution_cookie = this.Helper.getCookie('save_resolution');
			var last_resolution = this.Helper.getCookie('last_resolution');
			if (save_resolution_cookie != null && save_resolution_cookie != '' && last_resolution != null && last_resolution != '') {
				//load last saved resolution
				last_resolution = JSON.parse(last_resolution);
				_config2.default.WIDTH = parseInt(last_resolution[0]);
				_config2.default.HEIGHT = parseInt(last_resolution[1]);
			} else {
				//use largest possible
				for (var i = this.common_dimensions.length - 1; i >= 0; i--) {
					if (this.common_dimensions[i][0] > page_w || this.common_dimensions[i][1] > page_h) {
						//browser size is too small
						continue;
					}
					_config2.default.WIDTH = parseInt(this.common_dimensions[i][0]);
					_config2.default.HEIGHT = parseInt(this.common_dimensions[i][1]);
					auto_size = true;
					break;
				}

				if (auto_size == false) {
					//screen size is smaller then 400x300
					_config2.default.WIDTH = parseInt(page_w) - 5;
					_config2.default.HEIGHT = parseInt(page_h) - 10;
					if (page_w < 585) {
						_config2.default.HEIGHT = _config2.default.HEIGHT - 15;
					}
				}
			}
		}
	}, {
		key: 'render_canvas_background',
		value: function render_canvas_background(canvas_id, gap) {
			if (gap == undefined) gap = 10;

			var target = document.getElementById(canvas_id + '_background');

			if (_config2.default.TRANSPARENCY == false) {
				target.className = 'transparent-grid white';
				return false;
			} else {
				target.className = 'transparent-grid ' + _config2.default.TRANSPARENCY_TYPE;
			}
			target.style.backgroundSize = gap * 2 + 'px auto';
		}
	}, {
		key: 'draw_grid',
		value: function draw_grid(ctx) {
			if (this.grid == false) return;

			var gap_x = this.grid_size[0];
			var gap_y = this.grid_size[1];

			var width = _config2.default.WIDTH;
			var height = _config2.default.HEIGHT;

			//size
			if (gap_x != undefined && gap_y != undefined) this.grid_size = [gap_x, gap_y];else {
				gap_x = this.grid_size[0];
				gap_y = this.grid_size[1];
			}
			gap_x = parseInt(gap_x);
			gap_y = parseInt(gap_y);
			ctx.lineWidth = 1;
			ctx.beginPath();
			if (gap_x < 2) gap_x = 2;
			if (gap_y < 2) gap_y = 2;
			for (var i = gap_x; i < width; i = i + gap_x) {
				if (gap_x == 0) break;
				if (i % (gap_x * 5) == 0) {
					//main lines
					ctx.strokeStyle = '#222222';
				} else {
					//small lines
					ctx.strokeStyle = '#bbbbbb';
				}
				ctx.beginPath();
				ctx.moveTo(0.5 + i, 0);
				ctx.lineTo(0.5 + i, height);
				ctx.stroke();
			}
			for (var i = gap_y; i < height; i = i + gap_y) {
				if (gap_y == 0) break;
				if (i % (gap_y * 5) == 0) {
					//main lines
					ctx.strokeStyle = '#222222';
				} else {
					//small lines
					ctx.strokeStyle = '#bbbbbb';
				}
				ctx.beginPath();
				ctx.moveTo(0, 0.5 + i);
				ctx.lineTo(width, 0.5 + i);
				ctx.stroke();
			}
		}

		/**
   * change draw area size
   * 
   * @param {int} width
   * @param {int} height
   */

	}, {
		key: 'set_size',
		value: function set_size(width, height) {
			_config2.default.WIDTH = parseInt(width);
			_config2.default.HEIGHT = parseInt(height);
			this.prepare_canvas();
		}

		/**
   * 
   * @returns {object} keys: width, height
   */

	}, {
		key: 'get_visible_area_size',
		value: function get_visible_area_size() {
			var wrapper = document.getElementById('main_wrapper');
			var page_w = wrapper.clientWidth;
			var page_h = wrapper.clientHeight;

			//find visible size in pixels, but make sure its correct even if image smaller then screen
			var w = Math.min(Math.ceil(_config2.default.WIDTH * _config2.default.ZOOM), Math.ceil(page_w / _config2.default.ZOOM));
			var h = Math.min(Math.ceil(_config2.default.HEIGHT * _config2.default.ZOOM), Math.ceil(page_h / _config2.default.ZOOM));

			return {
				width: w,
				height: h
			};
		}

		/**
   * change theme or set automatically from cookie if possible
   * 
   * @param {string} theme_name
   */

	}, {
		key: 'change_theme',
		value: function change_theme(theme_name) {
			if (theme_name == undefined) {
				//auto detect
				var theme_cookie = this.Helper.getCookie('theme');
				if (theme_cookie) {
					theme_name = theme_cookie;
				} else {
					theme_name = _config2.default.themes[0];
				}
			}

			for (var i in _config2.default.themes) {
				document.querySelector('body').classList.remove('theme-' + _config2.default.themes[i]);
			}
			document.querySelector('body').classList.add('theme-' + theme_name);
		}
	}]);

	return Base_gui_class;
}();

exports.default = Base_gui_class;

/***/ }),

/***/ "./src/js/core/base-layers.js":
/*!************************************!*\
  !*** ./src/js/core/base-layers.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseGui = __webpack_require__(/*! ./base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _baseSelection = __webpack_require__(/*! ./base-selection.js */ "./src/js/core/base-selection.js");

var _baseSelection2 = _interopRequireDefault(_baseSelection);

var _baseState = __webpack_require__(/*! ./base-state.js */ "./src/js/core/base-state.js");

var _baseState2 = _interopRequireDefault(_baseState);

var _trim = __webpack_require__(/*! ./../modules/image/trim.js */ "./src/js/modules/image/trim.js");

var _trim2 = _interopRequireDefault(_trim);

var _zoomView = __webpack_require__(/*! ./../libs/zoomView.js */ "./src/js/libs/zoomView.js");

var _zoomView2 = _interopRequireDefault(_zoomView);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

/**
 * Layers class - manages layers. Each layer is object with various types. Keys:
 * - id (int)
 * - link (image)
 * - parent_id (int)
 * - name (string)
 * - type (string)
 * - x (int)
 * - y (int)
 * - width (int)
 * - height (int)
 * - width_original (int)
 * - height_original (int)
 * - visible (bool)
 * - is_vector (bool)
 * - opacity (0-100)
 * - order (int)
 * - composition (string)
 * - rotate (int) 0-359
 * - data (various data here)
 * - params (object)
 * - color {hex}
 * - status (string)
 * - filters (array)
 * - render_function (function)
 */

var Base_layers_class = function () {
	function Base_layers_class() {
		_classCallCheck(this, Base_layers_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Base_gui = new _baseGui2.default();
		this.Helper = new _helpers2.default();
		this.Image_trim = new _trim2.default();
		this.Base_state = new _baseState2.default();

		this.canvas = document.getElementById('canvas_minipaint');
		this.ctx = document.getElementById('canvas_minipaint').getContext("2d");
		this.ctx_preview = document.getElementById('canvas_preview').getContext("2d");
		this.last_zoom = 1;
		this.zoomView = _zoomView2.default;
		this.auto_increment = 1;
		this.stable_dimensions = [];
		this.tempCanvas = document.createElement('canvas');
	}

	/**
  * do preparation on start
  */


	_createClass(Base_layers_class, [{
		key: 'init',
		value: function init() {
			this.init_zoom_lib();
			this.insert({});

			var sel_config = {
				enable_background: false,
				enable_borders: true,
				enable_controls: false,
				data_function: function data_function() {
					return _config2.default.layer;
				}
			};
			this.Base_selection = new _baseSelection2.default(this.ctx, sel_config, 'main');

			this.render(true);
		}
	}, {
		key: 'init_zoom_lib',
		value: function init_zoom_lib() {
			_zoomView2.default.setBounds(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT);
			_zoomView2.default.setContext(this.ctx);
			this.stable_dimensions = [_config2.default.WIDTH, _config2.default.HEIGHT];
		}
	}, {
		key: 'pre_render',
		value: function pre_render() {
			this.ctx.save();
			_zoomView2.default.canvasDefault();
			this.ctx.clearRect(0, 0, _config2.default.WIDTH * _config2.default.ZOOM, _config2.default.HEIGHT * _config2.default.ZOOM);
		}
	}, {
		key: 'after_render',
		value: function after_render() {
			_config2.default.need_render = false;
			this.ctx.restore();
			_zoomView2.default.canvasDefault();
		}

		/**
   * renders all layers objects on main canvas
   *
   * @param {bool} force
   */

	}, {
		key: 'render',
		value: function render(force) {
			var _this = this;
			if (force !== true) {
				//request render and exit
				_config2.default.need_render = true;
				return;
			}

			if (this.stable_dimensions[0] != _config2.default.WIDTH || this.stable_dimensions[1] != _config2.default.HEIGHT) {
				//dimensions changed - re-init zoom lib
				this.init_zoom_lib();
			}

			if (_config2.default.need_render == true) {

				if (this.last_zoom != _config2.default.ZOOM) {
					//change zoom
					_zoomView2.default.scaleAt(this.Base_gui.GUI_preview.zoom_data.x, this.Base_gui.GUI_preview.zoom_data.y, _config2.default.ZOOM / this.last_zoom);
				} else if (this.Base_gui.GUI_preview.zoom_data.move_pos != null) {
					//move visible window
					var pos = this.Base_gui.GUI_preview.zoom_data.move_pos;
					var pos_global = _zoomView2.default.toScreen(pos);
					_zoomView2.default.move(-pos_global.x, -pos_global.y);
					this.Base_gui.GUI_preview.zoom_data.move_pos = null;
				}

				//prepare
				this.pre_render();

				//take data
				var layers_sorted = this.get_sorted_layers();

				_zoomView2.default.apply();

				//render main canvas
				for (var i = layers_sorted.length - 1; i >= 0; i--) {
					var value = layers_sorted[i];
					this.ctx.globalAlpha = value.opacity / 100;
					this.ctx.globalCompositeOperation = value.composition;

					this.render_object(this.ctx, value);
				}

				//grid
				this.Base_gui.draw_grid(this.ctx);

				//render selected object controls
				this.Base_selection.draw_selection();

				//render preview
				this.render_preview(layers_sorted);

				//reset
				this.after_render();
				this.last_zoom = _config2.default.ZOOM;

				this.Base_gui.GUI_details.render_details();
			}

			requestAnimationFrame(function () {
				_this.render(force);
			});
		}
	}, {
		key: 'render_preview',
		value: function render_preview(layers) {
			var w = this.Base_gui.GUI_preview.PREVIEW_SIZE.w;
			var h = this.Base_gui.GUI_preview.PREVIEW_SIZE.h;

			this.ctx_preview.save();
			this.ctx_preview.clearRect(0, 0, w, h);

			//prepare scale
			this.ctx_preview.scale(w / _config2.default.WIDTH, h / _config2.default.HEIGHT);

			for (var i = layers.length - 1; i >= 0; i--) {
				var value = layers[i];

				if (value.visible == false) {
					//not visible
					continue;
				}
				if (value.type == null) {
					//empty type
					continue;
				}

				this.ctx_preview.globalAlpha = value.opacity / 100;
				this.ctx_preview.globalCompositeOperation = value.composition;

				this.render_object(this.ctx_preview, value);
			}

			this.ctx_preview.restore();
			this.Base_gui.GUI_preview.render_preview_active_zone();
		}

		/**
   * export current 1ayers to given canvas
   *
   * @param {canvas.context} ctx
   * @param {object} object
   */

	}, {
		key: 'render_object',
		value: function render_object(ctx, object) {
			if (object.visible == false || object.type == null) return;

			//apply filters
			var filter_code = '';
			for (var i in object.filters) {
				var filter = object.filters[i];

				if (filter_code != '') filter_code += ' ';
				filter_code += filter.name + "(" + filter.params.value + ")";
			}
			if (filter_code != '') ctx.filter = filter_code;else ctx.filter = 'none';

			//example with canvas object - other types should overwrite this method
			if (object.type == 'image') {
				//image - default behavior
				var rotateSupport = true;
				if (rotateSupport == false) {
					if (object.link_canvas != undefined && object.link_canvas != null) {
						//we have draft canvas - use it
						ctx.drawImage(object.link_canvas, object.x, object.y, object.width, object.height);
					} else {
						ctx.drawImage(object.link, object.x, object.y, object.width, object.height);
					}
				} else {
					ctx.save();

					ctx.translate(object.x + object.width / 2, object.y + object.height / 2);
					ctx.rotate(object.rotate * Math.PI / 180);
					if (object.link_canvas != undefined && object.link_canvas != null) {
						//we have draft canvas - use it
						ctx.drawImage(object.link_canvas, -object.width / 2, -object.height / 2, object.width, object.height);
					} else {
						ctx.drawImage(object.link, -object.width / 2, -object.height / 2, object.width, object.height);
					}

					ctx.restore();
				}
			} else {
				//call render function from other module
				var render_class = object.render_function[0];
				var render_function = object.render_function[1];

				this.Base_gui.GUI_tools.tools_modules[render_class][render_function](ctx, object);
			}
			ctx.filter = 'none';
		}

		/**
   * creates new layer
   *
   * @param {array} settings
   * @param {boolean} can_automate
   */

	}, {
		key: 'insert',
		value: function () {
			var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(settings) {
				var can_automate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

				var _this;

				return regeneratorRuntime.wrap(function _callee$(_context) {
					while (1) {
						switch (_context.prev = _context.next) {
							case 0:
								_this = this;
								return _context.abrupt('return', new Promise(function (resolve, reject) {
									var resolvable = false;
									var need_autoresize = false;

									//default data
									var layer = {
										id: _this.auto_increment,
										parent_id: 0,
										name: _this.Helper.ucfirst(_config2.default.TOOL.name) + ' #' + _this.auto_increment,
										type: null,
										link: null,
										x: 0,
										y: 0,
										width: 0,
										width_original: null,
										height: 0,
										height_original: null,
										visible: true,
										is_vector: false,
										opacity: 100,
										order: _this.auto_increment,
										composition: 'source-over',
										rotate: 0,
										data: null,
										params: {},
										status: null,
										color: _config2.default.COLOR,
										filters: [],
										render_function: null
									};

									//build data
									for (var i in settings) {
										if (typeof layer[i] == "undefined") {
											_alertifyMin2.default.error('Error: wrong key: ' + i);
											continue;
										}
										layer[i] = settings[i];
									}

									//prepare image
									if (layer.type == 'image') {

										if (layer.name.toLowerCase().indexOf('.svg') == layer.name.length - 4) {
											//we have svg
											layer.is_vector = true;
										}

										if (_config2.default.layers.length == 1 && _config2.default.layer.width == 0 && _config2.default.layer.height == 0 && _config2.default.layer.data == null) {
											//remove first empty layer?
											_this.delete(_config2.default.layer.id, true);
										}

										if (layer.link == null) {
											if (_typeof(layer.data) == 'object') {
												//load actual image
												if (layer.width == 0) layer.width = layer.data.width;
												if (layer.height == 0) layer.height = layer.data.height;
												layer.link = layer.data.cloneNode(true);
												layer.link.onload = function () {
													_config2.default.need_render = true;
												};
												layer.data = null;
												need_autoresize = true;
											} else if (typeof layer.data == 'string') {
												//try loading as imageData
												resolvable = true;
												layer.link = new Image();
												layer.link.onload = function () {
													//update dimensions
													if (layer.width == 0) layer.width = layer.link.width;
													if (layer.height == 0) layer.height = layer.link.height;
													if (layer.width_original == null) layer.width_original = layer.width;
													if (layer.height_original == null) layer.height_original = layer.height;
													//free data

													layer.data = null;
													_this.autoresize(layer.width, layer.height, layer.id, can_automate);
													_this.render();
													layer.link.onload = function () {
														_config2.default.need_render = true;
													};
													resolve(true);
												};
												layer.link.src = layer.data;
											} else {
												_alertifyMin2.default.error('Error: can not load image.');
											}
										}
									}

									if (settings != undefined && _config2.default.layers.length > 0 && _config2.default.layer.width == 0 && _config2.default.layer.height == 0 && _config2.default.layer.data == null && layer.type != 'image' && can_automate !== false) {
										//update existing layer, because its empty
										for (var i in layer) {
											if (i == 'id') continue;
											if (i == 'name') continue;
											if (i == 'order') continue;
											_config2.default.layer[i] = layer[i];
										}
									} else {
										//create new layer
										_config2.default.layers.push(layer);
										_config2.default.layer = _this.get_layer(layer.id);
										_this.auto_increment++;

										if (_config2.default.layer == null) {
											_config2.default.layer = _config2.default.layers[0];
										}
									}

									if (layer.id >= _this.auto_increment) _this.auto_increment = layer.id + 1;

									if (need_autoresize == true) {
										_this.autoresize(_config2.default.layer.width, _config2.default.layer.height);
									}

									_this.render();
									_this.Base_gui.GUI_layers.render_layers();
									if (resolvable == false) {
										resolve(true);
									}
								}));

							case 2:
							case 'end':
								return _context.stop();
						}
					}
				}, _callee, this);
			}));

			function insert(_x2) {
				return _ref.apply(this, arguments);
			}

			return insert;
		}()

		/**
   * autoresize layer, based on dimensions, up - always, if 1 layer - down.
   *
   * @param {int} width
   * @param {int} height
   * @param {int} layer_id
   * @param {boolean} can_automate
   */

	}, {
		key: 'autoresize',
		value: function autoresize(width, height, layer_id) {
			var can_automate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;

			var _this = this;
			var need_fit = false;

			if (layer_id == undefined) layer_id = _config2.default.layer;

			//resize up
			if (width > _config2.default.WIDTH || height > _config2.default.HEIGHT) {

				var wrapper = document.getElementById('main_wrapper');
				var page_w = wrapper.clientWidth;
				var page_h = wrapper.clientHeight;

				if (width > page_w || height > page_h) {
					need_fit = true;
				}
				if (width > _config2.default.WIDTH) _config2.default.WIDTH = parseInt(width);
				if (height > _config2.default.HEIGHT) _config2.default.HEIGHT = parseInt(height);
			}

			//resize down
			if (_config2.default.layers.length == 1 && can_automate !== false) {
				if (width < _config2.default.WIDTH) _config2.default.WIDTH = parseInt(width);
				if (height < _config2.default.HEIGHT) _config2.default.HEIGHT = parseInt(height);
			}

			this.Base_gui.prepare_canvas();

			//fit zoom when after short pause
			//@todo - remove setTimeout
			if (need_fit == true) {
				var myCallback = function myCallback() {
					_this.Base_gui.GUI_preview.zoom_auto();
				};

				var internal = window.setTimeout(myCallback, 100);
			}
		}

		/**
   * returns layer
   *
   * @param {int} id
   * @returns {object}
   */

	}, {
		key: 'get_layer',
		value: function get_layer(id) {
			if (id == undefined) {
				id = _config2.default.layer.id;
			}
			for (var i in _config2.default.layers) {
				if (_config2.default.layers[i].id == id) {
					return _config2.default.layers[i];
				}
			}
			_alertifyMin2.default.error('Error: can not find layer with id:' + id);
			return null;
		}

		/**
   * removes layer
   *
   * @param {int} id
   * @param {boolean} force - Force to delete first layer?
   */

	}, {
		key: 'delete',
		value: function _delete(id, force) {
			id = parseInt(id);
			if (_config2.default.layers.length == 1 && (force == undefined || force == false)) {
				//only 1 layer left
				if (_config2.default.layer.type == null) {
					//STOP
					return;
				} else {
					//delete it, but before that - create new empty layer
					this.insert();
				}
			}

			if (_config2.default.layer.id == id) {
				//select previous layer
				_config2.default.layer = this.find_next(id);
				if (_config2.default.layer == null) _config2.default.layer = this.find_previous(id);
			}

			for (var i in _config2.default.layers) {
				if (_config2.default.layers[i].id == id) {
					//delete

					if (_config2.default.layers[i].type == 'image') {
						//clean image
						_config2.default.layers[i].link = null;
					}

					_config2.default.layers.splice(i, 1);
				}
			}

			this.render();
			this.Base_gui.GUI_layers.render_layers();
		}

		/*
   * removes all layers
   */

	}, {
		key: 'reset_layers',
		value: function reset_layers(auto_insert) {
			for (var i = _config2.default.layers.length - 1; i >= 0; i--) {
				this.delete(_config2.default.layers[i].id, true);
			}
			this.auto_increment = 1;

			if (auto_insert != undefined && auto_insert === true) {
				var settings = {};
				this.insert(settings);
			}

			this.render();
			this.Base_gui.GUI_layers.render_layers();
		}

		/**
   * toggle layer visibility
   *
   * @param {int} id
   */

	}, {
		key: 'toggle_visibility',
		value: function toggle_visibility(id) {
			id = parseInt(id);
			var link = this.get_layer(id);

			if (link.visible == false) link.visible = true;else link.visible = false;

			this.render();
			this.Base_gui.GUI_layers.render_layers();
		}

		/*
   * renew layers HTML
   */

	}, {
		key: 'refresh_gui',
		value: function refresh_gui() {
			this.Base_gui.GUI_layers.render_layers();
		}

		/**
   * marks layer as selected, active
   *
   * @param {int} id
   */

	}, {
		key: 'select',
		value: function select(id) {
			id = parseInt(id);
			_config2.default.layer = this.get_layer(id);
			this.Base_selection.reset_selection();

			this.render();
			this.Base_gui.GUI_layers.render_layers();
		}

		/**
   * change layer opacity
   *
   * @param {int} id
   * @param {int} value 0-100
   */

	}, {
		key: 'set_opacity',
		value: function set_opacity(id, value) {
			id = parseInt(id);
			value = parseInt(value);
			if (value < 0 || value > 100) {
				//reset
				value = 100;
			}
			var link = this.get_layer(id);

			link.opacity = value;
		}

		/**
   * clear layer data
   *
   * @param {int} id
   */

	}, {
		key: 'layer_clear',
		value: function layer_clear(id) {
			id = parseInt(id);
			var link = this.get_layer(id);

			link.data = null;
			link.x = 0;
			link.y = 0;
			link.width = 0;
			link.height = 0;
		}

		/**
   * move layer up or down
   *
   * @param {int} id
   * @param {int} direction
   */

	}, {
		key: 'move',
		value: function move(id, direction) {
			id = parseInt(id);
			var link = this.get_layer(id);

			if (direction < 0) {
				var target = this.find_previous(id);
			} else {
				var target = this.find_next(id);
			}
			if (target != null) {
				var current_order = link.order;
				link.order = target.order;
				target.order = current_order;
			}

			this.render();
			this.Base_gui.GUI_layers.render_layers();
		}

		/**
   * clone and sort.
   */

	}, {
		key: 'get_sorted_layers',
		value: function get_sorted_layers() {
			return _config2.default.layers.concat().sort(
			//sort function
			function (a, b) {
				return b.order - a.order;
			});
		}

		/**
   * checks if layer empty
   *
   * @param {int} id
   * @returns {Boolean}
   */

	}, {
		key: 'is_layer_empty',
		value: function is_layer_empty(id) {
			var link = this.get_layer(id);

			if (link.width == 0 && link.height == 0 && link.data == null) {
				return true;
			}

			return false;
		}

		/**
   * find next layer
   *
   * @param {int} id layer id
   * @returns {layer|null}
   */

	}, {
		key: 'find_next',
		value: function find_next(id) {
			id = parseInt(id);
			var link = this.get_layer(id);
			var layers_sorted = this.get_sorted_layers();

			var last = null;
			for (var i = layers_sorted.length - 1; i >= 0; i--) {
				var value = layers_sorted[i];

				if (last != null && last.id == link.id) {
					return value;
				}
				last = value;
			}

			return null;
		}

		/**
   * find previous layer
   *
   * @param {int} id layer id
   * @returns {layer|null}
   */

	}, {
		key: 'find_previous',
		value: function find_previous(id) {
			id = parseInt(id);
			var link = this.get_layer(id);
			var layers_sorted = this.get_sorted_layers();

			var last = null;
			for (var i in layers_sorted) {
				var value = layers_sorted[i];

				if (last != null && last.id == link.id) {
					return value;
				}
				last = value;
			}

			return null;
		}

		/**
   * returns global position, for example if canvas is zoomed, it will convert relative mouse position to absolute at 100% zoom.
   *
   * @param {int} x
   * @param {int} y
   * @returns {object} keys: x, y
   */

	}, {
		key: 'get_world_coords',
		value: function get_world_coords(x, y) {
			return _zoomView2.default.toWorld(x, y);
		}

		/**
   * register new live filter
   *
   * @param {int} layer_id
   * @param {string} name
   * @param {object} params
   */

	}, {
		key: 'add_filter',
		value: function add_filter(layer_id, name, params) {
			if (layer_id == null) layer_id = _config2.default.layer.id;
			var link = this.get_layer(layer_id);
			var filter = {
				id: this.Helper.getRandomInt(1, 999999999),
				name: name,
				params: params
			};
			link.filters.push(filter);

			_config2.default.need_render = true;
			this.Base_gui.GUI_layers.render_layers();
		}

		/**
   * delete live filter
   *
   * @param {int} layer_id
   * @param {string} filter_id
   */

	}, {
		key: 'delete_filter',
		value: function delete_filter(layer_id, filter_id) {
			if (layer_id == null) layer_id = _config2.default.layer.id;
			var link = this.get_layer(layer_id);

			for (var i in link.filters) {
				if (link.filters[i].id == filter_id) {
					link.filters.splice(i, 1);
				}
			}

			_config2.default.need_render = true;
			this.Base_gui.GUI_layers.render_layers();
		}

		/**
   * exports all layers to canvas for saving
   *
   * @param {canvas.context} ctx
   * @param {int} layer_id Optional
   */

	}, {
		key: 'convert_layers_to_canvas',
		value: function convert_layers_to_canvas(ctx, layer_id) {
			var layers_sorted = this.get_sorted_layers();
			for (var i = layers_sorted.length - 1; i >= 0; i--) {
				var value = layers_sorted[i];

				if (value.visible == false || value.type == null) {
					continue;
				}
				if (layer_id != undefined && value.id != layer_id) {
					continue;
				}

				ctx.globalAlpha = value.opacity / 100;
				ctx.globalCompositeOperation = value.composition;

				this.render_object(ctx, value);
			}
		}
		/**
   * exports (active) layer to canvas for saving
   *
   * @param {int} layer_id or current layer by default
   * @param {boolean} actual_area used for resized image. Default is false.
   * @param {boolean} can_trim default is true
   * @returns {canvas}
   */

	}, {
		key: 'convert_layer_to_canvas',
		value: function convert_layer_to_canvas(layer_id) {
			var actual_area = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
			var can_trim = arguments[2];

			if (actual_area == null) actual_area = false;
			if (layer_id == null) layer_id = _config2.default.layer.id;
			var link = this.get_layer(layer_id);
			var offset_x = 0;
			var offset_y = 0;

			//create tmp canvas
			var canvas = document.createElement('canvas');
			if (actual_area === true && link.type == 'image') {
				canvas.width = link.width_original;
				canvas.height = link.height_original;
				can_trim = false;
			} else {
				canvas.width = Math.max(link.width, _config2.default.WIDTH);
				canvas.height = Math.max(link.height, _config2.default.HEIGHT);
			}

			//add data
			if (actual_area === true && link.type == 'image') {
				canvas.getContext("2d").drawImage(link.link, 0, 0);
			} else {
				this.render_object(canvas.getContext("2d"), link);
			}

			//trim
			if ((can_trim == true || can_trim == undefined) && link.type != null) {
				var trim_info = this.Image_trim.get_trim_info(layer_id);
				if (trim_info.left > 0 || trim_info.top > 0 || trim_info.right > 0 || trim_info.bottom > 0) {
					offset_x = trim_info.left;
					offset_y = trim_info.top;

					var w = canvas.width - trim_info.left - trim_info.right;
					var h = canvas.height - trim_info.top - trim_info.bottom;
					if (w > 1 && h > 1) {
						this.Helper.change_canvas_size(canvas, w, h, offset_x, offset_y);
					}
				}
			}

			canvas.dataset.x = offset_x;
			canvas.dataset.y = offset_y;

			return canvas;
		}

		/**
   * updates layer image data
   *
   * @param {canvas} canvas
   * @param {int} layer_id (optional)
   */

	}, {
		key: 'update_layer_image',
		value: function update_layer_image(canvas, layer_id) {
			if (layer_id == null) layer_id = _config2.default.layer.id;
			var link = this.get_layer(layer_id);

			if (link.type != 'image') {
				_alertifyMin2.default.error('Error: layer must be image.');
				return null;
			}

			if (this.Helper.is_edge_or_ie() == false) {
				//update image using blob (faster)
				canvas.toBlob(function (blob) {
					link.link.src = window.URL.createObjectURL(blob);
					_config2.default.need_render = true;
				}, 'image/png');
			} else {
				//slow way for IE, Edge
				link.link.src = canvas.toDataURL();
			}

			_config2.default.need_render = true;
		}

		/**
   * returns canvas dimensions.
   *
   * @returns {object}
   */

	}, {
		key: 'get_dimensions',
		value: function get_dimensions() {
			return {
				width: _config2.default.WIDTH,
				height: _config2.default.HEIGHT
			};
		}
	}]);

	return Base_layers_class;
}();

exports.default = Base_layers_class;

/***/ }),

/***/ "./src/js/core/base-selection.js":
/*!***************************************!*\
  !*** ./src/js/core/base-selection.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;
var settings_all = [];

/**
 * Selection class - draws rectangular selection on canvas, can be resized.
 */

var Base_selection_class = function () {

	/**
  * settings:
  * - enable_background
  * - enable_borders
  * - enable_controls
  * 
  * @param {ctx} ctx
  * @param {object} settings
  * @param {string} key
  */
	function Base_selection_class(ctx, settings) {
		var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

		_classCallCheck(this, Base_selection_class);

		if (key != null) {
			settings_all[key] = settings;
		}

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.ctx = ctx;
		this.mouse_lock = null;
		this.selected_obj_positions = {};
		this.selected_object_drag_type = null;
		this.click_details = {};

		this.events();
	}

	_createClass(Base_selection_class, [{
		key: 'events',
		value: function events() {
			var _this = this;

			document.addEventListener('mousedown', function (e) {
				_this.selected_object_actions(e);
			});
			document.addEventListener('mousemove', function (e) {
				_this.selected_object_actions(e);
			});
			document.addEventListener('mouseup', function (e) {
				_this.selected_object_actions(e);
			});
		}
	}, {
		key: 'set_selection',
		value: function set_selection(x, y, width, height) {
			var settings = this.find_settings();

			if (x != null) settings.data.x = x;
			if (y != null) settings.data.y = y;
			if (width != null) settings.data.width = width;
			if (height != null) settings.data.height = height;
			_config2.default.need_render = true;
		}
	}, {
		key: 'reset_selection',
		value: function reset_selection() {
			var settings = this.find_settings();

			settings.data = {
				x: null,
				y: null,
				width: null,
				height: null
			};
			_config2.default.need_render = true;
		}
	}, {
		key: 'get_selection',
		value: function get_selection() {
			var settings = this.find_settings();

			return settings.data;
		}
	}, {
		key: 'find_settings',
		value: function find_settings() {
			var current_key = _config2.default.TOOL.name;
			var settings = null;

			for (var i in settings_all) {
				if (i == current_key) settings = settings_all[i];
			}

			//default
			if (settings === null) {
				settings = settings_all['main'];
			}

			//find data
			settings.data = settings.data_function.call();

			return settings;
		}

		/**
   * marks object as selected, and draws corners
   */

	}, {
		key: 'draw_selection',
		value: function draw_selection() {
			var _this = this;
			var settings = this.find_settings();
			var data = settings.data;

			if (settings.data === null || settings.data.status == 'draft') {
				return;
			}

			var x = settings.data.x;
			var y = settings.data.y;
			var w = settings.data.width;
			var h = settings.data.height;

			if (x == null || y == null || w == null || h == null) {
				//not supported 
				return;
			}

			var block_size_default = 14;
			block_size_default = Math.ceil(block_size_default / _config2.default.ZOOM);

			if (_config2.default.ZOOM != 1) {
				x = Math.round(x);
				y = Math.round(y);
				w = Math.round(w);
				h = Math.round(h);
			}
			var block_size = block_size_default;
			var half_size = Math.ceil(block_size / 2);

			this.ctx.save();
			this.ctx.globalAlpha = 1;
			if (data.rotate != null && data.rotate != 0) {
				//rotate
				this.ctx.translate(data.x + data.width / 2, data.y + data.height / 2);
				this.ctx.rotate(data.rotate * Math.PI / 180);
				x = Math.round(-data.width / 2);
				y = Math.round(-data.height / 2);
			}

			var half_fix = 0.5;

			//fill
			if (settings.enable_background == true) {
				this.ctx.fillStyle = "rgba(0, 255, 0, 0.3)";
				this.ctx.fillRect(x, y, w, h);
			}

			//borders
			if (settings.enable_borders == true && (x != 0 || y != 0 || w != _config2.default.WIDTH || h != _config2.default.HEIGHT)) {
				this.ctx.lineWidth = 1;
				this.ctx.strokeStyle = "rgba(0, 128, 0, 0.5)";
				this.ctx.strokeRect(x + half_fix, y + half_fix, w, h);
			}

			//draw corners
			if (Math.abs(w) > block_size * 2 && Math.abs(h) > block_size * 2) {
				corner(x - half_size, y - half_size, 0, 0, 'left_top');
				corner(x + w + half_size, y - half_size, -1, 0, 'right_top');
				corner(x - half_size, y + h + half_size, 0, -1, 'left_bottom');
				corner(x + w + half_size, y + h + half_size, -1, -1, 'right_bottom');
			}

			if (settings.enable_controls == true) {
				//draw centers
				if (Math.abs(w) > block_size * 5) {
					corner(x + w / 2 - block_size / 2, y - half_size, 0, 0, 'top');
					corner(x + w / 2 - block_size / 2, y + h + half_size, 0, -1, 'bottom');
				}
				if (Math.abs(h) > block_size * 5) {
					corner(x - half_size, y + h / 2 - block_size / 2, 0, 0, 'left');
					corner(x + w + half_size, y + h / 2 - block_size / 2, -1, 0, 'right');
				}
			}

			function corner(x, y, dx, dy, name) {
				var block_size = Math.round(block_size_default / 2) * 2;
				x = Math.round(x);
				y = Math.round(y);
				var angle = 0;
				if (settings.data.rotate != null && settings.data.rotate > 0) {
					angle = settings.data.rotate;
				}

				//register position
				_this.selected_obj_positions[name] = {
					x: x + dx * block_size,
					y: y + dy * block_size,
					size: block_size
				};

				if (settings.enable_controls == false || angle > 0) {
					_this.ctx.strokeStyle = "rgba(0, 128, 0, 0.4)";
					_this.ctx.fillStyle = "rgba(255, 255, 255, 0.8)";
				} else {
					_this.ctx.strokeStyle = "#008000";
					_this.ctx.fillStyle = "#ffffff";
				}

				//borders
				_this.ctx.lineWidth = 1;
				if (_config2.default.ZOOM < 1) _this.ctx.lineWidth = 2;
				_this.ctx.beginPath();
				_this.ctx.arc(x + dx * block_size + half_size, y + dy * block_size + half_size, half_size, 0, 2 * Math.PI);
				_this.ctx.fill();
				_this.ctx.stroke();
			}

			//restore
			this.ctx.restore();
		}
	}, {
		key: 'selected_object_actions',
		value: function selected_object_actions(e) {
			var settings = this.find_settings();
			if (document.body.style.cursor != 'default') {
				document.body.style.cursor = 'default';
			}
			if (e.type == 'mousedown' && _config2.default.mouse.valid == false || settings.enable_controls == false) {
				return;
			}
			if (settings.data != null && settings.data.rotate != null && settings.data.rotate > 0) {
				//controls on rotated object disabled
				return;
			}

			var mouse = _config2.default.mouse;
			var type = this.selected_object_drag_type;

			if (e.type == 'mousedown') {
				this.click_details = {
					x: settings.data.x,
					y: settings.data.y,
					width: settings.data.width,
					height: settings.data.height
				};
			}
			if (e.type == 'mousemove' && this.mouse_lock == 'selected_object_actions') {
				document.body.style.cursor = "pointer";

				var is_ctrl = false;
				if (e.ctrlKey == true || e.metaKey) {
					is_ctrl = true;
				}

				if (e.buttons == 1) {
					//do transformations				
					var dx = Math.round(mouse.x - mouse.click_x);
					var dy = Math.round(mouse.y - mouse.click_y);
					var width = this.click_details.width + dx;
					var height = this.click_details.height + dy;
					if (type.indexOf("top") >= 0) var height = this.click_details.height - dy;
					if (type.indexOf("left") >= 0) var width = this.click_details.width - dx;

					if (type.indexOf("_") >= 0 && settings.keep_ratio == true && is_ctrl == false || settings.keep_ratio !== true && is_ctrl == true) {
						//keep ratio
						var ratio = this.click_details.width / this.click_details.height;
						var width_new = Math.round(height * ratio);
						var height_new = Math.round(width / ratio);

						if (Math.abs(width * 100 / width_new) > Math.abs(height * 100 / height_new)) {
							height = height_new;
						} else {
							width = width_new;
						}
					}

					//set values
					if (type.indexOf("top") >= 0) settings.data.y = this.click_details.y - (height - this.click_details.height);
					if (type.indexOf("left") >= 0) settings.data.x = this.click_details.x - (width - this.click_details.width);
					if (type.indexOf("left") >= 0 || type.indexOf("right") >= 0) settings.data.width = width;
					if (type.indexOf("top") >= 0 || type.indexOf("bottom") >= 0) settings.data.height = height;

					_config2.default.need_render = true;
				}
				return;
			}
			if (e.type == 'mouseup' && this.mouse_lock == 'selected_object_actions') {
				//reset
				this.mouse_lock = null;
			}

			for (var i in this.selected_obj_positions) {
				var positions = this.selected_obj_positions[i];

				if (mouse.x >= positions.x && mouse.x <= positions.x + positions.size && mouse.y >= positions.y && mouse.y <= positions.y + positions.size) {
					//match
					if (e.type == 'mousedown') {
						if (e.buttons == 1) {
							this.mouse_lock = 'selected_object_actions';
							this.selected_object_drag_type = i;
						}
					}
					if (e.type == 'mousemove') {
						document.body.style.cursor = "pointer";
					}
				}
			}
		}
	}]);

	return Base_selection_class;
}();

exports.default = Base_selection_class;

/***/ }),

/***/ "./src/js/core/base-state.js":
/*!***********************************!*\
  !*** ./src/js/core/base-state.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseGui = __webpack_require__(/*! ./base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

/**
 * Undo state class. Supports multiple levels undo.
 */

var Base_state_class = function () {
	function Base_state_class() {
		_classCallCheck(this, Base_state_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Base_layers = new _baseLayers2.default();
		this.Base_gui = new _baseGui2.default();
		this.layers_archive = [];
		this.levels = 3;
		this.levels_optimal = 3;
		this.enabled = true;

		this.set_events();
	}

	_createClass(Base_state_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 90 && (event.ctrlKey == true || event.metaKey)) {
					//undo
					_this.undo();
				}
			}, false);
		}
	}, {
		key: 'save',
		value: function save() {

			this.optimize();

			if (this.enabled == false) {
				return;
			}

			//move previous
			this.layers_archive.unshift(null);
			if (this.layers_archive.length > this.levels) {
				//remove element, that is too far in history - saving memory here
				this.layers_archive.splice(-1, 1);
			}

			//general
			this.layers_archive[0] = {
				width: _config2.default.WIDTH,
				height: _config2.default.HEIGHT,
				layer_active: _config2.default.layer.id
			};

			//layers
			this.layers_archive[0].layers = [];
			for (var i in _config2.default.layers) {
				var layer = {};
				for (var j in _config2.default.layers[i]) {
					if (j[0] == '_' || j == 'link_canvas') {
						//private data
						continue;
					}

					layer[j] = _config2.default.layers[i][j];
				}
				layer = JSON.parse(JSON.stringify(layer));
				this.layers_archive[0].layers.push(layer);
			}

			//image data
			this.layers_archive[0].data = [];
			for (var i in _config2.default.layers) {
				if (_config2.default.layers[i].type != 'image') continue;

				this.layers_archive[0].data.push({
					id: _config2.default.layers[i].id,
					data: _config2.default.layers[i].link.cloneNode(true) //@todo - optimize, avoid duplicating data
				});
			}
		}

		/**
   * supports multiple levels undo system
   */

	}, {
		key: 'undo',
		value: function undo() {
			if (this.enabled == false || this.layers_archive[0] == undefined) {
				//not saved yet
				_alertifyMin2.default.error('Undo is not available.');
				return false;
			}

			var data = this.layers_archive[0];

			//set attributes
			if (_config2.default.WIDTH != parseInt(data.width) || _config2.default.HEIGHT != parseInt(data.height)) {
				_config2.default.WIDTH = parseInt(data.width);
				_config2.default.HEIGHT = parseInt(data.height);
				this.Base_gui.prepare_canvas();
			}
			this.Base_layers.reset_layers();

			for (var i in data.layers) {
				var value = data.layers[i];

				if (value.type == 'image') {
					//add image data
					value.link = null;
					for (var j in data.data) {
						if (data.data[j].id == value.id) {
							value.data = data.data[j].data;
						}
					}
				}

				this.Base_layers.insert(value, false);
			}

			if (_config2.default.WIDTH != parseInt(data.width) || _config2.default.HEIGHT != parseInt(data.height)) {
				_config2.default.WIDTH = parseInt(data.width);
				_config2.default.HEIGHT = parseInt(data.height);
				this.Base_gui.prepare_canvas();
			}

			this.Base_layers.select(data.layer_active);
			this.layers_archive.shift(); //remove used state
		}

		/**
   * try save, optimize memory, find optimal undo level count.
   */

	}, {
		key: 'optimize',
		value: function optimize() {
			var megapixels = _config2.default.WIDTH * _config2.default.HEIGHT / 1024 / 1024;
			var images = 0;
			for (var i in _config2.default.layers) {
				if (_config2.default.layers[i].type == 'image') {
					images++;
				}
			}
			var total_megapixels = megapixels * images;

			if (total_megapixels > 100) {
				//high dimensions - undo disabled
				if (this.enabled == true) _alertifyMin2.default.warning('Undo disabled.');
				this.enabled = false;
				this.layers_archive = [];
			} else {
				//enabled
				if (this.enabled == false) _alertifyMin2.default.success('Undo enabled.');
				this.enabled = true;

				if (total_megapixels > 50) {
					//1 undo level
					if (this.levels > 1) _alertifyMin2.default.warning('Undo levels changed to 1.');
					this.levels = 1;
					this.layers_archive = [this.layers_archive[0]];
				} else {
					//OK
					if (this.levels == 1) _alertifyMin2.default.success('Undo levels restored to ' + this.levels);
					this.levels = this.levels_optimal;
				}
			}
		}
	}]);

	return Base_state_class;
}();

exports.default = Base_state_class;

/***/ }),

/***/ "./src/js/core/base-tools.js":
/*!***********************************!*\
  !*** ./src/js/core/base-tools.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * Base tools class, can be used for extending on tools like brush, provides various helping methods.
 */
var Base_tools_class = function () {
	function Base_tools_class(save_mouse) {
		_classCallCheck(this, Base_tools_class);

		this.Base_layers = new _baseLayers2.default();
		this.is_drag = false;
		this.mouse_click_pos = [false, false];
		this.mouse_move_last = [false, false];
		this.canvas_offset = { x: null, y: null };
		this.mouse_valid = false;
		this.mouse_click_valid = false;
		this.speed_average = 0;
		this.save_mouse = save_mouse;

		this.prepare();

		if (this.save_mouse == true) {
			this.events();
		}
	}

	_createClass(Base_tools_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			_this.set_mouse_info(event);

			_this.is_drag = true;
			_this.speed_average = 0;
			var mouse = _this.get_mouse_info(event, true);
			_this.mouse_click_pos[0] = mouse.x;
			_this.mouse_click_pos[1] = mouse.y;
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			_this.set_mouse_info(event);

			_this.speed_average = _this.calc_average_mouse_speed(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			_this.is_drag = false;
			_this.set_mouse_info(event);
		}
	}, {
		key: 'events',
		value: function events() {
			var _this = this;

			//collect mouse info
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch info
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
				if (event.target.id === "canvas_minipaint" && !$('.scroll').has($(event.target)).length) event.preventDefault();
			}, { passive: false });
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});

			//on resize
			window.addEventListener('resize', function (event) {
				_this.prepare();
			});
		}

		/**
   * do preparation
   */

	}, {
		key: 'prepare',
		value: function prepare() {
			//calc canvas position offset
			var bodyRect = document.body.getBoundingClientRect();
			var canvas_el = document.getElementById('canvas_minipaint').getBoundingClientRect();
			this.canvas_offset.x = canvas_el.left - bodyRect.left;
			this.canvas_offset.y = canvas_el.top - bodyRect.top;

			this.is_drag = _config2.default.mouse.is_drag;
		}
	}, {
		key: 'set_mouse_info',
		value: function set_mouse_info(event) {
			if (this.save_mouse !== true) {
				//not main
				return false;
			}

			var eventType = event.type;

			if (event.target.id != "canvas_minipaint") {
				//outside canvas
				this.mouse_valid = false;
			} else {
				this.mouse_valid = true;
			}

			if (eventType === 'mousedown' || eventType === 'touchstart') {
				if (event.target.id != "canvas_minipaint" || event.which != 1 && eventType !== 'touchstart') this.mouse_click_valid = false;else this.mouse_click_valid = true;
				this.mouse_valid = true;
			}

			if (event != undefined && event.changedTouches) {
				//using touch events
				event = event.changedTouches[0];
			}

			var mouse_x = event.pageX - this.canvas_offset.x;
			var mouse_y = event.pageY - this.canvas_offset.y;

			//adapt coords to ZOOM
			var global_pos = this.Base_layers.get_world_coords(mouse_x, mouse_y);
			mouse_x = global_pos.x;
			mouse_y = global_pos.y;

			var start_pos = this.Base_layers.get_world_coords(0, 0);
			var x_rel = mouse_x - start_pos.x;
			var y_rel = mouse_y - start_pos.y;

			//save
			_config2.default.mouse = {
				x: mouse_x,
				y: mouse_y,
				x_rel: x_rel,
				y_rel: y_rel,
				click_x: this.mouse_click_pos[0],
				click_y: this.mouse_click_pos[1],
				last_x: this.mouse_move_last[0],
				last_y: this.mouse_move_last[1],
				valid: this.mouse_valid,
				click_valid: this.mouse_click_valid,
				is_drag: this.is_drag,
				speed_average: this.speed_average
			};

			if (eventType === 'mousemove' || eventType === 'touchmove') {
				//save last pos
				this.mouse_move_last[0] = mouse_x;
				this.mouse_move_last[1] = mouse_y;
			}
		}
	}, {
		key: 'get_mouse_info',
		value: function get_mouse_info() {
			return _config2.default.mouse;
		}
	}, {
		key: 'calc_average_mouse_speed',
		value: function calc_average_mouse_speed(event) {
			if (this.is_drag == false) return null;

			//calc average speed
			var avg_speed_max = 30;
			var avg_speed_changing_power = 2;
			var mouse = this.get_mouse_info(event, true);

			var dx = Math.abs(mouse.x - mouse.last_x);
			var dy = Math.abs(mouse.y - mouse.last_y);
			var delta = Math.sqrt(dx * dx + dy * dy);
			var mouse_average_speed = this.speed_average;
			if (delta > avg_speed_max / 2) {
				mouse_average_speed += avg_speed_changing_power;
			} else {
				mouse_average_speed -= avg_speed_changing_power;
			}
			mouse_average_speed = Math.max(0, mouse_average_speed); //min
			mouse_average_speed = Math.min(avg_speed_max, mouse_average_speed); //max

			return mouse_average_speed;
		}
	}, {
		key: 'get_params_hash',
		value: function get_params_hash() {
			var data = [this.getParams(), _config2.default.COLOR, _config2.default.ALPHA];
			return JSON.stringify(data);
		}
	}, {
		key: 'clone',
		value: function clone(object) {
			return JSON.parse(JSON.stringify(object));
		}

		/**
   * customized mouse cursor
   *
   * @param {int} x
   * @param {int} y
   * @param {int} size
   * @param {string} type circle, rect
   */

	}, {
		key: 'show_mouse_cursor',
		value: function show_mouse_cursor(x, y, size, type) {

			//fix coordinates, because of scroll
			var start_pos = this.Base_layers.get_world_coords(0, 0);
			x = x - start_pos.x;
			y = y - start_pos.y;

			var element = document.getElementById('mouse');
			size = size * _config2.default.ZOOM;
			x = x * _config2.default.ZOOM;
			y = y * _config2.default.ZOOM;

			if (size < 5) {
				//too small
				element.className = '';
				return;
			}

			element.style.width = size + 'px';
			element.style.height = size + 'px';

			element.style.left = x - Math.ceil(size / 2) + 'px';
			element.style.top = y - Math.ceil(size / 2) + 'px';

			//add style
			element.className = '';
			element.classList.add(type);
		}
	}, {
		key: 'getParams',
		value: function getParams() {
			return _config2.default.TOOL.attributes;
		}
	}, {
		key: 'adaptSize',
		value: function adaptSize(value) {
			var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "width";

			var response;
			if (_config2.default.layer.width_original == null) {
				return value;
			}

			if (type === "width") {
				response = value / (_config2.default.layer.width / _config2.default.layer.width_original);
			} else {
				response = value / (_config2.default.layer.height / _config2.default.layer.height_original);
			}

			return response;
		}
	}]);

	return Base_tools_class;
}();

exports.default = Base_tools_class;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")))

/***/ }),

/***/ "./src/js/core/gui/gui-colors.js":
/*!***************************************!*\
  !*** ./src/js/core/gui/gui-colors.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

__webpack_require__(/*! ./../../../../node_modules/spectrum-colorpicker/spectrum.css */ "./node_modules/spectrum-colorpicker/spectrum.css");

var _spectrum = __webpack_require__(/*! ./../../../../node_modules/spectrum-colorpicker/spectrum.js */ "./node_modules/spectrum-colorpicker/spectrum.js");

var _spectrum2 = _interopRequireDefault(_spectrum);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Helper = new _helpers2.default();

var template = '\n\t\t<span class="trn bold hex">Hex:</span>\n\t\t<input type="text" class="color_hex" id="color_hex" value="#000000" />\n\t\t<br />\n\t\t<div class="main_color_rgb">\n\t\t\t<div>\n\t\t\t\t<span class="trn red">Red:</span>\n\t\t\t\t<input id="rgb_r" min="0" max="255" type="number" />\n\t\t\t\t<br />\t\t\t\t\n\t\t\t\t<span class="trn green">Green:</span>\n\t\t\t\t<input id="rgb_g" min="0" max="255" type="number" />\n\t\t\t\t<br />\n\t\t\t\t<span class="trn blue">Blue:</span>\n\t\t\t\t<input id="rgb_b" min="0" max="255" type="number" />\n\t\t\t\t<br />\n\t\t\t\t<span class="trn alpha">Alpha:</span>\n\t\t\t\t<input id="rgb_a" min="0" max="255" type="number" />\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<span class="trn">Hue:</span>\n\t\t\t\t<input id="hsl_h" min="0" max="360" type="number" />\n\t\t\t\t<br />\t\t\t\t\n\t\t\t\t<span class="trn">Sat:</span>\n\t\t\t\t<input id="hsl_s" min="0" max="100" type="number" />\n\t\t\t\t<br />\n\t\t\t\t<span class="trn">Lum:</span>\n\t\t\t\t<input id="hsl_l" min="0" max="100" type="number" />\n\t\t\t</div>\n\t\t</div>\n';

/**
 * GUI class responsible for rendering colors block on right sidebar
 */

var GUI_colors_class = function () {
	function GUI_colors_class() {
		_classCallCheck(this, GUI_colors_class);
	}

	_createClass(GUI_colors_class, [{
		key: 'render_main_colors',
		value: function render_main_colors() {
			document.getElementById('toggle_colors').innerHTML = template;
			this.render_colors();
			this.set_events();
		}
	}, {
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			var rbg_input_ids = ['rgb_r', 'rgb_g', 'rgb_b', 'rgb_a'];
			for (var i in rbg_input_ids) {
				var target = document.getElementById(rbg_input_ids[i]);
				target.addEventListener('input', function (e) {
					_this.set_color_rgb(this);
				}, false);
			}

			var hsl_input_ids = ['hsl_h', 'hsl_s', 'hsl_l'];
			for (var i in hsl_input_ids) {
				var target = document.getElementById(hsl_input_ids[i]);
				target.addEventListener('input', function (e) {
					_this.set_color_hsl(this);
				}, false);
			}

			var changed = false;
			var last_color = _config2.default.COLOR;
			$("#main_color").spectrum({
				move: function move(color) {
					_this.change_color(color.toHexString());
					_this.render_colors();
				},
				show: function show() {
					changed = false;
				},
				change: function change(color) {
					changed = true;
				},
				hide: function hide(color) {
					if (changed == false) {
						// revert
						_this.change_color(last_color);
						_this.render_colors();
					} else {
						//changed
						last_color = _config2.default.COLOR;
					}
				}
			});

			//colors
			document.getElementById('color_hex').addEventListener('keyup', function (e) {
				_this.set_color_manual(e);
			}, false);
			document.getElementById('main_color').addEventListener('change', function (e) {
				_this.set_color(this);
			}, false);
		}
	}, {
		key: 'render_colors',
		value: function render_colors(ignore_id) {
			document.getElementById("color_hex").value = _config2.default.COLOR;
			document.getElementById("main_color").value = _config2.default.COLOR;

			var colors = Helper.hex2rgb(_config2.default.COLOR);
			document.getElementById("rgb_r").value = colors.r;
			document.getElementById("rgb_g").value = colors.g;
			document.getElementById("rgb_b").value = colors.b;
			document.getElementById("rgb_a").value = _config2.default.ALPHA;

			var hsl = Helper.rgbToHsl(colors.r, colors.g, colors.b, false);
			if (ignore_id !== 'hsl_h') document.getElementById("hsl_h").value = Math.round(hsl.h * 360);
			if (ignore_id !== 'hsl_s') document.getElementById("hsl_s").value = Math.round(hsl.s * 100);
			if (ignore_id !== 'hsl_l') document.getElementById("hsl_l").value = Math.round(hsl.l * 100);
		}
	}, {
		key: 'set_color',
		value: function set_color(object) {
			if (object.id == 'main_color') this.change_color(object.value);else this.change_color(Helper.rgb2hex_all(object.style.backgroundColor));

			document.getElementById("main_color").value = _config2.default.COLOR;
			document.getElementById("color_hex").value = _config2.default.COLOR;
			var colors = Helper.hex2rgb(_config2.default.COLOR);
			document.getElementById("rgb_r").value = colors.r;
			document.getElementById("rgb_g").value = colors.g;
			document.getElementById("rgb_b").value = colors.b;

			//also set alpha to max
			if (_config2.default.ALPHA == 0) {
				this.change_alpha(255);
			}

			this.render_colors();
		}
	}, {
		key: 'set_color_manual',
		value: function set_color_manual(event) {
			var object = event.target;
			if (object.value.length == 6 && object.value[0] != '#') {
				this.change_color('#' + object.value);
				this.render_colors();
			}
			if (object.value.length == 7) {
				this.change_color(object.value);
				this.render_colors();
			} else if (object.value.length > 7) {
				object.value = _config2.default.COLOR;
			}
		}
	}, {
		key: 'set_color_rgb',
		value: function set_color_rgb(object) {
			var value = parseInt(object.value);
			if (isNaN(value) || value < 0) {
				object.value = 0;
				_alertifyMin2.default.error('Error: bad rgb value.');
			}
			if (value > 255) {
				object.value = 255;
				_alertifyMin2.default.error('Error: bad rgb value.');
			}
			this.change_color(null, document.getElementById("rgb_r").value, document.getElementById("rgb_g").value, document.getElementById("rgb_b").value);
			this.change_alpha(document.getElementById("rgb_a").value);

			this.render_colors(object.id);
		}
	}, {
		key: 'set_color_hsl',
		value: function set_color_hsl(object) {
			var value = parseInt(object.value);
			if (isNaN(value) || value < 0) {
				object.value = 0;
				return false;
			}

			var max = 100;
			if (object.id == 'hsl_h') {
				max = 360;
			}

			if (value > max) {
				object.value = max;
				_alertifyMin2.default.error('Error: bad hsl value.');
			}
			if (value < 0) {
				object.value = 0;
				_alertifyMin2.default.error('Error: bad hsl value.');
			}
			var rgb = Helper.hslToRgb(document.getElementById("hsl_h").value / 360, document.getElementById("hsl_s").value / 100, document.getElementById("hsl_l").value / 100);
			this.change_color(null, rgb[0], rgb[1], rgb[2]);

			this.render_colors(object.id);
		}

		/**
   * change global color value
   * 
   * @param {type} hex can be null, but r/g/b/ must be provided then. Can be #ff0000 or ff0000
   * @param {type} r optional
   * @param {type} g optional
   * @param {type} b optional
   * @returns {undefined}
   */

	}, {
		key: 'change_color',
		value: function change_color(hex, r, g, b) {
			if (hex != '' && hex != null) {
				if (hex[0] != '#') {
					hex = '#' + hex;
				}
				_config2.default.COLOR = hex;
			} else if (r != undefined && g != undefined && b != undefined) {
				_config2.default.COLOR = Helper.rgbToHex(r, g, b);
			} else {
				_alertifyMin2.default.error('Error: wrong color.');
				return;
			}

			$("#main_color").spectrum("set", _config2.default.COLOR);
		}

		/**
   * change global alpha value
   * 
   * @param {int} value
   */

	}, {
		key: 'change_alpha',
		value: function change_alpha(value) {
			value = Math.ceil(value);
			_config2.default.ALPHA = parseInt(value);
			document.getElementById("rgb_a").value = _config2.default.ALPHA;
		}
	}]);

	return GUI_colors_class;
}();

exports.default = GUI_colors_class;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")))

/***/ }),

/***/ "./src/js/core/gui/gui-details.js":
/*!****************************************!*\
  !*** ./src/js/core/gui/gui-details.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _text = __webpack_require__(/*! ./../../tools/text.js */ "./src/js/tools/text.js");

var _text2 = _interopRequireDefault(_text);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var template = '\n\t<div class="row">\n\t\t<span class="trn label">X</span>\n\t\t<input type="number" id="detail_x" />\n\t\t<button class="extra reset" type="button" id="reset_x" title="Reset">Reset</button>\n\t</div>\n\t<div class="row">\n\t\t<span class="trn label">Y:</span>\n\t\t<input type="number" id="detail_y" />\n\t\t<button class="extra reset" type="button" id="reset_y" title="Reset">Reset</button>\n\t</div>\n\t<div class="row">\n\t\t<span class="trn label">Width:</span>\n\t\t<input type="number" id="detail_width" />\n\t\t<button class="extra reset" type="button" id="reset_size" title="Reset">Reset</button>\n\t</div>\n\t<div class="row">\n\t\t<span class="trn label">Height:</span>\n\t\t<input type="number" id="detail_height" />\n\t</div>\n\t<hr />\n\t<div class="row">\n\t\t<span class="trn label">Rotate:</span>\n\t\t<input type="number" min="-360" max="360" id="detail_rotate" />\n\t</div>\n\t<div class="row">\n\t\t<span class="trn label">Opacity:</span>\n\t\t<input type="number" min="0" max="100" id="detail_opacity" />\n\t</div>\n\t<div class="row">\n\t\t<span class="trn label">Color:</span>\n\t\t<input style="padding: 0px;" type="color" id="detail_color" />\n\t</div>\n\t<div id="params_details">\n\t\t<hr />\n\t\t<div class="row">\n\t\t\t<button type="button" class="" id="detail_param_text">Edit text...</button>\n\t\t\t<button type="button" class="" id="detail_param_bold">Bold</button>\n\t\t\t<button type="button" class="" id="detail_param_italic">Italic</button>\n\t\t\t<button type="button" class="" id="detail_param_stroke">Stroke</button>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<span class="trn label">Size:</span>\n\t\t\t<input type="number" min="1" id="detail_param_size" />\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<span class="trn label">Align:</span>\n\t\t\t<select id="detail_param_align">\n\t\t\t\t<option value="Left">Left</option>\n\t\t\t\t<option value="Center">Center</option>\n\t\t\t\t<option value="Right">Right</option>\n\t\t\t</select>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<span class="trn label">Font:</span>\n\t\t\t<select id="detail_param_family"></select>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<span class="trn label">Stroke:</span>\n\t\t\t<input type="number" min="0" id="detail_param_stroke_size" />\n\t\t</div>\n\t<div>\n';

/**
 * GUI class responsible for rendering selected layer details block on right sidebar
 */

var GUI_details_class = function () {
	function GUI_details_class() {
		_classCallCheck(this, GUI_details_class);

		this.POP = new _popup2.default();
		this.Text = new _text2.default();
	}

	_createClass(GUI_details_class, [{
		key: 'render_main_details',
		value: function render_main_details() {
			document.getElementById('toggle_details').innerHTML = template;

			this.render_details(true);
		}
	}, {
		key: 'render_details',
		value: function render_details() {
			var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

			this.render_general('x', events);
			this.render_general('y', events);
			this.render_general('width', events);
			this.render_general('height', events);

			this.render_general('rotate', events);
			this.render_general('opacity', events);
			this.render_color(events);
			this.render_reset(events);

			//text - special case
			if (_config2.default.layer != undefined && _config2.default.layer.type == 'text') {
				document.getElementById('params_details').style.display = 'block';
			} else {
				document.getElementById('params_details').style.display = 'none';
			}
			this.render_text(events);
			this.render_general_param('size', events);
			this.render_general_param('bold', events);
			this.render_general_param('italic', events);
			this.render_general_param('stroke', events);
			this.render_general_param('stroke_size', events);
			this.render_general_select_param('align', events);
			this.render_general_select_param('family', events);
		}
	}, {
		key: 'render_general',
		value: function render_general(key, events) {
			var layer = _config2.default.layer;

			if (layer != undefined) {
				var target = document.getElementById('detail_' + key);
				if (layer[key] == null) {
					target.value = '';
					target.disabled = true;
				} else {
					target.value = Math.round(layer[key]);
					target.disabled = false;
				}
			}

			if (events) {
				//events
				var target = document.getElementById('detail_' + key);
				if (target == undefined) {
					console.log('Error: missing details event target ' + 'detail_' + key);
					return;
				}
				target.addEventListener('change', function (e) {
					var value = parseInt(this.value);

					if (this.min != undefined && this.min != '' && value < this.min) {
						document.getElementById('detail_opacity').value = value;
						value = this.min;
					}
					if (this.max != undefined && this.min != '' && value > this.max) {
						document.getElementById('detail_opacity').value = value;
						value = this.max;
					}

					_config2.default.layer[key] = value;
					_config2.default.need_render = true;
				});
				target.addEventListener('keyup', function (e) {
					//for edge....
					if (e.keyCode != 13) return;
					var value = parseInt(this.value);

					if (this.min != undefined && this.min != '' && value < this.min) {
						document.getElementById('detail_opacity').value = value;
						value = this.min;
					}
					if (this.max != undefined && this.min != '' && value > this.max) {
						document.getElementById('detail_opacity').value = value;
						value = this.max;
					}

					_config2.default.layer[key] = value;
					_config2.default.need_render = true;
				});
			}
		}
	}, {
		key: 'render_general_param',
		value: function render_general_param(key, events) {
			var layer = _config2.default.layer;

			if (layer != undefined) {
				var target = document.getElementById('detail_param_' + key);
				if (layer.params[key] == null) {
					target.value = '';
					target.disabled = true;
				} else {
					if (typeof layer.params[key] == 'boolean') {
						//boolean
						if (target.tagName == 'BUTTON') {
							if (layer.params[key]) {
								target.classList.add('active');
							} else {
								target.classList.remove('active');
							}
						}
					} else {
						//common
						target.value = layer.params[key];
					}
					target.disabled = false;
				}
			}

			if (events) {
				//events
				document.getElementById('detail_param_' + key).addEventListener('change', function (e) {
					var value = parseInt(this.value);
					_config2.default.layer.params[key] = value;
					_config2.default.need_render = true;
				});
				document.getElementById('detail_param_' + key).addEventListener('click', function (e) {
					if (typeof _config2.default.layer.params[key] != 'boolean') return;
					this.classList.toggle('active');
					_config2.default.layer.params[key] = !_config2.default.layer.params[key];
					_config2.default.need_render = true;
				});
			}
		}
	}, {
		key: 'render_general_select_param',
		value: function render_general_select_param(key, events) {
			var layer = _config2.default.layer;

			if (layer != undefined) {
				var target = document.getElementById('detail_param_' + key);

				if (layer.params[key] == null) {
					target.value = '';
					target.disabled = true;
				} else {
					if (_typeof(layer.params[key]) == 'object') target.value = layer.params[key].value; //legacy
					else target.value = layer.params[key];
					target.disabled = false;
				}
			}

			if (events) {
				//events
				document.getElementById('detail_param_' + key).addEventListener('change', function (e) {
					var value = this.value;
					_config2.default.layer.params[key] = value;
					_config2.default.need_render = true;
				});
			}
		}

		/**
   * item: color
   */

	}, {
		key: 'render_color',
		value: function render_color(events) {
			var layer = _config2.default.layer;

			if (layer != undefined) {
				document.getElementById('detail_color').value = layer.color;
			}

			if (events) {
				//events
				document.getElementById('detail_color').addEventListener('change', function (e) {
					var value = this.value;
					_config2.default.layer.color = value;
					_config2.default.need_render = true;
				});
			}
		}

		/**
   * item: size reset button
   */

	}, {
		key: 'render_reset',
		value: function render_reset(events) {
			var layer = _config2.default.layer;

			if (layer != undefined) {
				//size
				if (layer.width_original != null) {
					document.getElementById('reset_size').classList.remove('hidden');
				} else {
					document.getElementById('reset_size').classList.add('hidden');
				}
			}

			if (events) {
				//events
				document.getElementById('reset_x').addEventListener('click', function (e) {
					if (_config2.default.layer.x != null) _config2.default.layer.x = 0;
					_config2.default.need_render = true;
				});
				document.getElementById('reset_y').addEventListener('click', function (e) {
					if (_config2.default.layer.x != null) _config2.default.layer.y = 0;
					_config2.default.need_render = true;
				});
				document.getElementById('reset_size').addEventListener('click', function (e) {
					_config2.default.layer.width = _config2.default.layer.width_original;
					_config2.default.layer.height = _config2.default.layer.height_original;
					_config2.default.need_render = true;
				});
			}
		}

		/**
   * item: text
   */

	}, {
		key: 'render_text',
		value: function render_text(events) {
			var _this = this;
			var layer = _config2.default.layer;

			if (events) {
				//events
				document.getElementById('detail_param_text').addEventListener('click', function (e) {
					var settings = {
						title: 'Edit text',
						params: [{ name: "text", title: "Text:", value: _config2.default.layer.params.text || "", type: "textarea" }],
						on_finish: function on_finish(params) {
							_config2.default.layer.params.text = params.text;
							_config2.default.need_render = true;
						}
					};
					_this.POP.show(settings);
				});

				//also show font families
				var families = this.Text.get_fonts();
				var select = document.getElementById('detail_param_family');
				for (var i in families) {
					var opt = document.createElement('option');
					opt.value = families[i];
					opt.innerHTML = families[i];
					select.appendChild(opt);
				}
			}
		}
	}]);

	return GUI_details_class;
}();

exports.default = GUI_details_class;

/***/ }),

/***/ "./src/js/core/gui/gui-information.js":
/*!********************************************!*\
  !*** ./src/js/core/gui/gui-information.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var template = '\n\t<span class="trn label">Size:</span>\n\t<span id="mouse_info_size">-</span>\n\t<br />\n\t<span class="trn label">Mouse:</span>\n\t<span id="mouse_info_mouse">-</span>\n';

/**
 * GUI class responsible for rendering information block on right sidebar
 */

var GUI_information_class = function () {
	function GUI_information_class(ctx) {
		_classCallCheck(this, GUI_information_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(GUI_information_class, [{
		key: 'render_main_information',
		value: function render_main_information() {
			document.getElementById('toggle_info').innerHTML = template;
			this.set_events();
			this.show_size();
		}
	}, {
		key: 'set_events',
		value: function set_events() {
			var _this = this;
			var target = document.getElementById('mouse_info_mouse');

			//colors
			document.getElementById('canvas_minipaint').addEventListener('mousemove', function (e) {
				var global_pos = _this.Base_layers.get_world_coords(e.offsetX, e.offsetY);
				var mouse_x = Math.ceil(global_pos.x);
				var mouse_y = Math.ceil(global_pos.y);

				target.innerHTML = mouse_x + ', ' + mouse_y;

				_this.show_size();
			}, false);
		}
	}, {
		key: 'show_size',
		value: function show_size() {
			document.getElementById('mouse_info_size').innerHTML = _config2.default.WIDTH + ' x ' + _config2.default.HEIGHT;
		}
	}]);

	return GUI_information_class;
}();

exports.default = GUI_information_class;

/***/ }),

/***/ "./src/js/core/gui/gui-layers.js":
/*!***************************************!*\
  !*** ./src/js/core/gui/gui-layers.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _rename = __webpack_require__(/*! ./../../modules/layer/rename.js */ "./src/js/modules/layer/rename.js");

var _rename2 = _interopRequireDefault(_rename);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var template = '\n\t<span class="trn">Insert:</span>\n\t<button type="button" class="layer_add" id="insert_layer">+</button>\n\n\t<button type="button" class="layers_arrow" title="Move down" id="layer_down">&darr;</button>\n\t<button type="button" class="layers_arrow" title="Move up" id="layer_up">&uarr;</button>\n\n\t<div class="layers_list" id="layers"></div>\n';

/**
 * GUI class responsible for rendering layers on right sidebar
 */

var GUI_layers_class = function () {
	function GUI_layers_class(ctx) {
		_classCallCheck(this, GUI_layers_class);

		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
		this.Layer_rename = new _rename2.default();
	}

	_createClass(GUI_layers_class, [{
		key: 'render_main_layers',
		value: function render_main_layers() {
			document.getElementById('layers_base').innerHTML = template;
			this.render_layers();

			this.set_events();
		}
	}, {
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.getElementById('layers_base').addEventListener('click', function (event) {
				var target = event.target;
				if (target.id == 'insert_layer') {
					//new layer
					window.State.save();
					_this.Base_layers.insert();
				} else if (target.id == 'layer_up') {
					//move layer up
					window.State.save();
					_this.Base_layers.move(_config2.default.layer.id, 1);
				} else if (target.id == 'layer_down') {
					//move layer down
					window.State.save();
					_this.Base_layers.move(_config2.default.layer.id, -1);
				} else if (target.id == 'visibility') {
					//change visibility
					_this.Base_layers.toggle_visibility(target.dataset.id);
				} else if (target.id == 'delete') {
					//delete layer
					window.State.save();
					_this.Base_layers.delete(target.dataset.id);
				} else if (target.id == 'layer_name') {
					//select layer
					if (target.dataset.id == _config2.default.layer.id) return;
					_this.Base_layers.select(target.dataset.id);
				} else if (target.id == 'delete_filter') {
					//delete filter
					_this.Base_layers.delete_filter(target.dataset.pid, target.dataset.id);
				}
			});

			document.getElementById('layers_base').addEventListener('dblclick', function (event) {
				var target = event.target;
				if (target.id == 'layer_name') {
					//rename layer
					_this.Layer_rename.rename(target.dataset.id);
				}
			});
		}

		/**
   * renders layers list
   */

	}, {
		key: 'render_layers',
		value: function render_layers() {
			var target_id = 'layers';
			var layers = _config2.default.layers.concat().sort(
			//sort function
			function (a, b) {
				return b.order - a.order;
			});

			document.getElementById(target_id).innerHTML = '';
			var html = '';

			for (var i in layers) {
				var value = layers[i];

				if (value.id == _config2.default.layer.id) html += '<div class="item active">';else html += '<div class="item">';
				if (value.visible == true) html += '	<span class="visibility visible" id="visibility" data-id="' + value.id + '" title="hide"></span>';else html += '	<span class="visibility" id="visibility" data-id="' + value.id + '" title="show"></span>';
				html += '	<span class="delete" id="delete" data-id="' + value.id + '" title="delete"></span>';
				html += '	<span class="layer_name" id="layer_name" data-id="' + value.id + '">' + value.name + '</span>';
				html += '	<div class="clear"></div>';
				html += '</div>';

				//show filters
				if (layers[i].filters.length > 0) {
					html += '<div class="filters">';
					for (var j in layers[i].filters) {
						var filter = layers[i].filters[j];
						var title = this.Helper.ucfirst(filter.name);
						title = title.replace(/-/g, ' ');

						html += '<div class="filter">';
						html += '	<span class="delete" id="delete_filter" data-pid="' + layers[i].id + '" data-id="' + filter.id + '" title="delete"></span>';
						html += '	<span class="layer_name" id="filter_name" data-pid="' + layers[i].id + '" data-id="' + filter.id + '">' + title + '</span>';
						html += '	<div class="clear"></div>';
						html += '</div>';
					}
					html += '</div>';
				}
			}

			//register
			document.getElementById(target_id).innerHTML = html;
		}
	}]);

	return GUI_layers_class;
}();

exports.default = GUI_layers_class;

/***/ }),

/***/ "./src/js/core/gui/gui-menu.js":
/*!*************************************!*\
  !*** ./src/js/core/gui/gui-menu.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _configMenu = __webpack_require__(/*! ./../../config-menu.js */ "./src/js/config-menu.js");

var _configMenu2 = _interopRequireDefault(_configMenu);

var _menu = __webpack_require__(/*! ./../../libs/menu.js */ "./src/js/libs/menu.js");

var _menu2 = _interopRequireDefault(_menu);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * class responsible for rendering main menu
 */
var GUI_menu_class = function () {
	function GUI_menu_class() {
		_classCallCheck(this, GUI_menu_class);
	}

	_createClass(GUI_menu_class, [{
		key: 'render_main',
		value: function render_main() {
			document.getElementById('main_menu').innerHTML = _configMenu2.default;
			_menu2.default.init({
				mainmenuid: "main_menu",
				method: 'toggle', //'hover' (default) or 'toggle'
				contentsource: "markup"
			});
		}
	}]);

	return GUI_menu_class;
}();

exports.default = GUI_menu_class;

/***/ }),

/***/ "./src/js/core/gui/gui-preview.js":
/*!****************************************!*\
  !*** ./src/js/core/gui/gui-preview.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var template = '\n\t<div class="canvas_preview_wrapper">\n\t\t<div class="transparent-grid" id="canvas_preview_background"></div>\n\t\t<canvas width="188" height="100" class="transparent" id="canvas_preview"></canvas>\n\t</div>\n\t<div class="canvas_preview_details">\n\t\t<div class="details">\n\t\t\t<input title="Zoom out" class="layer_add" id="zoom_less" type="button" value="-" />\n\t\t\t<input title="Reset zoom level" class="layer_add" id="zoom_100" type="button" value="100%" />\n\t\t\t<input title="Zoom in" class="layer_add" id="zoom_more" type="button" value="+" />\n\t\t\t<input class="layer_add" id="zoom_fit" type="button" value="Fit" />\n\t\t</div>\n\t\t<input id="zoom_range" type="range" value="100" min="50" max="1000" step="50" />\n\t</div>\n';

/**
 * GUI class responsible for rendering preview on right sidebar
 */

var GUI_preview_class = function () {
	function GUI_preview_class(GUI_class) {
		_classCallCheck(this, GUI_preview_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;
		document.getElementById('toggle_preview').innerHTML = template;

		// preview mini window size on right sidebar
		this.PREVIEW_SIZE = { w: 188, h: 100 };

		this.zoom_data = {
			x: 0,
			y: 0,
			move_pos: null
		};

		this.mouse_pressed = false;
		this.canvas_preview = null;
		if (GUI_class != undefined) {
			this.GUI = GUI_class;
		}
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(GUI_preview_class, [{
		key: 'render_main_preview',
		value: function render_main_preview() {
			this.canvas_preview = document.getElementById("canvas_preview").getContext("2d");

			this.prepare_canvas();
			_config2.default.need_render = true;
			this.set_events();
		}
	}, {
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('mousedown', function (e) {
				_this.mouse_pressed = true;
			}, false);
			document.addEventListener('mouseup', function (e) {
				_this.mouse_pressed = false;
			}, false);
			document.getElementById('zoom_range').addEventListener('input', function (e) {
				_this.set_center_zoom();
				_this.zoom(this.value);
			}, false);
			document.getElementById('zoom_range').addEventListener('change', function (e) {
				//IE11
				if (this.value != _config2.default.ZOOM * 100) {
					_this.set_center_zoom();
					_this.zoom(this.value);
				}
			}, false);
			document.getElementById('zoom_less').addEventListener('click', function (e) {
				_this.set_center_zoom();
				_this.zoom(-1);
			}, false);
			document.getElementById('zoom_100').addEventListener('click', function (e) {
				_this.zoom(100);
			}, false);
			document.getElementById('zoom_more').addEventListener('click', function (e) {
				_this.set_center_zoom();
				_this.zoom(+1);
			}, false);
			document.getElementById('zoom_fit').addEventListener('click', function (e) {
				_this.zoom_auto();
			}, false);
			document.getElementById('main_wrapper').addEventListener('wheel', function (e) {
				//zoom with mouse scroll
				e.preventDefault();
				_this.zoom_data.x = e.offsetX;
				_this.zoom_data.y = e.offsetY;
				var delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail || -e.deltaY));
				if (delta > 0) _this.zoom(+1, e);else _this.zoom(-1, e);
			}, false);
			window.addEventListener('resize', function (e) {
				//resize
				_config2.default.need_render = true;
			}, false);
			document.getElementById("canvas_preview").addEventListener('mousedown', function (e) {
				//change zoom offset
				_this.set_zoom_position(e);
			}, false);
			document.getElementById("canvas_preview").addEventListener('mousemove', function (e) {
				//change zoom offset
				if (_this.mouse_pressed == false) return;
				_this.set_zoom_position(e);
			}, false);
		}
	}, {
		key: 'prepare_canvas',
		value: function prepare_canvas() {
			this.canvas_preview.webkitImageSmoothingEnabled = false;
			this.canvas_preview.msImageSmoothingEnabled = false;
			this.canvas_preview.imageSmoothingEnabled = false;
			this.GUI.render_canvas_background('canvas_preview', 8);
		}
	}, {
		key: 'render_preview_active_zone',
		value: function render_preview_active_zone() {
			if (this.canvas_preview == undefined) {
				this.canvas_preview = document.getElementById("canvas_preview").getContext("2d");
			}

			//active zone
			var visible_w = _config2.default.visible_width / _config2.default.ZOOM;
			var visible_h = _config2.default.visible_height / _config2.default.ZOOM;

			var mini_rect_w = this.PREVIEW_SIZE.w * visible_w / _config2.default.WIDTH;
			var mini_rect_h = this.PREVIEW_SIZE.h * visible_h / _config2.default.HEIGHT;

			var start_pos = this.Base_layers.get_world_coords(0, 0);
			var mini_rect_x = start_pos.x / _config2.default.WIDTH * this.PREVIEW_SIZE.w;
			var mini_rect_y = start_pos.y / _config2.default.HEIGHT * this.PREVIEW_SIZE.h;

			//validate
			mini_rect_x = Math.max(0, mini_rect_x);
			mini_rect_y = Math.max(0, mini_rect_y);
			mini_rect_w = Math.min(this.PREVIEW_SIZE.w - 1, mini_rect_w);
			mini_rect_h = Math.min(this.PREVIEW_SIZE.h - 1, mini_rect_h);
			if (mini_rect_x + mini_rect_w > this.PREVIEW_SIZE.w) mini_rect_x = this.PREVIEW_SIZE.w - mini_rect_w;
			if (mini_rect_y + mini_rect_h > this.PREVIEW_SIZE.h) mini_rect_y = this.PREVIEW_SIZE.h - mini_rect_h;

			if (mini_rect_x == 0 && mini_rect_y == 0 && mini_rect_w == this.PREVIEW_SIZE.w - 1 && mini_rect_h == this.PREVIEW_SIZE.h - 1) {
				//everything is visible
				return;
			}

			//draw selected area in preview canvas
			this.canvas_preview.lineWidth = 1;
			this.canvas_preview.beginPath();
			this.canvas_preview.rect(Math.round(mini_rect_x) + 0.5, Math.round(mini_rect_y) + 0.5, mini_rect_w, mini_rect_h);
			this.canvas_preview.fillStyle = "rgba(0, 255, 0, 0.3)";
			this.canvas_preview.strokeStyle = "#00ff00";
			this.canvas_preview.fill();
			this.canvas_preview.stroke();
		}
	}, {
		key: 'zoom',
		value: function zoom(recalc) {
			if (recalc != undefined) {
				//zoom-in or zoom-out
				if (recalc == 1 || recalc == -1) {
					//fix
					if (_config2.default.ZOOM > 1 && _config2.default.ZOOM < 1.5) {
						_config2.default.ZOOM = 1;
					}
					if (_config2.default.ZOOM > 0.9 && _config2.default.ZOOM < 1) {
						_config2.default.ZOOM = 1;
					}

					//calc step
					if (recalc < 0) {
						//down
						if (_config2.default.ZOOM > 3) {
							//infinity -> 300%
							_config2.default.ZOOM -= 1;
						} else if (_config2.default.ZOOM > 1) {
							//300% -> 100%
							_config2.default.ZOOM -= 0.5;
						} else if (_config2.default.ZOOM > 0.1) {
							//100% -> 10%
							_config2.default.ZOOM -= 0.1;
						} else {
							//10% -> 1%
							_config2.default.ZOOM -= 0.01;
						}
					} else {
						//up
						if (_config2.default.ZOOM < 0.1) {
							//1% -> 10%
							_config2.default.ZOOM += 0.01;
						} else if (_config2.default.ZOOM < 1) {
							//10% -> 100%
							_config2.default.ZOOM += 0.1;
						} else if (_config2.default.ZOOM < 3) {
							//100% -> 300%
							_config2.default.ZOOM += 0.5;
						} else {
							//300% -> more
							_config2.default.ZOOM += 1;
						}
					}
				} else {
					//zoom using exact value
					_config2.default.ZOOM = recalc / 100;
				}
				_config2.default.ZOOM = Math.round(_config2.default.ZOOM * 100) / 100;
				_config2.default.ZOOM = Math.max(_config2.default.ZOOM, 0.01);
				_config2.default.ZOOM = Math.min(_config2.default.ZOOM, 500);
			}

			document.getElementById("zoom_100").value = Math.round(_config2.default.ZOOM * 100) + '%';
			document.getElementById("zoom_range").value = _config2.default.ZOOM * 100;

			_config2.default.need_render = true;
			this.GUI.prepare_canvas();
			return true;
		}
	}, {
		key: 'zoom_auto',
		value: function zoom_auto(only_increase) {
			var container = document.getElementById('main_wrapper');
			var page_w = container.clientWidth;
			var page_h = container.clientHeight;

			var best_width = page_w / _config2.default.WIDTH;
			var best_height = page_h / _config2.default.HEIGHT;
			var best_zoom = null;

			best_zoom = Math.min(best_width, best_height);

			if (only_increase != undefined && best_zoom > 1) {
				return false;
			}

			this.zoom(Math.min(best_width, best_height) * 100);
		}
	}, {
		key: 'set_center_zoom',
		value: function set_center_zoom() {
			this.zoom_data.x = _config2.default.visible_width / 2;
			this.zoom_data.y = _config2.default.visible_height / 2;
		}
	}, {
		key: 'set_zoom_position',
		value: function set_zoom_position(e) {
			var visible_w = _config2.default.visible_width / _config2.default.ZOOM;
			var visible_h = _config2.default.visible_height / _config2.default.ZOOM;
			var mini_w = this.PREVIEW_SIZE.w * visible_w / _config2.default.WIDTH;
			var mini_h = this.PREVIEW_SIZE.h * visible_h / _config2.default.HEIGHT;

			var change_x = (e.offsetX - mini_w / 2) / this.PREVIEW_SIZE.w * _config2.default.WIDTH;
			var change_y = (e.offsetY - mini_h / 2) / this.PREVIEW_SIZE.h * _config2.default.HEIGHT;

			var zoom_data = this.zoom_data;
			zoom_data.move_pos = {};
			zoom_data.move_pos.x = change_x;
			zoom_data.move_pos.y = change_y;

			_config2.default.need_render = true;
		}

		/**
   * moves visible area to new position.
   * 
   * @param {int} x global offset
   * @param {int} y global offset
   */

	}, {
		key: 'zoom_to_position',
		value: function zoom_to_position(x, y) {
			var zoom_data = this.zoom_data;
			zoom_data.move_pos = {};
			zoom_data.move_pos.x = parseInt(x);
			zoom_data.move_pos.y = parseInt(y);

			_config2.default.need_render = true;
		}
	}]);

	return GUI_preview_class;
}();

exports.default = GUI_preview_class;

/***/ }),

/***/ "./src/js/core/gui/gui-tools.js":
/*!**************************************!*\
  !*** ./src/js/core/gui/gui-tools.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * miniPaint - https://github.com/viliusle/miniPaint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * author: Vilius L.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _translate = __webpack_require__(/*! ./../../modules/help/translate.js */ "./src/js/modules/help/translate.js");

var _translate2 = _interopRequireDefault(_translate);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

/**
 * GUI class responsible for rendering left sidebar tools
 */

var GUI_tools_class = function () {
	function GUI_tools_class(GUI_class) {
		_classCallCheck(this, GUI_tools_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Helper = new _helpers2.default();
		this.Help_translate = new _translate2.default();

		//active tool
		this.active_tool = 'brush';
		this.tools_modules = {};
	}

	_createClass(GUI_tools_class, [{
		key: 'load_plugins',
		value: function load_plugins() {
			var _this = this;
			var ctx = document.getElementById('canvas_minipaint').getContext("2d");
			var plugins_context = __webpack_require__("./src/js/tools sync recursive \\.js$");
			plugins_context.keys().forEach(function (key) {
				if (key.indexOf('Base' + '/') < 0) {
					var moduleKey = key.replace('./', '').replace('.js', '');
					var classObj = plugins_context(key);
					_this.tools_modules[moduleKey] = new classObj.default(ctx);

					//init events once
					_this.tools_modules[moduleKey].load();
				}
			});
		}
	}, {
		key: 'render_main_tools',
		value: function render_main_tools() {
			this.load_plugins();

			this.render_tools();
		}
	}, {
		key: 'render_tools',
		value: function render_tools() {
			var target_id = "tools_container";
			var _this = this;
			var saved_tool = this.Helper.getCookie('active_tool');
			if (saved_tool != null) {
				this.active_tool = saved_tool;
			}

			//left menu
			for (var i in _config2.default.TOOLS) {
				var item = _config2.default.TOOLS[i];

				var itemDom = document.createElement('span');
				itemDom.id = item.name;
				itemDom.title = item.title;
				if (item.name == this.active_tool) {
					itemDom.className = 'item trn active ' + item.name;
				} else {
					itemDom.className = 'item trn ' + item.name;
				}

				//event
				itemDom.addEventListener('click', function (event) {
					_this.activate_tool(this.id);
				});

				//register
				document.getElementById(target_id).appendChild(itemDom);
			}

			this.show_action_attributes();
			this.activate_tool(this.active_tool);
		}
	}, {
		key: 'activate_tool',
		value: function activate_tool(key) {
			//reset last
			document.querySelector('#tools_container .' + this.active_tool).classList.remove("active");

			//send exit event to old previous tool
			if (_config2.default.TOOL.on_leave != undefined) {
				var moduleKey = _config2.default.TOOL.name;
				var functionName = _config2.default.TOOL.on_leave;
				this.tools_modules[moduleKey][functionName]();
			}

			//change active
			this.active_tool = key;
			document.querySelector('#tools_container .' + this.active_tool).classList.add("active");
			for (var i in _config2.default.TOOLS) {
				if (_config2.default.TOOLS[i].name == this.active_tool) {
					_config2.default.TOOL = _config2.default.TOOLS[i];
				}
			}

			//check module
			if (this.tools_modules[key] == undefined) {
				_alertifyMin2.default.error('Tools class not found: ' + key);
				return;
			}

			//send activate event to new tool
			if (_config2.default.TOOL.on_activate != undefined) {
				var moduleKey = _config2.default.TOOL.name;
				var functionName = _config2.default.TOOL.on_activate;
				this.tools_modules[moduleKey][functionName]();
			}

			this.show_action_attributes();
			this.Helper.setCookie('active_tool', this.active_tool);
			_config2.default.need_render = true;
		}
	}, {
		key: 'action_data',
		value: function action_data() {
			for (var i in _config2.default.TOOLS) {
				if (_config2.default.TOOLS[i].name == this.active_tool) return _config2.default.TOOLS[i];
			}

			//something wrong - select first tool
			this.active_tool = _config2.default.TOOLS[0].name;
			return _config2.default.TOOLS[0];
		}

		/**
   * used strings: 
   * "Fill", "Square", "Circle", "Radial", "Anti aliasing", "Circle", "Strict", "Burn"
   */

	}, {
		key: 'show_action_attributes',
		value: function show_action_attributes() {
			var _this = this;
			var target_id = "action_attributes";

			document.getElementById(target_id).innerHTML = "";

			for (var k in this.action_data().attributes) {
				var item = this.action_data().attributes[k];

				var title = k[0].toUpperCase() + k.slice(1);
				title = title.replace("_", " ");

				var itemDom = document.createElement('span');
				itemDom.className = 'item ' + k;
				document.getElementById(target_id).appendChild(itemDom);

				if (typeof item == 'boolean') {
					//boolean - true, false

					var element = document.createElement('button');
					element.type = 'button';
					element.className = 'block-2';
					element.id = k;
					element.innerHTML = title;
					if (item == true) {
						element.className = 'active trn';
						element.dataset.param = false;
					} else {
						element.className = 'trn';
						element.dataset.param = true;
					}
					//event
					element.addEventListener('click', function (event) {
						//toggle boolean
						var new_value = JSON.parse(this.dataset.param);
						_this.action_data().attributes[this.id] = new_value;
						_this.show_action_attributes();

						if (_this.action_data().on_update != undefined) {
							//send event
							var moduleKey = _this.action_data().name;
							var functionName = _this.action_data().on_update;
							_this.tools_modules[moduleKey][functionName]();
						}
					});

					itemDom.appendChild(element);
				} else if (typeof item == 'number') {
					//numbers

					var elementTitle = document.createElement('span');
					elementTitle.innerHTML = title + ': ';

					var elementInput = document.createElement('input');
					elementInput.type = 'number';
					elementInput.id = k;
					elementInput.value = item;
					elementInput.addEventListener('keyup', function (event) {
						//validate number
						var value = parseInt(this.value);
						if (isNaN(value) || value < 1) {
							value = 1;
							_this.action_data().attributes[this.id] = value;
							_this.show_action_attributes();
						}
						if (value > 100 && this.id == 'power') {
							//max 100
							value = 100;
							_this.action_data().attributes[this.id] = value;
							_this.show_action_attributes();
						}
						_this.action_data().attributes[this.id] = value;
					});
					elementInput.addEventListener('change', function (event) {
						//validate number
						var value = parseInt(this.value);
						_this.action_data().attributes[this.id] = value;
					});

					var elementPlus = document.createElement('button');
					elementPlus.type = 'button';
					elementPlus.id = k;
					elementPlus.innerHTML = '+';
					elementPlus.dataset.target = k;
					elementPlus.addEventListener('click', function (event) {
						//increase
						var value = document.getElementById(this.dataset.target).value;
						value = Math.abs(parseInt(value));

						if (value >= 500) value = value + 100;else if (value >= 100) value = value + 50;else if (value >= 10) value = value + 10;else if (value >= 5) value = value + 5;else value = value + 1;

						if (value > 100 && this.id == 'power') {
							//max 100
							value = 100;
						}

						_this.action_data().attributes[this.id] = value;
						_this.show_action_attributes();
					});

					var elementMinus = document.createElement('button');
					elementMinus.type = 'button';
					elementMinus.id = k;
					elementMinus.innerHTML = '-';
					elementMinus.dataset.target = k;
					elementMinus.addEventListener('click', function (event) {
						//decrease
						var value = document.getElementById(this.dataset.target).value;
						value = Math.abs(parseInt(value));

						if (value > 500) value = value - 100;else if (value > 100) value = value - 50;else if (value > 10) value = value - 10;else if (value > 5) value = value - 5;else value = value - 1;
						value = Math.max(value, 1);

						_this.action_data().attributes[this.id] = value;
						_this.show_action_attributes();
					});

					itemDom.appendChild(elementTitle);
					itemDom.appendChild(elementInput);
					itemDom.appendChild(elementPlus);
					itemDom.appendChild(elementMinus);
				} else if ((typeof item === 'undefined' ? 'undefined' : _typeof(item)) == 'object') {
					//select

					var elementTitle = document.createElement('span');
					elementTitle.innerHTML = title + ': ';

					var selectList = document.createElement("select");
					selectList.id = k;
					for (var j in item.values) {
						var option = document.createElement("option");
						if (item.value == item.values[j]) {
							option.selected = 'selected';
						}
						option.className = 'trn';
						option.name = item.values[j];
						option.value = item.values[j];
						option.text = item.values[j];
						selectList.appendChild(option);
					}
					//event
					selectList.addEventListener('change', function (event) {
						_this.action_data().attributes[this.id].value = this.value;
						_this.show_action_attributes();
					});

					itemDom.appendChild(elementTitle);
					itemDom.appendChild(selectList);
				} else if (typeof item == 'string' && item[0] == '#') {
					//color

					var elementTitle = document.createElement('span');
					elementTitle.innerHTML = title + ': ';

					var elementInput = document.createElement('input');
					elementInput.type = 'color';
					elementInput.id = k;
					elementInput.value = item;

					elementInput.addEventListener('keyup', function (event) {
						_this.action_data().attributes[this.id] = this.value;
					});
					elementInput.addEventListener('change', function (event) {
						_this.action_data().attributes[this.id] = this.value;
					});

					itemDom.appendChild(elementTitle);
					itemDom.appendChild(elementInput);
				} else {
					_alertifyMin2.default.error('Error: unsupported attribute type:' + (typeof item === 'undefined' ? 'undefined' : _typeof(item)) + ', ' + k);
				}
			}

			if (_config2.default.LANG != 'en') {
				//retranslate
				this.Help_translate.translate(_config2.default.LANG);
			}
		}
	}]);

	return GUI_tools_class;
}();

exports.default = GUI_tools_class;

/***/ }),

/***/ "./src/js/languages sync recursive \\.json$":
/*!***************************************!*\
  !*** ./src/js/languages sync \.json$ ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./de.json": "./src/js/languages/de.json",
	"./empty.json": "./src/js/languages/empty.json",
	"./es.json": "./src/js/languages/es.json",
	"./fr.json": "./src/js/languages/fr.json",
	"./it.json": "./src/js/languages/it.json",
	"./ja.json": "./src/js/languages/ja.json",
	"./ko.json": "./src/js/languages/ko.json",
	"./lt.json": "./src/js/languages/lt.json",
	"./pt.json": "./src/js/languages/pt.json",
	"./ru.json": "./src/js/languages/ru.json",
	"./tr.json": "./src/js/languages/tr.json",
	"./zh.json": "./src/js/languages/zh.json"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./src/js/languages sync recursive \\.json$";

/***/ }),

/***/ "./src/js/languages/de.json":
/*!**********************************!*\
  !*** ./src/js/languages/de.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"Über\",\"Active\":\"Aktiv\",\"Advanced\":\"Fortgeschritten\",\"All\":\"Alle\",\"Alpha:\":\"Alpha:\",\"Anonymous\":\"Anonym\",\"Anti aliasing\":\"Kantenglättung\",\"Arial\":\"Arial\",\"Arrow\":\"Pfeil\",\"Author:\":\"Autor:\",\"Auto adjust colors\":\"Automatische Farbeinstellung\",\"Average:\":\"Durchschnitt:\",\"BMP - Windows Bitmap\":\"BMP - Windows-Bitmap\",\"Base\":\"Basis\",\"Basic\":\"Basic\",\"Black and White\":\"Schwarz und weiß\",\"Blue\":\"Blau\",\"Blue channel:\":\"Blauer Kanal:\",\"Blue:\":\"Blau:\",\"Blur Radius:\":\"Weichzeichner-Radius:\",\"Blur power:\":\"Weichzeichner-Stärke:\",\"Blur tool\":\"Weichzeichner\",\"Bold\":\"Fett gedruckt\",\"Bold Italic\":\"Fett Kursiv\",\"Borders\":\"Grenzen\",\"Box Blur\":\"Box Unschärfe\",\"Box blur\":\"Box Unschärfe\",\"Brightness\":\"Helligkeit\",\"Brightness:\":\"Helligkeit:\",\"Brush\":\"Pinsel\",\"Bulge/Pinch tool\":\"Ausbuchtung / Pinch-Werkzeug\",\"Burn\":\"Brennen\",\"CSS filters\":\"CSS-Filter\",\"Can not animate 1 layer.\":\"1 Ebene kann nicht animiert werden.\",\"Can not find previous layer.\":\"Die vorherige Ebene kann nicht gefunden werden.\",\"Cancel\":\"Abbrechen\",\"Center\":\"Zentrum\",\"Center x:\":\"Mitte x:\",\"Center y:\":\"Mitte y:\",\"Center:\":\"Zentrum:\",\"Channel:\":\"Kanal:\",\"Circle\":\"Kreis\",\"Clear\":\"Löschen\",\"Clone count:\":\"Klonanzahl:\",\"Clone tool\":\"Klonwerkzeug\",\"Cloned edges\":\"Klonierte Kanten\",\"Color #\":\"Farbe #\",\"Color Zoom\":\"Farbzoom\",\"Color alpha value can not be zero.\":\"Farb-Alpha-Wert kann nicht Null sein.\",\"Color corrections\":\"Farbkorrekturen\",\"Color palette\":\"Farbpalette\",\"Color to alpha\":\"Farbe zu Alpha\",\"Color zoom\":\"Farbzoom\",\"Color:\":\"Farbe:\",\"Colors\":\"Farben\",\"Colors:\":\"Farben:\",\"Composition\":\"Zusammensetzung\",\"Composition:\":\"Zusammensetzung:\",\"Content fill\":\"Inhalt ausfüllen\",\"Contrast\":\"Kontrast\",\"Contrast:\":\"Kontrast:\",\"Convert to raster\":\"In Raster konvertieren\",\"Copy selection\":\"Auswahl kopieren\",\"Copy:\":\"Kopieren:\",\"Courier\":\"Kurier\",\"Crop\":\"Zuschneiden\",\"Ctrl+V\":\"Strg + V\",\"Ctrl-P\":\"Strg-P\",\"Current\":\"Aktuell\",\"Curve\":\"Kurve\",\"Custom\":\"Individuell\",\"Data URL\":\"Daten-URL\",\"Data URL:\":\"Daten-URL:\",\"Decrease color depth\":\"Farbtiefe verringern\",\"Default\":\"Standard\",\"Degree:\":\"Grad:\",\"Del\":\"Del\",\"Delete\":\"Löschen\",\"Delete selection\":\"Auswahl löschen\",\"Denoise\":\"Denoise\",\"Desaturate\":\"Entsättigen\",\"Description:\":\"Beschreibung:\",\"Differences\":\"Unterschiede\",\"Differences Down\":\"Unterschiede nach unten\",\"Dither\":\"Dither\",\"Dithering:\":\"Dithering:\",\"Dominant color:\":\"Dominierende Farbe:\",\"Dot Screen\":\"Punkt-Bildschirm\",\"Down\":\"Runter\",\"Duplicate\":\"Duplikat\",\"Edge\":\"Kante\",\"Edit\":\"Bearbeiten\",\"Edit text\":\"Text bearbeiten\",\"Edit text...\":\"Text bearbeiten...\",\"Effects\":\"Filter\",\"Email:\":\"Email:\",\"Emboss\":\"Prägen\",\"Empty selection\":\"Leere Auswahl\",\"Empty selection or type not image.\":\"Leere Auswahl oder kein Bildtyp.\",\"English\":\"Englisch\",\"Enrich\":\"Bereichern\",\"Erase\":\"Löschen\",\"Erase on rotate object is disabled. Sorry.\":\"Das Objekt \\\"Erase on rotate\\\" ist deaktiviert. Es tut uns leid.\",\"Error\":\"Fehler\",\"Error connecting to service.\":\"Fehler beim Verbinden mit dem Dienst.\",\"Error: can not load image.\":\"Fehler: Bild kann nicht geladen werden.\",\"Error: missing details event target\":\"Fehler: Details zum Ereignis fehlen\",\"Error: unsupported attribute type:\":\"Fehler: nicht unterstützter Attributtyp:\",\"Error: wrong key:\":\"Fehler: falscher Schlüssel:\",\"Español\":\"Spanisch\",\"Expand edges\":\"Kanten erweitern\",\"Exponent:\":\"Exponent:\",\"Factor:\":\"Faktor:\",\"File\":\"Datei\",\"File name:\":\"Dateiname:\",\"File size:\":\"Dateigröße:\",\"Fill\":\"Füllen\",\"Fit\":\"Passen\",\"Fit window\":\"Fenster einpassen\",\"Flatten Image\":\"Zu einer Ebene vereinigen\",\"Flip\":\"Spiegeln\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-Serpentin\",\"French\":\"Französisch\",\"Full HD, 1080p\":\"Volles HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - Graphics Interchange Format\",\"Gap:\":\"Spalt:\",\"Gaussian Blur\":\"Gaußscher Weichzeichner\",\"German\":\"Deutsch\",\"Gif delay:\":\"Gif Verzögerung:\",\"GitHub:\":\"GitHub:\",\"Gradient\":\"Gradient\",\"Gradient Radius:\":\"Gradient Radius:\",\"Grains\":\"Körner\",\"Gray\":\"Grau\",\"Grayscale\":\"Graustufen\",\"Green\":\"Grün\",\"Green channel:\":\"Grüner Kanal:\",\"Green:\":\"Grün:\",\"Greyscale:\":\"Graustufen:\",\"Grid\":\"Raster\",\"Grid on/off\":\"Raster ein / aus\",\"H Radius:\":\"H Radius:\",\"Heatmap\":\"Heatmap\",\"Height (%):\":\"Höhe (%):\",\"Height:\":\"Höhe:\",\"Help\":\"Hilfe\",\"Helvetica\":\"Helvetica\",\"Hermite\":\"Hermite\",\"Hex:\":\"Hex:\",\"Histogram\":\"Histogramm\",\"Histogram:\":\"Histogramm:\",\"Horizontal\":\"Horizontal\",\"Horizontal blur:\":\"Horizontale Unschärfe:\",\"Hue Rotate\":\"Farbton drehen\",\"Hue:\":\"Farbton:\",\"Image\":\"Bild\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Bilddaten mit mehreren Ebenen. Kann mit miniPaint geöffnet werden -\",\"Impact\":\"Auswirkung\",\"Information\":\"Information\",\"Insert:\":\"Einfügen:\",\"Italiano\":\"Italienisch\",\"Italic\":\"Kursiv\",\"JPG - JPG/JPEG Format\":\"JPG - JPG / JPEG Format\",\"JPG, WEBP quality:\":\"JPG, WEBP Qualität:\",\"JSON - Full layers data\":\"JSON - Vollständige Ebenen-Daten\",\"Japanese\":\"Japanisch\",\"Key-points\":\"Schlüsselpunkte\",\"Keyboard Shortcuts\":\"Tastatürkürzel\",\"Keyword:\":\"Stichwort:\",\"Korean\":\"Koreanisch\",\"Language\":\"Sprache\",\"Last modified\":\"Zuletzt bearbeitet\",\"Layer details\":\"Ebenendetails\",\"Layer is already image.\":\"Die Ebene ist bereits ein Bild.\",\"Layer must be image, convert it to raster to apply this tool.\":\"Die Ebene muss ein Bild sein, wandeln Sie sie in ein Raster um, um dieses Werkzeug anzuwenden.\",\"Layers\":\"Ebenen\",\"Layers:\":\"Ebenen:\",\"Left\":\"Links\",\"Level:\":\"Niveau:\",\"Levels:\":\"Stufen:\",\"Lietuvių\":\"Litauisch\",\"Line\":\"Linie\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Leuchtdichte:\",\"Magic Wand Tool\":\"Zauberstab-Werkzeug\",\"Merge Down\":\"Nach unten vereinigen\",\"Merged\":\"Zusammengeführt\",\"Mode:\":\"Modus:\",\"Module function not found.\":\"Modulfunktion nicht gefunden.\",\"Modules class not found:\":\"Modulklasse nicht gefunden:\",\"Mosaic\":\"Mosaik\",\"Mouse:\":\"Maus:\",\"Move\":\"Bewegung\",\"Move down\":\"Nach unten schieben\",\"Move up\":\"Nach oben schieben\",\"Name:\":\"Name:\",\"Needs at least 2 layers.\":\"Benötigt mindestens 2 Ebenen.\",\"Negative\":\"Negativ\",\"New\":\"Neu\",\"New file\":\"Neue Datei\",\"New from selection\":\"Neu von Auswahl\",\"New layer\":\"Neue Ebene\",\"New width can not be smaller then current width\":\"Die neue Breite darf nicht kleiner als die aktuelle Breite sein\",\"Normal\":\"Normal\",\"Nothing is selected.\":\"Nichts ausgewählt.\",\"Offset X:\":\"Offset X:\",\"Offset Y:\":\"Offset Y:\",\"Oil\":\"Öl\",\"Ok\":\"OK\",\"Online image editor.\":\"Online Bildbearbeitung.\",\"Opacity\":\"Opazität\",\"Opacity:\":\"Opazität:\",\"Open\":\"Öffnen\",\"Open Data URL\":\"Öffnen Sie die Daten-URL\",\"Open Directory\":\"Verzeichnis öffnen\",\"Open File\":\"Datei öffnen\",\"Open URL\":\"Öffne URL\",\"Open data URL\":\"Öffnen Sie die Daten-URL\",\"Original size\":\"Originalgröße\",\"PNG - Portable Network Graphics\":\"PNG - Portable Netzwerkgrafik\",\"Palette\":\"Palette\",\"Parameter #1:\":\"Parameter # 1:\",\"Parameter #2:\":\"Parameter # 2:\",\"Paste\":\"Einfügen\",\"Pencil\":\"Bleistift\",\"Percentage:\":\"Prozentsatz:\",\"Pick Color\":\"Farbe wählen\",\"Pixels:\":\"Pixel:\",\"Play animation\":\"Animation abspielen\",\"Portuguese\":\"Portugiesisch\",\"Power:\":\"Leistung:\",\"Powred by  pixabay.com .\":\"Powred von pixabay.com.\",\"Pre-Blur:\":\"Vor Weichzeichnen:\",\"Preview\":\"Vorschau\",\"Previous\":\"Bisherige\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"Die vorherige Ebene muss ein Bild sein, wandeln Sie sie in ein Raster um, um dieses Werkzeug anzuwenden.\",\"Print\":\"Drucken\",\"Quality:\":\"Qualität:\",\"Quick load\":\"Schnell laden\",\"Quick save\":\"Schnellspeichern\",\"Radial\":\"Radial\",\"Radial gradient\":\"Radialer Verlauf\",\"Radius:\":\"Radius:\",\"Range:\":\"Angebot:\",\"Rectangle\":\"Rechteck\",\"Red\":\"Rot\",\"Red channel:\":\"Roter Kanal:\",\"Red:\":\"Rot:\",\"Rename\":\"Umbenennen\",\"Replace Color\":\"Farbe ersetzen\",\"Replace color\":\"Farbe ersetzen\",\"Replacement:\":\"Ersatz:\",\"Report issues\":\"Probleme melden\",\"Resample - Hermite\":\"Resample - Hermite\",\"Reset\":\"Zurücksetzen\",\"Reset zoom level\":\"Zoomstufe zurücksetzen\",\"Resize\":\"Größe ändern\",\"Resized as background\":\"Größe als Hintergrund\",\"Resolution:\":\"Auflösung:\",\"Restore alpha\":\"Alpha wiederherstellen\",\"Right\":\"Recht\",\"Right angle:\":\"Rechter Winkel:\",\"Rotate\":\"Drehen\",\"Rotate is not supported on this type of object. Convert to raster?\":\"Drehen wird bei diesem Objekttyp nicht unterstützt. In Raster konvertieren?\",\"Rotate left\":\"Nach links drehen\",\"Rotate:\":\"Drehen:\",\"Russian\":\"Russisch\",\"Sat:\":\"Sat:\",\"Saturate\":\"Sättigen\",\"Saturation:\":\"Sättigung:\",\"Save\":\"Speichern\",\"Save as\":\"Speichern als\",\"Save as data URL\":\"Als Daten-URL speichern\",\"Save as type:\":\"Speichern unter:\",\"Save layers:\":\"Ebenen speichern:\",\"Save resolution:\":\"Auflösung speichern:\",\"Scroll down\":\"Runterscrollen\",\"Scroll up\":\"Hochscrollen\",\"Search\":\"Suche\",\"Search images\":\"Bilder suchen\",\"Select all\":\"Alles auswählen\",\"Select object tool\":\"Wählen Sie das Objektwerkzeug aus\",\"Selected\":\"Ausgewählt\",\"Selection\":\"Auswahl\",\"Sensitivity:\":\"Empfindlichkeit:\",\"Sepia\":\"Sepia\",\"Settings\":\"Einstellungen\",\"Shadow\":\"Schatten\",\"Shadow:\":\"Schatten:\",\"Sharpen\":\"Schärfen\",\"Sharpen tool\":\"Werkzeug schärfen\",\"Sharpen:\":\"Schärfen:\",\"Show / Hide\":\"Anzeigen Ausblenden\",\"Show file size:\":\"Dateigröße anzeigen:\",\"Simple\":\"Einfach\",\"Size\":\"Größe\",\"Size is too big, max\":\"Größe ist zu groß, max\",\"Size:\":\"Größe:\",\"Skip - layer must be image.\":\"Überspringen - Ebene muss ein Bild sein.\",\"Solarize\":\"Solarisieren\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"Entschuldigung, Bild konnte nicht geladen werden. Versuchen Sie, das Bild zu kopieren und einzufügen.\",\"Sorry, image is too big, max 5 MB.\":\"Entschuldigung, das Bild ist zu groß, maximal 5 MB.\",\"Source is empty, right click on image to save source position.\":\"Die Quelle ist leer, klicken Sie mit der rechten Maustaste auf das Bild, um die Quellposition zu speichern.\",\"Sprites\":\"Sprites\",\"Square\":\"Rechteck\",\"Strength:\":\"Stärke:\",\"Strict\":\"Streng\",\"Stroke\":\"Strich\",\"Stroke:\":\"Strich:\",\"Target:\":\"Ziel:\",\"Text\":\"Text\",\"Text example\":\"Textbeispiel\",\"Text:\":\"Text:\",\"There are no layers behind.\":\"Es gibt keine Ebenen dahinter.\",\"There is only 1 layer.\":\"Es gibt nur 1 Ebene.\",\"Tilt Shift\":\"Neigung Verschiebung\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"Umschalten\",\"Tools\":\"Werkzeuge\",\"Tools class not found:\":\"Tools-Klasse nicht gefunden:\",\"Total pixels:\":\"Gesamtpixel:\",\"Translate\":\"Übersetzen\",\"Translate error, can not find dictionary:\":\"Fehler beim Übersetzen, Wörterbuch nicht gefunden:\",\"Transparency background:\":\"Transparenz Hintergrund:\",\"Transparent:\":\"Transparent:\",\"Trim\":\"Trimmen\",\"Trim everything:\":\"Alles zurechtschneiden:\",\"Trim layer:\":\"Trim-Ebene:\",\"Trim white color?\":\"Trim weiße Farbe?\",\"Turkish\":\"Türkisch\",\"Undo\":\"Rückgängig machen\",\"Undo disabled.\":\"Rückgängig deaktiviert\",\"Undo enabled.\":\"Rückgängig machen\",\"Undo is not available.\":\"Rückgängig ist nicht verfügbar.\",\"Undo levels changed to 1.\":\"Stufen rückgängig machen, die auf 1 geändert wurden.\",\"Undo levels restored to\":\"Rückgängigmachen von Stufen, auf die wiederhergestellt wird\",\"Unique colors:\":\"Einzigartige Farben:\",\"Up\":\"Oben\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Verwenden Sie die Tastenkombination Strg + V zum Einfügen aus der Zwischenablage.\",\"V Radius:\":\"V-Radius:\",\"Verdana\":\"Verdana\",\"Version:\":\"Ausführung:\",\"Vertical\":\"Vertikal\",\"Vertical blur:\":\"Vertikale Unschärfe:\",\"Vibrance\":\"Dynamik\",\"Vignette\":\"Vignette\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"Vintage\",\"Visible:\":\"Sichtbar:\",\"WEBP - Weppy File Format\":\"WEBP - Weppy Dateiformat\",\"Website:\":\"Webseite:\",\"Width (%):\":\"Breite (%):\",\"Width:\":\"Breite:\",\"Wrong file type, must be image or json.\":\"Falscher Dateityp, muss image oder json sein.\",\"X end:\":\"X Ende:\",\"X position:\":\"X-Position:\",\"X start:\":\"X Start:\",\"Y end:\":\"Y Ende:\",\"Y position:\":\"Y-Position:\",\"Y start:\":\"Y Start:\",\"You can also drag and drop items into browser.\":\"Sie können Objekte auch per Drag & Drop in den Browser ziehen.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Ihr Browser unterstützt kein Canvas oder JavaScript ist nicht aktiviert.\",\"Your browser does not support this format.\":\"Ihr Browser unterstützt dieses Format nicht.\",\"Your search did not match any images.\":\"Ihre Suche hat keine Bilder gefunden.\",\"Zoom\":\"Zoomen\",\"Zoom Blur\":\"Zoom-Unschärfe\",\"Zoom In\":\"Hineinzoomen\",\"Zoom Out\":\"Herauszoomen\",\"Zoom blur\":\"Zoom-Unschärfe\",\"Zoom in\":\"Hineinzoomen\",\"Zoom out\":\"Herauszoomen\",\"Zoom:\":\"Zoomen:\"}");

/***/ }),

/***/ "./src/js/languages/empty.json":
/*!*************************************!*\
  !*** ./src/js/languages/empty.json ***!
  \*************************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"\",\"480p\":\"\",\"About\":\"\",\"Active\":\"\",\"Advanced\":\"\",\"All\":\"\",\"Alpha:\":\"\",\"Anonymous\":\"\",\"Anti aliasing\":\"\",\"Arial\":\"\",\"Arrow\":\"\",\"Author:\":\"\",\"Auto adjust colors\":\"\",\"Average:\":\"\",\"BMP - Windows Bitmap\":\"\",\"Base\":\"\",\"Basic\":\"\",\"Black and White\":\"\",\"Blue\":\"\",\"Blue channel:\":\"\",\"Blue:\":\"\",\"Blur Radius:\":\"\",\"Blur power:\":\"\",\"Blur tool\":\"\",\"Bold\":\"\",\"Bold Italic\":\"\",\"Borders\":\"\",\"Box Blur\":\"\",\"Box blur\":\"\",\"Brightness\":\"\",\"Brightness:\":\"\",\"Brush\":\"\",\"Bulge/Pinch tool\":\"\",\"Burn\":\"\",\"CSS filters\":\"\",\"Can not animate 1 layer.\":\"\",\"Can not find previous layer.\":\"\",\"Cancel\":\"\",\"Center\":\"\",\"Center x:\":\"\",\"Center y:\":\"\",\"Center:\":\"\",\"Channel:\":\"\",\"Circle\":\"\",\"Clear\":\"\",\"Clone count:\":\"\",\"Clone tool\":\"\",\"Cloned edges\":\"\",\"Color #\":\"\",\"Color Zoom\":\"\",\"Color alpha value can not be zero.\":\"\",\"Color corrections\":\"\",\"Color palette\":\"\",\"Color to alpha\":\"\",\"Color zoom\":\"\",\"Color:\":\"\",\"Colors\":\"\",\"Colors:\":\"\",\"Composition\":\"\",\"Composition:\":\"\",\"Content fill\":\"\",\"Contrast\":\"\",\"Contrast:\":\"\",\"Convert to raster\":\"\",\"Copy selection\":\"\",\"Copy:\":\"\",\"Courier\":\"\",\"Crop\":\"\",\"Ctrl+V\":\"\",\"Ctrl-P\":\"\",\"Current\":\"\",\"Curve\":\"\",\"Custom\":\"\",\"Data URL\":\"\",\"Data URL:\":\"\",\"Decrease color depth\":\"\",\"Default\":\"\",\"Degree:\":\"\",\"Del\":\"\",\"Delete\":\"\",\"Delete selection\":\"\",\"Denoise\":\"\",\"Desaturate\":\"\",\"Description:\":\"\",\"Differences\":\"\",\"Differences Down\":\"\",\"Dither\":\"\",\"Dithering:\":\"\",\"Dominant color:\":\"\",\"Dot Screen\":\"\",\"Down\":\"\",\"Duplicate\":\"\",\"Edge\":\"\",\"Edit\":\"\",\"Edit text\":\"\",\"Edit text...\":\"\",\"Effects\":\"\",\"Email:\":\"\",\"Emboss\":\"\",\"Empty selection\":\"\",\"Empty selection or type not image.\":\"\",\"English\":\"\",\"Enrich\":\"\",\"Erase\":\"\",\"Erase on rotate object is disabled. Sorry.\":\"\",\"Error\":\"\",\"Error connecting to service.\":\"\",\"Error: can not load image.\":\"\",\"Error: missing details event target\":\"\",\"Error: unsupported attribute type:\":\"\",\"Error: wrong key:\":\"\",\"Español\":\"\",\"Expand edges\":\"\",\"Exponent:\":\"\",\"Factor:\":\"\",\"File\":\"\",\"File name:\":\"\",\"File size:\":\"\",\"Fill\":\"\",\"Fit\":\"\",\"Fit window\":\"\",\"Flatten Image\":\"\",\"Flip\":\"\",\"FloydSteinberg-serpentine\":\"\",\"French\":\"\",\"Full HD, 1080p\":\"\",\"GIF - Graphics Interchange Format\":\"\",\"Gap:\":\"\",\"Gaussian Blur\":\"\",\"German\":\"\",\"Gif delay:\":\"\",\"GitHub:\":\"\",\"Gradient\":\"\",\"Gradient Radius:\":\"\",\"Grains\":\"\",\"Gray\":\"\",\"Grayscale\":\"\",\"Green\":\"\",\"Green channel:\":\"\",\"Green:\":\"\",\"Greyscale:\":\"\",\"Grid\":\"\",\"Grid on/off\":\"\",\"H Radius:\":\"\",\"Heatmap\":\"\",\"Height (%):\":\"\",\"Height:\":\"\",\"Help\":\"\",\"Helvetica\":\"\",\"Hermite\":\"\",\"Hex:\":\"\",\"Histogram\":\"\",\"Histogram:\":\"\",\"Horizontal\":\"\",\"Horizontal blur:\":\"\",\"Hue Rotate\":\"\",\"Hue:\":\"\",\"Image\":\"\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"\",\"Impact\":\"\",\"Information\":\"\",\"Insert:\":\"\",\"Italiano\":\"\",\"Italic\":\"\",\"JPG - JPG/JPEG Format\":\"\",\"JPG, WEBP quality:\":\"\",\"JSON - Full layers data\":\"\",\"Japanese\":\"\",\"Key-points\":\"\",\"Keyboard Shortcuts\":\"\",\"Keyword:\":\"\",\"Korean\":\"\",\"Language\":\"\",\"Last modified\":\"\",\"Layer details\":\"\",\"Layer is already image.\":\"\",\"Layer must be image, convert it to raster to apply this tool.\":\"\",\"Layers\":\"\",\"Layers:\":\"\",\"Left\":\"\",\"Level:\":\"\",\"Levels:\":\"\",\"Lietuvių\":\"\",\"Line\":\"\",\"Lum:\":\"\",\"Luminance:\":\"\",\"Magic Wand Tool\":\"\",\"Merge Down\":\"\",\"Merged\":\"\",\"Mode:\":\"\",\"Module function not found.\":\"\",\"Modules class not found:\":\"\",\"Mosaic\":\"\",\"Mouse:\":\"\",\"Move\":\"\",\"Move down\":\"\",\"Move up\":\"\",\"Name:\":\"\",\"Needs at least 2 layers.\":\"\",\"Negative\":\"\",\"New\":\"\",\"New file\":\"\",\"New from selection\":\"\",\"New layer\":\"\",\"New width can not be smaller then current width\":\"\",\"Normal\":\"\",\"Nothing is selected.\":\"\",\"Offset X:\":\"\",\"Offset Y:\":\"\",\"Oil\":\"\",\"Ok\":\"\",\"Online image editor.\":\"\",\"Opacity\":\"\",\"Opacity:\":\"\",\"Open\":\"\",\"Open Data URL\":\"\",\"Open Directory\":\"\",\"Open File\":\"\",\"Open URL\":\"\",\"Open data URL\":\"\",\"Original size\":\"\",\"PNG - Portable Network Graphics\":\"\",\"Palette\":\"\",\"Parameter #1:\":\"\",\"Parameter #2:\":\"\",\"Paste\":\"\",\"Pencil\":\"\",\"Percentage:\":\"\",\"Pick Color\":\"\",\"Pixels:\":\"\",\"Play animation\":\"\",\"Portuguese\":\"\",\"Power:\":\"\",\"Powred by  pixabay.com .\":\"\",\"Pre-Blur:\":\"\",\"Preview\":\"\",\"Previous\":\"\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"\",\"Print\":\"\",\"Quality:\":\"\",\"Quick load\":\"\",\"Quick save\":\"\",\"Radial\":\"\",\"Radial gradient\":\"\",\"Radius:\":\"\",\"Range:\":\"\",\"Rectangle\":\"\",\"Red\":\"\",\"Red channel:\":\"\",\"Red:\":\"\",\"Rename\":\"\",\"Replace Color\":\"\",\"Replace color\":\"\",\"Replacement:\":\"\",\"Report issues\":\"\",\"Resample - Hermite\":\"\",\"Reset\":\"\",\"Reset zoom level\":\"\",\"Resize\":\"\",\"Resized as background\":\"\",\"Resolution:\":\"\",\"Restore alpha\":\"\",\"Right\":\"\",\"Right angle:\":\"\",\"Rotate\":\"\",\"Rotate is not supported on this type of object. Convert to raster?\":\"\",\"Rotate left\":\"\",\"Rotate:\":\"\",\"Russian\":\"\",\"Sat:\":\"\",\"Saturate\":\"\",\"Saturation:\":\"\",\"Save\":\"\",\"Save as\":\"\",\"Save as data URL\":\"\",\"Save as type:\":\"\",\"Save layers:\":\"\",\"Save resolution:\":\"\",\"Scroll down\":\"\",\"Scroll up\":\"\",\"Search\":\"\",\"Search images\":\"\",\"Select all\":\"\",\"Select object tool\":\"\",\"Selected\":\"\",\"Selection\":\"\",\"Sensitivity:\":\"\",\"Sepia\":\"\",\"Settings\":\"\",\"Shadow\":\"\",\"Shadow:\":\"\",\"Sharpen\":\"\",\"Sharpen tool\":\"\",\"Sharpen:\":\"\",\"Show / Hide\":\"\",\"Show file size:\":\"\",\"Simple\":\"\",\"Size\":\"\",\"Size is too big, max\":\"\",\"Size:\":\"\",\"Skip - layer must be image.\":\"\",\"Solarize\":\"\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"\",\"Sorry, image is too big, max 5 MB.\":\"\",\"Source is empty, right click on image to save source position.\":\"\",\"Sprites\":\"\",\"Square\":\"\",\"Strength:\":\"\",\"Strict\":\"\",\"Stroke\":\"\",\"Stroke:\":\"\",\"Target:\":\"\",\"Text\":\"\",\"Text example\":\"\",\"Text:\":\"\",\"There are no layers behind.\":\"\",\"There is only 1 layer.\":\"\",\"Tilt Shift\":\"\",\"Times New Roman\":\"\",\"Toggle\":\"\",\"Tools\":\"\",\"Tools class not found:\":\"\",\"Total pixels:\":\"\",\"Translate\":\"\",\"Translate error, can not find dictionary:\":\"\",\"Transparency background:\":\"\",\"Transparent:\":\"\",\"Trim\":\"\",\"Trim everything:\":\"\",\"Trim layer:\":\"\",\"Trim white color?\":\"\",\"Turkish\":\"\",\"Undo\":\"\",\"Undo disabled.\":\"\",\"Undo enabled.\":\"\",\"Undo is not available.\":\"\",\"Undo levels changed to 1.\":\"\",\"Undo levels restored to\":\"\",\"Unique colors:\":\"\",\"Up\":\"\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"\",\"V Radius:\":\"\",\"Verdana\":\"\",\"Version:\":\"\",\"Vertical\":\"\",\"Vertical blur:\":\"\",\"Vibrance\":\"\",\"Vignette\":\"\",\"ViliusL\":\"\",\"Vintage\":\"\",\"Visible:\":\"\",\"WEBP - Weppy File Format\":\"\",\"Website:\":\"\",\"Width (%):\":\"\",\"Width:\":\"\",\"Wrong file type, must be image or json.\":\"\",\"X end:\":\"\",\"X position:\":\"\",\"X start:\":\"\",\"Y end:\":\"\",\"Y position:\":\"\",\"Y start:\":\"\",\"You can also drag and drop items into browser.\":\"\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"\",\"Your browser does not support this format.\":\"\",\"Your search did not match any images.\":\"\",\"Zoom\":\"\",\"Zoom Blur\":\"\",\"Zoom In\":\"\",\"Zoom Out\":\"\",\"Zoom blur\":\"\",\"Zoom in\":\"\",\"Zoom out\":\"\",\"Zoom:\":\"\"}");

/***/ }),

/***/ "./src/js/languages/es.json":
/*!**********************************!*\
  !*** ./src/js/languages/es.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"Acerca de\",\"Active\":\"Activo\",\"Advanced\":\"Avanzado\",\"All\":\"Todas\",\"Alpha:\":\"Alfa:\",\"Anonymous\":\"Anónimo\",\"Anti aliasing\":\"Anti aliasing\",\"Arial\":\"Arial\",\"Arrow\":\"Flecha\",\"Author:\":\"Autor:\",\"Auto adjust colors\":\"Ajuste automático de colores\",\"Average:\":\"Promedio:\",\"BMP - Windows Bitmap\":\"BMP - Mapa de bits de Windows\",\"Base\":\"Base\",\"Basic\":\"BASIC\",\"Black and White\":\"En blanco y negro\",\"Blue\":\"Azul\",\"Blue channel:\":\"Canal azul:\",\"Blue:\":\"Azul:\",\"Blur Radius:\":\"Blur Radio:\",\"Blur power:\":\"Desenfoque de poder:\",\"Blur tool\":\"Herramienta de desenfoque\",\"Bold\":\"Negrita\",\"Bold Italic\":\"Negrita cursiva\",\"Borders\":\"Bordes\",\"Box Blur\":\"Caja de desenfoque\",\"Box blur\":\"Caja de desenfoque\",\"Brightness\":\"Brillo\",\"Brightness:\":\"Brillo:\",\"Brush\":\"Cepillo\",\"Bulge/Pinch tool\":\"Herramienta de abombamiento / pellizco\",\"Burn\":\"Quemar\",\"CSS filters\":\"Filtros CSS\",\"Can not animate 1 layer.\":\"No se puede animar 1 capa.\",\"Can not find previous layer.\":\"No se puede encontrar la capa anterior.\",\"Cancel\":\"Cancelar\",\"Center\":\"Centrar\",\"Center x:\":\"Centro x:\",\"Center y:\":\"Centro y:\",\"Center:\":\"Centrar:\",\"Channel:\":\"Canal:\",\"Circle\":\"Circulo\",\"Clear\":\"Claro\",\"Clone count:\":\"Recuento de clones\",\"Clone tool\":\"Herramienta de clonación\",\"Cloned edges\":\"Bordes clonados\",\"Color #\":\"Color #\",\"Color Zoom\":\"Zoom de color\",\"Color alpha value can not be zero.\":\"El valor alfa del color no puede ser cero.\",\"Color corrections\":\"Correcciones de color\",\"Color palette\":\"Paleta de color\",\"Color to alpha\":\"Color a alfa\",\"Color zoom\":\"Zoom a color\",\"Color:\":\"Color:\",\"Colors\":\"Colores\",\"Colors:\":\"Colores:\",\"Composition\":\"Composición\",\"Composition:\":\"Composición:\",\"Content fill\":\"Relleno de contenido\",\"Contrast\":\"Contraste\",\"Contrast:\":\"Contraste:\",\"Convert to raster\":\"Convertir a trama\",\"Copy selection\":\"Copiar selección\",\"Copy:\":\"Dupdo:\",\"Courier\":\"mensajero\",\"Crop\":\"Cultivo\",\"Ctrl+V\":\"Ctrl + V\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"Corriente\",\"Curve\":\"Curva\",\"Custom\":\"Personalizado\",\"Data URL\":\"URL de datos\",\"Data URL:\":\"URL de datos:\",\"Decrease color depth\":\"Disminuir la profundidad de color\",\"Default\":\"Defecto\",\"Degree:\":\"La licenciatura:\",\"Del\":\"Del\",\"Delete\":\"Borrar\",\"Delete selection\":\"Eliminar selección\",\"Denoise\":\"Denoise\",\"Desaturate\":\"Desaturar\",\"Description:\":\"Descripción:\",\"Differences\":\"Diferencias\",\"Differences Down\":\"Diferencias hacia abajo\",\"Dither\":\"Vacilar\",\"Dithering:\":\"Dithering:\",\"Dominant color:\":\"Color dominante:\",\"Dot Screen\":\"Pantalla de puntos\",\"Down\":\"Abajo\",\"Duplicate\":\"Duplicar\",\"Edge\":\"Borde\",\"Edit\":\"Editar\",\"Edit text\":\"Editar texto\",\"Edit text...\":\"Editar texto...\",\"Effects\":\"Efectos\",\"Email:\":\"Email:\",\"Emboss\":\"Realzar\",\"Empty selection\":\"Selección vacía\",\"Empty selection or type not image.\":\"Vaciar selección o escribir no imagen.\",\"English\":\"Inglés\",\"Enrich\":\"Enriquecer\",\"Erase\":\"Borrar\",\"Erase on rotate object is disabled. Sorry.\":\"Borrar en rotar objeto está deshabilitado. Lo siento.\",\"Error\":\"Error\",\"Error connecting to service.\":\"Error al conectarse al servicio.\",\"Error: can not load image.\":\"Error: no se puede cargar la imagen.\",\"Error: missing details event target\":\"Error: falta el objetivo del evento de detalles\",\"Error: unsupported attribute type:\":\"Error: tipo de atributo no soportado:\",\"Error: wrong key:\":\"Error: clave incorrecta:\",\"Español\":\"English\",\"Expand edges\":\"Expandir bordes\",\"Exponent:\":\"Exponente:\",\"Factor:\":\"Factor:\",\"File\":\"Archivo\",\"File name:\":\"Nombre del archivo:\",\"File size:\":\"Tamaño del archivo:\",\"Fill\":\"Llenar\",\"Fit\":\"Ajuste\",\"Fit window\":\"Ajustar ventana\",\"Flatten Image\":\"Imagen aplanada\",\"Flip\":\"Dar la vuelta\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-serpentina\",\"French\":\"francés\",\"Full HD, 1080p\":\"Full HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - Formato de intercambio de gráficos\",\"Gap:\":\"Brecha:\",\"Gaussian Blur\":\"Desenfoque gaussiano\",\"German\":\"alemán\",\"Gif delay:\":\"Retraso Gif:\",\"GitHub:\":\"GitHub:\",\"Gradient\":\"Gradiente\",\"Gradient Radius:\":\"Radio de gradiente:\",\"Grains\":\"Granos\",\"Gray\":\"gris\",\"Grayscale\":\"Escala de grises\",\"Green\":\"Verde\",\"Green channel:\":\"Canal verde:\",\"Green:\":\"Verde:\",\"Greyscale:\":\"Escala de grises:\",\"Grid\":\"Cuadrícula\",\"Grid on/off\":\"Grid on / off\",\"H Radius:\":\"H Radio:\",\"Heatmap\":\"Mapa de calor\",\"Height (%):\":\"Altura (%):\",\"Height:\":\"Altura:\",\"Help\":\"Ayuda\",\"Helvetica\":\"Helvética\",\"Hermite\":\"Hermite\",\"Hex:\":\"Maleficio:\",\"Histogram\":\"Histograma\",\"Histogram:\":\"Histograma:\",\"Horizontal\":\"Horizontal\",\"Horizontal blur:\":\"Desenfoque horizontal:\",\"Hue Rotate\":\"Hue Rotate\",\"Hue:\":\"Matiz:\",\"Image\":\"Imagen\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Datos de imagen con varias capas. Se puede abrir usando miniPaint -\",\"Impact\":\"Impacto\",\"Information\":\"Información\",\"Insert:\":\"Insertar:\",\"Italiano\":\"Italiano\",\"Italic\":\"Itálico\",\"JPG - JPG/JPEG Format\":\"JPG - Formato JPG / JPEG\",\"JPG, WEBP quality:\":\"JPG, calidad de WEBP:\",\"JSON - Full layers data\":\"JSON: datos de capas completas\",\"Japanese\":\"japonés\",\"Key-points\":\"Puntos clave\",\"Keyboard Shortcuts\":\"Atajos de teclado\",\"Keyword:\":\"Palabra clave:\",\"Korean\":\"coreano\",\"Language\":\"Idioma\",\"Last modified\":\"Última modificación\",\"Layer details\":\"Detalles de la capa\",\"Layer is already image.\":\"Layer ya es imagen.\",\"Layer must be image, convert it to raster to apply this tool.\":\"La capa debe ser una imagen, conviértala a raster para aplicar esta herramienta.\",\"Layers\":\"Capas\",\"Layers:\":\"Capas:\",\"Left\":\"Izquierda\",\"Level:\":\"Nivel:\",\"Levels:\":\"Niveles:\",\"Lietuvių\":\"Lietuvių\",\"Line\":\"Línea\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Luminancia:\",\"Magic Wand Tool\":\"Varita mágica\",\"Merge Down\":\"Fusionar\",\"Merged\":\"Fusionado\",\"Mode:\":\"Modo:\",\"Module function not found.\":\"Función del módulo no encontrada.\",\"Modules class not found:\":\"Clase de módulos no encontrada:\",\"Mosaic\":\"Mosaico\",\"Mouse:\":\"Ratón:\",\"Move\":\"Movimiento\",\"Move down\":\"Mover hacia abajo\",\"Move up\":\"Ascender\",\"Name:\":\"Nombre:\",\"Needs at least 2 layers.\":\"Necesita al menos 2 capas\",\"Negative\":\"Negativo\",\"New\":\"Nuevo\",\"New file\":\"Archivo nuevo\",\"New from selection\":\"Nuevo de la selección\",\"New layer\":\"Nueva capa\",\"New width can not be smaller then current width\":\"El nuevo ancho no puede ser más pequeño que el ancho actual\",\"Normal\":\"Normal\",\"Nothing is selected.\":\"Nada está seleccionado.\",\"Offset X:\":\"Compensación X:\",\"Offset Y:\":\"Desplazamiento Y:\",\"Oil\":\"Petróleo\",\"Ok\":\"De acuerdo\",\"Online image editor.\":\"Editor de imágenes en línea\",\"Opacity\":\"Opacidad\",\"Opacity:\":\"Opacidad:\",\"Open\":\"Abierto\",\"Open Data URL\":\"URL de datos abiertos\",\"Open Directory\":\"Directorio abierto\",\"Open File\":\"Abrir documento\",\"Open URL\":\"URL abierta\",\"Open data URL\":\"URL de datos abiertos\",\"Original size\":\"Tamaño original\",\"PNG - Portable Network Graphics\":\"PNG - Gráficos de red portátiles\",\"Palette\":\"Paleta\",\"Parameter #1:\":\"Parámetro # 1:\",\"Parameter #2:\":\"Parámetro # 2:\",\"Paste\":\"Pegar\",\"Pencil\":\"Lápiz\",\"Percentage:\":\"Porcentaje:\",\"Pick Color\":\"Elegir color\",\"Pixels:\":\"Píxeles:\",\"Play animation\":\"Reproducir animación\",\"Portuguese\":\"portugués\",\"Power:\":\"Poder:\",\"Powred by  pixabay.com .\":\"Desarrollado por pixabay.com.\",\"Pre-Blur:\":\"Pre-desenfoque:\",\"Preview\":\"Avance\",\"Previous\":\"Anterior\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"La capa anterior debe ser una imagen, conviértala a raster para aplicar esta herramienta.\",\"Print\":\"Impresión\",\"Quality:\":\"Calidad:\",\"Quick load\":\"Carga rápida\",\"Quick save\":\"Guardado rápido\",\"Radial\":\"Radial\",\"Radial gradient\":\"Gradiente radial\",\"Radius:\":\"Radio:\",\"Range:\":\"Distancia:\",\"Rectangle\":\"Rectángulo\",\"Red\":\"rojo\",\"Red channel:\":\"Canal rojo:\",\"Red:\":\"Rojo:\",\"Rename\":\"Rebautizar\",\"Replace Color\":\"Reemplazar color\",\"Replace color\":\"Reemplazar color\",\"Replacement:\":\"Reemplazo:\",\"Report issues\":\"Informar problemas\",\"Resample - Hermite\":\"Remuestreo - Hermite\",\"Reset\":\"Reiniciar\",\"Reset zoom level\":\"Restablecer nivel de zoom\",\"Resize\":\"Cambiar el tamaño\",\"Resized as background\":\"Redimensionado como fondo\",\"Resolution:\":\"Resolución:\",\"Restore alpha\":\"Restaurar alfa\",\"Right\":\"Derecha\",\"Right angle:\":\"Ángulo recto:\",\"Rotate\":\"Girar\",\"Rotate is not supported on this type of object. Convert to raster?\":\"Girar no es compatible con este tipo de objeto. Convertir a raster?\",\"Rotate left\":\"Girar a la izquierda\",\"Rotate:\":\"Girar:\",\"Russian\":\"ruso\",\"Sat:\":\"Sab:\",\"Saturate\":\"Saturar\",\"Saturation:\":\"Saturación:\",\"Save\":\"Salvar\",\"Save as\":\"Guardar como\",\"Save as data URL\":\"Guardar como URL de datos\",\"Save as type:\":\"Guardar como tipo:\",\"Save layers:\":\"Guardar capas:\",\"Save resolution:\":\"Guardar resolución:\",\"Scroll down\":\"Desplazarse hacia abajo\",\"Scroll up\":\"Desplazarse hacia arriba\",\"Search\":\"Buscar\",\"Search images\":\"Buscar imágenes\",\"Select all\":\"Seleccionar todo\",\"Select object tool\":\"Seleccionar herramienta de objeto\",\"Selected\":\"Seleccionado\",\"Selection\":\"Selección\",\"Sensitivity:\":\"Sensibilidad:\",\"Sepia\":\"Sepia\",\"Settings\":\"Configuraciones\",\"Shadow\":\"Sombra\",\"Shadow:\":\"Sombra:\",\"Sharpen\":\"Afilar\",\"Sharpen tool\":\"Afilar la herramienta\",\"Sharpen:\":\"Afilar:\",\"Show / Hide\":\"Mostrar ocultar\",\"Show file size:\":\"Mostrar tamaño de archivo:\",\"Simple\":\"Sencillo\",\"Size\":\"tamaño\",\"Size is too big, max\":\"El tamaño es demasiado grande, máximo\",\"Size:\":\"Tamaño:\",\"Skip - layer must be image.\":\"Omitir: la capa debe ser una imagen.\",\"Solarize\":\"Solarizar\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"Lo sentimos, la imagen no se pudo cargar. Intenta copiar la imagen y pégala.\",\"Sorry, image is too big, max 5 MB.\":\"Lo sentimos, la imagen es demasiado grande, máximo 5 MB.\",\"Source is empty, right click on image to save source position.\":\"La fuente está vacía, haga clic derecho en la imagen para guardar la posición de la fuente.\",\"Sprites\":\"Sprites\",\"Square\":\"Cuadrado\",\"Strength:\":\"Fuerza:\",\"Strict\":\"Estricto\",\"Stroke\":\"Carrera\",\"Stroke:\":\"Carrera:\",\"Target:\":\"Objetivo:\",\"Text\":\"Texto\",\"Text example\":\"Ejemplo de texto\",\"Text:\":\"Texto:\",\"There are no layers behind.\":\"No hay capas detrás\",\"There is only 1 layer.\":\"Solo hay 1 capa\",\"Tilt Shift\":\"Cambio de inclinación\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"Palanca\",\"Tools\":\"Herramientas\",\"Tools class not found:\":\"Clase de herramientas no encontradas:\",\"Total pixels:\":\"Píxeles totales:\",\"Translate\":\"Traducir\",\"Translate error, can not find dictionary:\":\"Error de traducción, no se puede encontrar el diccionario:\",\"Transparency background:\":\"Fondo de transparencia:\",\"Transparent:\":\"Transparente:\",\"Trim\":\"Recortar\",\"Trim everything:\":\"Recortar todo:\",\"Trim layer:\":\"Capa de ajuste:\",\"Trim white color?\":\"Recortar el color blanco?\",\"Turkish\":\"turco\",\"Undo\":\"Deshacer\",\"Undo disabled.\":\"Deshabilitar.\",\"Undo enabled.\":\"Deshacer habilitado.\",\"Undo is not available.\":\"Deshacer no está disponible.\",\"Undo levels changed to 1.\":\"Los niveles de deshacer cambiaron a 1.\",\"Undo levels restored to\":\"Deshace los niveles restaurados a\",\"Unique colors:\":\"Colores únicos:\",\"Up\":\"Arriba\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Use el atajo de teclado Ctrl + V para pegar desde el Portapapeles.\",\"V Radius:\":\"V Radio:\",\"Verdana\":\"Verdana\",\"Version:\":\"Versión:\",\"Vertical\":\"Vertical\",\"Vertical blur:\":\"Desenfoque vertical:\",\"Vibrance\":\"Vibrance\",\"Vignette\":\"Viñeta\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"Vendimia\",\"Visible:\":\"Visible:\",\"WEBP - Weppy File Format\":\"WEBP - Formato de archivo Weppy\",\"Website:\":\"Sitio web:\",\"Width (%):\":\"Ancho (%):\",\"Width:\":\"Anchura:\",\"Wrong file type, must be image or json.\":\"Tipo de archivo incorrecto, debe ser imagen o json.\",\"X end:\":\"X final:\",\"X position:\":\"Posición X:\",\"X start:\":\"X inicio:\",\"Y end:\":\"Final de Y:\",\"Y position:\":\"Posición Y:\",\"Y start:\":\"Y comienza:\",\"You can also drag and drop items into browser.\":\"También puede arrastrar y soltar elementos en el navegador.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Su navegador no admite lienzo o JavaScript no está habilitado.\",\"Your browser does not support this format.\":\"Su navegador no es compatible con este formato.\",\"Your search did not match any images.\":\"Su búsqueda no coincide con ninguna imagen.\",\"Zoom\":\"Enfocar\",\"Zoom Blur\":\"Desenfoque de zoom\",\"Zoom In\":\"Acercarse\",\"Zoom Out\":\"Disminuir el zoom\",\"Zoom blur\":\"Borroso de zoom\",\"Zoom in\":\"Acercarse\",\"Zoom out\":\"Disminuir el zoom\",\"Zoom:\":\"Enfocar:\"}");

/***/ }),

/***/ "./src/js/languages/fr.json":
/*!**********************************!*\
  !*** ./src/js/languages/fr.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"A propos\",\"Active\":\"actif\",\"Advanced\":\"Avancé\",\"All\":\"Tout\",\"Alpha:\":\"Alpha :\",\"Anonymous\":\"Anonyme\",\"Anti aliasing\":\"Anticrénelage\",\"Arial\":\"Arial\",\"Arrow\":\"Flèche\",\"Author:\":\"Auteur :\",\"Auto adjust colors\":\"Ajuster automatiquement les couleurs\",\"Average:\":\"Moyenne :\",\"BMP - Windows Bitmap\":\"BMP - Windows Bitmap\",\"Base\":\"Base\",\"Basic\":\"Basique\",\"Black and White\":\"Noir et blanc\",\"Blue\":\"Bleu\",\"Blue channel:\":\"Niveau de bleu :\",\"Blue:\":\"Bleu:\",\"Blur Radius:\":\"Rayon de floutage :\",\"Blur power:\":\"Puissance de flou:\",\"Blur tool\":\"Flou\",\"Bold\":\"Gras\",\"Bold Italic\":\"Gras Italique\",\"Borders\":\"Cadres\",\"Box Blur\":\"Box Blur\",\"Box blur\":\"Box flou\",\"Brightness\":\"Luminosité\",\"Brightness:\":\"Luminosité :\",\"Brush\":\"Pinceau\",\"Bulge/Pinch tool\":\"Déformer / Bosse\",\"Burn\":\"Brûler\",\"CSS filters\":\"Filtres CSS\",\"Can not animate 1 layer.\":\"Impossible d'animer une couche.\",\"Can not find previous layer.\":\"Impossible de trouver la couche précédente.\",\"Cancel\":\"Annuler\",\"Center\":\"Centre\",\"Center x:\":\"Centrage x :\",\"Center y:\":\"Centrage y :\",\"Center:\":\"Centre :\",\"Channel:\":\"Niveau :\",\"Circle\":\"Cercle\",\"Clear\":\"Effacer\",\"Clone count:\":\"Nombre de clones:\",\"Clone tool\":\"Tampon de clonage\",\"Cloned edges\":\"Bords clonés\",\"Color #\":\"Couleur #\",\"Color Zoom\":\"Eclat\",\"Color alpha value can not be zero.\":\"La valeur alpha de la couleur ne peut pas être nulle.\",\"Color corrections\":\"Correction des couleurs\",\"Color palette\":\"Palette de couleurs\",\"Color to alpha\":\"Rendre transparent\",\"Color zoom\":\"Zoom couleur\",\"Color:\":\"Couleur :\",\"Colors\":\"Couleurs\",\"Colors:\":\"Couleurs :\",\"Composition\":\"Composition\",\"Composition:\":\"Composition :\",\"Content fill\":\"Remplissage de contenu\",\"Contrast\":\"Contraste\",\"Contrast:\":\"Contraste :\",\"Convert to raster\":\"Convertir en raster\",\"Copy selection\":\"Copier\",\"Copy:\":\"Copie:\",\"Courier\":\"Courier\",\"Crop\":\"Rogner selon la sélection\",\"Ctrl+V\":\"Ctrl + V\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"Actuel\",\"Curve\":\"Courbe\",\"Custom\":\"Personnalisé\",\"Data URL\":\"URL de données\",\"Data URL:\":\"URL de données:\",\"Decrease color depth\":\"Postériser\",\"Default\":\"Défaut\",\"Degree:\":\"Degré:\",\"Del\":\"Supp\",\"Delete\":\"Supprimer\",\"Delete selection\":\"Effacer la sélection\",\"Denoise\":\"Réduire le bruit\",\"Desaturate\":\"Désaturer\",\"Description:\":\"Description :\",\"Differences\":\"Détection des bords\",\"Differences Down\":\"Détection des bords...\",\"Dither\":\"Ajouter du bruit\",\"Dithering:\":\"Trame :\",\"Dominant color:\":\"Couleur dominante:\",\"Dot Screen\":\"Demi-teinte\",\"Down\":\"Vers le bas\",\"Duplicate\":\"Dupliquer\",\"Edge\":\"Détection des bords\",\"Edit\":\"Edition\",\"Edit text\":\"Éditer le texte\",\"Edit text...\":\"Éditer le texte...\",\"Effects\":\"Effets\",\"Email:\":\"Email :\",\"Emboss\":\"Embossage\",\"Empty selection\":\"Sélection vide\",\"Empty selection or type not image.\":\"Sélection vide ou tapez pas d'image.\",\"English\":\"Anglais\",\"Enrich\":\"Améliorer la netteté\",\"Erase\":\"Gomme\",\"Erase on rotate object is disabled. Sorry.\":\"L'effacement à la rotation de l'objet est désactivé. Pardon.\",\"Error\":\"Erreur\",\"Error connecting to service.\":\"Erreur lors de la connexion au service.\",\"Error: can not load image.\":\"Erreur: impossible de charger l'image.\",\"Error: missing details event target\":\"Erreur: cible des événements manquants de détails\",\"Error: unsupported attribute type:\":\"Erreur: type d'attribut non pris en charge:\",\"Error: wrong key:\":\"Erreur: mauvaise clé:\",\"Español\":\"Espagnol\",\"Expand edges\":\"Développer les bords\",\"Exponent:\":\"Exposant :\",\"Factor:\":\"Facteur :\",\"File\":\"Fichier\",\"File name:\":\"Nom de fichier :\",\"File size:\":\"Taille du fichier :\",\"Fill\":\"Remplir\",\"Fit\":\"Fenêtre\",\"Fit window\":\"Remplir la fenêtre\",\"Flatten Image\":\"Fusionner tous les calques\",\"Flip\":\"Retourner\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-serpentine\",\"French\":\"Français\",\"Full HD, 1080p\":\"Full HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - Format d'échange de graphiques\",\"Gap:\":\"Ecart :\",\"Gaussian Blur\":\"Flou gaussien\",\"German\":\"Allemand\",\"Gif delay:\":\"Gif délai:\",\"GitHub:\":\"GitHub :\",\"Gradient\":\"Dégradé\",\"Gradient Radius:\":\"Rayon du dégradé :\",\"Grains\":\"Grains\",\"Gray\":\"Gris\",\"Grayscale\":\"Niveaux de gris\",\"Green\":\"Vert\",\"Green channel:\":\"Niveau de vert :\",\"Green:\":\"Vert:\",\"Greyscale:\":\"Noir et blanc :\",\"Grid\":\"Grille\",\"Grid on/off\":\"Grille activée / désactivée\",\"H Radius:\":\"Rayon H :\",\"Heatmap\":\"Zones chaudes\",\"Height (%):\":\"Hauteur (%) :\",\"Height:\":\"Hauteur :\",\"Help\":\"Aide\",\"Helvetica\":\"Helvetica\",\"Hermite\":\"Hermite\",\"Hex:\":\"Hex:\",\"Histogram\":\"Histogramme\",\"Histogram:\":\"Histogramme :\",\"Horizontal\":\"Horizontalement\",\"Horizontal blur:\":\"Flou horizontal:\",\"Hue Rotate\":\"Hue Rotate\",\"Hue:\":\"Teinte :\",\"Image\":\"Image\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Données d'image avec plusieurs couches. Peut être ouvert en utilisant miniPaint -\",\"Impact\":\"Impact\",\"Information\":\"Informations\",\"Insert:\":\"Insérer:\",\"Italiano\":\"Italien\",\"Italic\":\"Italique\",\"JPG - JPG/JPEG Format\":\"JPG - Format JPG/JPEG\",\"JPG, WEBP quality:\":\"JPG, qualité WEBP:\",\"JSON - Full layers data\":\"JSON - Données avec tous les calques\",\"Japanese\":\"Japonais\",\"Key-points\":\"Points clés\",\"Keyboard Shortcuts\":\"Raccourcis clavier\",\"Keyword:\":\"Mot-clé:\",\"Korean\":\"Coréen\",\"Language\":\"Langue\",\"Last modified\":\"Dernière mise à jour\",\"Layer details\":\"Détails de la couche\",\"Layer is already image.\":\"Le calque est déjà l'image.\",\"Layer must be image, convert it to raster to apply this tool.\":\"Le calque doit être image, le convertir en raster pour appliquer cet outil.\",\"Layers\":\"Calques\",\"Layers:\":\"Couches:\",\"Left\":\"à gauche\",\"Level:\":\"Niveau :\",\"Levels:\":\"Niveau :\",\"Lietuvių\":\"Lituanien\",\"Line\":\"Ligne\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Luminance :\",\"Magic Wand Tool\":\"Baguette magique\",\"Merge Down\":\"Fusionner avec le calque inférieur\",\"Merged\":\"Fusionné\",\"Mode:\":\"Mode :\",\"Module function not found.\":\"Fonction du module introuvable.\",\"Modules class not found:\":\"Classe de modules introuvable:\",\"Mosaic\":\"Mosaïque\",\"Mouse:\":\"Souris :\",\"Move\":\"Déplacer\",\"Move down\":\"Déplacer vers le bas\",\"Move up\":\"Déplacer vers le haut\",\"Name:\":\"Nom :\",\"Needs at least 2 layers.\":\"Nécessite au moins 2 couches.\",\"Negative\":\"Négatif\",\"New\":\"Nouveau...\",\"New file\":\"Nouveau fichier\",\"New from selection\":\"Nouveau à partir de la sélection\",\"New layer\":\"Nouveau calque\",\"New width can not be smaller then current width\":\"La nouvelle largeur ne peut pas être plus petite que la largeur actuelle\",\"Normal\":\"Normal\",\"Nothing is selected.\":\"Rien n'est sélectionné.\",\"Offset X:\":\"Décalage X:\",\"Offset Y:\":\"Décalage Y:\",\"Oil\":\"Peinture à l'huile\",\"Ok\":\"OK\",\"Online image editor.\":\"Éditeur d'image en ligne.\",\"Opacity\":\"Opacité\",\"Opacity:\":\"Opacité:\",\"Open\":\"Ouvrir\",\"Open Data URL\":\"URL de données ouvertes\",\"Open Directory\":\"Ouvrir le répertoire\",\"Open File\":\"Fichier ouvert\",\"Open URL\":\"Ouvrir depuis le Web\",\"Open data URL\":\"URL de données ouvertes\",\"Original size\":\"Format original\",\"PNG - Portable Network Graphics\":\"PNG - Portable Network Graphics\",\"Palette\":\"Palette\",\"Parameter #1:\":\"Paramètre n ° 1:\",\"Parameter #2:\":\"Paramètre n ° 2:\",\"Paste\":\"Coller\",\"Pencil\":\"Crayon\",\"Percentage:\":\"Pourcentage:\",\"Pick Color\":\"Sélecteur de couleurs\",\"Pixels:\":\"Pixels :\",\"Play animation\":\"Jouer l'animation\",\"Portuguese\":\"Portugais\",\"Power:\":\"<abbr title='Tolérance'>Tol.</abbr> :\",\"Powred by  pixabay.com .\":\"Powred par pixabay.com.\",\"Pre-Blur:\":\"Flou :\",\"Preview\":\"Aperçu\",\"Previous\":\"précédent\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"La couche précédente doit être une image, la convertir en raster pour appliquer cet outil.\",\"Print\":\"Imprimer\",\"Quality:\":\"Qualité :\",\"Quick load\":\"Chargement rapide\",\"Quick save\":\"Sauvegarde rapide\",\"Radial\":\"Radial\",\"Radial gradient\":\"Gradient radial\",\"Radius:\":\"Rayon :\",\"Range:\":\"Gamme :\",\"Rectangle\":\"Rectangle\",\"Red\":\"Rouge\",\"Red channel:\":\"Niveau de rouge :\",\"Red:\":\"Rouge:\",\"Rename\":\"Renommer\",\"Replace Color\":\"Remplacer une couleur\",\"Replace color\":\"Remplacer une couleur\",\"Replacement:\":\"Remplacement :\",\"Report issues\":\"Signaler un problème\",\"Resample - Hermite\":\"Rééchantillonnage\",\"Reset\":\"Réinitialiser\",\"Reset zoom level\":\"Réinitialiser le niveau de zoom\",\"Resize\":\"Redimensionner\",\"Resized as background\":\"Redimensionné comme arrière-plan\",\"Resolution:\":\"Taille :\",\"Restore alpha\":\"Restaurer le niveau alpha\",\"Right\":\"à droite\",\"Right angle:\":\"Angle droit:\",\"Rotate\":\"Faire pivoter\",\"Rotate is not supported on this type of object. Convert to raster?\":\"La rotation n'est pas prise en charge sur ce type d'objet. Convertir en raster?\",\"Rotate left\":\"Faire pivoter à gauche\",\"Rotate:\":\"Tourner:\",\"Russian\":\"Russe\",\"Sat:\":\"Sam:\",\"Saturate\":\"Saturer\",\"Saturation:\":\"Saturation :\",\"Save\":\"Enregistrer\",\"Save as\":\"Enregistrer sous\",\"Save as data URL\":\"Enregistrer comme URL de données\",\"Save as type:\":\"Enregistrer comme type :\",\"Save layers:\":\"Enregistrer les calques :\",\"Save resolution:\":\"Se souvenir de la taille :\",\"Scroll down\":\"Défiler vers le bas\",\"Scroll up\":\"Défiler\",\"Search\":\"Chercher\",\"Search images\":\"Rechercher des images\",\"Select all\":\"Sélectionner tout\",\"Select object tool\":\"Déplacer les pixels sélectionnés\",\"Selected\":\"Choisi\",\"Selection\":\"Sélection\",\"Sensitivity:\":\"Sensibilité :\",\"Sepia\":\"Vieille photo\",\"Settings\":\"Paramètres\",\"Shadow\":\"Ombre\",\"Shadow:\":\"Ombre :\",\"Sharpen\":\"Améliorer la netteté\",\"Sharpen tool\":\"Netteté\",\"Sharpen:\":\"Netteté :\",\"Show / Hide\":\"Montrer / Cacher\",\"Show file size:\":\"Calculer la taille du fichier :\",\"Simple\":\"Simple\",\"Size\":\"Taille\",\"Size is too big, max\":\"La taille est trop grande, max\",\"Size:\":\"Taille :\",\"Skip - layer must be image.\":\"Skip-layer doit être image.\",\"Solarize\":\"Solariser\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"Désolé, l'image n'a pas pu être chargée. Essayez de la copier dans le presse-papier et de la coller à la place.\",\"Sorry, image is too big, max 5 MB.\":\"Désolé, l'image est trop grande (5MB max).\",\"Source is empty, right click on image to save source position.\":\"La source est vide, faites un clic droit sur l'image pour sauvegarder la position de la source.\",\"Sprites\":\"Sprites\",\"Square\":\"Carré\",\"Strength:\":\"Force :\",\"Strict\":\"Strict\",\"Stroke\":\"Contour\",\"Stroke:\":\"Accident vasculaire cérébral:\",\"Target:\":\"Cible :\",\"Text\":\"Texte\",\"Text example\":\"Exemple de texte\",\"Text:\":\"Texte :\",\"There are no layers behind.\":\"Il n'y a pas de couches derrière.\",\"There is only 1 layer.\":\"Il n'y a qu'une seule couche.\",\"Tilt Shift\":\"Flou artistique\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"Basculer\",\"Tools\":\"Outils\",\"Tools class not found:\":\"Classe d'outils introuvable:\",\"Total pixels:\":\"Nombre de pixels :\",\"Translate\":\"Traduire\",\"Translate error, can not find dictionary:\":\"Erreur de traduction, impossible de trouver le dictionnaire :\",\"Transparency background:\":\"Fond de transparence:\",\"Transparent:\":\"Transparence :\",\"Trim\":\"Rogner l'image\",\"Trim everything:\":\"Coupez tout:\",\"Trim layer:\":\"Couche de garniture:\",\"Trim white color?\":\"Taillez la couleur blanche?\",\"Turkish\":\"Turc\",\"Undo\":\"Annuler\",\"Undo disabled.\":\"Annuler désactivé.\",\"Undo enabled.\":\"Annuler activé.\",\"Undo is not available.\":\"Annuler n'est pas disponible.\",\"Undo levels changed to 1.\":\"Les niveaux d'annulation ont été changés en 1.\",\"Undo levels restored to\":\"Annuler les niveaux restitués à\",\"Unique colors:\":\"Couleurs uniques :\",\"Up\":\"Vers le haut\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Utilisez le raccourci clavier Ctrl + V pour coller à partir du Presse-papiers.\",\"V Radius:\":\"Rayon V :\",\"Verdana\":\"Verdana\",\"Version:\":\"Version:\",\"Vertical\":\"Verticalement\",\"Vertical blur:\":\"Flou vertical:\",\"Vibrance\":\"Vibrance\",\"Vignette\":\"Vignette\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"Vintage\",\"Visible:\":\"Visible :\",\"WEBP - Weppy File Format\":\"WEBP - Weppy File Format\",\"Website:\":\"Site Internet:\",\"Width (%):\":\"Largeur (%) :\",\"Width:\":\"Largeur :\",\"Wrong file type, must be image or json.\":\"Mauvais type de fichier, image ou json attendu.\",\"X end:\":\"Fin X :\",\"X position:\":\"Position x :\",\"X start:\":\"Début X :\",\"Y end:\":\"Fin Y :\",\"Y position:\":\"Position y :\",\"Y start:\":\"Début Y :\",\"You can also drag and drop items into browser.\":\"Vous pouvez également faire glisser et déposer des éléments dans le navigateur.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Votre navigateur ne supporte pas le canevas ou JavaScript n'est pas activé.\",\"Your browser does not support this format.\":\"Votre navigateur ne supporte pas ce format.\",\"Your search did not match any images.\":\"Votre recherche ne correspond à aucune image.\",\"Zoom\":\"Zoom\",\"Zoom Blur\":\"Zoom Flou\",\"Zoom In\":\"Agrandir\",\"Zoom Out\":\"Réduire\",\"Zoom blur\":\"Zoom flou\",\"Zoom in\":\"Zoomer\",\"Zoom out\":\"Dézoomer\",\"Zoom:\":\"Zoom :\"}");

/***/ }),

/***/ "./src/js/languages/it.json":
/*!**********************************!*\
  !*** ./src/js/languages/it.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"Di\",\"Active\":\"Attivo\",\"Advanced\":\"Avanzate\",\"All\":\"Tutti\",\"Alpha:\":\"Alfa:\",\"Anonymous\":\"Anonimo\",\"Anti aliasing\":\"Anti aliasing\",\"Arial\":\"Arial\",\"Arrow\":\"Freccia\",\"Author:\":\"Autore:\",\"Auto adjust colors\":\"Regola automaticamente i colori\",\"Average:\":\"Media:\",\"BMP - Windows Bitmap\":\"BMP - Bitmap di Windows\",\"Base\":\"Base\",\"Basic\":\"Di base\",\"Black and White\":\"Bianco e nero\",\"Blue\":\"Blu\",\"Blue channel:\":\"Canale blu:\",\"Blue:\":\"Blu:\",\"Blur Radius:\":\"Sfocatura raggio:\",\"Blur power:\":\"Sfocatura:\",\"Blur tool\":\"Strumento di sfocatura\",\"Bold\":\"Grassetto\",\"Bold Italic\":\"Italico grassetto\",\"Borders\":\"frontiere\",\"Box Blur\":\"Box Blur\",\"Box blur\":\"Scatola sfocatura\",\"Brightness\":\"Luminosità\",\"Brightness:\":\"Luminosità:\",\"Brush\":\"Spazzola\",\"Bulge/Pinch tool\":\"Bulge / Pinch tool\",\"Burn\":\"Bruciare\",\"CSS filters\":\"Filtri CSS\",\"Can not animate 1 layer.\":\"Impossibile animare 1 livello.\",\"Can not find previous layer.\":\"Impossibile trovare il livello precedente.\",\"Cancel\":\"Annulla\",\"Center\":\"Centro\",\"Center x:\":\"Centro x:\",\"Center y:\":\"Centro y:\",\"Center:\":\"Centro:\",\"Channel:\":\"Canale:\",\"Circle\":\"Cerchio\",\"Clear\":\"Chiaro\",\"Clone count:\":\"Conteggio dei cloni:\",\"Clone tool\":\"Strumento clone\",\"Cloned edges\":\"Bordi clonati\",\"Color #\":\"Colore #\",\"Color Zoom\":\"Zoom a colori\",\"Color alpha value can not be zero.\":\"Il valore alfa del colore non può essere zero.\",\"Color corrections\":\"Correzioni di colore\",\"Color palette\":\"Palette dei colori\",\"Color to alpha\":\"Colore ad alfa\",\"Color zoom\":\"Zoom a colori\",\"Color:\":\"Colore:\",\"Colors\":\"Colori\",\"Colors:\":\"Colori:\",\"Composition\":\"Composizione\",\"Composition:\":\"Composizione:\",\"Content fill\":\"Riempimento del contenuto\",\"Contrast\":\"Contrasto\",\"Contrast:\":\"Contrasto:\",\"Convert to raster\":\"Converti in raster\",\"Copy selection\":\"Copia selezione\",\"Copy:\":\"Copia:\",\"Courier\":\"Corriere\",\"Crop\":\"raccolto\",\"Ctrl+V\":\"Ctrl + V\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"attuale\",\"Curve\":\"Curva\",\"Custom\":\"costume\",\"Data URL\":\"URL dei dati\",\"Data URL:\":\"URL dei dati:\",\"Decrease color depth\":\"Diminuisci la profondità del colore\",\"Default\":\"Predefinito\",\"Degree:\":\"Grado:\",\"Del\":\"del\",\"Delete\":\"Elimina\",\"Delete selection\":\"Elimina selezione\",\"Denoise\":\"Denoise\",\"Desaturate\":\"Togli saturazione\",\"Description:\":\"Descrizione:\",\"Differences\":\"differenze\",\"Differences Down\":\"Differenze giù\",\"Dither\":\"oscillare\",\"Dithering:\":\"dithering:\",\"Dominant color:\":\"Colore dominante:\",\"Dot Screen\":\"Schermo a punti\",\"Down\":\"Giù\",\"Duplicate\":\"Duplicare\",\"Edge\":\"Bordo\",\"Edit\":\"modificare\",\"Edit text\":\"Modifica il testo\",\"Edit text...\":\"Modifica il testo...\",\"Effects\":\"effetti\",\"Email:\":\"E-mail:\",\"Emboss\":\"rilievo\",\"Empty selection\":\"Selezione vuota\",\"Empty selection or type not image.\":\"Selezione vuota o tipo non immagine.\",\"English\":\"Inglese\",\"Enrich\":\"Arricchire\",\"Erase\":\"Cancellare\",\"Erase on rotate object is disabled. Sorry.\":\"Cancella su ruotare l'oggetto è disabilitato. Scusate.\",\"Error\":\"Errore\",\"Error connecting to service.\":\"Errore durante la connessione al servizio.\",\"Error: can not load image.\":\"Errore: impossibile caricare l'immagine.\",\"Error: missing details event target\":\"Errore: manca il bersaglio dell'evento dettagli\",\"Error: unsupported attribute type:\":\"Errore: tipo di attributo non supportato:\",\"Error: wrong key:\":\"Errore: chiave errata:\",\"Español\":\"Español\",\"Expand edges\":\"Espandi i bordi\",\"Exponent:\":\"Esponente:\",\"Factor:\":\"Fattore:\",\"File\":\"File\",\"File name:\":\"Nome del file:\",\"File size:\":\"Dimensione del file:\",\"Fill\":\"Riempire\",\"Fit\":\"In forma\",\"Fit window\":\"Finestra adatta\",\"Flatten Image\":\"Immagine piatta\",\"Flip\":\"Flip\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-serpentina\",\"French\":\"francese\",\"Full HD, 1080p\":\"Full HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - Graphics Interchange Format\",\"Gap:\":\"Gap:\",\"Gaussian Blur\":\"Sfocatura gaussiana\",\"German\":\"Tedesco\",\"Gif delay:\":\"Ritardo Gif:\",\"GitHub:\":\"GitHub:\",\"Gradient\":\"Pendenza\",\"Gradient Radius:\":\"Raggio di pendenza:\",\"Grains\":\"Grani\",\"Gray\":\"Grigio\",\"Grayscale\":\"Scala di grigi\",\"Green\":\"verde\",\"Green channel:\":\"Canale Verde:\",\"Green:\":\"Verde:\",\"Greyscale:\":\"Scala di grigi:\",\"Grid\":\"Griglia\",\"Grid on/off\":\"Griglia on / off\",\"H Radius:\":\"Raggio H:\",\"Heatmap\":\"Mappa di calore\",\"Height (%):\":\"Altezza (%):\",\"Height:\":\"Altezza:\",\"Help\":\"Aiuto\",\"Helvetica\":\"Helvetica\",\"Hermite\":\"Hermite\",\"Hex:\":\"Esadecimale:\",\"Histogram\":\"Istogramma\",\"Histogram:\":\"Istogramma:\",\"Horizontal\":\"Orizzontale\",\"Horizontal blur:\":\"Sfocatura orizzontale:\",\"Hue Rotate\":\"Tonalità Ruota\",\"Hue:\":\"Hue:\",\"Image\":\"Immagine\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Dati immagine con multi-layer. Può essere aperto usando miniPaint -\",\"Impact\":\"urto\",\"Information\":\"Informazione\",\"Insert:\":\"Inserire:\",\"Italiano\":\"Italiano\",\"Italic\":\"Corsivo\",\"JPG - JPG/JPEG Format\":\"JPG - Formato JPG / JPEG\",\"JPG, WEBP quality:\":\"JPG, qualità WEBP:\",\"JSON - Full layers data\":\"JSON - Dati a strati completi\",\"Japanese\":\"giapponese\",\"Key-points\":\"Punti chiave\",\"Keyboard Shortcuts\":\"Tasti rapidi\",\"Keyword:\":\"Parola chiave:\",\"Korean\":\"coreano\",\"Language\":\"linguaggio\",\"Last modified\":\"Ultima modifica\",\"Layer details\":\"Dettagli del livello\",\"Layer is already image.\":\"Il livello è già immagine.\",\"Layer must be image, convert it to raster to apply this tool.\":\"Il livello deve essere un'immagine, convertirlo in raster per applicare questo strumento.\",\"Layers\":\"Livelli\",\"Layers:\":\"strati:\",\"Left\":\"Sinistra\",\"Level:\":\"Livello:\",\"Levels:\":\"livelli:\",\"Lietuvių\":\"Lietuvių\",\"Line\":\"Linea\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Luminance:\",\"Magic Wand Tool\":\"Strumento bacchetta magica\",\"Merge Down\":\"Unisci giù\",\"Merged\":\"Fusione\",\"Mode:\":\"Modalità:\",\"Module function not found.\":\"Funzione del modulo non trovata.\",\"Modules class not found:\":\"Classe di moduli non trovata:\",\"Mosaic\":\"Mosaico\",\"Mouse:\":\"Topo:\",\"Move\":\"Mossa\",\"Move down\":\"Abbassati\",\"Move up\":\"Andare avanti\",\"Name:\":\"Nome:\",\"Needs at least 2 layers.\":\"Ha bisogno di almeno 2 strati.\",\"Negative\":\"Negativo\",\"New\":\"Nuovo\",\"New file\":\"Nuovo file\",\"New from selection\":\"Novità dalla selezione\",\"New layer\":\"Nuovo strato\",\"New width can not be smaller then current width\":\"La nuova larghezza non può essere più piccola della larghezza attuale\",\"Normal\":\"Normale\",\"Nothing is selected.\":\"Niente è selezionato.\",\"Offset X:\":\"Offset X:\",\"Offset Y:\":\"Offset Y:\",\"Oil\":\"Olio\",\"Ok\":\"Ok\",\"Online image editor.\":\"Editor di immagini online\",\"Opacity\":\"Opacità\",\"Opacity:\":\"Opacità:\",\"Open\":\"Aperto\",\"Open Data URL\":\"Apri URL dati\",\"Open Directory\":\"Apri Directory\",\"Open File\":\"Apri il file\",\"Open URL\":\"Apri URL\",\"Open data URL\":\"Apri l'URL dei dati\",\"Original size\":\"Misura originale\",\"PNG - Portable Network Graphics\":\"PNG - Portable Network Graphics\",\"Palette\":\"Tavolozza\",\"Parameter #1:\":\"Parametro n. 1:\",\"Parameter #2:\":\"Parametro n. 2:\",\"Paste\":\"Incolla\",\"Pencil\":\"Matita\",\"Percentage:\":\"Percentuale:\",\"Pick Color\":\"Scegli colore\",\"Pixels:\":\"pixel:\",\"Play animation\":\"Riproduci animazione\",\"Portuguese\":\"portoghese\",\"Power:\":\"Energia:\",\"Powred by  pixabay.com .\":\"Powred di pixabay.com.\",\"Pre-Blur:\":\"Pre-Blur:\",\"Preview\":\"Anteprima\",\"Previous\":\"Precedente\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"Il livello precedente deve essere un'immagine, convertirlo in raster per applicare questo strumento.\",\"Print\":\"Stampare\",\"Quality:\":\"Qualità:\",\"Quick load\":\"Carico rapido\",\"Quick save\":\"Salvataggio veloce\",\"Radial\":\"Radiale\",\"Radial gradient\":\"Gradiente radiale\",\"Radius:\":\"Raggio:\",\"Range:\":\"Gamma:\",\"Rectangle\":\"Rettangolo\",\"Red\":\"Rosso\",\"Red channel:\":\"Canale Rosso:\",\"Red:\":\"Rosso:\",\"Rename\":\"Rinominare\",\"Replace Color\":\"Sostituisci colore\",\"Replace color\":\"Sostituisci colore\",\"Replacement:\":\"Sostituzione:\",\"Report issues\":\"Segnala problemi\",\"Resample - Hermite\":\"Ricampionare - Hermite\",\"Reset\":\"Reset\",\"Reset zoom level\":\"Reimposta il livello di zoom\",\"Resize\":\"Ridimensiona\",\"Resized as background\":\"Ridimensionato come sfondo\",\"Resolution:\":\"Risoluzione:\",\"Restore alpha\":\"Ripristina alpha\",\"Right\":\"Destra\",\"Right angle:\":\"Angolo retto:\",\"Rotate\":\"Ruotare\",\"Rotate is not supported on this type of object. Convert to raster?\":\"Ruota non è supportato su questo tipo di oggetto. Converti in raster?\",\"Rotate left\":\"Gira a sinistra\",\"Rotate:\":\"Ruotare:\",\"Russian\":\"russo\",\"Sat:\":\"Sat:\",\"Saturate\":\"Saturare\",\"Saturation:\":\"Saturazione:\",\"Save\":\"Salvare\",\"Save as\":\"Salva come\",\"Save as data URL\":\"Salva come URL dei dati\",\"Save as type:\":\"Salva come tipo:\",\"Save layers:\":\"Salva livelli:\",\"Save resolution:\":\"Salva risoluzione:\",\"Scroll down\":\"Scorri verso il basso\",\"Scroll up\":\"Scorrere verso l'alto\",\"Search\":\"Ricerca\",\"Search images\":\"Cerca immagini\",\"Select all\":\"Seleziona tutto\",\"Select object tool\":\"Seleziona lo strumento oggetto\",\"Selected\":\"Selezionato\",\"Selection\":\"Selezione\",\"Sensitivity:\":\"sensibilità:\",\"Sepia\":\"nero di seppia\",\"Settings\":\"impostazioni\",\"Shadow\":\"Ombra\",\"Shadow:\":\"Ombra:\",\"Sharpen\":\"Affilare\",\"Sharpen tool\":\"Affila lo strumento\",\"Sharpen:\":\"Affilare:\",\"Show / Hide\":\"Mostra nascondi\",\"Show file size:\":\"Mostra la dimensione del file:\",\"Simple\":\"Semplice\",\"Size\":\"Dimensione\",\"Size is too big, max\":\"La dimensione è troppo grande, max\",\"Size:\":\"Dimensione:\",\"Skip - layer must be image.\":\"Salta: il livello deve essere un'immagine.\",\"Solarize\":\"solarizzare\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"Spiacenti, l'immagine non può essere caricata. Prova a copiare l'immagine e incollarla.\",\"Sorry, image is too big, max 5 MB.\":\"Siamo spiacenti, l'immagine è troppo grande, max 5 MB.\",\"Source is empty, right click on image to save source position.\":\"L'origine è vuota, fare clic con il tasto destro sull'immagine per salvare la posizione della fonte.\",\"Sprites\":\"sprites\",\"Square\":\"Piazza\",\"Strength:\":\"Forza:\",\"Strict\":\"Rigoroso\",\"Stroke\":\"Ictus\",\"Stroke:\":\"Ictus:\",\"Target:\":\"Bersaglio:\",\"Text\":\"Testo\",\"Text example\":\"Esempio di testo\",\"Text:\":\"Testo:\",\"There are no layers behind.\":\"Non ci sono strati dietro.\",\"There is only 1 layer.\":\"C'è solo 1 strato.\",\"Tilt Shift\":\"Tilt Shift\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"Toggle\",\"Tools\":\"Utensili\",\"Tools class not found:\":\"Classe di strumenti non trovata:\",\"Total pixels:\":\"Pixel totali:\",\"Translate\":\"Tradurre\",\"Translate error, can not find dictionary:\":\"Traduci errore, impossibile trovare il dizionario:\",\"Transparency background:\":\"Sfondo della trasparenza:\",\"Transparent:\":\"Trasparente:\",\"Trim\":\"tagliare\",\"Trim everything:\":\"Taglia tutto:\",\"Trim layer:\":\"Strato di rifinitura:\",\"Trim white color?\":\"Tagliare il colore bianco?\",\"Turkish\":\"Turco\",\"Undo\":\"Disfare\",\"Undo disabled.\":\"Annulla disabilitato.\",\"Undo enabled.\":\"Annulla abilitato.\",\"Undo is not available.\":\"Annulla non è disponibile.\",\"Undo levels changed to 1.\":\"Annulla i livelli modificati in 1.\",\"Undo levels restored to\":\"Annulla i livelli ripristinati in\",\"Unique colors:\":\"Colori unici:\",\"Up\":\"Su\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Usa la scorciatoia da tastiera Ctrl + V per incollare dagli Appunti.\",\"V Radius:\":\"V raggio:\",\"Verdana\":\"Verdana\",\"Version:\":\"Versione:\",\"Vertical\":\"Verticale\",\"Vertical blur:\":\"Sfocatura verticale:\",\"Vibrance\":\"Vibrance\",\"Vignette\":\"vignette\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"Vintage ▾\",\"Visible:\":\"Visibile:\",\"WEBP - Weppy File Format\":\"WEBP - Formato file Weppy\",\"Website:\":\"Sito web:\",\"Width (%):\":\"Larghezza (%):\",\"Width:\":\"Larghezza:\",\"Wrong file type, must be image or json.\":\"Tipo di file errato, deve essere immagine o json.\",\"X end:\":\"X fine:\",\"X position:\":\"Posizione X:\",\"X start:\":\"X inizio:\",\"Y end:\":\"Fine Y:\",\"Y position:\":\"Posizione Y:\",\"Y start:\":\"Y inizio:\",\"You can also drag and drop items into browser.\":\"Puoi anche trascinare gli oggetti nel browser.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Il tuo browser non supporta canvas o JavaScript non è abilitato.\",\"Your browser does not support this format.\":\"Il tuo browser non supporta questo formato.\",\"Your search did not match any images.\":\"La tua ricerca non corrisponde ad alcuna immagine.\",\"Zoom\":\"Zoom\",\"Zoom Blur\":\"Zoom sfocatura\",\"Zoom In\":\"Ingrandire\",\"Zoom Out\":\"Zoom indietro\",\"Zoom blur\":\"Sfocatura dello zoom\",\"Zoom in\":\"Ingrandire\",\"Zoom out\":\"Zoom indietro\",\"Zoom:\":\"Zoom:\"}");

/***/ }),

/***/ "./src/js/languages/ja.json":
/*!**********************************!*\
  !*** ./src/js/languages/ja.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"約\",\"Active\":\"アクティブ\",\"Advanced\":\"上級\",\"All\":\"すべて\",\"Alpha:\":\"アルファ：\",\"Anonymous\":\"匿名\",\"Anti aliasing\":\"アンチエイリアシング\",\"Arial\":\"Arial\",\"Arrow\":\"矢印\",\"Author:\":\"著者：\",\"Auto adjust colors\":\"色を自動調整する\",\"Average:\":\"平均：\",\"BMP - Windows Bitmap\":\"BMP  -  Windowsビットマップ\",\"Base\":\"ベース\",\"Basic\":\"ベーシック\",\"Black and White\":\"黒と白\",\"Blue\":\"青\",\"Blue channel:\":\"ブルーチャンネル：\",\"Blue:\":\"青：\",\"Blur Radius:\":\"ぼかし半径：\",\"Blur power:\":\"ぼかしパワー：\",\"Blur tool\":\"ぼかしツール\",\"Bold\":\"大胆な\",\"Bold Italic\":\"ボールドイタリック\",\"Borders\":\"罫線\",\"Box Blur\":\"ボックスのぼかし\",\"Box blur\":\"ボックスボケ\",\"Brightness\":\"輝度\",\"Brightness:\":\"輝度：\",\"Brush\":\"みがきます\",\"Bulge/Pinch tool\":\"バルジ/ピンチツール\",\"Burn\":\"燃やす\",\"CSS filters\":\"CSSフィルタ\",\"Can not animate 1 layer.\":\"1つのレイヤーをアニメートできません。\",\"Can not find previous layer.\":\"以前のレイヤーが見つかりません。\",\"Cancel\":\"キャンセル\",\"Center\":\"センター\",\"Center x:\":\"センターx：\",\"Center y:\":\"センターy：\",\"Center:\":\"センター：\",\"Channel:\":\"チャネル：\",\"Circle\":\"サークル\",\"Clear\":\"クリア\",\"Clone count:\":\"クローン数：\",\"Clone tool\":\"クローンツール\",\"Cloned edges\":\"クローンエッジ\",\"Color #\":\"色 ＃\",\"Color Zoom\":\"カラーズーム\",\"Color alpha value can not be zero.\":\"色のアルファ値はゼロにすることはできません。\",\"Color corrections\":\"色補正\",\"Color palette\":\"カラーパレット\",\"Color to alpha\":\"カラーからアルファ\",\"Color zoom\":\"カラーズーム\",\"Color:\":\"色：\",\"Colors\":\"色\",\"Colors:\":\"色：\",\"Composition\":\"組成\",\"Composition:\":\"組成：\",\"Content fill\":\"コンテンツの埋め込み\",\"Contrast\":\"コントラスト\",\"Contrast:\":\"コントラスト：\",\"Convert to raster\":\"ラスタに変換する\",\"Copy selection\":\"選択コピー\",\"Copy:\":\"コピー：\",\"Courier\":\"宅配便\",\"Crop\":\"作物\",\"Ctrl+V\":\"Ctrl + V\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"現在\",\"Curve\":\"曲線\",\"Custom\":\"カスタム\",\"Data URL\":\"データURL\",\"Data URL:\":\"データURL：\",\"Decrease color depth\":\"色深度を減らす\",\"Default\":\"デフォルト\",\"Degree:\":\"度：\",\"Del\":\"デル\",\"Delete\":\"削除\",\"Delete selection\":\"選択を削除する\",\"Denoise\":\"デノアーズ\",\"Desaturate\":\"不飽和化する\",\"Description:\":\"説明：\",\"Differences\":\"相違点\",\"Differences Down\":\"相違点\",\"Dither\":\"ディザ\",\"Dithering:\":\"ディザリング：\",\"Dominant color:\":\"支配的な色：\",\"Dot Screen\":\"ドットスクリーン\",\"Down\":\"ダウン\",\"Duplicate\":\"重複\",\"Edge\":\"エッジ\",\"Edit\":\"編集\",\"Edit text\":\"テキストを編集する\",\"Edit text...\":\"テキストを編集...\",\"Effects\":\"エフェクト\",\"Email:\":\"Eメール：\",\"Emboss\":\"エンボス\",\"Empty selection\":\"空の選択\",\"Empty selection or type not image.\":\"空の選択またはタイプではない画像。\",\"English\":\"英語\",\"Enrich\":\"エンリッチ\",\"Erase\":\"消去する\",\"Erase on rotate object is disabled. Sorry.\":\"回転オブジェクトの消去が無効になっています。ごめんなさい。\",\"Error\":\"エラー\",\"Error connecting to service.\":\"サービスに接続中にエラーが発生しました。\",\"Error: can not load image.\":\"エラー：画像を読み込めません。\",\"Error: missing details event target\":\"エラー：詳細イベントターゲットがありません\",\"Error: unsupported attribute type:\":\"エラー：サポートされていない属性タイプ：\",\"Error: wrong key:\":\"エラー：間違ったキー：\",\"Español\":\"スペイン語\",\"Expand edges\":\"エッジを開く\",\"Exponent:\":\"指数：\",\"Factor:\":\"因子：\",\"File\":\"ファイル\",\"File name:\":\"ファイル名：\",\"File size:\":\"ファイルサイズ：\",\"Fill\":\"塗りつぶす\",\"Fit\":\"フィット\",\"Fit window\":\"ウィンドウに合わせる\",\"Flatten Image\":\"画像を平ら\",\"Flip\":\"フリップ\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-蛇紋文字\",\"French\":\"フランス語\",\"Full HD, 1080p\":\"フルHD、1080p\",\"GIF - Graphics Interchange Format\":\"GIF  - グラフィックスインターチェンジ形式\",\"Gap:\":\"ギャップ：\",\"Gaussian Blur\":\"ガウスぼかし\",\"German\":\"ドイツ人\",\"Gif delay:\":\"GIF遅延：\",\"GitHub:\":\"GitHub：\",\"Gradient\":\"勾配\",\"Gradient Radius:\":\"勾配半径：\",\"Grains\":\"穀類\",\"Gray\":\"グレー\",\"Grayscale\":\"グレースケール\",\"Green\":\"緑\",\"Green channel:\":\"グリーンチャネル：\",\"Green:\":\"緑：\",\"Greyscale:\":\"グレースケール：\",\"Grid\":\"グリッド\",\"Grid on/off\":\"グリッドのオン/オフ\",\"H Radius:\":\"H半径：\",\"Heatmap\":\"ヒートマップ\",\"Height (%):\":\"高さ （％）：\",\"Height:\":\"高さ：\",\"Help\":\"助けて\",\"Helvetica\":\"ヘルベチカ\",\"Hermite\":\"エルミート\",\"Hex:\":\"16進数：\",\"Histogram\":\"ヒストグラム\",\"Histogram:\":\"ヒストグラム：\",\"Horizontal\":\"水平\",\"Horizontal blur:\":\"水平ブラー：\",\"Hue Rotate\":\"色相回転\",\"Hue:\":\"色相：\",\"Image\":\"画像\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"マルチレイヤーの画像データ。 miniPaintを使用して開くことができます -\",\"Impact\":\"影響\",\"Information\":\"情報\",\"Insert:\":\"インサート：\",\"Italiano\":\"イタリア語\",\"Italic\":\"イタリック\",\"JPG - JPG/JPEG Format\":\"JPG  -  JPG / JPEG形式\",\"JPG, WEBP quality:\":\"JPG、WEBP品質：\",\"JSON - Full layers data\":\"JSON  - フルレイヤーデータ\",\"Japanese\":\"日本語\",\"Key-points\":\"キーポイント\",\"Keyboard Shortcuts\":\"キーボードショートカット\",\"Keyword:\":\"キーワード：\",\"Korean\":\"韓国語\",\"Language\":\"言語\",\"Last modified\":\"最終更新日\",\"Layer details\":\"レイヤの詳細\",\"Layer is already image.\":\"レイヤは既に画像です。\",\"Layer must be image, convert it to raster to apply this tool.\":\"レイヤはイメージでなければならず、このツールを適用するにはラスタに変換する必要があります。\",\"Layers\":\"レイヤー\",\"Layers:\":\"レイヤー：\",\"Left\":\"左\",\"Level:\":\"レベル：\",\"Levels:\":\"レベル：\",\"Lietuvių\":\"Lietuvių\",\"Line\":\"ライン\",\"Lum:\":\"Lum：\",\"Luminance:\":\"輝度：\",\"Magic Wand Tool\":\"マジックワンドツール\",\"Merge Down\":\"マージダウン\",\"Merged\":\"合併\",\"Mode:\":\"モード：\",\"Module function not found.\":\"モジュール機能が見つかりません。\",\"Modules class not found:\":\"モジュールクラスが見つかりません：\",\"Mosaic\":\"モザイク\",\"Mouse:\":\"マウス：\",\"Move\":\"移動\",\"Move down\":\"下に移動\",\"Move up\":\"上がる\",\"Name:\":\"名：\",\"Needs at least 2 layers.\":\"少なくとも2つの層が必要です。\",\"Negative\":\"負\",\"New\":\"新しい\",\"New file\":\"新しいファイル\",\"New from selection\":\"新しい選択から\",\"New layer\":\"新しいレイヤー\",\"New width can not be smaller then current width\":\"新しい幅は現在の幅より小さくすることはできません\",\"Normal\":\"ノーマル\",\"Nothing is selected.\":\"何も選択されていません。\",\"Offset X:\":\"オフセットX：\",\"Offset Y:\":\"オフセットY：\",\"Oil\":\"油\",\"Ok\":\"OK\",\"Online image editor.\":\"オンラインイメージエディタ。\",\"Opacity\":\"不透明度\",\"Opacity:\":\"不透明度：\",\"Open\":\"開いた\",\"Open Data URL\":\"公開データURL\",\"Open Directory\":\"オープンディレクトリ\",\"Open File\":\"ファイルを開く\",\"Open URL\":\"URLを開く\",\"Open data URL\":\"公開データURL\",\"Original size\":\"オリジナルサイズ\",\"PNG - Portable Network Graphics\":\"PNG  - ポータブルネットワークグラフィックス\",\"Palette\":\"パレット\",\"Parameter #1:\":\"パラメータ＃1：\",\"Parameter #2:\":\"パラメータ＃2：\",\"Paste\":\"ペースト\",\"Pencil\":\"鉛筆\",\"Percentage:\":\"パーセンテージ：\",\"Pick Color\":\"ピックカラー\",\"Pixels:\":\"ピクセル：\",\"Play animation\":\"アニメーションを再生する\",\"Portuguese\":\"ポルトガル\",\"Power:\":\"力：\",\"Powred by  pixabay.com .\":\"pixabay.comのPowred\",\"Pre-Blur:\":\"プリブラー：\",\"Preview\":\"プレビュー\",\"Previous\":\"前\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"前のレイヤーはイメージでなければならず、このツールを適用するにはラスターに変換する必要があります。\",\"Print\":\"印刷\",\"Quality:\":\"品質：\",\"Quick load\":\"クイックロード\",\"Quick save\":\"クイックセーブ\",\"Radial\":\"ラジアル\",\"Radial gradient\":\"放射グラジエント\",\"Radius:\":\"半径：\",\"Range:\":\"範囲：\",\"Rectangle\":\"矩形\",\"Red\":\"赤\",\"Red channel:\":\"赤いチャンネル：\",\"Red:\":\"赤：\",\"Rename\":\"名前を変更する\",\"Replace Color\":\"色を置き換える\",\"Replace color\":\"色を交換する\",\"Replacement:\":\"置換：\",\"Report issues\":\"レポートの問題\",\"Resample - Hermite\":\"リサンプル - エルミート\",\"Reset\":\"リセット\",\"Reset zoom level\":\"ズームレベルのリセット\",\"Resize\":\"サイズを変更する\",\"Resized as background\":\"背景としてサイズ変更\",\"Resolution:\":\"解決：\",\"Restore alpha\":\"アルファを復元する\",\"Right\":\"右\",\"Right angle:\":\"直角：\",\"Rotate\":\"回転する\",\"Rotate is not supported on this type of object. Convert to raster?\":\"このタイプのオブジェクトでは、回転はサポートされていません。ラスタに変換しますか？\",\"Rotate left\":\"左に回転\",\"Rotate:\":\"回転：\",\"Russian\":\"ロシア\",\"Sat:\":\"土：\",\"Saturate\":\"飽和\",\"Saturation:\":\"飽和：\",\"Save\":\"セーブ\",\"Save as\":\"名前を付けて保存\",\"Save as data URL\":\"データURLとして保存\",\"Save as type:\":\"タイプとして保存：\",\"Save layers:\":\"レイヤーを保存：\",\"Save resolution:\":\"解像度を保存：\",\"Scroll down\":\"下へスクロール\",\"Scroll up\":\"スクロールアップする\",\"Search\":\"サーチ\",\"Search images\":\"画像を検索する\",\"Select all\":\"すべて選択\",\"Select object tool\":\"オブジェクトツールを選択\",\"Selected\":\"選択された\",\"Selection\":\"選択\",\"Sensitivity:\":\"感度：\",\"Sepia\":\"セピア\",\"Settings\":\"設定\",\"Shadow\":\"影\",\"Shadow:\":\"影：\",\"Sharpen\":\"シャープ\",\"Sharpen tool\":\"シャープツール\",\"Sharpen:\":\"シャープ：\",\"Show / Hide\":\"表示/非表示\",\"Show file size:\":\"ファイルサイズを表示：\",\"Simple\":\"シンプル\",\"Size\":\"サイズ\",\"Size is too big, max\":\"サイズが大きすぎます\",\"Size:\":\"サイズ：\",\"Skip - layer must be image.\":\"スキップ - レイヤはイメージでなければなりません。\",\"Solarize\":\"ソラリゼーション\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"申し訳ありませんが、画像を読み込めませんでした。イメージをコピーして貼り付けてみてください。\",\"Sorry, image is too big, max 5 MB.\":\"申し訳ありませんが、イメージが大きすぎます（最大5 MB）。\",\"Source is empty, right click on image to save source position.\":\"ソースは空です。イメージを右クリックするとソースの位置が保存されます。\",\"Sprites\":\"スプライト\",\"Square\":\"平方\",\"Strength:\":\"力：\",\"Strict\":\"厳格\",\"Stroke\":\"ストローク\",\"Stroke:\":\"ストローク：\",\"Target:\":\"ターゲット：\",\"Text\":\"テキスト\",\"Text example\":\"テキストの例\",\"Text:\":\"テキスト：\",\"There are no layers behind.\":\"後ろに層がありません。\",\"There is only 1 layer.\":\"レイヤーは1つしかありません。\",\"Tilt Shift\":\"チルトシフト\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"トグル\",\"Tools\":\"ツール\",\"Tools class not found:\":\"ツールクラスが見つかりません：\",\"Total pixels:\":\"合計ピクセル数：\",\"Translate\":\"翻訳\",\"Translate error, can not find dictionary:\":\"翻訳エラー、辞書が見つかりません：\",\"Transparency background:\":\"透明性の背景：\",\"Transparent:\":\"トランスペアレント：\",\"Trim\":\"トリム\",\"Trim everything:\":\"すべてをトリム：\",\"Trim layer:\":\"トリムレイヤー：\",\"Trim white color?\":\"白い色をトリム？\",\"Turkish\":\"トルコ語\",\"Undo\":\"元に戻す\",\"Undo disabled.\":\"元に戻すことはできません。\",\"Undo enabled.\":\"取り消しが有効になっています。\",\"Undo is not available.\":\"元に戻すことはできません。\",\"Undo levels changed to 1.\":\"元に戻すレベルが1に変更されました。\",\"Undo levels restored to\":\"元に戻すレベルを元に戻す\",\"Unique colors:\":\"ユニークな色：\",\"Up\":\"アップ\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Ctrl + Vキーボードショートカットを使用してクリップボードから貼り付けます。\",\"V Radius:\":\"V半径：\",\"Verdana\":\"ヴェルダナ\",\"Version:\":\"バージョン：\",\"Vertical\":\"垂直\",\"Vertical blur:\":\"垂直方向のぼかし：\",\"Vibrance\":\"バイブランス\",\"Vignette\":\"ビネット\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"ビンテージ\",\"Visible:\":\"表示：\",\"WEBP - Weppy File Format\":\"WEBP  - ウィピーファイルフォーマット\",\"Website:\":\"ウェブサイト：\",\"Width (%):\":\"幅（％）：\",\"Width:\":\"幅：\",\"Wrong file type, must be image or json.\":\"間違ったファイルタイプです。画像またはjsonでなければなりません。\",\"X end:\":\"X end：\",\"X position:\":\"X位置：\",\"X start:\":\"Xスタート：\",\"Y end:\":\"Y end：\",\"Y position:\":\"Y位置：\",\"Y start:\":\"Y開始：\",\"You can also drag and drop items into browser.\":\"アイテムをブラウザにドラッグアンドドロップすることもできます。\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"ブラウザがキャンバスをサポートしていないか、JavaScriptが有効になっていません。\",\"Your browser does not support this format.\":\"お使いのブラウザはこの形式をサポートしていません。\",\"Your search did not match any images.\":\"あなたの検索はどの画像にも一致しませんでした。\",\"Zoom\":\"ズーム\",\"Zoom Blur\":\"ズームぼかし\",\"Zoom In\":\"ズームイン\",\"Zoom Out\":\"ズームアウトする\",\"Zoom blur\":\"ズームブラー\",\"Zoom in\":\"ズームイン\",\"Zoom out\":\"ズームアウトする\",\"Zoom:\":\"ズーム：\"}");

/***/ }),

/***/ "./src/js/languages/ko.json":
/*!**********************************!*\
  !*** ./src/js/languages/ko.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"약\",\"Active\":\"유효한\",\"Advanced\":\"많은\",\"All\":\"모든\",\"Alpha:\":\"알파 :\",\"Anonymous\":\"익명\",\"Anti aliasing\":\"안티 앨리어싱\",\"Arial\":\"Arial\",\"Arrow\":\"화살\",\"Author:\":\"저자:\",\"Auto adjust colors\":\"색상 자동 조정\",\"Average:\":\"평균:\",\"BMP - Windows Bitmap\":\"BMP - Windows 비트 맵\",\"Base\":\"베이스\",\"Basic\":\"기본\",\"Black and White\":\"검정색과 흰색\",\"Blue\":\"푸른\",\"Blue channel:\":\"파란색 채널 :\",\"Blue:\":\"푸른:\",\"Blur Radius:\":\"흐리게 반경 :\",\"Blur power:\":\"흐림 효과 :\",\"Blur tool\":\"블러 도구\",\"Bold\":\"대담한\",\"Bold Italic\":\"굵은 기울임 꼴\",\"Borders\":\"테두리\",\"Box Blur\":\"상자 흐림 효과\",\"Box blur\":\"상자 흐림 효과\",\"Brightness\":\"명도\",\"Brightness:\":\"명도:\",\"Brush\":\"브러시\",\"Bulge/Pinch tool\":\"벌지 / 핀치 도구\",\"Burn\":\"화상\",\"CSS filters\":\"CSS 필터\",\"Can not animate 1 layer.\":\"1 개의 레이어를 애니메이션으로 만들 수 없습니다.\",\"Can not find previous layer.\":\"이전 레이어를 찾을 수 없습니다.\",\"Cancel\":\"취소\",\"Center\":\"센터\",\"Center x:\":\"센터 x :\",\"Center y:\":\"센터 y :\",\"Center:\":\"센터:\",\"Channel:\":\"채널:\",\"Circle\":\"원\",\"Clear\":\"명확한\",\"Clone count:\":\"클론 횟수 :\",\"Clone tool\":\"복제 도구\",\"Cloned edges\":\"복제 된 가장자리\",\"Color #\":\"색깔 #\",\"Color Zoom\":\"색상 확대 / 축소\",\"Color alpha value can not be zero.\":\"색상 알파 값은 0 일 수 없습니다.\",\"Color corrections\":\"색상 보정\",\"Color palette\":\"색상 팔레트\",\"Color to alpha\":\"알파에서 색상으로\",\"Color zoom\":\"색상 확대 / 축소\",\"Color:\":\"색깔:\",\"Colors\":\"그림 물감\",\"Colors:\":\"그림 물감:\",\"Composition\":\"구성\",\"Composition:\":\"구성:\",\"Content fill\":\"콘텐츠 채우기\",\"Contrast\":\"대조\",\"Contrast:\":\"대조:\",\"Convert to raster\":\"래스터로 변환\",\"Copy selection\":\"선택 항목 복사\",\"Copy:\":\"부:\",\"Courier\":\"급사\",\"Crop\":\"수확고\",\"Ctrl+V\":\"Ctrl + V\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"흐름\",\"Curve\":\"곡선\",\"Custom\":\"관습\",\"Data URL\":\"데이터 URL\",\"Data URL:\":\"데이터 URL :\",\"Decrease color depth\":\"색상 심도 감소\",\"Default\":\"태만\",\"Degree:\":\"정도:\",\"Del\":\"델\",\"Delete\":\"지우다\",\"Delete selection\":\"선택 항목 삭제\",\"Denoise\":\"데니스 이스\",\"Desaturate\":\"불포화\",\"Description:\":\"기술:\",\"Differences\":\"차이점\",\"Differences Down\":\"차이점\",\"Dither\":\"떨림\",\"Dithering:\":\"디더링 :\",\"Dominant color:\":\"주된 색깔 :\",\"Dot Screen\":\"도트 스크린\",\"Down\":\"하위\",\"Duplicate\":\"복제\",\"Edge\":\"가장자리\",\"Edit\":\"편집하다\",\"Edit text\":\"텍스트 수정\",\"Edit text...\":\"텍스트 수정 ...\",\"Effects\":\"효과\",\"Email:\":\"이메일:\",\"Emboss\":\"엠보싱\",\"Empty selection\":\"빈 선택\",\"Empty selection or type not image.\":\"이미지를 선택하지 않거나 입력하지 마십시오.\",\"English\":\"영어\",\"Enrich\":\"높이다\",\"Erase\":\"삭제\",\"Erase on rotate object is disabled. Sorry.\":\"회전 객체에서 지우기가 비활성화됩니다. 죄송합니다.\",\"Error\":\"오류\",\"Error connecting to service.\":\"서비스에 연결하는 중 오류가 발생했습니다.\",\"Error: can not load image.\":\"오류 : 이미지를로드 할 수 없습니다.\",\"Error: missing details event target\":\"오류 : 세부 정보 이벤트 대상이 누락되었습니다.\",\"Error: unsupported attribute type:\":\"오류 : 지원되지 않는 속성 유형 :\",\"Error: wrong key:\":\"오류 : 잘못된 키 :\",\"Español\":\"스페인어\",\"Expand edges\":\"가장자리 확장\",\"Exponent:\":\"멱지수:\",\"Factor:\":\"인자:\",\"File\":\"파일\",\"File name:\":\"파일 이름:\",\"File size:\":\"파일 크기 :\",\"Fill\":\"가득 따르다\",\"Fit\":\"적당한\",\"Fit window\":\"창에 맞추기\",\"Flatten Image\":\"납작한 이미지\",\"Flip\":\"튀기다\",\"FloydSteinberg-serpentine\":\"FloydSteinberg- 사문석\",\"French\":\"프랑스 국민\",\"Full HD, 1080p\":\"풀 HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - 그래픽 교환 형식\",\"Gap:\":\"갭:\",\"Gaussian Blur\":\"가우스 흐림\",\"German\":\"독일 사람\",\"Gif delay:\":\"GIF 지연 :\",\"GitHub:\":\"GitHub :\",\"Gradient\":\"구배\",\"Gradient Radius:\":\"기울기 반경 :\",\"Grains\":\"작살\",\"Gray\":\"회색\",\"Grayscale\":\"그레이 스케일\",\"Green\":\"녹색\",\"Green channel:\":\"녹색 통로:\",\"Green:\":\"녹색:\",\"Greyscale:\":\"그레이 스케일 :\",\"Grid\":\"그리드\",\"Grid on/off\":\"그리드 켜기 / 끄기\",\"H Radius:\":\"H 반경 :\",\"Heatmap\":\"히트 맵\",\"Height (%):\":\"높이 (%) :\",\"Height:\":\"신장:\",\"Help\":\"도움\",\"Helvetica\":\"헬 베티 카\",\"Hermite\":\"허 마이트\",\"Hex:\":\"마녀:\",\"Histogram\":\"히스토그램\",\"Histogram:\":\"히스토그램 :\",\"Horizontal\":\"수평\",\"Horizontal blur:\":\"가로 흐리게 :\",\"Hue Rotate\":\"색조 회전\",\"Hue:\":\"색조:\",\"Image\":\"영상\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"다중 레이어가있는 이미지 데이터. miniPaint를 사용하여 열 수 있습니다 -\",\"Impact\":\"충격\",\"Information\":\"정보\",\"Insert:\":\"끼워 넣다:\",\"Italiano\":\"이탈리아어\",\"Italic\":\"이탤릭체\",\"JPG - JPG/JPEG Format\":\"JPG - JPG / JPEG 형식\",\"JPG, WEBP quality:\":\"JPG, WEBP 품질 :\",\"JSON - Full layers data\":\"JSON - 전체 레이어 데이터\",\"Japanese\":\"일본어\",\"Key-points\":\"키 포인트\",\"Keyboard Shortcuts\":\"키보드 단축키\",\"Keyword:\":\"예어:\",\"Korean\":\"한국어\",\"Language\":\"언어\",\"Last modified\":\"최종 수정일\",\"Layer details\":\"레이어 세부 정보\",\"Layer is already image.\":\"레이어는 이미 이미지입니다.\",\"Layer must be image, convert it to raster to apply this tool.\":\"레이어는 이미지 여야하며이 도구를 적용하려면 래스터로 변환해야합니다.\",\"Layers\":\"레이어\",\"Layers:\":\"레이어 :\",\"Left\":\"왼쪽\",\"Level:\":\"수평:\",\"Levels:\":\"레벨 :\",\"Lietuvių\":\"Lietuvių\",\"Line\":\"선\",\"Lum:\":\"Lum :\",\"Luminance:\":\"휘도 :\",\"Magic Wand Tool\":\"마법 지팡이 도구\",\"Merge Down\":\"병합\",\"Merged\":\"병합 됨\",\"Mode:\":\"방법:\",\"Module function not found.\":\"모듈 기능을 찾을 수 없습니다.\",\"Modules class not found:\":\"모듈 클래스를 찾을 수 없음 :\",\"Mosaic\":\"모자이크\",\"Mouse:\":\"쥐:\",\"Move\":\"움직임\",\"Move down\":\"아래로 이동\",\"Move up\":\"이동\",\"Name:\":\"이름:\",\"Needs at least 2 layers.\":\"최소한 2 개의 레이어가 필요합니다.\",\"Negative\":\"부정\",\"New\":\"새로운\",\"New file\":\"새로운 파일\",\"New from selection\":\"선택 항목의 새로운 기능\",\"New layer\":\"새 레이어\",\"New width can not be smaller then current width\":\"새 너비는 현재 너비보다 작을 수 없습니다.\",\"Normal\":\"표준\",\"Nothing is selected.\":\"아무것도 선택되지 않았습니다.\",\"Offset X:\":\"오프셋 X :\",\"Offset Y:\":\"오프셋 Y :\",\"Oil\":\"기름\",\"Ok\":\"승인\",\"Online image editor.\":\"온라인 이미지 편집기.\",\"Opacity\":\"불투명\",\"Opacity:\":\"불투명:\",\"Open\":\"열다\",\"Open Data URL\":\"공개 데이터 URL\",\"Open Directory\":\"오픈 디렉토리\",\"Open File\":\"파일 열기\",\"Open URL\":\"URL 열기\",\"Open data URL\":\"공개 데이터 URL\",\"Original size\":\"원본 크기\",\"PNG - Portable Network Graphics\":\"PNG - 휴대용 네트워크 그래픽\",\"Palette\":\"팔레트\",\"Parameter #1:\":\"매개 변수 # 1 :\",\"Parameter #2:\":\"매개 변수 # 2 :\",\"Paste\":\"풀\",\"Pencil\":\"연필\",\"Percentage:\":\"백분율:\",\"Pick Color\":\"색상 선택\",\"Pixels:\":\"픽셀 :\",\"Play animation\":\"애니메이션 재생\",\"Portuguese\":\"포르투갈 인\",\"Power:\":\"힘:\",\"Powred by  pixabay.com .\":\"pixabay.com의 Powred.\",\"Pre-Blur:\":\"사전 흐림 효과 :\",\"Preview\":\"시사\",\"Previous\":\"너무 이른\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"이전 레이어는 이미지 여야하며이 도구를 적용하려면 래스터로 변환해야합니다.\",\"Print\":\"인쇄\",\"Quality:\":\"품질:\",\"Quick load\":\"빠른로드\",\"Quick save\":\"빠른 저장\",\"Radial\":\"방사형\",\"Radial gradient\":\"방사형 그래디언트\",\"Radius:\":\"반지름:\",\"Range:\":\"범위:\",\"Rectangle\":\"구형\",\"Red\":\"빨간\",\"Red channel:\":\"적색 통로:\",\"Red:\":\"빨간:\",\"Rename\":\"이름 바꾸기\",\"Replace Color\":\"색상 바꾸기\",\"Replace color\":\"색상 바꾸기\",\"Replacement:\":\"바꿔 놓음:\",\"Report issues\":\"문제 신고\",\"Resample - Hermite\":\"리 샘플 - Hermite\",\"Reset\":\"다시 놓기\",\"Reset zoom level\":\"확대 / 축소 레벨 재설정\",\"Resize\":\"크기 조정\",\"Resized as background\":\"배경으로 크기 조정\",\"Resolution:\":\"해결:\",\"Restore alpha\":\"알파 복원\",\"Right\":\"권리\",\"Right angle:\":\"직각:\",\"Rotate\":\"회전\",\"Rotate is not supported on this type of object. Convert to raster?\":\"회전은이 유형의 객체에서 지원되지 않습니다. 래스터로 변환 하시겠습니까?\",\"Rotate left\":\"왼쪽으로 회전\",\"Rotate:\":\"회전 :\",\"Russian\":\"러시아인\",\"Sat:\":\"토 :\",\"Saturate\":\"가득한\",\"Saturation:\":\"포화:\",\"Save\":\"구하다\",\"Save as\":\"다른 이름으로 저장\",\"Save as data URL\":\"데이터 URL로 저장\",\"Save as type:\":\"유형으로 저장 :\",\"Save layers:\":\"레이어 저장 :\",\"Save resolution:\":\"해상도 절약 :\",\"Scroll down\":\"아래로 스크롤\",\"Scroll up\":\"스크롤\",\"Search\":\"수색\",\"Search images\":\"이미지 검색\",\"Select all\":\"모두 선택\",\"Select object tool\":\"오브젝트 도구 선택\",\"Selected\":\"선택된\",\"Selection\":\"선택\",\"Sensitivity:\":\"감광도:\",\"Sepia\":\"세피아\",\"Settings\":\"설정\",\"Shadow\":\"그림자\",\"Shadow:\":\"그림자:\",\"Sharpen\":\"갈다\",\"Sharpen tool\":\"선명 도구\",\"Sharpen:\":\"갈다:\",\"Show / Hide\":\"표시 / 숨기기\",\"Show file size:\":\"파일 크기 표시 :\",\"Simple\":\"단순한\",\"Size\":\"크기\",\"Size is too big, max\":\"크기가 너무 큽니다.\",\"Size:\":\"크기:\",\"Skip - layer must be image.\":\"건너 뛰기 - 레이어가 이미지 여야합니다.\",\"Solarize\":\"솔라 이즈\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"죄송합니다. 이미지를로드 할 수 없습니다. 이미지 복사 및 붙여 넣기를 시도하십시오.\",\"Sorry, image is too big, max 5 MB.\":\"죄송합니다. 이미지가 너무 크고 최대 5MB입니다.\",\"Source is empty, right click on image to save source position.\":\"소스가 비어 있습니다. 소스 위치를 저장하려면 이미지를 마우스 오른쪽 버튼으로 클릭하십시오.\",\"Sprites\":\"스프라이트\",\"Square\":\"광장\",\"Strength:\":\"힘:\",\"Strict\":\"엄격한\",\"Stroke\":\"행정\",\"Stroke:\":\"행정:\",\"Target:\":\"목표:\",\"Text\":\"본문\",\"Text example\":\"텍스트 예제\",\"Text:\":\"본문:\",\"There are no layers behind.\":\"뒤에 레이어가 없습니다.\",\"There is only 1 layer.\":\"단 하나의 레이어가 있습니다.\",\"Tilt Shift\":\"경사 변화\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"비녀장\",\"Tools\":\"도구들\",\"Tools class not found:\":\"도구 클래스를 찾을 수 없음 :\",\"Total pixels:\":\"총 픽셀 수 :\",\"Translate\":\"옮기다\",\"Translate error, can not find dictionary:\":\"번역 오류, 사전을 찾을 수 없음 :\",\"Transparency background:\":\"투명도 배경 :\",\"Transparent:\":\"투명한:\",\"Trim\":\"손질\",\"Trim everything:\":\"모든 것을 다듬습니다 :\",\"Trim layer:\":\"레이어 다듬기 :\",\"Trim white color?\":\"흰색을 다듬을까요?\",\"Turkish\":\"터키어\",\"Undo\":\"끄르다\",\"Undo disabled.\":\"실행 취소가 해제되었습니다.\",\"Undo enabled.\":\"실행 취소가 활성화되었습니다.\",\"Undo is not available.\":\"실행 취소를 사용할 수 없습니다.\",\"Undo levels changed to 1.\":\"실행 취소 수준이 1로 변경되었습니다.\",\"Undo levels restored to\":\"복원 된 실행 취소 수준\",\"Unique colors:\":\"독특한 색상 :\",\"Up\":\"쪽으로\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Ctrl + V 키보드 단축키를 사용하여 클립 보드에서 붙여 넣기하십시오.\",\"V Radius:\":\"V 반경 :\",\"Verdana\":\"Verdana\",\"Version:\":\"번역:\",\"Vertical\":\"수직선\",\"Vertical blur:\":\"수직 흐림 효과 :\",\"Vibrance\":\"활기찬\",\"Vignette\":\"삽화\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"포도 수확\",\"Visible:\":\"명백한:\",\"WEBP - Weppy File Format\":\"WEBP - 위피 파일 형식\",\"Website:\":\"웹 사이트 :\",\"Width (%):\":\"너비 (%) :\",\"Width:\":\"폭:\",\"Wrong file type, must be image or json.\":\"잘못된 파일 유형. 이미지 또는 json이어야합니다.\",\"X end:\":\"X 끝 :\",\"X position:\":\"X 위치 :\",\"X start:\":\"X 시작 :\",\"Y end:\":\"Y 끝 :\",\"Y position:\":\"Y 위치 :\",\"Y start:\":\"Y 시작 :\",\"You can also drag and drop items into browser.\":\"항목을 브라우저로 끌어다 놓을 수도 있습니다.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"브라우저가 캔버스를 지원하지 않거나 JavaScript가 활성화되어 있지 않습니다.\",\"Your browser does not support this format.\":\"브라우저가이 형식을 지원하지 않습니다.\",\"Your search did not match any images.\":\"검색어와 일치하는 이미지가 없습니다.\",\"Zoom\":\"줌\",\"Zoom Blur\":\"줌 블러\",\"Zoom In\":\"확대\",\"Zoom Out\":\"축소\",\"Zoom blur\":\"줌 흐림 효과\",\"Zoom in\":\"확대\",\"Zoom out\":\"축소\",\"Zoom:\":\"줌:\"}");

/***/ }),

/***/ "./src/js/languages/lt.json":
/*!**********************************!*\
  !*** ./src/js/languages/lt.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"Apie\",\"Active\":\"Aktyvus\",\"Advanced\":\"Pažangus\",\"All\":\"Visi\",\"Alpha:\":\"Alfa:\",\"Anonymous\":\"Anoniminis\",\"Anti aliasing\":\"Sulieti\",\"Arial\":\"Arial\",\"Arrow\":\"Rodyklė\",\"Author:\":\"Autorius:\",\"Auto adjust colors\":\"Sureguliuoti spalvas\",\"Average:\":\"Vidurkis:\",\"BMP - Windows Bitmap\":\"BMP - Windows Bitmap\",\"Base\":\"Bazė\",\"Basic\":\"Paprastas\",\"Black and White\":\"Juoda ir balta\",\"Blue\":\"Mėlynas\",\"Blue channel:\":\"Mėlyna kanalas:\",\"Blue:\":\"Mėlyna:\",\"Blur Radius:\":\"Migla spindulys:\",\"Blur power:\":\"Blur stiprumas:\",\"Blur tool\":\"Migla įrankis\",\"Bold\":\"Bold\",\"Bold Italic\":\"Bold Italic\",\"Borders\":\"Ribojasi\",\"Box Blur\":\"Box Blur\",\"Box blur\":\"Langelis blur\",\"Brightness\":\"Ryškumas\",\"Brightness:\":\"Ryškumas:\",\"Brush\":\"Šepetys\",\"Bulge/Pinch tool\":\"Bumbulas/Žiupsnelis\",\"Burn\":\"Deginti\",\"CSS filters\":\"CSS filtrai\",\"Can not animate 1 layer.\":\"Negalima animuoti 1 sluoksniu.\",\"Can not find previous layer.\":\"Negaliu rasti ankstesnio sluoksnio.\",\"Cancel\":\"Atšaukti\",\"Center\":\"Centras\",\"Center x:\":\"Centras x:\",\"Center y:\":\"Centras y:\",\"Center:\":\"Centras:\",\"Channel:\":\"Kanalas:\",\"Circle\":\"Ratas\",\"Clear\":\"Aiškus\",\"Clone count:\":\"Klonų skaičius:\",\"Clone tool\":\"Klonas įrankis\",\"Cloned edges\":\"Klonuoti kraštai\",\"Color #\":\"Spalva #\",\"Color Zoom\":\"Spalvų mastelio keitimas\",\"Color alpha value can not be zero.\":\"Spalvų alfa vertė negali būti lygi nuliui.\",\"Color corrections\":\"Spalvų korekcijos\",\"Color palette\":\"Spalvų paletė\",\"Color to alpha\":\"Spalva alfa\",\"Color zoom\":\"Spalvų priartinimas\",\"Color:\":\"Spalva:\",\"Colors\":\"Spalvos\",\"Colors:\":\"Spalvos:\",\"Composition\":\"Kompozicija\",\"Composition:\":\"Sudėtis:\",\"Content fill\":\"Turinio užpildymas\",\"Contrast\":\"Kontrastas\",\"Contrast:\":\"Kontrastas:\",\"Convert to raster\":\"Konvertuoti į rastrą\",\"Copy selection\":\"Kopijuoti pasirinkimą\",\"Copy:\":\"Kopijuoti:\",\"Courier\":\"Courier\",\"Crop\":\"Iškirpti\",\"Ctrl+V\":\"Ctrl + v\",\"Ctrl-P\":\"Ctrl-p\",\"Current\":\"Dabartinis\",\"Curve\":\"Kreivė\",\"Custom\":\"Kitas\",\"Data URL\":\"Duomenų adresas\",\"Data URL:\":\"Duomenų adresas:\",\"Decrease color depth\":\"Sumažinti spalvų gylį\",\"Default\":\"Numatytas\",\"Degree:\":\"Laipsnis:\",\"Del\":\"Del\",\"Delete\":\"Ištrinti\",\"Delete selection\":\"Ištrinti pasirinkimą\",\"Denoise\":\"Sumažinti triukšmą\",\"Desaturate\":\"Sumažinti ryškumą\",\"Description:\":\"Aprašymas:\",\"Differences\":\"Skirtumai\",\"Differences Down\":\"Skirtumai žemyn\",\"Dither\":\"Papildymas\",\"Dithering:\":\"Papildymu:\",\"Dominant color:\":\"Dominuojanti spalva:\",\"Dot Screen\":\"Taškų ekranas\",\"Down\":\"Žemyn\",\"Duplicate\":\"Pasikartojantis\",\"Edge\":\"Kraštas\",\"Edit\":\"Redaguoti\",\"Edit text\":\"Redaguoti tekstą\",\"Edit text...\":\"Redaguoti tekstą ...\",\"Effects\":\"Efektai\",\"Email:\":\"El. paštas:\",\"Emboss\":\"Įspausti\",\"Empty selection\":\"Tuščias pasirinkimas\",\"Empty selection or type not image.\":\"Tuščias pasirinkimas arba įveskite ne vaizdą.\",\"English\":\"Anglų\",\"Enrich\":\"Praturtinti\",\"Erase\":\"Ištrinti\",\"Erase on rotate object is disabled. Sorry.\":\"Ištrinti objektą pasukti yra išjungtas. atsiprašau\",\"Error\":\"Klaida\",\"Error connecting to service.\":\"Klaida prisijungiant prie paslaugos.\",\"Error: can not load image.\":\"Klaida: negalima įkelti paveikslėlio.\",\"Error: missing details event target\":\"Klaida: trūksta detalių įvykio tikslo\",\"Error: unsupported attribute type:\":\"Klaida: nepalaikomas atributo tipas:\",\"Error: wrong key:\":\"Klaida: klaidingas raktas:\",\"Español\":\"Español\",\"Expand edges\":\"Išskleiskite kraštus\",\"Exponent:\":\"Eksponentė:\",\"Factor:\":\"Veiksnys:\",\"File\":\"Failas\",\"File name:\":\"Failo pavadinimas:\",\"File size:\":\"Failo dydis:\",\"Fill\":\"Pildyti\",\"Fit\":\"Talpinti\",\"Fit window\":\"Tinkamas langas\",\"Flatten Image\":\"Išlyginti vaizdą\",\"Flip\":\"Apversti\",\"FloydSteinberg-serpentine\":\"Floydsteinberg-serpentinas\",\"French\":\"Prancūzų kalba\",\"Full HD, 1080p\":\"Full HD, 1080p\",\"GIF - Graphics Interchange Format\":\"Gif - grafikos mainų formatas\",\"Gap:\":\"Atotrūkis:\",\"Gaussian Blur\":\"Gauso suliejimo\",\"German\":\"Vokiečių kalba\",\"Gif delay:\":\"Gif delsimas:\",\"GitHub:\":\"Github:\",\"Gradient\":\"Gradientas\",\"Gradient Radius:\":\"Gradientas spindulys:\",\"Grains\":\"Grūdėtumas\",\"Gray\":\"Pilkas\",\"Grayscale\":\"Pelės skalė\",\"Green\":\"Žalias\",\"Green channel:\":\"Žalias kanalas:\",\"Green:\":\"Žalias:\",\"Greyscale:\":\"Pilkieji pustoniai:\",\"Grid\":\"Tinklelis\",\"Grid on/off\":\"Tinklelis\",\"H Radius:\":\"H spindulys:\",\"Heatmap\":\"Spalvinė diagrama\",\"Height (%):\":\"Aukštis (%):\",\"Height:\":\"Aukštis:\",\"Help\":\"Pagalba\",\"Helvetica\":\"Helvetica\",\"Hermite\":\"Hermite\",\"Hex:\":\"Hex:\",\"Histogram\":\"Histograma\",\"Histogram:\":\"Histograma:\",\"Horizontal\":\"Horizontali\",\"Horizontal blur:\":\"Horizontalus miglotas vaizdas:\",\"Hue Rotate\":\"Atspalvis pasukti\",\"Hue:\":\"Atspalvis:\",\"Image\":\"Vaizdas\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Vaizdo duomenys su kelių sluoksnių. gali būti atidarytas naudojant minipaint -\",\"Impact\":\"Poveikis\",\"Information\":\"Informacija\",\"Insert:\":\"Įdėti:\",\"Italiano\":\"Italų kalba\",\"Italic\":\"Italic\",\"JPG - JPG/JPEG Format\":\"JPG - JPG/JPEG formatas\",\"JPG, WEBP quality:\":\"Jpg, webp kokybės:\",\"JSON - Full layers data\":\"JSON - sluoksnių duomenys\",\"Japanese\":\"Japonų kalba\",\"Key-points\":\"Pagrindiniai klausimai\",\"Keyboard Shortcuts\":\"Klaviatūros nuorodos\",\"Keyword:\":\"Raktinis žodis:\",\"Korean\":\"Korėjiečių kalba\",\"Language\":\"Kalba\",\"Last modified\":\"Paskutinį kartą keistas\",\"Layer details\":\"Sluoksnio detalės\",\"Layer is already image.\":\"Sluoksnis jau yra vaizdas.\",\"Layer must be image, convert it to raster to apply this tool.\":\"Sluoksnis turi būti įvaizdis, paversti jį rastru, kad pritaikytų šį įrankį.\",\"Layers\":\"Sluoksniai\",\"Layers:\":\"Sluoksniai:\",\"Left\":\"Kairėje\",\"Level:\":\"Lygis:\",\"Levels:\":\"Lygiais:\",\"Lietuvių\":\"Lietuvių\",\"Line\":\"Linija\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Skaisčio:\",\"Magic Wand Tool\":\"Stebuklinga lazdelė\",\"Merge Down\":\"Sujungti žemyn\",\"Merged\":\"Sujungta\",\"Mode:\":\"Režimas:\",\"Module function not found.\":\"Modulio funkcija nerasta.\",\"Modules class not found:\":\"Modulio klasė nerasta:\",\"Mosaic\":\"Mozaika\",\"Mouse:\":\"Pelė:\",\"Move\":\"Perkelti\",\"Move down\":\"Judėti žemyn\",\"Move up\":\"Perkelti\",\"Name:\":\"Vardas:\",\"Needs at least 2 layers.\":\"Reikia bent 2 sluoksnius.\",\"Negative\":\"Neigiamas\",\"New\":\"Naujas\",\"New file\":\"Naujas failas\",\"New from selection\":\"Nauja iš pasirinkimo\",\"New layer\":\"Nauja sluoksnis\",\"New width can not be smaller then current width\":\"Naujas plotis negali būti mažesnis nei dabartinis plotis\",\"Normal\":\"Normalus\",\"Nothing is selected.\":\"Niekas nėra pasirinktas.\",\"Offset X:\":\"Nuokrypis x:\",\"Offset Y:\":\"Kompensuoti:\",\"Oil\":\"Aliejus\",\"Ok\":\"Gerai\",\"Online image editor.\":\"Internetinis vaizdo redaktorius.\",\"Opacity\":\"Nepermatomumas\",\"Opacity:\":\"Nepermatomumas:\",\"Open\":\"Atidaryti\",\"Open Data URL\":\"Atidaryti duomenų URL\",\"Open Directory\":\"Atidaryti katalogą\",\"Open File\":\"Atidaryti failą\",\"Open URL\":\"Atidaryti url\",\"Open data URL\":\"Atidaryti duomenų url\",\"Original size\":\"Originalus dydis\",\"PNG - Portable Network Graphics\":\"PNG - portable network graphics\",\"Palette\":\"Paletė\",\"Parameter #1:\":\"Parametras Nr. 1:\",\"Parameter #2:\":\"Parametras # 2:\",\"Paste\":\"Įkelti\",\"Pencil\":\"Pieštukas\",\"Percentage:\":\"Procentas:\",\"Pick Color\":\"Pasirinkite spalvą\",\"Pixels:\":\"Taškai:\",\"Play animation\":\"Groti animaciją\",\"Portuguese\":\"Portugalų\",\"Power:\":\"Galia:\",\"Powred by  pixabay.com .\":\"Powred by pixabay.com.\",\"Pre-Blur:\":\"Migla:\",\"Preview\":\"Peržiūrėti\",\"Previous\":\"Ankstesnis\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"Ankstesnis sluoksnis turi būti vaizdas, konvertuoti jį į rastrą, kad būtų taikomas šis įrankis.\",\"Print\":\"Spausdinti\",\"Quality:\":\"Kokybė:\",\"Quick load\":\"Greitas įkrovimas\",\"Quick save\":\"Greitas išsaugojimas\",\"Radial\":\"Radialinis\",\"Radial gradient\":\"Radialinis gradientas\",\"Radius:\":\"Spindulys:\",\"Range:\":\"Kategorijos:\",\"Rectangle\":\"Stačiakampis\",\"Red\":\"Raudonas\",\"Red channel:\":\"Raudonasis kanalas:\",\"Red:\":\"Raudona:\",\"Rename\":\"Pervadinti\",\"Replace Color\":\"Pakeiskite spalvą\",\"Replace color\":\"Pakeiskite spalvą\",\"Replacement:\":\"Pakeitimas:\",\"Report issues\":\"Pranešti apie problemas\",\"Resample - Hermite\":\"Resample - hermite\",\"Reset\":\"Atstatyti\",\"Reset zoom level\":\"Atstatyti mastelį\",\"Resize\":\"Keisti dydį\",\"Resized as background\":\"Pakeista kaip fonas\",\"Resolution:\":\"Rezoliucija:\",\"Restore alpha\":\"Atkurti alfa\",\"Right\":\"Teisingai\",\"Right angle:\":\"Dešinysis kampas:\",\"Rotate\":\"Sukti\",\"Rotate is not supported on this type of object. Convert to raster?\":\"Šio tipo objektuose nepavyksta pakeisti rotacijos. konvertuoti į rastrą?\",\"Rotate left\":\"Pasukti į kairę\",\"Rotate:\":\"Pasukti:\",\"Russian\":\"Rusų kalba\",\"Sat:\":\"Sat:\",\"Saturate\":\"Saturate\",\"Saturation:\":\"Spalvingumas:\",\"Save\":\"Išsaugoti\",\"Save as\":\"Išsaugoti kaip\",\"Save as data URL\":\"Išsaugoti kaip duomenų URL\",\"Save as type:\":\"Išsaugoti kaip:\",\"Save layers:\":\"Išsaugoti sluoksnius:\",\"Save resolution:\":\"Išsaugoti rezoliuciją:\",\"Scroll down\":\"Slinkti žemyn\",\"Scroll up\":\"Slinkite aukštyn\",\"Search\":\"Paieška\",\"Search images\":\"Ieškoti vaizdų\",\"Select all\":\"Pasirinkti viską\",\"Select object tool\":\"Pasirinkite objektas įrankis\",\"Selected\":\"Pasirinkti\",\"Selection\":\"Pasirinkimas\",\"Sensitivity:\":\"Jautrumas:\",\"Sepia\":\"Sepia\",\"Settings\":\"Nustatymai\",\"Shadow\":\"Šešėlis\",\"Shadow:\":\"Šešėlis:\",\"Sharpen\":\"Pagaląsti\",\"Sharpen tool\":\"Paryškinti nuorodą\",\"Sharpen:\":\"Paryškinti:\",\"Show / Hide\":\"Rodyti Slėpti\",\"Show file size:\":\"Rodyti failo dydį:\",\"Simple\":\"Paprastas\",\"Size\":\"Dydis\",\"Size is too big, max\":\"Dydis yra per didelis, maks\",\"Size:\":\"Dydis:\",\"Skip - layer must be image.\":\"Praleisti - sluoksnis turi būti vaizdas.\",\"Solarize\":\"Soliarizacija\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"Deja, vaizdas negali būti įkeltas. pabandykite kopijuoti nuotrauką ir įklijuoti ją.\",\"Sorry, image is too big, max 5 MB.\":\"Atsiprašome, vaizdas yra per didelis, daugiausiai 5 MB.\",\"Source is empty, right click on image to save source position.\":\"Šaltinis yra tuščias, dešiniuoju pelės mygtuku spustelėkite vaizdą, kad išsaugotumėte šaltinio poziciją.\",\"Sprites\":\"Sprites\",\"Square\":\"Langelis\",\"Strength:\":\"Jėga:\",\"Strict\":\"Griežtas\",\"Stroke\":\"Insultas\",\"Stroke:\":\"Insultas:\",\"Target:\":\"Tikslas:\",\"Text\":\"Tekstas\",\"Text example\":\"Teksto pavyzdys\",\"Text:\":\"Tekstas:\",\"There are no layers behind.\":\"Už sluoksnių nėra.\",\"There is only 1 layer.\":\"Yra tik 1 sluoksnis.\",\"Tilt Shift\":\"Tento perkelimas\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"Perjungti\",\"Tools\":\"Įrankiai\",\"Tools class not found:\":\"Įrankių klasė nerasta:\",\"Total pixels:\":\"Iš viso taškų:\",\"Translate\":\"Versti\",\"Translate error, can not find dictionary:\":\"Versti klaidą, negali rasti žodyną:\",\"Transparency background:\":\"Skaidrumo fonas:\",\"Transparent:\":\"Skaidri:\",\"Trim\":\"Apkarpyti\",\"Trim everything:\":\"Trim viską:\",\"Trim layer:\":\"Trim sluoksnis:\",\"Trim white color?\":\"Trim balta spalva?\",\"Turkish\":\"Turkų kalba\",\"Undo\":\"Anuliuoti\",\"Undo disabled.\":\"Atšaukti išjungta.\",\"Undo enabled.\":\"Atšaukti įjungta.\",\"Undo is not available.\":\"Atšaukti negalima.\",\"Undo levels changed to 1.\":\"Atšaukti lygiai pakeista į 1.\",\"Undo levels restored to\":\"Atšaukti lygius atkurti\",\"Unique colors:\":\"Unikalios spalvos:\",\"Up\":\"Aukštyn\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Naudokite \\\"ctrl + v\\\" spartieji klavišai, kuriuos norite įklijuoti iš iškarpinės.\",\"V Radius:\":\"V spindulys:\",\"Verdana\":\"Verdana\",\"Version:\":\"Versija:\",\"Vertical\":\"Vertikalus\",\"Vertical blur:\":\"Vertikalus plyšimas:\",\"Vibrance\":\"Rezonansas\",\"Vignette\":\"Vinjetė\",\"ViliusL\":\"Viliusl\",\"Vintage\":\"Senoviškas\",\"Visible:\":\"Matomas:\",\"WEBP - Weppy File Format\":\"WEBP - weppy failo formatas\",\"Website:\":\"Interneto svetainė:\",\"Width (%):\":\"Plotis (%):\",\"Width:\":\"Plotis:\",\"Wrong file type, must be image or json.\":\"Neteisingas failo tipas, turi būti paveikslėlis arba json.\",\"X end:\":\"X pabaiga:\",\"X position:\":\"X pozicija:\",\"X start:\":\"X pradžia::\",\"Y end:\":\"Y pabaiga:\",\"Y position:\":\"Y pozicija:\",\"Y start:\":\"Y pradžia:\",\"You can also drag and drop items into browser.\":\"Taip pat galite vilkti elementus į naršyklę.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Jūsų naršyklė nepalaiko drobės ar javascript nėra įjungtas.\",\"Your browser does not support this format.\":\"Jūsų naršyklė nepalaiko šio formato.\",\"Your search did not match any images.\":\"Jūsų paieška neatitiko jokių vaizdų.\",\"Zoom\":\"Zoom\",\"Zoom Blur\":\"Zoom Blur\",\"Zoom In\":\"Priartinti\",\"Zoom Out\":\"Nutolinti\",\"Zoom blur\":\"Padidinti blur\",\"Zoom in\":\"Priartinti\",\"Zoom out\":\"Nutolinti\",\"Zoom:\":\"Priartinimas:\"}");

/***/ }),

/***/ "./src/js/languages/pt.json":
/*!**********************************!*\
  !*** ./src/js/languages/pt.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"Sobre\",\"Active\":\"Ativo\",\"Advanced\":\"Avançado\",\"All\":\"Todos\",\"Alpha:\":\"Alfa:\",\"Anonymous\":\"Anônimo\",\"Anti aliasing\":\"Anti-aliasing\",\"Arial\":\"Arial\",\"Arrow\":\"Flecha\",\"Author:\":\"Autor:\",\"Auto adjust colors\":\"Cores de ajuste automático\",\"Average:\":\"Média:\",\"BMP - Windows Bitmap\":\"BMP - Bitmap do Windows\",\"Base\":\"Base\",\"Basic\":\"Básico\",\"Black and White\":\"Preto e branco\",\"Blue\":\"Azul\",\"Blue channel:\":\"Canal azul:\",\"Blue:\":\"Azul:\",\"Blur Radius:\":\"Blur Radius:\",\"Blur power:\":\"Blur power:\",\"Blur tool\":\"Ferramenta de desfoque\",\"Bold\":\"Negrito\",\"Bold Italic\":\"Negrito itálico\",\"Borders\":\"Fronteiras\",\"Box Blur\":\"Borrão de caixa\",\"Box blur\":\"Borrão de caixa\",\"Brightness\":\"Brilho\",\"Brightness:\":\"Brilho:\",\"Brush\":\"Escova\",\"Bulge/Pinch tool\":\"Ferramenta Bulge / Pinch\",\"Burn\":\"Queimar\",\"CSS filters\":\"Filtros CSS\",\"Can not animate 1 layer.\":\"Não é possível animar 1 camada.\",\"Can not find previous layer.\":\"Não é possível encontrar a camada anterior.\",\"Cancel\":\"Cancelar\",\"Center\":\"Centro\",\"Center x:\":\"Centro x:\",\"Center y:\":\"Centro y:\",\"Center:\":\"Centro:\",\"Channel:\":\"Canal:\",\"Circle\":\"Círculo\",\"Clear\":\"Claro\",\"Clone count:\":\"Contagem de clones:\",\"Clone tool\":\"Ferramenta de clonagem\",\"Cloned edges\":\"Bordas clonadas\",\"Color #\":\"Cor #\",\"Color Zoom\":\"Zoom de cor\",\"Color alpha value can not be zero.\":\"O valor alpha colorido não pode ser zero.\",\"Color corrections\":\"Correções de cores\",\"Color palette\":\"Paleta de cores\",\"Color to alpha\":\"Cor para alfa\",\"Color zoom\":\"Zoom de cor\",\"Color:\":\"Cor:\",\"Colors\":\"Cores\",\"Colors:\":\"Cores:\",\"Composition\":\"Composição\",\"Composition:\":\"Composição:\",\"Content fill\":\"Preenchimento de conteúdo\",\"Contrast\":\"Contraste\",\"Contrast:\":\"Contraste:\",\"Convert to raster\":\"Converter em raster\",\"Copy selection\":\"Seleção de cópia\",\"Copy:\":\"Cópia de:\",\"Courier\":\"Correio\",\"Crop\":\"Colheita\",\"Ctrl+V\":\"Ctrl + V\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"Atual\",\"Curve\":\"Curva\",\"Custom\":\"personalizadas\",\"Data URL\":\"URL de dados\",\"Data URL:\":\"URL de dados:\",\"Decrease color depth\":\"Diminuir a profundidade de cor\",\"Default\":\"Padrão\",\"Degree:\":\"Grau:\",\"Del\":\"Del\",\"Delete\":\"Excluir\",\"Delete selection\":\"Eliminar seleção\",\"Denoise\":\"Denoise\",\"Desaturate\":\"Desaturar\",\"Description:\":\"Descrição:\",\"Differences\":\"Diferenças\",\"Differences Down\":\"Diferenças para baixo\",\"Dither\":\"Dither\",\"Dithering:\":\"Dithering:\",\"Dominant color:\":\"Cor dominante:\",\"Dot Screen\":\"Tela de ponto\",\"Down\":\"Baixa\",\"Duplicate\":\"Duplicado\",\"Edge\":\"Beira\",\"Edit\":\"Editar\",\"Edit text\":\"Editar texto\",\"Edit text...\":\"Editar texto...\",\"Effects\":\"Efeitos\",\"Email:\":\"O email:\",\"Emboss\":\"Em relevo\",\"Empty selection\":\"Seleção vazia\",\"Empty selection or type not image.\":\"Seleção vazia ou não digite imagem.\",\"English\":\"Inglês\",\"Enrich\":\"Enriquecer\",\"Erase\":\"Apagar\",\"Erase on rotate object is disabled. Sorry.\":\"Apagar no objeto rotativo está desabilitado. Desculpa.\",\"Error\":\"Erro\",\"Error connecting to service.\":\"Erro ao conectar-se ao serviço.\",\"Error: can not load image.\":\"Erro: não é possível carregar a imagem.\",\"Error: missing details event target\":\"Erro: detalhes faltantes alvo do evento\",\"Error: unsupported attribute type:\":\"Erro: tipo de atributo não suportado:\",\"Error: wrong key:\":\"Erro: chave errada:\",\"Español\":\"Español\",\"Expand edges\":\"Expandir bordas\",\"Exponent:\":\"Expoente:\",\"Factor:\":\"Fator:\",\"File\":\"Arquivo\",\"File name:\":\"Nome do arquivo:\",\"File size:\":\"Tamanho do arquivo:\",\"Fill\":\"Preencher\",\"Fit\":\"Em forma\",\"Fit window\":\"Janela de ajuste\",\"Flatten Image\":\"Achatar imagem\",\"Flip\":\"Giro\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-serpentine\",\"French\":\"francês\",\"Full HD, 1080p\":\"Full HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - Graphics Interchange Format\",\"Gap:\":\"Gap:\",\"Gaussian Blur\":\"Gaussian Blur\",\"German\":\"alemão\",\"Gif delay:\":\"Retardo GIF:\",\"GitHub:\":\"GitHub:\",\"Gradient\":\"Gradiente\",\"Gradient Radius:\":\"Radiação de gradiente:\",\"Grains\":\"Grãos\",\"Gray\":\"cinzento\",\"Grayscale\":\"Escala de cinza\",\"Green\":\"Verde\",\"Green channel:\":\"Canal verde:\",\"Green:\":\"Verde:\",\"Greyscale:\":\"Greyscale:\",\"Grid\":\"Grade\",\"Grid on/off\":\"Grid on / off\",\"H Radius:\":\"H Radius:\",\"Heatmap\":\"Mapa de calor\",\"Height (%):\":\"Altura (%):\",\"Height:\":\"Altura:\",\"Help\":\"Socorro\",\"Helvetica\":\"helvética\",\"Hermite\":\"Hermite\",\"Hex:\":\"Hex:\",\"Histogram\":\"Histograma\",\"Histogram:\":\"Histograma:\",\"Horizontal\":\"Horizontal\",\"Horizontal blur:\":\"Desfoque horizontal:\",\"Hue Rotate\":\"Hue Rotate\",\"Hue:\":\"Matiz:\",\"Image\":\"Imagem\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Dados de imagem com várias camadas. Pode ser aberto usando o miniPaint -\",\"Impact\":\"Impacto\",\"Information\":\"Em formação\",\"Insert:\":\"Inserir:\",\"Italiano\":\"Italiano\",\"Italic\":\"itálico\",\"JPG - JPG/JPEG Format\":\"JPG - Formato JPG / JPEG\",\"JPG, WEBP quality:\":\"JPG, qualidade WEBP:\",\"JSON - Full layers data\":\"JSON - Dados de camadas completas\",\"Japanese\":\"japonês\",\"Key-points\":\"Pontos chave\",\"Keyboard Shortcuts\":\"Atalhos do teclado\",\"Keyword:\":\"Palavra-chave:\",\"Korean\":\"coreano\",\"Language\":\"Língua\",\"Last modified\":\"Última modificação\",\"Layer details\":\"Detalhes da camada\",\"Layer is already image.\":\"Layer já é imagem.\",\"Layer must be image, convert it to raster to apply this tool.\":\"A camada deve ser imagem, converta-a em raster para aplicar esta ferramenta.\",\"Layers\":\"Camadas\",\"Layers:\":\"Camadas:\",\"Left\":\"Esquerda\",\"Level:\":\"Nível:\",\"Levels:\":\"Níveis:\",\"Lietuvių\":\"Lietuvių\",\"Line\":\"Linha\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Luminância:\",\"Magic Wand Tool\":\"Varinha mágica\",\"Merge Down\":\"Fusionar\",\"Merged\":\"Mesclado\",\"Mode:\":\"Modo:\",\"Module function not found.\":\"Função do módulo não encontrada.\",\"Modules class not found:\":\"Classe de módulos não encontrada:\",\"Mosaic\":\"mosaico\",\"Mouse:\":\"Rato:\",\"Move\":\"Mover\",\"Move down\":\"Mover para baixo\",\"Move up\":\"Subir\",\"Name:\":\"Nome:\",\"Needs at least 2 layers.\":\"Precisa de pelo menos 2 camadas.\",\"Negative\":\"Negativo\",\"New\":\"Novo\",\"New file\":\"Novo arquivo\",\"New from selection\":\"Novo da seleção\",\"New layer\":\"Nova camada\",\"New width can not be smaller then current width\":\"A nova largura não pode ser menor do que a largura atual\",\"Normal\":\"Normal\",\"Nothing is selected.\":\"Nada é selecionado.\",\"Offset X:\":\"Offset X:\",\"Offset Y:\":\"Offset Y:\",\"Oil\":\"Óleo\",\"Ok\":\"Está bem\",\"Online image editor.\":\"Editor de imagens on-line.\",\"Opacity\":\"Opacidade\",\"Opacity:\":\"Opacidade:\",\"Open\":\"Aberto\",\"Open Data URL\":\"Abrir URL de dados\",\"Open Directory\":\"Diretório aberto\",\"Open File\":\"Abrir arquivo\",\"Open URL\":\"Url aberta\",\"Open data URL\":\"Abrir URL de dados\",\"Original size\":\"Tamanho original\",\"PNG - Portable Network Graphics\":\"PNG - Gráficos de rede portátil\",\"Palette\":\"Paleta\",\"Parameter #1:\":\"Parâmetro # 1:\",\"Parameter #2:\":\"Parâmetro # 2:\",\"Paste\":\"Colar\",\"Pencil\":\"Lápis\",\"Percentage:\":\"Percentagem:\",\"Pick Color\":\"Escolha a cor\",\"Pixels:\":\"Píxeis:\",\"Play animation\":\"Jogue animação\",\"Portuguese\":\"Português\",\"Power:\":\"Poder:\",\"Powred by  pixabay.com .\":\"Powred by pixabay.com.\",\"Pre-Blur:\":\"Pré-borrão:\",\"Preview\":\"Visualização\",\"Previous\":\"Anterior\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"A camada anterior deve ser imagem, convertê-la em raster para aplicar esta ferramenta.\",\"Print\":\"Impressão\",\"Quality:\":\"Qualidade:\",\"Quick load\":\"Carga rápida\",\"Quick save\":\"Salvamento rapido\",\"Radial\":\"Radial\",\"Radial gradient\":\"Gradiente radial\",\"Radius:\":\"Raio:\",\"Range:\":\"Alcance:\",\"Rectangle\":\"Retângulo\",\"Red\":\"Vermelho\",\"Red channel:\":\"Canal vermelho:\",\"Red:\":\"Vermelho:\",\"Rename\":\"Renomear\",\"Replace Color\":\"Substituir cor\",\"Replace color\":\"Substitua a cor\",\"Replacement:\":\"Substituição:\",\"Report issues\":\"Relatar problemas\",\"Resample - Hermite\":\"Resmplemento - Hermite\",\"Reset\":\"Restabelecer\",\"Reset zoom level\":\"Redefinir o nível de zoom\",\"Resize\":\"Redimensionar\",\"Resized as background\":\"Redimensionado como plano de fundo\",\"Resolution:\":\"Resolução:\",\"Restore alpha\":\"Restaurar alfa\",\"Right\":\"Certo\",\"Right angle:\":\"Ângulo certo:\",\"Rotate\":\"Girar\",\"Rotate is not supported on this type of object. Convert to raster?\":\"Rotate não é suportado neste tipo de objeto. Converter em raster?\",\"Rotate left\":\"Vire à esquerda\",\"Rotate:\":\"Girar:\",\"Russian\":\"russo\",\"Sat:\":\"Sentou:\",\"Saturate\":\"Saturar\",\"Saturation:\":\"Saturação:\",\"Save\":\"Salve \",\"Save as\":\"Salvar como\",\"Save as data URL\":\"Salvar como URL de dados\",\"Save as type:\":\"Salvar como tipo:\",\"Save layers:\":\"Salvar camadas:\",\"Save resolution:\":\"Salvar resolução:\",\"Scroll down\":\"Rolar para baixo\",\"Scroll up\":\"Deslize para cima\",\"Search\":\"Pesquisa\",\"Search images\":\"Pesquisar imagens\",\"Select all\":\"Selecionar tudo\",\"Select object tool\":\"Selecione a ferramenta de objeto\",\"Selected\":\"Selecionado\",\"Selection\":\"Seleção\",\"Sensitivity:\":\"Sensibilidade:\",\"Sepia\":\"Sépia\",\"Settings\":\"Configurações\",\"Shadow\":\"Sombra\",\"Shadow:\":\"Sombra:\",\"Sharpen\":\"Sharpen\",\"Sharpen tool\":\"Ferramenta Sharpen\",\"Sharpen:\":\"Sharpen:\",\"Show / Hide\":\"Aparecer esconder\",\"Show file size:\":\"Mostrar tamanho do arquivo:\",\"Simple\":\"Simples\",\"Size\":\"Tamanho\",\"Size is too big, max\":\"O tamanho é muito grande, máximo\",\"Size:\":\"Tamanho:\",\"Skip - layer must be image.\":\"Skip - layer deve ser imagem.\",\"Solarize\":\"Solarize\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"Desculpe, a imagem não pôde ser carregada. Tente copiar imagem e cole-a.\",\"Sorry, image is too big, max 5 MB.\":\"Desculpe, a imagem é muito grande, no máximo 5 MB.\",\"Source is empty, right click on image to save source position.\":\"A fonte está vazia, clique com o botão direito do mouse na imagem para salvar a posição da fonte.\",\"Sprites\":\"Sprites\",\"Square\":\"Quadrado\",\"Strength:\":\"Força:\",\"Strict\":\"Rigoroso\",\"Stroke\":\"Acidente vascular encefálico\",\"Stroke:\":\"Acidente vascular encefálico:\",\"Target:\":\"Alvo:\",\"Text\":\"Texto\",\"Text example\":\"Exemplo de texto\",\"Text:\":\"Texto:\",\"There are no layers behind.\":\"Não há camadas atrás.\",\"There is only 1 layer.\":\"Existe apenas uma camada.\",\"Tilt Shift\":\"Tilt Shift\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"Alternancia\",\"Tools\":\"Ferramentas\",\"Tools class not found:\":\"Classe de ferramentas não encontrada:\",\"Total pixels:\":\"Total de pixels:\",\"Translate\":\"Traduzir\",\"Translate error, can not find dictionary:\":\"Traduzir erro, não encontrar dicionário:\",\"Transparency background:\":\"Fundo de transparência:\",\"Transparent:\":\"Transparente:\",\"Trim\":\"aparar\",\"Trim everything:\":\"Apare tudo:\",\"Trim layer:\":\"Trim layer:\",\"Trim white color?\":\"Trim cor branca?\",\"Turkish\":\"turco\",\"Undo\":\"Desfazer\",\"Undo disabled.\":\"Desfazer desativado.\",\"Undo enabled.\":\"Desfazer habilitado.\",\"Undo is not available.\":\"Desfazer não está disponível.\",\"Undo levels changed to 1.\":\"Desfazer níveis alterados para 1.\",\"Undo levels restored to\":\"Desfazer níveis restaurados para\",\"Unique colors:\":\"Cores únicas:\",\"Up\":\"Acima\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Use o atalho de teclado Ctrl + V para colar da área de transferência.\",\"V Radius:\":\"V Radius:\",\"Verdana\":\"Verdana\",\"Version:\":\"Versão:\",\"Vertical\":\"Vertical\",\"Vertical blur:\":\"Borrão vertical:\",\"Vibrance\":\"Vibração\",\"Vignette\":\"Vinheta\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"Vintage\",\"Visible:\":\"Visível:\",\"WEBP - Weppy File Format\":\"WEBP - Formato de Arquivo Weppy\",\"Website:\":\"Local na rede Internet:\",\"Width (%):\":\"Largura (%):\",\"Width:\":\"Largura:\",\"Wrong file type, must be image or json.\":\"Tipo de arquivo errado, deve ser imagem ou json.\",\"X end:\":\"X final:\",\"X position:\":\"Posição X:\",\"X start:\":\"X start:\",\"Y end:\":\"Y final:\",\"Y position:\":\"Posição Y:\",\"Y start:\":\"Y começar:\",\"You can also drag and drop items into browser.\":\"Você também pode arrastar e soltar itens no navegador.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Seu navegador não é compatível com tela ou o JavaScript não está habilitado.\",\"Your browser does not support this format.\":\"Seu navegador não suporta este formato.\",\"Your search did not match any images.\":\"Sua pesquisa não corresponde a nenhuma imagem.\",\"Zoom\":\"Zoom\",\"Zoom Blur\":\"Zoom de zoom\",\"Zoom In\":\"Mais Zoom\",\"Zoom Out\":\"Reduzir o zoom\",\"Zoom blur\":\"Zoom de zoom\",\"Zoom in\":\"Mais Zoom\",\"Zoom out\":\"Reduzir o zoom\",\"Zoom:\":\"Zoom:\"}");

/***/ }),

/***/ "./src/js/languages/ru.json":
/*!**********************************!*\
  !*** ./src/js/languages/ru.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"Около\",\"Active\":\"активный\",\"Advanced\":\"продвинутый\",\"All\":\"Все\",\"Alpha:\":\"Альфа:\",\"Anonymous\":\"анонимное\",\"Anti aliasing\":\"Сглаживание\",\"Arial\":\"Arial\",\"Arrow\":\"Стрела\",\"Author:\":\"Автор:\",\"Auto adjust colors\":\"Автоматическая настройка цветов\",\"Average:\":\"В среднем:\",\"BMP - Windows Bitmap\":\"BMP - битмап Windows\",\"Base\":\"База\",\"Basic\":\"основной\",\"Black and White\":\"Черное и белое\",\"Blue\":\"синий\",\"Blue channel:\":\"Голубой канал:\",\"Blue:\":\"Синий:\",\"Blur Radius:\":\"Радиус размытия:\",\"Blur power:\":\"Размытие:\",\"Blur tool\":\"Инструмент размытия\",\"Bold\":\"Жирный\",\"Bold Italic\":\"Жирный курсив\",\"Borders\":\"Границы\",\"Box Blur\":\"Размытие ящика\",\"Box blur\":\"Размытие коробки\",\"Brightness\":\"яркость\",\"Brightness:\":\"Яркость:\",\"Brush\":\"Щетка\",\"Bulge/Pinch tool\":\"Инструмент для выемки / зажима\",\"Burn\":\"жечь\",\"CSS filters\":\"Фильтры CSS\",\"Can not animate 1 layer.\":\"Невозможно оживить 1 слой.\",\"Can not find previous layer.\":\"Не удается найти предыдущий слой.\",\"Cancel\":\"Отмена\",\"Center\":\"Центр\",\"Center x:\":\"Центр x:\",\"Center y:\":\"Центр y:\",\"Center:\":\"Центр:\",\"Channel:\":\"Источник:\",\"Circle\":\"Круг\",\"Clear\":\"Очистить\",\"Clone count:\":\"Количество клонов:\",\"Clone tool\":\"Инструмент клонирования\",\"Cloned edges\":\"Клонированные края\",\"Color #\":\"Цвет #\",\"Color Zoom\":\"Цветное увеличение\",\"Color alpha value can not be zero.\":\"Значение цветной альфа не может быть равно нулю.\",\"Color corrections\":\"Коррекция цвета\",\"Color palette\":\"Цветовая палитра\",\"Color to alpha\":\"Цвет в альфа\",\"Color zoom\":\"Цветное увеличение\",\"Color:\":\"Цвет:\",\"Colors\":\"Цвета\",\"Colors:\":\"Цвета:\",\"Composition\":\"Состав\",\"Composition:\":\"Состав:\",\"Content fill\":\"Контент заполняется\",\"Contrast\":\"контрастировать\",\"Contrast:\":\"Контраст:\",\"Convert to raster\":\"Преобразовать в растровый\",\"Copy selection\":\"Выбор копии\",\"Copy:\":\"Копирование:\",\"Courier\":\"курьер\",\"Crop\":\"урожай\",\"Ctrl+V\":\"Ctrl + V,\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"Текущий\",\"Curve\":\"кривая\",\"Custom\":\"изготовленный на заказ\",\"Data URL\":\"URL-адрес данных\",\"Data URL:\":\"URL-адрес данных:\",\"Decrease color depth\":\"Уменьшить глубину цвета\",\"Default\":\"По умолчанию\",\"Degree:\":\"Степень:\",\"Del\":\"Del\",\"Delete\":\"Удалить\",\"Delete selection\":\"Удалить выделение\",\"Denoise\":\"Denoise\",\"Desaturate\":\"Обесцвечивание\",\"Description:\":\"Описание:\",\"Differences\":\"Различия\",\"Differences Down\":\"Разница вниз\",\"Dither\":\"трястись\",\"Dithering:\":\"Смешение:\",\"Dominant color:\":\"Доминирующий цвет:\",\"Dot Screen\":\"Точечный экран\",\"Down\":\"вниз\",\"Duplicate\":\"дублировать\",\"Edge\":\"край\",\"Edit\":\"редактировать\",\"Edit text\":\"Редактировать текст\",\"Edit text...\":\"Редактировать текст...\",\"Effects\":\"Последствия\",\"Email:\":\"Эл. адрес:\",\"Emboss\":\"выбивать\",\"Empty selection\":\"Пустой выбор\",\"Empty selection or type not image.\":\"Пустой выбор или введите не изображение.\",\"English\":\"английский\",\"Enrich\":\"обогащать\",\"Erase\":\"стирать\",\"Erase on rotate object is disabled. Sorry.\":\"Стереть объект поворота отключен. Сожалею.\",\"Error\":\"ошибка\",\"Error connecting to service.\":\"Ошибка подключения к сервису.\",\"Error: can not load image.\":\"Ошибка: невозможно загрузить изображение.\",\"Error: missing details event target\":\"Ошибка: отсутствует цель события\",\"Error: unsupported attribute type:\":\"Ошибка: неподдерживаемый тип атрибута:\",\"Error: wrong key:\":\"Ошибка: неправильный ключ:\",\"Español\":\"Español\",\"Expand edges\":\"Развернуть края\",\"Exponent:\":\"Экспонент:\",\"Factor:\":\"фактор:\",\"File\":\"файл\",\"File name:\":\"Имя файла:\",\"File size:\":\"Размер файла:\",\"Fill\":\"заполнить\",\"Fit\":\"Поместиться\",\"Fit window\":\"Окно для установки\",\"Flatten Image\":\"Свести изображение\",\"Flip\":\"кувырок\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-змеевик\",\"French\":\"Французский\",\"Full HD, 1080p\":\"Full HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - формат обмена графикой\",\"Gap:\":\"Gap:\",\"Gaussian Blur\":\"Гауссовское размытие\",\"German\":\"Немецкий\",\"Gif delay:\":\"Задержка Gif:\",\"GitHub:\":\"GitHub:\",\"Gradient\":\"градиент\",\"Gradient Radius:\":\"Радиус градиента:\",\"Grains\":\"зерна\",\"Gray\":\"Серый\",\"Grayscale\":\"Оттенки серого\",\"Green\":\"зеленый\",\"Green channel:\":\"Зеленый коридор:\",\"Green:\":\"Зеленый цвет:\",\"Greyscale:\":\"Оттенки серого:\",\"Grid\":\"сетка\",\"Grid on/off\":\"Включение / выключение сетки\",\"H Radius:\":\"H Радиус:\",\"Heatmap\":\"Тепловая карта\",\"Height (%):\":\"Высота (%):\",\"Height:\":\"Высота:\",\"Help\":\"Помогите\",\"Helvetica\":\"Helvetica\",\"Hermite\":\"Эрмита\",\"Hex:\":\"Hex:\",\"Histogram\":\"Гистограмма\",\"Histogram:\":\"Гистограмма:\",\"Horizontal\":\"горизонтальный\",\"Horizontal blur:\":\"Горизонтальное размытие:\",\"Hue Rotate\":\"Оттенок\",\"Hue:\":\"Оттенок:\",\"Image\":\"Образ\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Данные изображения с несколькими слоями. Может быть открыт с помощью miniPaint -\",\"Impact\":\"Влияние\",\"Information\":\"Информация\",\"Insert:\":\"Вставка:\",\"Italiano\":\"Italiano\",\"Italic\":\"курсивный\",\"JPG - JPG/JPEG Format\":\"JPG - формат JPG / JPEG\",\"JPG, WEBP quality:\":\"JPG, WEBP качество:\",\"JSON - Full layers data\":\"JSON - данные с полными слоями\",\"Japanese\":\"Японский\",\"Key-points\":\"Ключевые пункты\",\"Keyboard Shortcuts\":\"Горячие клавиши\",\"Keyword:\":\"Ключевое слово:\",\"Korean\":\"Корейский\",\"Language\":\"язык\",\"Last modified\":\"Последнее изменение\",\"Layer details\":\"Детали слоя\",\"Layer is already image.\":\"Слой уже является изображением.\",\"Layer must be image, convert it to raster to apply this tool.\":\"Слой должен быть изображением, преобразовать его в растр, чтобы применить этот инструмент.\",\"Layers\":\"Слои\",\"Layers:\":\"Слои:\",\"Left\":\"Оставил\",\"Level:\":\"Уровень:\",\"Levels:\":\"Уровни:\",\"Lietuvių\":\"Lietuvių\",\"Line\":\"Линия\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Luminance:\",\"Magic Wand Tool\":\"Инструмент волшебной палочки\",\"Merge Down\":\"Слить\",\"Merged\":\"Объединенное\",\"Mode:\":\"Режим:\",\"Module function not found.\":\"Функция модуля не найдена.\",\"Modules class not found:\":\"Класс модулей не найден:\",\"Mosaic\":\"мозаика\",\"Mouse:\":\"Мышь:\",\"Move\":\"Переехать\",\"Move down\":\"Переместить вниз\",\"Move up\":\"Переместить вверх\",\"Name:\":\"Имя:\",\"Needs at least 2 layers.\":\"Требуется не менее 2 слоев.\",\"Negative\":\"отрицательный\",\"New\":\"новый\",\"New file\":\"Новый файл\",\"New from selection\":\"Новое от выбора\",\"New layer\":\"Новый слой\",\"New width can not be smaller then current width\":\"Новая ширина не может быть меньше текущей ширины\",\"Normal\":\"Нормальный\",\"Nothing is selected.\":\"Ничего не выбрано.\",\"Offset X:\":\"Смещение X:\",\"Offset Y:\":\"Смещение Y:\",\"Oil\":\"масло\",\"Ok\":\"ОК\",\"Online image editor.\":\"Редактор онлайн-изображений.\",\"Opacity\":\"помутнение\",\"Opacity:\":\"Непрозрачность:\",\"Open\":\"открыто\",\"Open Data URL\":\"Открыть URL-адрес данных\",\"Open Directory\":\"Открыть каталог\",\"Open File\":\"Открыть файл\",\"Open URL\":\"Открыть URL-адрес\",\"Open data URL\":\"Открыть URL-адрес данных\",\"Original size\":\"Оригинальный размер\",\"PNG - Portable Network Graphics\":\"PNG - портативная сетевая графика\",\"Palette\":\"палитра\",\"Parameter #1:\":\"Параметр №1:\",\"Parameter #2:\":\"Параметр №2:\",\"Paste\":\"Вставить\",\"Pencil\":\"Карандаш\",\"Percentage:\":\"Процент:\",\"Pick Color\":\"Выберите цвет\",\"Pixels:\":\"Пиксели:\",\"Play animation\":\"Игровая анимация\",\"Portuguese\":\"португальский\",\"Power:\":\"Мощность:\",\"Powred by  pixabay.com .\":\"Поражается pixabay.com.\",\"Pre-Blur:\":\"Pre-Размытие:\",\"Preview\":\"предварительный просмотр\",\"Previous\":\"предыдущий\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"Предыдущий слой должен быть изображением, преобразовать его в растр, чтобы применить этот инструмент.\",\"Print\":\"Распечатать\",\"Quality:\":\"Качественный:\",\"Quick load\":\"Быстрая нагрузка\",\"Quick save\":\"Быстрое сохранение\",\"Radial\":\"радиальный\",\"Radial gradient\":\"Радиальный градиент\",\"Radius:\":\"Радиус:\",\"Range:\":\"Ассортимент:\",\"Rectangle\":\"Прямоугольник\",\"Red\":\"красный\",\"Red channel:\":\"Красный канал:\",\"Red:\":\"Красный:\",\"Rename\":\"переименовывать\",\"Replace Color\":\"Заменить цвет\",\"Replace color\":\"Заменить цвет\",\"Replacement:\":\"Замена:\",\"Report issues\":\"Проблемы с отчетами\",\"Resample - Hermite\":\"Resample - Эрмит\",\"Reset\":\"Сброс\",\"Reset zoom level\":\"Сбросить уровень масштабирования\",\"Resize\":\"Изменение размера\",\"Resized as background\":\"Изменилось в качестве фона\",\"Resolution:\":\"Разрешение:\",\"Restore alpha\":\"Восстановить альфа\",\"Right\":\"Правильно\",\"Right angle:\":\"Прямой угол:\",\"Rotate\":\"Поворот\",\"Rotate is not supported on this type of object. Convert to raster?\":\"Поворот на этом типе объекта не поддерживается. Конвертировать в растр?\",\"Rotate left\":\"Поверните влево\",\"Rotate:\":\"Поворот:\",\"Russian\":\"русский\",\"Sat:\":\"Сидел:\",\"Saturate\":\"насыщать\",\"Saturation:\":\"Насыщенность:\",\"Save\":\"Сохранить\",\"Save as\":\"Сохранить как\",\"Save as data URL\":\"Сохранить как URL-адрес данных\",\"Save as type:\":\"Сохранить как тип:\",\"Save layers:\":\"Сохранить слои:\",\"Save resolution:\":\"Сохранить разрешение:\",\"Scroll down\":\"Прокрутить вниз\",\"Scroll up\":\"Прокрутка вверх\",\"Search\":\"Поиск\",\"Search images\":\"Поиск изображений\",\"Select all\":\"Выбрать все\",\"Select object tool\":\"Выберите инструмент объекта\",\"Selected\":\"выбранный\",\"Selection\":\"выбор\",\"Sensitivity:\":\"Чувствительность:\",\"Sepia\":\"Сепия\",\"Settings\":\"настройки\",\"Shadow\":\"Тень\",\"Shadow:\":\"Тень:\",\"Sharpen\":\"точить\",\"Sharpen tool\":\"Инструмент «Резкость»\",\"Sharpen:\":\"Резкость:\",\"Show / Hide\":\"Показать спрятать\",\"Show file size:\":\"Показать размер файла:\",\"Simple\":\"просто\",\"Size\":\"Размер\",\"Size is too big, max\":\"Размер слишком большой, макс.\",\"Size:\":\"Размер:\",\"Skip - layer must be image.\":\"Пропуск - слой должен быть изображением.\",\"Solarize\":\"передержать\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"К сожалению, изображение не может быть загружено. Попробуйте скопировать изображение и вставьте его.\",\"Sorry, image is too big, max 5 MB.\":\"К сожалению, изображение слишком велико, не более 5 МБ.\",\"Source is empty, right click on image to save source position.\":\"Источник пуст, щелкните правой кнопкой мыши по изображению, чтобы сохранить исходную позицию.\",\"Sprites\":\"Спрайты\",\"Square\":\"Квадрат\",\"Strength:\":\"Прочность:\",\"Strict\":\"строгий\",\"Stroke\":\"Инсульт\",\"Stroke:\":\"Инсульт:\",\"Target:\":\"Цель:\",\"Text\":\"Текст\",\"Text example\":\"Пример текста\",\"Text:\":\"Текст:\",\"There are no layers behind.\":\"Позади нет слоев.\",\"There is only 1 layer.\":\"Есть только 1 слой.\",\"Tilt Shift\":\"Сдвиг наклона\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"тумблер\",\"Tools\":\"инструменты\",\"Tools class not found:\":\"Класс инструментов не найден:\",\"Total pixels:\":\"Всего пикселей:\",\"Translate\":\"Переведите\",\"Translate error, can not find dictionary:\":\"Перевести ошибку, не найти словарь:\",\"Transparency background:\":\"Прозрачный фон:\",\"Transparent:\":\"Прозрачный:\",\"Trim\":\"Отделка\",\"Trim everything:\":\"Обрежьте все:\",\"Trim layer:\":\"Обрезной слой:\",\"Trim white color?\":\"Обрезать белый цвет?\",\"Turkish\":\"турецкий\",\"Undo\":\"расстегивать\",\"Undo disabled.\":\"Отменить.\",\"Undo enabled.\":\"Отменить.\",\"Undo is not available.\":\"Отмена недоступна.\",\"Undo levels changed to 1.\":\"Уровни отмены отменены на 1.\",\"Undo levels restored to\":\"Уровни отмены отменены\",\"Unique colors:\":\"Уникальные цвета:\",\"Up\":\"вверх\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Используйте комбинацию клавиш Ctrl + V для вставки из буфера обмена.\",\"V Radius:\":\"V Радиус:\",\"Verdana\":\"Verdana\",\"Version:\":\"Версия:\",\"Vertical\":\"вертикальный\",\"Vertical blur:\":\"Вертикальное размытие:\",\"Vibrance\":\"вибрация\",\"Vignette\":\"Виньетка\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"марочный\",\"Visible:\":\"Видимых:\",\"WEBP - Weppy File Format\":\"WEBP - Формат файла Weppy\",\"Website:\":\"Веб-сайт:\",\"Width (%):\":\"Ширина (%):\",\"Width:\":\"Ширина:\",\"Wrong file type, must be image or json.\":\"Неверный тип файла должен быть изображением или json.\",\"X end:\":\"X конец:\",\"X position:\":\"X позиция:\",\"X start:\":\"Начало X:\",\"Y end:\":\"Y конец:\",\"Y position:\":\"Y позиция:\",\"Y start:\":\"Начало работы:\",\"You can also drag and drop items into browser.\":\"Вы также можете перетаскивать элементы в браузер.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Ваш браузер не поддерживает холст или JavaScript не включен.\",\"Your browser does not support this format.\":\"Ваш браузер не поддерживает этот формат.\",\"Your search did not match any images.\":\"Ваш поиск не соответствовал изображениям.\",\"Zoom\":\"Увеличить\",\"Zoom Blur\":\"Zoom Blur\",\"Zoom In\":\"Приблизить\",\"Zoom Out\":\"Уменьшить\",\"Zoom blur\":\"Масштабирование\",\"Zoom in\":\"Приблизить\",\"Zoom out\":\"Уменьшить\",\"Zoom:\":\"Zoom:\"}");

/***/ }),

/***/ "./src/js/languages/tr.json":
/*!**********************************!*\
  !*** ./src/js/languages/tr.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2d\",\"480p\":\"480p\",\"About\":\"hakkında\",\"Active\":\"Aktif\",\"Advanced\":\"ileri\",\"All\":\"Herşey\",\"Alpha:\":\"Alfa:\",\"Anonymous\":\"Anonim\",\"Anti aliasing\":\"Örtüşme önleme\",\"Arial\":\"Arial\",\"Arrow\":\"Ok\",\"Author:\":\"Yazar:\",\"Auto adjust colors\":\"Renkleri otomatik ayarla\",\"Average:\":\"Ortalama:\",\"BMP - Windows Bitmap\":\"BMP - Windows Bitmap\",\"Base\":\"baz\",\"Basic\":\"Temel\",\"Black and White\":\"Siyah ve beyaz\",\"Blue\":\"Mavi\",\"Blue channel:\":\"Mavi kanal:\",\"Blue:\":\"Mavi:\",\"Blur Radius:\":\"Bulanıklaştırma Yarıçapı:\",\"Blur power:\":\"Blur gücü:\",\"Blur tool\":\"Bulanıklık aracı\",\"Bold\":\"cesur\",\"Bold Italic\":\"Kalın italik\",\"Borders\":\"Sınırlar\",\"Box Blur\":\"Kutu bulanıklığı\",\"Box blur\":\"Kutu bulanıklığı\",\"Brightness\":\"Parlaklık\",\"Brightness:\":\"Parlaklık:\",\"Brush\":\"Fırça\",\"Bulge/Pinch tool\":\"Bulge / Sıkma aleti\",\"Burn\":\"Yanmak\",\"CSS filters\":\"CSS filtreleri\",\"Can not animate 1 layer.\":\"1 katmana canlandırma yapılamıyor.\",\"Can not find previous layer.\":\"Önceki katmanı bulamıyorum.\",\"Cancel\":\"İptal etmek\",\"Center\":\"merkez\",\"Center x:\":\"Merkez x:\",\"Center y:\":\"Merkez y:\",\"Center:\":\"merkez:\",\"Channel:\":\"Kanal:\",\"Circle\":\"Daire\",\"Clear\":\"Açık\",\"Clone count:\":\"Klon sayısı:\",\"Clone tool\":\"Klon aracı\",\"Cloned edges\":\"Klonlanmış kenarlar\",\"Color #\":\"Renk #\",\"Color Zoom\":\"Renkli Zoom\",\"Color alpha value can not be zero.\":\"Renkli alfa değeri sıfır olamaz.\",\"Color corrections\":\"Renk düzeltmeleri\",\"Color palette\":\"Renk paleti\",\"Color to alpha\":\"Alfanın renkleri\",\"Color zoom\":\"Renkli yakınlaştırma\",\"Color:\":\"Renk:\",\"Colors\":\"Renkler\",\"Colors:\":\"Renkler:\",\"Composition\":\"bileştirme, kompozisyon\",\"Composition:\":\"Bileştirme, kompozisyon:\",\"Content fill\":\"İçerik doldurma\",\"Contrast\":\"Kontrast\",\"Contrast:\":\"Kontrast:\",\"Convert to raster\":\"Rastera dönüştürün\",\"Copy selection\":\"Seçimi kopyala\",\"Copy:\":\"Kopya:\",\"Courier\":\"Kurye\",\"Crop\":\"ekin\",\"Ctrl+V\":\"Ctrl + V\",\"Ctrl-P\":\"Ctrl-P\",\"Current\":\"şimdiki\",\"Curve\":\"eğri\",\"Custom\":\"görenek\",\"Data URL\":\"Veri URL'si\",\"Data URL:\":\"Veri URL'si:\",\"Decrease color depth\":\"Renk derinliğini azalt\",\"Default\":\"Varsayılan\",\"Degree:\":\"Derece:\",\"Del\":\"Del\",\"Delete\":\"silmek\",\"Delete selection\":\"Seçimi sil\",\"Denoise\":\"Denoise\",\"Desaturate\":\"Desaturate\",\"Description:\":\"Açıklama:\",\"Differences\":\"farklılıklar\",\"Differences Down\":\"Farklar Aşağı\",\"Dither\":\"titreme\",\"Dithering:\":\"taklidi:\",\"Dominant color:\":\"Hakim renk:\",\"Dot Screen\":\"Nokta Ekranı\",\"Down\":\"Aşağı\",\"Duplicate\":\"Çift\",\"Edge\":\"kenar\",\"Edit\":\"Düzenle\",\"Edit text\":\"Metni düzenle\",\"Edit text...\":\"Metni düzenle...\",\"Effects\":\"Etkileri\",\"Email:\":\"E-posta:\",\"Emboss\":\"kabartma yapmak\",\"Empty selection\":\"Boş seçim\",\"Empty selection or type not image.\":\"Boş seçim veya resim değil yazın.\",\"English\":\"ingilizce\",\"Enrich\":\"Zenginleştirmek\",\"Erase\":\"silmek\",\"Erase on rotate object is disabled. Sorry.\":\"Döndürme nesnesinde silme devre dışı. Afedersiniz.\",\"Error\":\"Hata\",\"Error connecting to service.\":\"Hizmete bağlanırken hata oluştu.\",\"Error: can not load image.\":\"Hata: resim yüklenemiyor.\",\"Error: missing details event target\":\"Hata: eksik olan ayrıntılar etkinlik hedefi\",\"Error: unsupported attribute type:\":\"Hata: desteklenmeyen özellik türü:\",\"Error: wrong key:\":\"Hata: yanlış anahtar:\",\"Español\":\"Español\",\"Expand edges\":\"Kenarları genişlet\",\"Exponent:\":\"Üs:\",\"Factor:\":\"Faktör:\",\"File\":\"Dosya\",\"File name:\":\"Dosya adı:\",\"File size:\":\"Dosya boyutu:\",\"Fill\":\"doldurmak\",\"Fit\":\"Fit\",\"Fit window\":\"Pencereye sığdır\",\"Flatten Image\":\"Resmi Düzleştir\",\"Flip\":\"fiske\",\"FloydSteinberg-serpentine\":\"FloydSteinberg-serpantin\",\"French\":\"Fransızca\",\"Full HD, 1080p\":\"Tam HD, 1080p\",\"GIF - Graphics Interchange Format\":\"GIF - Grafik Değişim Biçimi\",\"Gap:\":\"boşluk:\",\"Gaussian Blur\":\"Gauss Bulanıklığı\",\"German\":\"Almanca\",\"Gif delay:\":\"Gif gecikmesi:\",\"GitHub:\":\"GitHub:\",\"Gradient\":\"meyil\",\"Gradient Radius:\":\"Gradyan Yarıçapı:\",\"Grains\":\"Taneler\",\"Gray\":\"Gri\",\"Grayscale\":\"Gri tonlama\",\"Green\":\"Yeşil\",\"Green channel:\":\"Yeşil kanal:\",\"Green:\":\"Yeşil:\",\"Greyscale:\":\"Gri tonlama:\",\"Grid\":\"Kafes\",\"Grid on/off\":\"Izgara açık / kapalı\",\"H Radius:\":\"H Radius:\",\"Heatmap\":\"Sıcaklık haritası\",\"Height (%):\":\"Yükseklik (%):\",\"Height:\":\"Yükseklik:\",\"Help\":\"yardım et\",\"Helvetica\":\"Helvetica\",\"Hermite\":\"Hermite\",\"Hex:\":\"hex:\",\"Histogram\":\"Histogram\",\"Histogram:\":\"Histogram:\",\"Horizontal\":\"Yatay\",\"Horizontal blur:\":\"Yatay bulanıklık:\",\"Hue Rotate\":\"Ton Döndür\",\"Hue:\":\"Ton:\",\"Image\":\"görüntü\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"Çok katmanlı görüntü verileri. MiniPaint ile açılabilir -\",\"Impact\":\"darbe\",\"Information\":\"Bilgi\",\"Insert:\":\"ekle:\",\"Italiano\":\"Italiano\",\"Italic\":\"İtalik\",\"JPG - JPG/JPEG Format\":\"JPG - JPG / JPEG Biçimi\",\"JPG, WEBP quality:\":\"JPG, WEBP kalitesi:\",\"JSON - Full layers data\":\"JSON - Tam katmanlı veriler\",\"Japanese\":\"Japonca\",\"Key-points\":\"Anahtar noktaları\",\"Keyboard Shortcuts\":\"Klavye kısayolları\",\"Keyword:\":\"Anahtar kelime:\",\"Korean\":\"Koreli\",\"Language\":\"Dil\",\"Last modified\":\"Son düzenleme\",\"Layer details\":\"Katman ayrıntıları\",\"Layer is already image.\":\"Tabaka zaten görüntü.\",\"Layer must be image, convert it to raster to apply this tool.\":\"Katman görüntü olmalı, onu uygulamak için rastgele dönüştürmelidir.\",\"Layers\":\"Katmanlar\",\"Layers:\":\"Katmanlar:\",\"Left\":\"Ayrıldı\",\"Level:\":\"Seviye:\",\"Levels:\":\"Seviyeleri:\",\"Lietuvių\":\"Litvanya\",\"Line\":\"Hat\",\"Lum:\":\"Lum:\",\"Luminance:\":\"Parlaklık:\",\"Magic Wand Tool\":\"Sihirli değnek aracı\",\"Merge Down\":\"Aşağı Birleştir\",\"Merged\":\"Birleştirilmiş\",\"Mode:\":\"Mod:\",\"Module function not found.\":\"Modül işlevi bulunamadı.\",\"Modules class not found:\":\"Modüller sınıf bulunamadı:\",\"Mosaic\":\"Mozaik\",\"Mouse:\":\"Fare:\",\"Move\":\"Hareket\",\"Move down\":\"Aşağı inmek\",\"Move up\":\"Yukarı çık\",\"Name:\":\"Adı:\",\"Needs at least 2 layers.\":\"En az 2 kat gerekir.\",\"Negative\":\"Negatif\",\"New\":\"Yeni\",\"New file\":\"Yeni dosya\",\"New from selection\":\"Seçimden yeni\",\"New layer\":\"Yeni katman\",\"New width can not be smaller then current width\":\"Yeni genişlik o andaki genişlikten daha küçük olamaz\",\"Normal\":\"Normal\",\"Nothing is selected.\":\"Hiçbir şey seçilmedi.\",\"Offset X:\":\"Ofset X:\",\"Offset Y:\":\"Ofset Y:\",\"Oil\":\"Sıvı yağ\",\"Ok\":\"Tamam\",\"Online image editor.\":\"Çevrimiçi görüntü düzenleyici.\",\"Opacity\":\"opaklık\",\"Opacity:\":\"Saydamlık:\",\"Open\":\"Açık\",\"Open Data URL\":\"Açık Veri URL'si\",\"Open Directory\":\"Açık sözlük\",\"Open File\":\"Açık dosya\",\"Open URL\":\"Link aç\",\"Open data URL\":\"Açık veri URL'si\",\"Original size\":\"Orijinal boyut\",\"PNG - Portable Network Graphics\":\"PNG - Taşınabilir Ağ Grafikleri\",\"Palette\":\"palet\",\"Parameter #1:\":\"Parametre # 1:\",\"Parameter #2:\":\"Parametre # 2:\",\"Paste\":\"Yapıştırmak\",\"Pencil\":\"Kalem\",\"Percentage:\":\"Yüzde:\",\"Pick Color\":\"Renk seç\",\"Pixels:\":\"Piksel:\",\"Play animation\":\"Animasyonu oynat\",\"Portuguese\":\"Portekizce\",\"Power:\":\"Güç:\",\"Powred by  pixabay.com .\":\"Pixabay.com tarafından çekildi.\",\"Pre-Blur:\":\"Ön Bulanıklık:\",\"Preview\":\"Ön izleme\",\"Previous\":\"Önceki\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"Önceki katman resim olmalıdır, bu aracı uygulamak için raster haline getirin.\",\"Print\":\"baskı\",\"Quality:\":\"Kalite:\",\"Quick load\":\"Hızlı yükleme\",\"Quick save\":\"Hızlı kaydet\",\"Radial\":\"Radyal\",\"Radial gradient\":\"Radyal degrade\",\"Radius:\":\"radius:\",\"Range:\":\"aralık:\",\"Rectangle\":\"Dikdörtgen\",\"Red\":\"Kırmızı\",\"Red channel:\":\"Kırmızı kanal:\",\"Red:\":\"Kırmızı:\",\"Rename\":\"Adını değiştirmek\",\"Replace Color\":\"Renk Değiştir\",\"Replace color\":\"Rengi değiştir\",\"Replacement:\":\"Değiştirme:\",\"Report issues\":\"Sorunları bildir\",\"Resample - Hermite\":\"Resample - Hermite\",\"Reset\":\"Reset\",\"Reset zoom level\":\"Zum düzeyini sıfırla\",\"Resize\":\"yeniden boyutlandırma\",\"Resized as background\":\"Arka plan olarak yeniden boyutlandırıldı\",\"Resolution:\":\"Çözüm:\",\"Restore alpha\":\"Alfa geri yükle\",\"Right\":\"Sağ\",\"Right angle:\":\"Doğru açı:\",\"Rotate\":\"Döndürme\",\"Rotate is not supported on this type of object. Convert to raster?\":\"Döndürme, bu tür nesne üzerinde desteklenmiyor. Rastere dönüştürün?\",\"Rotate left\":\"Sola dön\",\"Rotate:\":\"Dönüşümlü:\",\"Russian\":\"Rusça\",\"Sat:\":\"Oturdu:\",\"Saturate\":\"bombalamak\",\"Saturation:\":\"Doyma:\",\"Save\":\"Kayıt etmek\",\"Save as\":\"Farklı kaydet\",\"Save as data URL\":\"Veri URL'si olarak kaydet\",\"Save as type:\":\"Türünü kaydet:\",\"Save layers:\":\"Katmanları kaydet:\",\"Save resolution:\":\"Çözünürlüğü kaydet:\",\"Scroll down\":\"Aşağı kaydır\",\"Scroll up\":\"Yukarı kaydırmak\",\"Search\":\"Arama\",\"Search images\":\"Resimleri ara\",\"Select all\":\"Hepsini seç\",\"Select object tool\":\"Nesne aracını seçin\",\"Selected\":\"seçilmiş\",\"Selection\":\"seçim\",\"Sensitivity:\":\"Duyarlılık:\",\"Sepia\":\"Sepya\",\"Settings\":\"Ayarlar\",\"Shadow\":\"Gölge\",\"Shadow:\":\"Gölge:\",\"Sharpen\":\"keskinleştirmek\",\"Sharpen tool\":\"Aleti keskinleştir\",\"Sharpen:\":\"keskinleştir:\",\"Show / Hide\":\"Göster / gizle\",\"Show file size:\":\"Dosya boyutunu göster:\",\"Simple\":\"Basit\",\"Size\":\"Boyut\",\"Size is too big, max\":\"Boyut çok büyük, maks.\",\"Size:\":\"Boyut:\",\"Skip - layer must be image.\":\"Atlama - katman resim olmalıdır.\",\"Solarize\":\"güneşte bırakmak\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"Üzgünüz, resim yüklenemedi. Resmi kopyala ve yapıştırmayı deneyin.\",\"Sorry, image is too big, max 5 MB.\":\"Maalesef, resim çok büyük, maksimum 5 MB.\",\"Source is empty, right click on image to save source position.\":\"Kaynak boş, kaynağı konumunu kaydetmek için görüntüye sağ tıklayın.\",\"Sprites\":\"Spritelar\",\"Square\":\"Kare\",\"Strength:\":\"Sertlik:\",\"Strict\":\"sıkı\",\"Stroke\":\"inme\",\"Stroke:\":\"İnme:\",\"Target:\":\"Hedef:\",\"Text\":\"Metin\",\"Text example\":\"Tipik örnek\",\"Text:\":\"Metin:\",\"There are no layers behind.\":\"Arkada hiçbir katman yok.\",\"There is only 1 layer.\":\"Sadece bir tabaka var.\",\"Tilt Shift\":\"Eğim Kaydırma\",\"Times New Roman\":\"Times New Roman\",\"Toggle\":\"geçiş\",\"Tools\":\"Araçlar\",\"Tools class not found:\":\"Araçlar sınıfı bulunamadı:\",\"Total pixels:\":\"Toplam piksel:\",\"Translate\":\"Çevirmek\",\"Translate error, can not find dictionary:\":\"Çeviri hatası, sözlük bulunamadı:\",\"Transparency background:\":\"Şeffaflık arka planı:\",\"Transparent:\":\"Şeffaf:\",\"Trim\":\"düzeltmek\",\"Trim everything:\":\"Her şeyi silmelisin:\",\"Trim layer:\":\"Döşeme tabakası:\",\"Trim white color?\":\"Beyaz rengini keser misin?\",\"Turkish\":\"Türk\",\"Undo\":\"Geri alma\",\"Undo disabled.\":\"Geri alınıyor devre dışı.\",\"Undo enabled.\":\"Devre dışı bırakıldı.\",\"Undo is not available.\":\"Geri al mevcut değil.\",\"Undo levels changed to 1.\":\"Geri alma seviyeleri 1 olarak değiştirildi.\",\"Undo levels restored to\":\"Geri yüklenen geri alma seviyeleri\",\"Unique colors:\":\"Eşsiz renkler:\",\"Up\":\"yukarı\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"Pano'dan yapıştırmak için Ctrl + V klavye kısayolunu kullanın.\",\"V Radius:\":\"V Yarıçapı:\",\"Verdana\":\"Verdana\",\"Version:\":\"Versiyon:\",\"Vertical\":\"Dikey\",\"Vertical blur:\":\"Dikey bulanıklık:\",\"Vibrance\":\"Titreşim\",\"Vignette\":\"skeç\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"bağbozumu\",\"Visible:\":\"Gözle görülür:\",\"WEBP - Weppy File Format\":\"WEBP - Weppy Dosya Biçimi\",\"Website:\":\"Web sitesi:\",\"Width (%):\":\"Genişlik (%):\",\"Width:\":\"Genişlik:\",\"Wrong file type, must be image or json.\":\"Yanlış dosya türü, resim veya json olmalı.\",\"X end:\":\"X sonu:\",\"X position:\":\"X konumu:\",\"X start:\":\"X start:\",\"Y end:\":\"Sonum:\",\"Y position:\":\"Y pozisyonu:\",\"Y start:\":\"Y başlatın:\",\"You can also drag and drop items into browser.\":\"Ayrıca öğeleri tarayıcıya sürükleyip bırakabilirsiniz.\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"Tarayıcınız tuvali desteklemiyor veya JavaScript etkin değil.\",\"Your browser does not support this format.\":\"Tarayıcınız bu biçimi desteklemiyor.\",\"Your search did not match any images.\":\"Aramanız herhangi bir resimle eşleşmedi.\",\"Zoom\":\"yakınlaştırma\",\"Zoom Blur\":\"Zum Bulanıklığı\",\"Zoom In\":\"Yakınlaştır\",\"Zoom Out\":\"Uzaklaştır\",\"Zoom blur\":\"Yakınlaştırma bulanıklığı\",\"Zoom in\":\"Yakınlaştır\",\"Zoom out\":\"Uzaklaştır\",\"Zoom:\":\"zum:\"}");

/***/ }),

/***/ "./src/js/languages/zh.json":
/*!**********************************!*\
  !*** ./src/js/languages/zh.json ***!
  \**********************************/
/*! exports provided: 2d, 480p, About, Active, Advanced, All, Alpha:, Anonymous, Anti aliasing, Arial, Arrow, Author:, Auto adjust colors, Average:, BMP - Windows Bitmap, Base, Basic, Black and White, Blue, Blue channel:, Blue:, Blur Radius:, Blur power:, Blur tool, Bold, Bold Italic, Borders, Box Blur, Box blur, Brightness, Brightness:, Brush, Bulge/Pinch tool, Burn, CSS filters, Can not animate 1 layer., Can not find previous layer., Cancel, Center, Center x:, Center y:, Center:, Channel:, Circle, Clear, Clone count:, Clone tool, Cloned edges, Color #, Color Zoom, Color alpha value can not be zero., Color corrections, Color palette, Color to alpha, Color zoom, Color:, Colors, Colors:, Composition, Composition:, Content fill, Contrast, Contrast:, Convert to raster, Copy selection, Copy:, Courier, Crop, Ctrl+V, Ctrl-P, Current, Curve, Custom, Data URL, Data URL:, Decrease color depth, Default, Degree:, Del, Delete, Delete selection, Denoise, Desaturate, Description:, Differences, Differences Down, Dither, Dithering:, Dominant color:, Dot Screen, Down, Duplicate, Edge, Edit, Edit text, Edit text..., Effects, Email:, Emboss, Empty selection, Empty selection or type not image., English, Enrich, Erase, Erase on rotate object is disabled. Sorry., Error, Error connecting to service., Error: can not load image., Error: missing details event target, Error: unsupported attribute type:, Error: wrong key:, Español, Expand edges, Exponent:, Factor:, File, File name:, File size:, Fill, Fit, Fit window, Flatten Image, Flip, FloydSteinberg-serpentine, French, Full HD, 1080p, GIF - Graphics Interchange Format, Gap:, Gaussian Blur, German, Gif delay:, GitHub:, Gradient, Gradient Radius:, Grains, Gray, Grayscale, Green, Green channel:, Green:, Greyscale:, Grid, Grid on/off, H Radius:, Heatmap, Height (%):, Height:, Help, Helvetica, Hermite, Hex:, Histogram, Histogram:, Horizontal, Horizontal blur:, Hue Rotate, Hue:, Image, Image data with multi-layers. Can be opened using miniPaint -, Impact, Information, Insert:, Italiano, Italic, JPG - JPG/JPEG Format, JPG, WEBP quality:, JSON - Full layers data, Japanese, Key-points, Keyboard Shortcuts, Keyword:, Korean, Language, Last modified, Layer details, Layer is already image., Layer must be image, convert it to raster to apply this tool., Layers, Layers:, Left, Level:, Levels:, Lietuvių, Line, Lum:, Luminance:, Magic Wand Tool, Merge Down, Merged, Mode:, Module function not found., Modules class not found:, Mosaic, Mouse:, Move, Move down, Move up, Name:, Needs at least 2 layers., Negative, New, New file, New from selection, New layer, New width can not be smaller then current width, Normal, Nothing is selected., Offset X:, Offset Y:, Oil, Ok, Online image editor., Opacity, Opacity:, Open, Open Data URL, Open Directory, Open File, Open URL, Open data URL, Original size, PNG - Portable Network Graphics, Palette, Parameter #1:, Parameter #2:, Paste, Pencil, Percentage:, Pick Color, Pixels:, Play animation, Portuguese, Power:, Powred by  pixabay.com ., Pre-Blur:, Preview, Previous, Previous layer must be image, convert it to raster to apply this tool., Print, Quality:, Quick load, Quick save, Radial, Radial gradient, Radius:, Range:, Rectangle, Red, Red channel:, Red:, Rename, Replace Color, Replace color, Replacement:, Report issues, Resample - Hermite, Reset, Reset zoom level, Resize, Resized as background, Resolution:, Restore alpha, Right, Right angle:, Rotate, Rotate is not supported on this type of object. Convert to raster?, Rotate left, Rotate:, Russian, Sat:, Saturate, Saturation:, Save, Save as, Save as data URL, Save as type:, Save layers:, Save resolution:, Scroll down, Scroll up, Search, Search images, Select all, Select object tool, Selected, Selection, Sensitivity:, Sepia, Settings, Shadow, Shadow:, Sharpen, Sharpen tool, Sharpen:, Show / Hide, Show file size:, Simple, Size, Size is too big, max, Size:, Skip - layer must be image., Solarize, Sorry, image could not be loaded. Try copy image and paste it., Sorry, image is too big, max 5 MB., Source is empty, right click on image to save source position., Sprites, Square, Strength:, Strict, Stroke, Stroke:, Target:, Text, Text example, Text:, There are no layers behind., There is only 1 layer., Tilt Shift, Times New Roman, Toggle, Tools, Tools class not found:, Total pixels:, Translate, Translate error, can not find dictionary:, Transparency background:, Transparent:, Trim, Trim everything:, Trim layer:, Trim white color?, Turkish, Undo, Undo disabled., Undo enabled., Undo is not available., Undo levels changed to 1., Undo levels restored to, Unique colors:, Up, Use Ctrl+V keyboard shortcut to paste from Clipboard., V Radius:, Verdana, Version:, Vertical, Vertical blur:, Vibrance, Vignette, ViliusL, Vintage, Visible:, WEBP - Weppy File Format, Website:, Width (%):, Width:, Wrong file type, must be image or json., X end:, X position:, X start:, Y end:, Y position:, Y start:, You can also drag and drop items into browser., Your browser does not support canvas or JavaScript is not enabled., Your browser does not support this format., Your search did not match any images., Zoom, Zoom Blur, Zoom In, Zoom Out, Zoom blur, Zoom in, Zoom out, Zoom:, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"2d\":\"2D\",\"480p\":\"480P\",\"About\":\"关于\",\"Active\":\"活性\",\"Advanced\":\"高级\",\"All\":\"所有\",\"Alpha:\":\"Α：\",\"Anonymous\":\"匿名\",\"Anti aliasing\":\"消除锯齿\",\"Arial\":\"宋体\",\"Arrow\":\"箭头\",\"Author:\":\"作者：\",\"Auto adjust colors\":\"自动调整颜色\",\"Average:\":\"平均：\",\"BMP - Windows Bitmap\":\"BMP  -  Windows位图\",\"Base\":\"基础\",\"Basic\":\"基本\",\"Black and White\":\"黑与白\",\"Blue\":\"蓝色\",\"Blue channel:\":\"蓝色通道：\",\"Blue:\":\"蓝色：\",\"Blur Radius:\":\"模糊半径：\",\"Blur power:\":\"模糊力量：\",\"Blur tool\":\"模糊工具\",\"Bold\":\"胆大\",\"Bold Italic\":\"加粗斜体\",\"Borders\":\"国界\",\"Box Blur\":\"框模糊\",\"Box blur\":\"框模糊\",\"Brightness\":\"亮度\",\"Brightness:\":\"亮度：\",\"Brush\":\"刷\",\"Bulge/Pinch tool\":\"凸出/捏合工具\",\"Burn\":\"烧伤\",\"CSS filters\":\"CSS过滤器\",\"Can not animate 1 layer.\":\"不能动画1层。\",\"Can not find previous layer.\":\"找不到以前的图层。\",\"Cancel\":\"取消\",\"Center\":\"中央\",\"Center x:\":\"中心x：\",\"Center y:\":\"中心y：\",\"Center:\":\"中央：\",\"Channel:\":\"渠道：\",\"Circle\":\"圈\",\"Clear\":\"明确\",\"Clone count:\":\"克隆数：\",\"Clone tool\":\"克隆工具\",\"Cloned edges\":\"克隆的边缘\",\"Color #\":\"颜色＃\",\"Color Zoom\":\"颜色缩放\",\"Color alpha value can not be zero.\":\"颜色alpha值不能为零。\",\"Color corrections\":\"颜色更正\",\"Color palette\":\"调色板\",\"Color to alpha\":\"颜色到阿尔法\",\"Color zoom\":\"彩色变焦\",\"Color:\":\"颜色：\",\"Colors\":\"颜色\",\"Colors:\":\"颜色：\",\"Composition\":\"组成\",\"Composition:\":\"组成：\",\"Content fill\":\"内容填写\",\"Contrast\":\"对比\",\"Contrast:\":\"对比：\",\"Convert to raster\":\"转换为光栅\",\"Copy selection\":\"复制选择\",\"Copy:\":\"复制：\",\"Courier\":\"信使\",\"Crop\":\"作物\",\"Ctrl+V\":\"按Ctrl + V\",\"Ctrl-P\":\"按Ctrl-P\",\"Current\":\"当前\",\"Curve\":\"曲线\",\"Custom\":\"习惯\",\"Data URL\":\"数据网址\",\"Data URL:\":\"数据网址：\",\"Decrease color depth\":\"减少颜色深度\",\"Default\":\"默认\",\"Degree:\":\"度：\",\"Del\":\"德尔\",\"Delete\":\"删除\",\"Delete selection\":\"删除选择\",\"Denoise\":\"降噪\",\"Desaturate\":\"去色\",\"Description:\":\"描述：\",\"Differences\":\"差异\",\"Differences Down\":\"差异下降\",\"Dither\":\"抖动\",\"Dithering:\":\"抖动：\",\"Dominant color:\":\"主色：\",\"Dot Screen\":\"点屏幕\",\"Down\":\"下\",\"Duplicate\":\"重复\",\"Edge\":\"边缘\",\"Edit\":\"编辑\",\"Edit text\":\"编辑文字\",\"Edit text...\":\"编辑文字...\",\"Effects\":\"效果\",\"Email:\":\"电子邮件：\",\"Emboss\":\"浮雕\",\"Empty selection\":\"空的选择\",\"Empty selection or type not image.\":\"空的选择或输入不是图像。\",\"English\":\"英语\",\"Enrich\":\"丰富\",\"Erase\":\"抹去\",\"Erase on rotate object is disabled. Sorry.\":\"旋转对象上的擦除被禁用。抱歉。\",\"Error\":\"错误\",\"Error connecting to service.\":\"连接到服务时出错。\",\"Error: can not load image.\":\"错误：无法加载图像。\",\"Error: missing details event target\":\"错误：缺少详细信息事件目标\",\"Error: unsupported attribute type:\":\"错误：不支持的属性类型：\",\"Error: wrong key:\":\"错误：错误的键：\",\"Español\":\"西班牙语\",\"Expand edges\":\"展开边缘\",\"Exponent:\":\"指数：\",\"Factor:\":\"因子：\",\"File\":\"文件\",\"File name:\":\"文件名：\",\"File size:\":\"文件大小：\",\"Fill\":\"填\",\"Fit\":\"适合\",\"Fit window\":\"适合的窗口\",\"Flatten Image\":\"拼合图像\",\"Flip\":\"翻动\",\"FloydSteinberg-serpentine\":\"FloydSteinberg蛇形\",\"French\":\"法国\",\"Full HD, 1080p\":\"全高清，1080p\",\"GIF - Graphics Interchange Format\":\"GIF  - 图形交换格式\",\"Gap:\":\"间隙：\",\"Gaussian Blur\":\"高斯模糊\",\"German\":\"德语\",\"Gif delay:\":\"Gif延迟：\",\"GitHub:\":\"GitHub的：\",\"Gradient\":\"梯度\",\"Gradient Radius:\":\"渐变半径：\",\"Grains\":\"谷物\",\"Gray\":\"灰色\",\"Grayscale\":\"灰度\",\"Green\":\"绿色\",\"Green channel:\":\"绿色通道：\",\"Green:\":\"绿色：\",\"Greyscale:\":\"灰度：\",\"Grid\":\"格\",\"Grid on/off\":\"网格开/关\",\"H Radius:\":\"H半径：\",\"Heatmap\":\"热图\",\"Height (%):\":\"身高（％）：\",\"Height:\":\"高度：\",\"Help\":\"帮帮我\",\"Helvetica\":\"黑体\",\"Hermite\":\"埃尔米特\",\"Hex:\":\"十六进制：\",\"Histogram\":\"直方图\",\"Histogram:\":\"柱状图：\",\"Horizontal\":\"横\",\"Horizontal blur:\":\"水平模糊：\",\"Hue Rotate\":\"色调旋转\",\"Hue:\":\"色调：\",\"Image\":\"图片\",\"Image data with multi-layers. Can be opened using miniPaint -\":\"图像数据与多层。可以使用miniPaint打开 -\",\"Impact\":\"碰撞\",\"Information\":\"信息\",\"Insert:\":\"插：\",\"Italiano\":\"意大利语\",\"Italic\":\"斜体\",\"JPG - JPG/JPEG Format\":\"JPG  -  JPG / JPEG格式\",\"JPG, WEBP quality:\":\"JPG，WEBP质量：\",\"JSON - Full layers data\":\"JSON  - 全层数据\",\"Japanese\":\"日本\",\"Key-points\":\"关键点\",\"Keyboard Shortcuts\":\"键盘快捷键\",\"Keyword:\":\"关键词：\",\"Korean\":\"朝鲜的\",\"Language\":\"语言\",\"Last modified\":\"上一次更改\",\"Layer details\":\"图层细节\",\"Layer is already image.\":\"图层已经是图像。\",\"Layer must be image, convert it to raster to apply this tool.\":\"图层必须是图像，将其转换为栅格来应用此工具。\",\"Layers\":\"图层\",\"Layers:\":\"图层：\",\"Left\":\"剩下\",\"Level:\":\"水平：\",\"Levels:\":\"级别：\",\"Lietuvių\":\"立陶宛ų\",\"Line\":\"线\",\"Lum:\":\"绥：\",\"Luminance:\":\"亮度：\",\"Magic Wand Tool\":\"魔术棒工具\",\"Merge Down\":\"合并下来\",\"Merged\":\"合并的\",\"Mode:\":\"模式：\",\"Module function not found.\":\"找不到模块功能。\",\"Modules class not found:\":\"找不到模块类：\",\"Mosaic\":\"镶嵌\",\"Mouse:\":\"老鼠：\",\"Move\":\"移动\",\"Move down\":\"下移\",\"Move up\":\"提升\",\"Name:\":\"名称：\",\"Needs at least 2 layers.\":\"至少需要2层。\",\"Negative\":\"负\",\"New\":\"新\",\"New file\":\"新文件\",\"New from selection\":\"新的选择\",\"New layer\":\"新的图层\",\"New width can not be smaller then current width\":\"新的宽度不能小于当前的宽度\",\"Normal\":\"正常\",\"Nothing is selected.\":\"没有选择。\",\"Offset X:\":\"偏移量X：\",\"Offset Y:\":\"偏移Y：\",\"Oil\":\"油\",\"Ok\":\"好\",\"Online image editor.\":\"在线图像编辑器。\",\"Opacity\":\"不透明度\",\"Opacity:\":\"不透明度：\",\"Open\":\"打开\",\"Open Data URL\":\"打开数据网址\",\"Open Directory\":\"打开目录\",\"Open File\":\"打开文件\",\"Open URL\":\"打开网址\",\"Open data URL\":\"打开数据网址\",\"Original size\":\"原始尺寸\",\"PNG - Portable Network Graphics\":\"PNG  - 便携式网络图形\",\"Palette\":\"调色板\",\"Parameter #1:\":\"参数＃1：\",\"Parameter #2:\":\"参数＃2：\",\"Paste\":\"糊\",\"Pencil\":\"铅笔\",\"Percentage:\":\"百分比：\",\"Pick Color\":\"选择颜色\",\"Pixels:\":\"像素：\",\"Play animation\":\"播放动画\",\"Portuguese\":\"葡萄牙语\",\"Power:\":\"功率：\",\"Powred by  pixabay.com .\":\"pixabay.com粉丝。\",\"Pre-Blur:\":\"预模糊：\",\"Preview\":\"预习\",\"Previous\":\"以前\",\"Previous layer must be image, convert it to raster to apply this tool.\":\"上一层必须是图像，将其转换为栅格来应用此工具。\",\"Print\":\"打印\",\"Quality:\":\"质量：\",\"Quick load\":\"快速加载\",\"Quick save\":\"快速保存\",\"Radial\":\"径向\",\"Radial gradient\":\"径向渐变\",\"Radius:\":\"半径：\",\"Range:\":\"范围：\",\"Rectangle\":\"长方形\",\"Red\":\"红\",\"Red channel:\":\"红色通道：\",\"Red:\":\"红：\",\"Rename\":\"改名\",\"Replace Color\":\"替换颜色\",\"Replace color\":\"替换颜色\",\"Replacement:\":\"替代：\",\"Report issues\":\"报告问题\",\"Resample - Hermite\":\"重新取样 -  Hermite\",\"Reset\":\"重启\",\"Reset zoom level\":\"重置缩放级别\",\"Resize\":\"调整\",\"Resized as background\":\"调整为背景\",\"Resolution:\":\"解析度：\",\"Restore alpha\":\"恢复阿尔法\",\"Right\":\"对\",\"Right angle:\":\"直角：\",\"Rotate\":\"旋转\",\"Rotate is not supported on this type of object. Convert to raster?\":\"这种类型的对象不支持旋转。转换为光栅？\",\"Rotate left\":\"向左旋转\",\"Rotate:\":\"旋转：\",\"Russian\":\"俄语\",\"Sat:\":\"星期六：\",\"Saturate\":\"饱和\",\"Saturation:\":\"饱和：\",\"Save\":\"保存\",\"Save as\":\"另存为\",\"Save as data URL\":\"另存为数据网址\",\"Save as type:\":\"另存为类型：\",\"Save layers:\":\"保存图层：\",\"Save resolution:\":\"保存分辨率：\",\"Scroll down\":\"向下滚动\",\"Scroll up\":\"向上滑动\",\"Search\":\"搜索\",\"Search images\":\"搜索图片\",\"Select all\":\"全选\",\"Select object tool\":\"选择对象工具\",\"Selected\":\"选\",\"Selection\":\"选择\",\"Sensitivity:\":\"灵敏度：\",\"Sepia\":\"乌贼\",\"Settings\":\"设置\",\"Shadow\":\"阴影\",\"Shadow:\":\"阴影：\",\"Sharpen\":\"削尖\",\"Sharpen tool\":\"锐化工具\",\"Sharpen:\":\"锐化：\",\"Show / Hide\":\"显示隐藏\",\"Show file size:\":\"显示文件大小：\",\"Simple\":\"简单\",\"Size\":\"尺寸\",\"Size is too big, max\":\"尺寸太大，最大\",\"Size:\":\"尺寸：\",\"Skip - layer must be image.\":\"跳过 - 图层必须是图像。\",\"Solarize\":\"曝光过度\",\"Sorry, image could not be loaded. Try copy image and paste it.\":\"对不起，图片无法加载。尝试复制图像并粘贴。\",\"Sorry, image is too big, max 5 MB.\":\"对不起，图片太大，最大5 MB。\",\"Source is empty, right click on image to save source position.\":\"源是空的，右键点击图像保存源位置。\",\"Sprites\":\"精灵\",\"Square\":\"广场\",\"Strength:\":\"强度：\",\"Strict\":\"严格\",\"Stroke\":\"行程\",\"Stroke:\":\"行程：\",\"Target:\":\"目标：\",\"Text\":\"文本\",\"Text example\":\"文本示例\",\"Text:\":\"文本：\",\"There are no layers behind.\":\"背后没有层。\",\"There is only 1 layer.\":\"只有1层。\",\"Tilt Shift\":\"倾斜移位\",\"Times New Roman\":\"英语字体格式一种\",\"Toggle\":\"切换\",\"Tools\":\"工具\",\"Tools class not found:\":\"找不到工具类：\",\"Total pixels:\":\"总像素数：\",\"Translate\":\"翻译\",\"Translate error, can not find dictionary:\":\"翻译错误，找不到字典：\",\"Transparency background:\":\"透明背景：\",\"Transparent:\":\"透明：\",\"Trim\":\"修剪\",\"Trim everything:\":\"修剪一切：\",\"Trim layer:\":\"修剪图层：\",\"Trim white color?\":\"修剪白色的颜色？\",\"Turkish\":\"土耳其\",\"Undo\":\"解开\",\"Undo disabled.\":\"撤消禁用。\",\"Undo enabled.\":\"撤消启用。\",\"Undo is not available.\":\"撤消不可用。\",\"Undo levels changed to 1.\":\"撤消级别更改为1。\",\"Undo levels restored to\":\"撤消级别恢复到\",\"Unique colors:\":\"独特的颜色：\",\"Up\":\"向上\",\"Use Ctrl+V keyboard shortcut to paste from Clipboard.\":\"使用Ctrl + V键盘快捷键从剪贴板粘贴。\",\"V Radius:\":\"V半径：\",\"Verdana\":\"宋体\",\"Version:\":\"版：\",\"Vertical\":\"垂直\",\"Vertical blur:\":\"垂直迷离：\",\"Vibrance\":\"鲜艳\",\"Vignette\":\"小插图\",\"ViliusL\":\"ViliusL\",\"Vintage\":\"酿酒\",\"Visible:\":\"可见：\",\"WEBP - Weppy File Format\":\"WEBP  -  Weppy文件格式\",\"Website:\":\"网站：\",\"Width (%):\":\"宽度（％）：\",\"Width:\":\"宽度：\",\"Wrong file type, must be image or json.\":\"错误的文件类型，必须是图像或JSON。\",\"X end:\":\"X结束：\",\"X position:\":\"X位置：\",\"X start:\":\"X开始：\",\"Y end:\":\"Y结束：\",\"Y position:\":\"Y位置：\",\"Y start:\":\"Y开始：\",\"You can also drag and drop items into browser.\":\"您也可以将项目拖放到浏览器中。\",\"Your browser does not support canvas or JavaScript is not enabled.\":\"您的浏览器不支持画布或JavaScript未启用。\",\"Your browser does not support this format.\":\"您的浏览器不支持这种格式。\",\"Your search did not match any images.\":\"您的搜索与任何图片都不匹配。\",\"Zoom\":\"放大\",\"Zoom Blur\":\"变焦模糊\",\"Zoom In\":\"放大\",\"Zoom Out\":\"缩小\",\"Zoom blur\":\"变焦模糊\",\"Zoom in\":\"放大\",\"Zoom out\":\"缩小\",\"Zoom:\":\"放大：\"}");

/***/ }),

/***/ "./src/js/libs/clipboard.js":
/*!**********************************!*\
  !*** ./src/js/libs/clipboard.js ***!
  \**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * image pasting into canvas
 * 
 * @param {string} canvas_id - canvas id
 * @param {boolean} autoresize - if canvas will be resized
 */
var Clipboard_class = function () {
	function Clipboard_class(on_paste) {
		_classCallCheck(this, Clipboard_class);

		var _self = this;

		this.on_paste = on_paste;
		this.ctrl_pressed = false;
		this.command_pressed = false;
		this.pasteCatcher;
		this.paste_mode;

		//handlers
		document.addEventListener('keydown', function (e) {
			_self.on_keyboard_action(e);
		}, false); //firefox fix
		document.addEventListener('keyup', function (e) {
			_self.on_keyboardup_action(e);
		}, false); //firefox fix
		document.addEventListener('paste', function (e) {
			_self.paste_auto(e);
		}, false); //official paste handler

		this.init();
	}

	//constructor - prepare


	_createClass(Clipboard_class, [{
		key: 'init',
		value: function init() {
			var _self = this;

			//if using auto
			if (window.Clipboard) return true;

			this.pasteCatcher = document.createElement("div");
			this.pasteCatcher.setAttribute("id", "paste_ff");
			this.pasteCatcher.setAttribute("contenteditable", "");
			this.pasteCatcher.style.cssText = 'opacity:0;position:fixed;top:0px;left:0px;';
			this.pasteCatcher.style.marginLeft = "-20px";
			this.pasteCatcher.style.width = "10px";
			document.body.appendChild(this.pasteCatcher);

			// create an observer instance
			var observer = new MutationObserver(function (mutations) {
				mutations.forEach(function (mutation) {
					if (this.paste_mode == 'auto' || this.ctrl_pressed == false || mutation.type != 'childList') return true;

					//if paste handle failed - capture pasted object manually
					if (mutation.addedNodes.length == 1) {
						if (mutation.addedNodes[0].src != undefined) {
							//image
							_self.paste_createImage(mutation.addedNodes[0].src);
						}
						//register cleanup after some time.
						setTimeout(function () {
							this.pasteCatcher.innerHTML = '';
						}, 20);
					}
				});
			});
			var target = document.getElementById('paste_ff');
			var config = { attributes: true, childList: true, characterData: true };
			observer.observe(target, config);
		}
	}, {
		key: 'paste_auto',

		//default paste action
		value: function paste_auto(e) {
			if (e.target.type == 'text') return;
			if (e.target.tagName.toUpperCase() == 'INPUT') return;
			if (e.target.tagName.toUpperCase() == 'TEXTAREA') return;

			this.paste_mode = '';
			if (!window.Clipboard) {
				this.pasteCatcher.innerHTML = '';
			}
			if (e.clipboardData) {
				var items = e.clipboardData.items;
				if (items) {
					this.paste_mode = 'auto';
					//access data directly
					for (var i = 0; i < items.length; i++) {
						if (items[i].type.indexOf("image") !== -1) {
							//image
							var blob = items[i].getAsFile();
							var URLObj = window.URL || window.webkitURL;
							var source = URLObj.createObjectURL(blob);
							this.paste_createImage(source);
						}
					}
					e.preventDefault();
				} else {
					//wait for DOMSubtreeModified event
					//https://bugzilla.mozilla.org/show_bug.cgi?id=891247
				}
			}
		}

		//on keyboard press

	}, {
		key: 'on_keyboard_action',
		value: function on_keyboard_action(event) {
			var k = event.keyCode;
			//ctrl
			if (k == 17 || event.metaKey || event.ctrlKey) {
				if (this.ctrl_pressed == false) this.ctrl_pressed = true;
			}
			//v
			if (k == 86) {
				if (document.activeElement != undefined && document.activeElement.type == 'text') {
					//let user paste into some input
					return false;
				}

				if (this.ctrl_pressed == true && !window.Clipboard) this.pasteCatcher.focus();
			}
		}

		//on kaybord release

	}, {
		key: 'on_keyboardup_action',
		value: function on_keyboardup_action(event) {
			//ctrl
			if (event.ctrlKey == false && this.ctrl_pressed == true) {
				this.ctrl_pressed = false;
			}
			//command
			else if (event.metaKey == false && this.command_pressed == true) {
					this.command_pressed = false;
					this.ctrl_pressed = false;
				}
		}

		//draw image

	}, {
		key: 'paste_createImage',
		value: function paste_createImage(source) {
			var pastedImage = new Image();
			var _this = this;

			pastedImage.onload = function () {
				_this.on_paste(source, pastedImage.width, pastedImage.height);
			};
			pastedImage.src = source;
		}
	}]);

	return Clipboard_class;
}();

exports.default = Clipboard_class;

/***/ }),

/***/ "./src/js/libs/color-thief.js":
/*!************************************!*\
  !*** ./src/js/libs/color-thief.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
    value: true
});
/*
 * Color Thief v2.0
 * by Lokesh Dhakar - http://www.lokeshdhakar.com
 *
 * Thanks
 * ------
 * Nick Rabinowitz - For creating quantize.js.
 * John Schulz - For clean up and optimization. @JFSIII
 * Nathan Spady - For adding drag and drop support to the demo page.
 *
 * License
 * -------
 * Copyright 2011, 2015 Lokesh Dhakar
 * Released under the MIT license
 * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE
 *
 * @license
 */

/*
  CanvasImage Class
  Class that wraps the html image element and canvas.
  It also simplifies some of the canvas context manipulation
  with a set of helper functions.
*/
var CanvasImage = function CanvasImage(image) {
    this.canvas = document.createElement('canvas');
    this.context = this.canvas.getContext('2d');

    document.body.appendChild(this.canvas);

    this.width = this.canvas.width = image.width;
    this.height = this.canvas.height = image.height;

    this.context.drawImage(image, 0, 0, this.width, this.height);
};

CanvasImage.prototype.clear = function () {
    this.context.clearRect(0, 0, this.width, this.height);
};

CanvasImage.prototype.update = function (imageData) {
    this.context.putImageData(imageData, 0, 0);
};

CanvasImage.prototype.getPixelCount = function () {
    return this.width * this.height;
};

CanvasImage.prototype.getImageData = function () {
    return this.context.getImageData(0, 0, this.width, this.height);
};

CanvasImage.prototype.removeCanvas = function () {
    this.canvas.parentNode.removeChild(this.canvas);
};

var ColorThief = function ColorThief() {};

/*
 * getColor(sourceImage[, quality])
 * returns {r: num, g: num, b: num}
 *
 * Use the median cut algorithm provided by quantize.js to cluster similar
 * colors and return the base color from the largest cluster.
 *
 * Quality is an optional argument. It needs to be an integer. 1 is the highest quality settings.
 * 10 is the default. There is a trade-off between quality and speed. The bigger the number, the
 * faster a color will be returned but the greater the likelihood that it will not be the visually
 * most dominant color.
 *
 * */
ColorThief.prototype.getColor = function (sourceImage, quality) {
    var palette = this.getPalette(sourceImage, 5, quality);
    var dominantColor = palette[0];
    return dominantColor;
};

/*
 * getPalette(sourceImage[, colorCount, quality])
 * returns array[ {r: num, g: num, b: num}, {r: num, g: num, b: num}, ...]
 *
 * Use the median cut algorithm provided by quantize.js to cluster similar colors.
 *
 * colorCount determines the size of the palette; the number of colors returned. If not set, it
 * defaults to 10.
 *
 * BUGGY: Function does not always return the requested amount of colors. It can be +/- 2.
 *
 * quality is an optional argument. It needs to be an integer. 1 is the highest quality settings.
 * 10 is the default. There is a trade-off between quality and speed. The bigger the number, the
 * faster the palette generation but the greater the likelihood that colors will be missed.
 *
 *
 */
ColorThief.prototype.getPalette = function (sourceImage, colorCount, quality) {

    if (typeof colorCount === 'undefined' || colorCount < 2 || colorCount > 256) {
        colorCount = 10;
    }
    if (typeof quality === 'undefined' || quality < 1) {
        quality = 10;
    }

    // Create custom CanvasImage object
    var image = new CanvasImage(sourceImage);
    var imageData = image.getImageData();
    var pixels = imageData.data;
    var pixelCount = image.getPixelCount();

    // Store the RGB values in an array format suitable for quantize function
    var pixelArray = [];
    for (var i = 0, offset, r, g, b, a; i < pixelCount; i = i + quality) {
        offset = i * 4;
        r = pixels[offset + 0];
        g = pixels[offset + 1];
        b = pixels[offset + 2];
        a = pixels[offset + 3];
        // If pixel is mostly opaque and not white
        if (a >= 125) {
            if (!(r > 250 && g > 250 && b > 250)) {
                pixelArray.push([r, g, b]);
            }
        }
    }

    // Send array to quantize function which clusters values
    // using median cut algorithm
    var cmap = MMCQ.quantize(pixelArray, colorCount);
    var palette = cmap ? cmap.palette() : null;

    // Clean up
    image.removeCanvas();

    return palette;
};

ColorThief.prototype.getColorFromUrl = function (imageUrl, callback, quality) {
    sourceImage = document.createElement("img");
    var thief = this;
    sourceImage.addEventListener('load', function () {
        var palette = thief.getPalette(sourceImage, 5, quality);
        var dominantColor = palette[0];
        callback(dominantColor, imageUrl);
    });
    sourceImage.src = imageUrl;
};

ColorThief.prototype.getImageData = function (imageUrl, callback) {
    xhr = new XMLHttpRequest();
    xhr.open('GET', imageUrl, true);
    xhr.responseType = 'arraybuffer';
    xhr.onload = function (e) {
        if (this.status == 200) {
            uInt8Array = new Uint8Array(this.response);
            i = uInt8Array.length;
            binaryString = new Array(i);
            for (var i = 0; i < uInt8Array.length; i++) {
                binaryString[i] = String.fromCharCode(uInt8Array[i]);
            }
            data = binaryString.join('');
            base64 = window.btoa(data);
            callback("data:image/png;base64," + base64);
        }
    };
    xhr.send();
};

ColorThief.prototype.getColorAsync = function (imageUrl, callback, quality) {
    var thief = this;
    this.getImageData(imageUrl, function (imageData) {
        sourceImage = document.createElement("img");
        sourceImage.addEventListener('load', function () {
            var palette = thief.getPalette(sourceImage, 5, quality);
            var dominantColor = palette[0];
            callback(dominantColor, this);
        });
        sourceImage.src = imageData;
    });
};

/*!
 * quantize.js Copyright 2008 Nick Rabinowitz.
 * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
 * @license
 */

// fill out a couple protovis dependencies
/*!
 * Block below copied from Protovis: http://mbostock.github.com/protovis/
 * Copyright 2010 Stanford Visualization Group
 * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
 * @license
 */
if (!pv) {
    var pv = {
        map: function map(array, f) {
            var o = {};
            return f ? array.map(function (d, i) {
                o.index = i;return f.call(o, d);
            }) : array.slice();
        },
        naturalOrder: function naturalOrder(a, b) {
            return a < b ? -1 : a > b ? 1 : 0;
        },
        sum: function sum(array, f) {
            var o = {};
            return array.reduce(f ? function (p, d, i) {
                o.index = i;return p + f.call(o, d);
            } : function (p, d) {
                return p + d;
            }, 0);
        },
        max: function max(array, f) {
            return Math.max.apply(null, f ? pv.map(array, f) : array);
        }
    };
}

/**
 * Basic Javascript port of the MMCQ (modified median cut quantization)
 * algorithm from the Leptonica library (http://www.leptonica.com/).
 * Returns a color map you can use to map original pixels to the reduced
 * palette. Still a work in progress.
 *
 * @author Nick Rabinowitz
 * @example

// array of pixels as [R,G,B] arrays
var myPixels = [[190,197,190], [202,204,200], [207,214,210], [211,214,211], [205,207,207]
                // etc
                ];
var maxColors = 4;

var cmap = MMCQ.quantize(myPixels, maxColors);
var newPalette = cmap.palette();
var newPixels = myPixels.map(function(p) {
    return cmap.map(p);
});

 */
var MMCQ = function () {
    // private constants
    var sigbits = 5,
        rshift = 8 - sigbits,
        maxIterations = 1000,
        fractByPopulations = 0.75;

    // get reduced-space color index for a pixel
    function getColorIndex(r, g, b) {
        return (r << 2 * sigbits) + (g << sigbits) + b;
    }

    // Simple priority queue
    function PQueue(comparator) {
        var contents = [],
            sorted = false;

        function sort() {
            contents.sort(comparator);
            sorted = true;
        }

        return {
            push: function push(o) {
                contents.push(o);
                sorted = false;
            },
            peek: function peek(index) {
                if (!sorted) sort();
                if (index === undefined) index = contents.length - 1;
                return contents[index];
            },
            pop: function pop() {
                if (!sorted) sort();
                return contents.pop();
            },
            size: function size() {
                return contents.length;
            },
            map: function map(f) {
                return contents.map(f);
            },
            debug: function debug() {
                if (!sorted) sort();
                return contents;
            }
        };
    }

    // 3d color space box
    function VBox(r1, r2, g1, g2, b1, b2, histo) {
        var vbox = this;
        vbox.r1 = r1;
        vbox.r2 = r2;
        vbox.g1 = g1;
        vbox.g2 = g2;
        vbox.b1 = b1;
        vbox.b2 = b2;
        vbox.histo = histo;
    }
    VBox.prototype = {
        volume: function volume(force) {
            var vbox = this;
            if (!vbox._volume || force) {
                vbox._volume = (vbox.r2 - vbox.r1 + 1) * (vbox.g2 - vbox.g1 + 1) * (vbox.b2 - vbox.b1 + 1);
            }
            return vbox._volume;
        },
        count: function count(force) {
            var vbox = this,
                histo = vbox.histo;
            if (!vbox._count_set || force) {
                var npix = 0,
                    index,
                    i,
                    j,
                    k;
                for (i = vbox.r1; i <= vbox.r2; i++) {
                    for (j = vbox.g1; j <= vbox.g2; j++) {
                        for (k = vbox.b1; k <= vbox.b2; k++) {
                            index = getColorIndex(i, j, k);
                            npix += histo[index] || 0;
                        }
                    }
                }
                vbox._count = npix;
                vbox._count_set = true;
            }
            return vbox._count;
        },
        copy: function copy() {
            var vbox = this;
            return new VBox(vbox.r1, vbox.r2, vbox.g1, vbox.g2, vbox.b1, vbox.b2, vbox.histo);
        },
        avg: function avg(force) {
            var vbox = this,
                histo = vbox.histo;
            if (!vbox._avg || force) {
                var ntot = 0,
                    mult = 1 << 8 - sigbits,
                    rsum = 0,
                    gsum = 0,
                    bsum = 0,
                    hval,
                    i,
                    j,
                    k,
                    histoindex;
                for (i = vbox.r1; i <= vbox.r2; i++) {
                    for (j = vbox.g1; j <= vbox.g2; j++) {
                        for (k = vbox.b1; k <= vbox.b2; k++) {
                            histoindex = getColorIndex(i, j, k);
                            hval = histo[histoindex] || 0;
                            ntot += hval;
                            rsum += hval * (i + 0.5) * mult;
                            gsum += hval * (j + 0.5) * mult;
                            bsum += hval * (k + 0.5) * mult;
                        }
                    }
                }
                if (ntot) {
                    vbox._avg = [~~(rsum / ntot), ~~(gsum / ntot), ~~(bsum / ntot)];
                } else {
                    vbox._avg = [~~(mult * (vbox.r1 + vbox.r2 + 1) / 2), ~~(mult * (vbox.g1 + vbox.g2 + 1) / 2), ~~(mult * (vbox.b1 + vbox.b2 + 1) / 2)];
                }
            }
            return vbox._avg;
        },
        contains: function contains(pixel) {
            var vbox = this,
                rval = pixel[0] >> rshift;
            gval = pixel[1] >> rshift;
            bval = pixel[2] >> rshift;
            return rval >= vbox.r1 && rval <= vbox.r2 && gval >= vbox.g1 && gval <= vbox.g2 && bval >= vbox.b1 && bval <= vbox.b2;
        }
    };

    // Color map
    function CMap() {
        this.vboxes = new PQueue(function (a, b) {
            return pv.naturalOrder(a.vbox.count() * a.vbox.volume(), b.vbox.count() * b.vbox.volume());
        });
    }
    CMap.prototype = {
        push: function push(vbox) {
            this.vboxes.push({
                vbox: vbox,
                color: vbox.avg()
            });
        },
        palette: function palette() {
            return this.vboxes.map(function (vb) {
                return vb.color;
            });
        },
        size: function size() {
            return this.vboxes.size();
        },
        map: function map(color) {
            var vboxes = this.vboxes;
            for (var i = 0; i < vboxes.size(); i++) {
                if (vboxes.peek(i).vbox.contains(color)) {
                    return vboxes.peek(i).color;
                }
            }
            return this.nearest(color);
        },
        nearest: function nearest(color) {
            var vboxes = this.vboxes,
                d1,
                d2,
                pColor;
            for (var i = 0; i < vboxes.size(); i++) {
                d2 = Math.sqrt(Math.pow(color[0] - vboxes.peek(i).color[0], 2) + Math.pow(color[1] - vboxes.peek(i).color[1], 2) + Math.pow(color[2] - vboxes.peek(i).color[2], 2));
                if (d2 < d1 || d1 === undefined) {
                    d1 = d2;
                    pColor = vboxes.peek(i).color;
                }
            }
            return pColor;
        },
        forcebw: function forcebw() {
            // XXX: won't  work yet
            var vboxes = this.vboxes;
            vboxes.sort(function (a, b) {
                return pv.naturalOrder(pv.sum(a.color), pv.sum(b.color));
            });

            // force darkest color to black if everything < 5
            var lowest = vboxes[0].color;
            if (lowest[0] < 5 && lowest[1] < 5 && lowest[2] < 5) vboxes[0].color = [0, 0, 0];

            // force lightest color to white if everything > 251
            var idx = vboxes.length - 1,
                highest = vboxes[idx].color;
            if (highest[0] > 251 && highest[1] > 251 && highest[2] > 251) vboxes[idx].color = [255, 255, 255];
        }
    };

    // histo (1-d array, giving the number of pixels in
    // each quantized region of color space), or null on error
    function getHisto(pixels) {
        var histosize = 1 << 3 * sigbits,
            histo = new Array(histosize),
            index,
            rval,
            gval,
            bval;
        pixels.forEach(function (pixel) {
            rval = pixel[0] >> rshift;
            gval = pixel[1] >> rshift;
            bval = pixel[2] >> rshift;
            index = getColorIndex(rval, gval, bval);
            histo[index] = (histo[index] || 0) + 1;
        });
        return histo;
    }

    function vboxFromPixels(pixels, histo) {
        var rmin = 1000000,
            rmax = 0,
            gmin = 1000000,
            gmax = 0,
            bmin = 1000000,
            bmax = 0,
            rval,
            gval,
            bval;
        // find min/max
        pixels.forEach(function (pixel) {
            rval = pixel[0] >> rshift;
            gval = pixel[1] >> rshift;
            bval = pixel[2] >> rshift;
            if (rval < rmin) rmin = rval;else if (rval > rmax) rmax = rval;
            if (gval < gmin) gmin = gval;else if (gval > gmax) gmax = gval;
            if (bval < bmin) bmin = bval;else if (bval > bmax) bmax = bval;
        });
        return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, histo);
    }

    function medianCutApply(histo, vbox) {
        if (!vbox.count()) return;

        var rw = vbox.r2 - vbox.r1 + 1,
            gw = vbox.g2 - vbox.g1 + 1,
            bw = vbox.b2 - vbox.b1 + 1,
            maxw = pv.max([rw, gw, bw]);
        // only one pixel, no split
        if (vbox.count() == 1) {
            return [vbox.copy()];
        }
        /* Find the partial sum arrays along the selected axis. */
        var total = 0,
            partialsum = [],
            lookaheadsum = [],
            i,
            j,
            k,
            sum,
            index;
        if (maxw == rw) {
            for (i = vbox.r1; i <= vbox.r2; i++) {
                sum = 0;
                for (j = vbox.g1; j <= vbox.g2; j++) {
                    for (k = vbox.b1; k <= vbox.b2; k++) {
                        index = getColorIndex(i, j, k);
                        sum += histo[index] || 0;
                    }
                }
                total += sum;
                partialsum[i] = total;
            }
        } else if (maxw == gw) {
            for (i = vbox.g1; i <= vbox.g2; i++) {
                sum = 0;
                for (j = vbox.r1; j <= vbox.r2; j++) {
                    for (k = vbox.b1; k <= vbox.b2; k++) {
                        index = getColorIndex(j, i, k);
                        sum += histo[index] || 0;
                    }
                }
                total += sum;
                partialsum[i] = total;
            }
        } else {
            /* maxw == bw */
            for (i = vbox.b1; i <= vbox.b2; i++) {
                sum = 0;
                for (j = vbox.r1; j <= vbox.r2; j++) {
                    for (k = vbox.g1; k <= vbox.g2; k++) {
                        index = getColorIndex(j, k, i);
                        sum += histo[index] || 0;
                    }
                }
                total += sum;
                partialsum[i] = total;
            }
        }
        partialsum.forEach(function (d, i) {
            lookaheadsum[i] = total - d;
        });
        function doCut(color) {
            var dim1 = color + '1',
                dim2 = color + '2',
                left,
                right,
                vbox1,
                vbox2,
                d2,
                count2 = 0;
            for (i = vbox[dim1]; i <= vbox[dim2]; i++) {
                if (partialsum[i] > total / 2) {
                    vbox1 = vbox.copy();
                    vbox2 = vbox.copy();
                    left = i - vbox[dim1];
                    right = vbox[dim2] - i;
                    if (left <= right) d2 = Math.min(vbox[dim2] - 1, ~~(i + right / 2));else d2 = Math.max(vbox[dim1], ~~(i - 1 - left / 2));
                    // avoid 0-count boxes
                    while (!partialsum[d2]) {
                        d2++;
                    }count2 = lookaheadsum[d2];
                    while (!count2 && partialsum[d2 - 1]) {
                        count2 = lookaheadsum[--d2];
                    } // set dimensions
                    vbox1[dim2] = d2;
                    vbox2[dim1] = vbox1[dim2] + 1;
                    return [vbox1, vbox2];
                }
            }
        }
        // determine the cut planes
        return maxw == rw ? doCut('r') : maxw == gw ? doCut('g') : doCut('b');
    }

    function quantize(pixels, maxcolors) {
        // short-circuit
        if (!pixels.length || maxcolors < 2 || maxcolors > 256) {
            return false;
        }

        // XXX: check color content and convert to grayscale if insufficient

        var histo = getHisto(pixels),
            histosize = 1 << 3 * sigbits;

        // check that we aren't below maxcolors already
        var nColors = 0;
        histo.forEach(function () {
            nColors++;
        });
        if (nColors <= maxcolors) {}
        // XXX: generate the new colors from the histo and return


        // get the beginning vbox from the colors
        var vbox = vboxFromPixels(pixels, histo),
            pq = new PQueue(function (a, b) {
            return pv.naturalOrder(a.count(), b.count());
        });
        pq.push(vbox);

        // inner function to do the iteration
        function iter(lh, target) {
            var ncolors = 1,
                niters = 0,
                vbox;
            while (niters < maxIterations) {
                vbox = lh.pop();
                if (!vbox.count()) {
                    /* just put it back */
                    lh.push(vbox);
                    niters++;
                    continue;
                }
                // do the cut
                var vboxes = medianCutApply(histo, vbox),
                    vbox1 = vboxes[0],
                    vbox2 = vboxes[1];

                if (!vbox1) {
                    return;
                }
                lh.push(vbox1);
                if (vbox2) {
                    /* vbox2 can be null */
                    lh.push(vbox2);
                    ncolors++;
                }
                if (ncolors >= target) return;
                if (niters++ > maxIterations) {
                    return;
                }
            }
        }

        // first set of colors, sorted by population
        iter(pq, fractByPopulations * maxcolors);

        // Re-sort by the product of pixel occupancy times the size in color space.
        var pq2 = new PQueue(function (a, b) {
            return pv.naturalOrder(a.count() * a.volume(), b.count() * b.volume());
        });
        while (pq.size()) {
            pq2.push(pq.pop());
        }

        // next set - generate the median cuts using the (npix * vol) sorting.
        iter(pq2, maxcolors - pq2.size());

        // calculate the actual colors
        var cmap = new CMap();
        while (pq2.size()) {
            cmap.push(pq2.pop());
        }

        return cmap;
    }

    return {
        quantize: quantize
    };
}();
exports.default = ColorThief;

/***/ }),

/***/ "./src/js/libs/gifjs/gif.js":
/*!**********************************!*\
  !*** ./src/js/libs/gifjs/gif.js ***!
  \**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

!function (t, e) {
  "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = e() :  true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(undefined, function () {
  return function (t) {
    function e(n) {
      if (i[n]) return i[n].exports;var r = i[n] = { exports: {}, id: n, loaded: !1 };return t[n].call(r.exports, r, r.exports, e), r.loaded = !0, r.exports;
    }var i = {};return e.m = t, e.c = i, e.p = "", e(0);
  }([function (t, e, i) {
    var n,
        r,
        s,
        o = function o(t, e) {
      function i() {
        this.constructor = t;
      }for (var n in e) {
        a.call(e, n) && (t[n] = e[n]);
      }return i.prototype = e.prototype, t.prototype = new i(), t.__super__ = e.prototype, t;
    },
        a = {}.hasOwnProperty,
        h = [].indexOf || function (t) {
      for (var e = 0, i = this.length; e < i; e++) {
        if (e in this && this[e] === t) return e;
      }return -1;
    };n = i(1).EventEmitter, s = i(2), r = function (t) {
      function e(t) {
        var e, n, r;this.running = !1, this.options = {}, this.frames = [], this.groups = new Map(), this.freeWorkers = [], this.activeWorkers = [], this.setOptions(t);for (n in i) {
          r = i[n], null == (e = this.options)[n] && (e[n] = r);
        }
      }var i, n;return o(e, t), i = { workerScript: "gif.worker.js", workers: 2, repeat: 0, background: "#fff", quality: 10, width: null, height: null, transparent: null, debug: !1 }, n = { delay: 500, copy: !1 }, e.prototype.setOption = function (t, e) {
        if (this.options[t] = e, null != this._canvas && ("width" === t || "height" === t)) return this._canvas[t] = e;
      }, e.prototype.setOptions = function (t) {
        var e, i, n;i = [];for (e in t) {
          a.call(t, e) && (n = t[e], i.push(this.setOption(e, n)));
        }return i;
      }, e.prototype.addFrame = function (t, e) {
        var i, r, s;null == e && (e = {}), i = {}, i.transparent = this.options.transparent;for (s in n) {
          i[s] = e[s] || n[s];
        }if (null == this.options.width && this.setOption("width", t.width), null == this.options.height && this.setOption("height", t.height), "undefined" != typeof ImageData && null !== ImageData && t instanceof ImageData) i.data = t.data;else if ("undefined" != typeof CanvasRenderingContext2D && null !== CanvasRenderingContext2D && t instanceof CanvasRenderingContext2D || "undefined" != typeof WebGLRenderingContext && null !== WebGLRenderingContext && t instanceof WebGLRenderingContext) e.copy ? i.data = this.getContextData(t) : i.context = t;else {
          if (null == t.childNodes) throw new Error("Invalid image");e.copy ? i.data = this.getImageData(t) : i.image = t;
        }return r = this.frames.length, r > 0 && i.data && (this.groups.has(i.data) ? this.groups.get(i.data).push(r) : this.groups.set(i.data, [r])), this.frames.push(i);
      }, e.prototype.render = function () {
        var t, e, i, n;if (this.running) throw new Error("Already running");if (null == this.options.width || null == this.options.height) throw new Error("Width and height must be set prior to rendering");if (this.running = !0, this.nextFrame = 0, this.finishedFrames = 0, this.imageParts = function () {
          var e, i, n;for (n = [], t = e = 0, i = this.frames.length; 0 <= i ? e < i : e > i; t = 0 <= i ? ++e : --e) {
            n.push(null);
          }return n;
        }.call(this), i = this.spawnWorkers(), this.options.globalPalette === !0) this.renderNextFrame();else for (t = e = 0, n = i; 0 <= n ? e < n : e > n; t = 0 <= n ? ++e : --e) {
          this.renderNextFrame();
        }return this.emit("start"), this.emit("progress", 0);
      }, e.prototype.abort = function () {
        for (var t;;) {
          if (t = this.activeWorkers.shift(), null == t) break;this.log("killing active worker"), t.terminate();
        }return this.running = !1, this.emit("abort");
      }, e.prototype.spawnWorkers = function () {
        var t, e, i;return t = Math.min(this.options.workers, this.frames.length), function () {
          i = [];for (var n = e = this.freeWorkers.length; e <= t ? n < t : n > t; e <= t ? n++ : n--) {
            i.push(n);
          }return i;
        }.apply(this).forEach(function (t) {
          return function (e) {
            var i;return t.log("spawning worker " + e), i = new Worker(t.options.workerScript), i.onmessage = function (e) {
              return t.activeWorkers.splice(t.activeWorkers.indexOf(i), 1), t.freeWorkers.push(i), t.frameFinished(e.data, !1);
            }, t.freeWorkers.push(i);
          };
        }(this)), t;
      }, e.prototype.frameFinished = function (t, e) {
        var i, n, r, s, o;if (this.finishedFrames++, e ? (n = this.frames.indexOf(t), r = this.groups.get(t.data)[0], this.log("frame " + (n + 1) + " is duplicate of " + r + " - " + this.activeWorkers.length + " active"), this.imageParts[n] = { indexOfFirstInGroup: r }) : (this.log("frame " + (t.index + 1) + " finished - " + this.activeWorkers.length + " active"), this.emit("progress", this.finishedFrames / this.frames.length), this.imageParts[t.index] = t), this.options.globalPalette === !0 && !e && (this.options.globalPalette = t.globalPalette, this.log("global palette analyzed"), this.frames.length > 2)) for (i = s = 1, o = this.freeWorkers.length; 1 <= o ? s < o : s > o; i = 1 <= o ? ++s : --s) {
          this.renderNextFrame();
        }return h.call(this.imageParts, null) >= 0 ? this.renderNextFrame() : this.finishRendering();
      }, e.prototype.finishRendering = function () {
        var t, e, i, n, r, s, o, a, h, l, f, p, u, d, c, g, v, m, y, _;for (v = this.imageParts, r = s = 0, l = v.length; s < l; r = ++s) {
          e = v[r], e.indexOfFirstInGroup && (this.imageParts[r] = this.imageParts[e.indexOfFirstInGroup]);
        }for (h = 0, m = this.imageParts, o = 0, f = m.length; o < f; o++) {
          e = m[o], h += (e.data.length - 1) * e.pageSize + e.cursor;
        }for (h += e.pageSize - e.cursor, this.log("rendering finished - filesize " + Math.round(h / 1e3) + "kb"), t = new Uint8Array(h), c = 0, y = this.imageParts, a = 0, p = y.length; a < p; a++) {
          for (e = y[a], _ = e.data, i = d = 0, u = _.length; d < u; i = ++d) {
            g = _[i], t.set(g, c), c += i === e.data.length - 1 ? e.cursor : e.pageSize;
          }
        }return n = new Blob([t], { type: "image/gif" }), this.emit("finished", n, t);
      }, e.prototype.renderNextFrame = function () {
        var t, e, i, n;if (0 === this.freeWorkers.length) throw new Error("No free workers");if (!(this.nextFrame >= this.frames.length)) return t = this.frames[this.nextFrame++], e = this.frames.indexOf(t), e > 0 && this.groups.has(t.data) && this.groups.get(t.data)[0] !== e ? void setTimeout(function (e) {
          return function () {
            return e.frameFinished(t, !0);
          };
        }(this), 0) : (n = this.freeWorkers.shift(), i = this.getTask(t), this.log("starting frame " + (i.index + 1) + " of " + this.frames.length), this.activeWorkers.push(n), n.postMessage(i));
      }, e.prototype.getContextData = function (t) {
        return t.getImageData(0, 0, this.options.width, this.options.height).data;
      }, e.prototype.getImageData = function (t) {
        var e;return null == this._canvas && (this._canvas = document.createElement("canvas"), this._canvas.width = this.options.width, this._canvas.height = this.options.height), e = this._canvas.getContext("2d"), e.setFill = this.options.background, e.fillRect(0, 0, this.options.width, this.options.height), e.drawImage(t, 0, 0), this.getContextData(e);
      }, e.prototype.getTask = function (t) {
        var e, i;if (e = this.frames.indexOf(t), i = { index: e, last: e === this.frames.length - 1, delay: t.delay, transparent: t.transparent, width: this.options.width, height: this.options.height, quality: this.options.quality, dither: this.options.dither, globalPalette: this.options.globalPalette, repeat: this.options.repeat, canTransfer: !0 }, null != t.data) i.data = t.data;else if (null != t.context) i.data = this.getContextData(t.context);else {
          if (null == t.image) throw new Error("Invalid frame");i.data = this.getImageData(t.image);
        }return i;
      }, e.prototype.log = function (t) {
        if (this.options.debug) return console.log(t);
      }, e;
    }(n), t.exports = r;
  }, function (t, e) {
    function i() {
      this._events = this._events || {}, this._maxListeners = this._maxListeners || void 0;
    }function n(t) {
      return "function" == typeof t;
    }function r(t) {
      return "number" == typeof t;
    }function s(t) {
      return "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && null !== t;
    }function o(t) {
      return void 0 === t;
    }t.exports = i, i.EventEmitter = i, i.prototype._events = void 0, i.prototype._maxListeners = void 0, i.defaultMaxListeners = 10, i.prototype.setMaxListeners = function (t) {
      if (!r(t) || t < 0 || isNaN(t)) throw TypeError("n must be a positive number");return this._maxListeners = t, this;
    }, i.prototype.emit = function (t) {
      var e, i, r, a, h, l;if (this._events || (this._events = {}), "error" === t && (!this._events.error || s(this._events.error) && !this._events.error.length)) {
        if (e = arguments[1], e instanceof Error) throw e;var f = new Error('Uncaught, unspecified "error" event. (' + e + ")");throw f.context = e, f;
      }if (i = this._events[t], o(i)) return !1;if (n(i)) switch (arguments.length) {case 1:
          i.call(this);break;case 2:
          i.call(this, arguments[1]);break;case 3:
          i.call(this, arguments[1], arguments[2]);break;default:
          a = Array.prototype.slice.call(arguments, 1), i.apply(this, a);} else if (s(i)) for (a = Array.prototype.slice.call(arguments, 1), l = i.slice(), r = l.length, h = 0; h < r; h++) {
        l[h].apply(this, a);
      }return !0;
    }, i.prototype.addListener = function (t, e) {
      var r;if (!n(e)) throw TypeError("listener must be a function");return this._events || (this._events = {}), this._events.newListener && this.emit("newListener", t, n(e.listener) ? e.listener : e), this._events[t] ? s(this._events[t]) ? this._events[t].push(e) : this._events[t] = [this._events[t], e] : this._events[t] = e, s(this._events[t]) && !this._events[t].warned && (r = o(this._maxListeners) ? i.defaultMaxListeners : this._maxListeners, r && r > 0 && this._events[t].length > r && (this._events[t].warned = !0, console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[t].length), "function" == typeof console.trace && console.trace())), this;
    }, i.prototype.on = i.prototype.addListener, i.prototype.once = function (t, e) {
      function i() {
        this.removeListener(t, i), r || (r = !0, e.apply(this, arguments));
      }if (!n(e)) throw TypeError("listener must be a function");var r = !1;return i.listener = e, this.on(t, i), this;
    }, i.prototype.removeListener = function (t, e) {
      var i, r, o, a;if (!n(e)) throw TypeError("listener must be a function");if (!this._events || !this._events[t]) return this;if (i = this._events[t], o = i.length, r = -1, i === e || n(i.listener) && i.listener === e) delete this._events[t], this._events.removeListener && this.emit("removeListener", t, e);else if (s(i)) {
        for (a = o; a-- > 0;) {
          if (i[a] === e || i[a].listener && i[a].listener === e) {
            r = a;break;
          }
        }if (r < 0) return this;1 === i.length ? (i.length = 0, delete this._events[t]) : i.splice(r, 1), this._events.removeListener && this.emit("removeListener", t, e);
      }return this;
    }, i.prototype.removeAllListeners = function (t) {
      var e, i;if (!this._events) return this;if (!this._events.removeListener) return 0 === arguments.length ? this._events = {} : this._events[t] && delete this._events[t], this;if (0 === arguments.length) {
        for (e in this._events) {
          "removeListener" !== e && this.removeAllListeners(e);
        }return this.removeAllListeners("removeListener"), this._events = {}, this;
      }if (i = this._events[t], n(i)) this.removeListener(t, i);else if (i) for (; i.length;) {
        this.removeListener(t, i[i.length - 1]);
      }return delete this._events[t], this;
    }, i.prototype.listeners = function (t) {
      var e;return e = this._events && this._events[t] ? n(this._events[t]) ? [this._events[t]] : this._events[t].slice() : [];
    }, i.prototype.listenerCount = function (t) {
      if (this._events) {
        var e = this._events[t];if (n(e)) return 1;if (e) return e.length;
      }return 0;
    }, i.listenerCount = function (t, e) {
      return t.listenerCount(e);
    };
  }, function (t, e) {
    var i, n, r, s, o;o = navigator.userAgent.toLowerCase(), s = navigator.platform.toLowerCase(), i = o.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [null, "unknown", 0], r = "ie" === i[1] && document.documentMode, n = { name: "version" === i[1] ? i[3] : i[1], version: r || parseFloat("opera" === i[1] && i[4] ? i[4] : i[2]), platform: { name: o.match(/ip(?:ad|od|hone)/) ? "ios" : (o.match(/(?:webos|android)/) || s.match(/mac|win|linux/) || ["other"])[0] } }, n[n.name] = !0, n[n.name + parseInt(n.version, 10)] = !0, n.platform[n.platform.name] = !0, t.exports = n;
  }]);
});
//# sourceMappingURL=gif.js.map
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))

/***/ }),

/***/ "./src/js/libs/glfx.js":
/*!*****************************!*\
  !*** ./src/js/libs/glfx.js ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
/*
 * glfx.js
 * http://evanw.github.com/glfx.js/
 *
 * Copyright 2011 Evan Wallace
 * Released under the MIT license
 */
var fx = function () {
  function q(a, d, c) {
    return Math.max(a, Math.min(d, c));
  }function w(b) {
    return { _: b, loadContentsOf: function loadContentsOf(b) {
        a = this._.gl;this._.loadContentsOf(b);
      }, destroy: function destroy() {
        a = this._.gl;this._.destroy();
      } };
  }function A(a) {
    return w(r.fromElement(a));
  }function B(b, d) {
    var c = a.UNSIGNED_BYTE;if (a.getExtension("OES_texture_float") && a.getExtension("OES_texture_float_linear")) {
      var e = new r(100, 100, a.RGBA, a.FLOAT);try {
        e.drawTo(function () {
          c = a.FLOAT;
        });
      } catch (g) {}e.destroy();
    }this._.texture && this._.texture.destroy();
    this._.spareTexture && this._.spareTexture.destroy();this.width = b;this.height = d;this._.texture = new r(b, d, a.RGBA, c);this._.spareTexture = new r(b, d, a.RGBA, c);this._.extraTexture = this._.extraTexture || new r(0, 0, a.RGBA, c);this._.flippedShader = this._.flippedShader || new h(null, "uniform sampler2D texture;varying vec2 texCoord;void main(){gl_FragColor=texture2D(texture,vec2(texCoord.x,1.0-texCoord.y));}");this._.isInitialized = !0;
  }function C(a, d, c) {
    this._.isInitialized && a._.width == this.width && a._.height == this.height || B.call(this, d ? d : a._.width, c ? c : a._.height);a._.use();this._.texture.drawTo(function () {
      h.getDefaultShader().drawRect();
    });return this;
  }function D() {
    this._.texture.use();this._.flippedShader.drawRect();return this;
  }function f(a, d, c, e) {
    (c || this._.texture).use();this._.spareTexture.drawTo(function () {
      a.uniforms(d).drawRect();
    });this._.spareTexture.swapWith(e || this._.texture);
  }function E(a) {
    a.parentNode.insertBefore(this, a);a.parentNode.removeChild(a);return this;
  }
  function F() {
    var b = new r(this._.texture.width, this._.texture.height, a.RGBA, a.UNSIGNED_BYTE);this._.texture.use();b.drawTo(function () {
      h.getDefaultShader().drawRect();
    });return w(b);
  }function G() {
    var b = this._.texture.width,
        d = this._.texture.height,
        c = new Uint8Array(4 * b * d);this._.texture.drawTo(function () {
      a.readPixels(0, 0, b, d, a.RGBA, a.UNSIGNED_BYTE, c);
    });return c;
  }function k(b) {
    return function () {
      a = this._.gl;return b.apply(this, arguments);
    };
  }function x(a, d, c, e, g, l, n, p) {
    var m = c - g,
        h = e - l,
        f = n - g,
        k = p - l;g = a - c + g - n;l = d - e + l - p;var q = m * k - f * h,
        f = (g * k - f * l) / q,
        m = (m * l - g * h) / q;return [c - a + f * c, e - d + f * e, f, n - a + m * n, p - d + m * p, m, a, d, 1];
  }function y(a) {
    var d = a[0],
        c = a[1],
        e = a[2],
        g = a[3],
        l = a[4],
        n = a[5],
        p = a[6],
        m = a[7];a = a[8];var f = d * l * a - d * n * m - c * g * a + c * n * p + e * g * m - e * l * p;return [(l * a - n * m) / f, (e * m - c * a) / f, (c * n - e * l) / f, (n * p - g * a) / f, (d * a - e * p) / f, (e * g - d * n) / f, (g * m - l * p) / f, (c * p - d * m) / f, (d * l - c * g) / f];
  }function z(a) {
    var d = a.length;this.xa = [];this.ya = [];this.u = [];this.y2 = [];a.sort(function (a, b) {
      return a[0] - b[0];
    });for (var c = 0; c < d; c++) {
      this.xa.push(a[c][0]), this.ya.push(a[c][1]);
    }this.u[0] = 0;this.y2[0] = 0;for (c = 1; c < d - 1; ++c) {
      a = this.xa[c + 1] - this.xa[c - 1];var e = (this.xa[c] - this.xa[c - 1]) / a,
          g = e * this.y2[c - 1] + 2;this.y2[c] = (e - 1) / g;this.u[c] = (6 * ((this.ya[c + 1] - this.ya[c]) / (this.xa[c + 1] - this.xa[c]) - (this.ya[c] - this.ya[c - 1]) / (this.xa[c] - this.xa[c - 1])) / a - e * this.u[c - 1]) / g;
    }this.y2[d - 1] = 0;for (c = d - 2; 0 <= c; --c) {
      this.y2[c] = this.y2[c] * this.y2[c + 1] + this.u[c];
    }
  }function u(a, d) {
    return new h(null, a + "uniform sampler2D texture;uniform vec2 texSize;varying vec2 texCoord;void main(){vec2 coord=texCoord*texSize;" + d + "gl_FragColor=texture2D(texture,coord/texSize);vec2 clampedCoord=clamp(coord,vec2(0.0),texSize);if(coord!=clampedCoord){gl_FragColor.a*=max(0.0,1.0-length(coord-clampedCoord));}}");
  }function H(b, d) {
    a.brightnessContrast = a.brightnessContrast || new h(null, "uniform sampler2D texture;uniform float brightness;uniform float contrast;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);color.rgb+=brightness;if(contrast>0.0){color.rgb=(color.rgb-0.5)/(1.0-contrast)+0.5;}else{color.rgb=(color.rgb-0.5)*(1.0+contrast)+0.5;}gl_FragColor=color;}");
    f.call(this, a.brightnessContrast, { brightness: q(-1, b, 1), contrast: q(-1, d, 1) });return this;
  }function t(a) {
    a = new z(a);for (var d = [], c = 0; 256 > c; c++) {
      d.push(q(0, Math.floor(256 * a.interpolate(c / 255)), 255));
    }return d;
  }function I(b, d, c) {
    b = t(b);1 == arguments.length ? d = c = b : (d = t(d), c = t(c));for (var e = [], g = 0; 256 > g; g++) {
      e.splice(e.length, 0, b[g], d[g], c[g], 255);
    }this._.extraTexture.initFromBytes(256, 1, e);this._.extraTexture.use(1);a.curves = a.curves || new h(null, "uniform sampler2D texture;uniform sampler2D map;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);color.r=texture2D(map,vec2(color.r)).r;color.g=texture2D(map,vec2(color.g)).g;color.b=texture2D(map,vec2(color.b)).b;gl_FragColor=color;}");
    a.curves.textures({ map: 1 });f.call(this, a.curves, {});return this;
  }function J(b) {
    a.denoise = a.denoise || new h(null, "uniform sampler2D texture;uniform float exponent;uniform float strength;uniform vec2 texSize;varying vec2 texCoord;void main(){vec4 center=texture2D(texture,texCoord);vec4 color=vec4(0.0);float total=0.0;for(float x=-4.0;x<=4.0;x+=1.0){for(float y=-4.0;y<=4.0;y+=1.0){vec4 sample=texture2D(texture,texCoord+vec2(x,y)/texSize);float weight=1.0-abs(dot(sample.rgb-center.rgb,vec3(0.25)));weight=pow(weight,exponent);color+=sample*weight;total+=weight;}}gl_FragColor=color/total;}");
    for (var d = 0; 2 > d; d++) {
      f.call(this, a.denoise, { exponent: Math.max(0, b), texSize: [this.width, this.height] });
    }return this;
  }function K(b, d) {
    a.hueSaturation = a.hueSaturation || new h(null, "uniform sampler2D texture;uniform float hue;uniform float saturation;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float angle=hue*3.14159265;float s=sin(angle),c=cos(angle);vec3 weights=(vec3(2.0*c,-sqrt(3.0)*s-c,sqrt(3.0)*s-c)+1.0)/3.0;float len=length(color.rgb);color.rgb=vec3(dot(color.rgb,weights.xyz),dot(color.rgb,weights.zxy),dot(color.rgb,weights.yzx));float average=(color.r+color.g+color.b)/3.0;if(saturation>0.0){color.rgb+=(average-color.rgb)*(1.0-1.0/(1.001-saturation));}else{color.rgb+=(average-color.rgb)*(-saturation);}gl_FragColor=color;}");
    f.call(this, a.hueSaturation, { hue: q(-1, b, 1), saturation: q(-1, d, 1) });return this;
  }function L(b) {
    a.noise = a.noise || new h(null, "uniform sampler2D texture;uniform float amount;varying vec2 texCoord;float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){vec4 color=texture2D(texture,texCoord);float diff=(rand(texCoord)-0.5)*amount;color.r+=diff;color.g+=diff;color.b+=diff;gl_FragColor=color;}");
    f.call(this, a.noise, { amount: q(0, b, 1) });return this;
  }function M(b) {
    a.sepia = a.sepia || new h(null, "uniform sampler2D texture;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float r=color.r;float g=color.g;float b=color.b;color.r=min(1.0,(r*(1.0-(0.607*amount)))+(g*(0.769*amount))+(b*(0.189*amount)));color.g=min(1.0,(r*0.349*amount)+(g*(1.0-(0.314*amount)))+(b*0.168*amount));color.b=min(1.0,(r*0.272*amount)+(g*0.534*amount)+(b*(1.0-(0.869*amount))));gl_FragColor=color;}");
    f.call(this, a.sepia, { amount: q(0, b, 1) });return this;
  }function N(b, d) {
    a.unsharpMask = a.unsharpMask || new h(null, "uniform sampler2D blurredTexture;uniform sampler2D originalTexture;uniform float strength;uniform float threshold;varying vec2 texCoord;void main(){vec4 blurred=texture2D(blurredTexture,texCoord);vec4 original=texture2D(originalTexture,texCoord);gl_FragColor=mix(blurred,original,1.0+strength);}");
    this._.extraTexture.ensureFormat(this._.texture);this._.texture.use();this._.extraTexture.drawTo(function () {
      h.getDefaultShader().drawRect();
    });this._.extraTexture.use(1);this.triangleBlur(b);a.unsharpMask.textures({ originalTexture: 1 });f.call(this, a.unsharpMask, { strength: d });this._.extraTexture.unuse(1);return this;
  }function O(b) {
    a.vibrance = a.vibrance || new h(null, "uniform sampler2D texture;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float average=(color.r+color.g+color.b)/3.0;float mx=max(color.r,max(color.g,color.b));float amt=(mx-average)*(-amount*3.0);color.rgb=mix(color.rgb,vec3(mx),amt);gl_FragColor=color;}");
    f.call(this, a.vibrance, { amount: q(-1, b, 1) });return this;
  }function P(b, d) {
    a.vignette = a.vignette || new h(null, "uniform sampler2D texture;uniform float size;uniform float amount;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);float dist=distance(texCoord,vec2(0.5,0.5));color.rgb*=smoothstep(0.8,size*0.799,dist*(amount+size));gl_FragColor=color;}");
    f.call(this, a.vignette, { size: q(0, b, 1), amount: q(0, d, 1) });return this;
  }function Q(b, d, c) {
    a.lensBlurPrePass = a.lensBlurPrePass || new h(null, "uniform sampler2D texture;uniform float power;varying vec2 texCoord;void main(){vec4 color=texture2D(texture,texCoord);color=pow(color,vec4(power));gl_FragColor=vec4(color);}");var e = "uniform sampler2D texture0;uniform sampler2D texture1;uniform vec2 delta0;uniform vec2 delta1;uniform float power;varying vec2 texCoord;" + s + "vec4 sample(vec2 delta){float offset=random(vec3(delta,151.7182),0.0);vec4 color=vec4(0.0);float total=0.0;for(float t=0.0;t<=30.0;t++){float percent=(t+offset)/30.0;color+=texture2D(texture0,texCoord+delta*percent);total+=1.0;}return color/total;}";
    a.lensBlur0 = a.lensBlur0 || new h(null, e + "void main(){gl_FragColor=sample(delta0);}");a.lensBlur1 = a.lensBlur1 || new h(null, e + "void main(){gl_FragColor=(sample(delta0)+sample(delta1))*0.5;}");a.lensBlur2 = a.lensBlur2 || new h(null, e + "void main(){vec4 color=(sample(delta0)+2.0*texture2D(texture1,texCoord))/3.0;gl_FragColor=pow(color,vec4(power));}").textures({ texture1: 1 });for (var e = [], g = 0; 3 > g; g++) {
      var l = c + 2 * g * Math.PI / 3;e.push([b * Math.sin(l) / this.width, b * Math.cos(l) / this.height]);
    }b = Math.pow(10, q(-1, d, 1));f.call(this, a.lensBlurPrePass, { power: b });this._.extraTexture.ensureFormat(this._.texture);f.call(this, a.lensBlur0, { delta0: e[0] }, this._.texture, this._.extraTexture);f.call(this, a.lensBlur1, { delta0: e[1], delta1: e[2] }, this._.extraTexture, this._.extraTexture);f.call(this, a.lensBlur0, { delta0: e[1] });this._.extraTexture.use(1);f.call(this, a.lensBlur2, { power: 1 / b, delta0: e[2] });return this;
  }
  function R(b, d, c, e, g, l) {
    a.tiltShift = a.tiltShift || new h(null, "uniform sampler2D texture;uniform float blurRadius;uniform float gradientRadius;uniform vec2 start;uniform vec2 end;uniform vec2 delta;uniform vec2 texSize;varying vec2 texCoord;" + s + "void main(){vec4 color=vec4(0.0);float total=0.0;float offset=random(vec3(12.9898,78.233,151.7182),0.0);vec2 normal=normalize(vec2(start.y-end.y,end.x-start.x));float radius=smoothstep(0.0,1.0,abs(dot(texCoord*texSize-start,normal))/gradientRadius)*blurRadius;for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec4 sample=texture2D(texture,texCoord+delta/texSize*percent*radius);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}");
    var n = c - b,
        p = e - d,
        m = Math.sqrt(n * n + p * p);f.call(this, a.tiltShift, { blurRadius: g, gradientRadius: l, start: [b, d], end: [c, e], delta: [n / m, p / m], texSize: [this.width, this.height] });f.call(this, a.tiltShift, { blurRadius: g, gradientRadius: l, start: [b, d], end: [c, e], delta: [-p / m, n / m], texSize: [this.width, this.height] });return this;
  }function S(b) {
    a.triangleBlur = a.triangleBlur || new h(null, "uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;" + s + "void main(){vec4 color=vec4(0.0);float total=0.0;float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec4 sample=texture2D(texture,texCoord+delta*percent);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}");
    f.call(this, a.triangleBlur, { delta: [b / this.width, 0] });f.call(this, a.triangleBlur, { delta: [0, b / this.height] });return this;
  }function T(b, d, c) {
    a.zoomBlur = a.zoomBlur || new h(null, "uniform sampler2D texture;uniform vec2 center;uniform float strength;uniform vec2 texSize;varying vec2 texCoord;" + s + "void main(){vec4 color=vec4(0.0);float total=0.0;vec2 toCenter=center-texCoord*texSize;float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=0.0;t<=40.0;t++){float percent=(t+offset)/40.0;float weight=4.0*(percent-percent*percent);vec4 sample=texture2D(texture,texCoord+toCenter*percent*strength/texSize);sample.rgb*=sample.a;color+=sample*weight;total+=weight;}gl_FragColor=color/total;gl_FragColor.rgb/=gl_FragColor.a+0.00001;}");
    f.call(this, a.zoomBlur, { center: [b, d], strength: c, texSize: [this.width, this.height] });return this;
  }function U(b, d, c, e) {
    a.colorHalftone = a.colorHalftone || new h(null, "uniform sampler2D texture;uniform vec2 center;uniform float angle;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;float pattern(float angle){float s=sin(angle),c=cos(angle);vec2 tex=texCoord*texSize-center;vec2 point=vec2(c*tex.x-s*tex.y,s*tex.x+c*tex.y)*scale;return(sin(point.x)*sin(point.y))*4.0;}void main(){vec4 color=texture2D(texture,texCoord);vec3 cmy=1.0-color.rgb;float k=min(cmy.x,min(cmy.y,cmy.z));cmy=(cmy-k)/(1.0-k);cmy=clamp(cmy*10.0-3.0+vec3(pattern(angle+0.26179),pattern(angle+1.30899),pattern(angle)),0.0,1.0);k=clamp(k*10.0-5.0+pattern(angle+0.78539),0.0,1.0);gl_FragColor=vec4(1.0-cmy-k,color.a);}");
    f.call(this, a.colorHalftone, { center: [b, d], angle: c, scale: Math.PI / e, texSize: [this.width, this.height] });return this;
  }function V(b, d, c, e) {
    a.dotScreen = a.dotScreen || new h(null, "uniform sampler2D texture;uniform vec2 center;uniform float angle;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;float pattern(){float s=sin(angle),c=cos(angle);vec2 tex=texCoord*texSize-center;vec2 point=vec2(c*tex.x-s*tex.y,s*tex.x+c*tex.y)*scale;return(sin(point.x)*sin(point.y))*4.0;}void main(){vec4 color=texture2D(texture,texCoord);float average=(color.r+color.g+color.b)/3.0;gl_FragColor=vec4(vec3(average*10.0-5.0+pattern()),color.a);}");
    f.call(this, a.dotScreen, { center: [b, d], angle: c, scale: Math.PI / e, texSize: [this.width, this.height] });return this;
  }function W(b) {
    a.edgeWork1 = a.edgeWork1 || new h(null, "uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;" + s + "void main(){vec2 color=vec2(0.0);vec2 total=vec2(0.0);float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec3 sample=texture2D(texture,texCoord+delta*percent).rgb;float average=(sample.r+sample.g+sample.b)/3.0;color.x+=average*weight;total.x+=weight;if(abs(t)<15.0){weight=weight*2.0-1.0;color.y+=average*weight;total.y+=weight;}}gl_FragColor=vec4(color/total,0.0,1.0);}");
    a.edgeWork2 = a.edgeWork2 || new h(null, "uniform sampler2D texture;uniform vec2 delta;varying vec2 texCoord;" + s + "void main(){vec2 color=vec2(0.0);vec2 total=vec2(0.0);float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=-30.0;t<=30.0;t++){float percent=(t+offset-0.5)/30.0;float weight=1.0-abs(percent);vec2 sample=texture2D(texture,texCoord+delta*percent).xy;color.x+=sample.x*weight;total.x+=weight;if(abs(t)<15.0){weight=weight*2.0-1.0;color.y+=sample.y*weight;total.y+=weight;}}float c=clamp(10000.0*(color.y/total.y-color.x/total.x)+0.5,0.0,1.0);gl_FragColor=vec4(c,c,c,1.0);}");
    f.call(this, a.edgeWork1, { delta: [b / this.width, 0] });f.call(this, a.edgeWork2, { delta: [0, b / this.height] });return this;
  }function X(b, d, c) {
    a.hexagonalPixelate = a.hexagonalPixelate || new h(null, "uniform sampler2D texture;uniform vec2 center;uniform float scale;uniform vec2 texSize;varying vec2 texCoord;void main(){vec2 tex=(texCoord*texSize-center)/scale;tex.y/=0.866025404;tex.x-=tex.y*0.5;vec2 a;if(tex.x+tex.y-floor(tex.x)-floor(tex.y)<1.0)a=vec2(floor(tex.x),floor(tex.y));else a=vec2(ceil(tex.x),ceil(tex.y));vec2 b=vec2(ceil(tex.x),floor(tex.y));vec2 c=vec2(floor(tex.x),ceil(tex.y));vec3 TEX=vec3(tex.x,tex.y,1.0-tex.x-tex.y);vec3 A=vec3(a.x,a.y,1.0-a.x-a.y);vec3 B=vec3(b.x,b.y,1.0-b.x-b.y);vec3 C=vec3(c.x,c.y,1.0-c.x-c.y);float alen=length(TEX-A);float blen=length(TEX-B);float clen=length(TEX-C);vec2 choice;if(alen<blen){if(alen<clen)choice=a;else choice=c;}else{if(blen<clen)choice=b;else choice=c;}choice.x+=choice.y*0.5;choice.y*=0.866025404;choice*=scale/texSize;gl_FragColor=texture2D(texture,choice+center/texSize);}");
    f.call(this, a.hexagonalPixelate, { center: [b, d], scale: c, texSize: [this.width, this.height] });return this;
  }function Y(b) {
    a.ink = a.ink || new h(null, "uniform sampler2D texture;uniform float strength;uniform vec2 texSize;varying vec2 texCoord;void main(){vec2 dx=vec2(1.0/texSize.x,0.0);vec2 dy=vec2(0.0,1.0/texSize.y);vec4 color=texture2D(texture,texCoord);float bigTotal=0.0;float smallTotal=0.0;vec3 bigAverage=vec3(0.0);vec3 smallAverage=vec3(0.0);for(float x=-2.0;x<=2.0;x+=1.0){for(float y=-2.0;y<=2.0;y+=1.0){vec3 sample=texture2D(texture,texCoord+dx*x+dy*y).rgb;bigAverage+=sample;bigTotal+=1.0;if(abs(x)+abs(y)<2.0){smallAverage+=sample;smallTotal+=1.0;}}}vec3 edge=max(vec3(0.0),bigAverage/bigTotal-smallAverage/smallTotal);gl_FragColor=vec4(color.rgb-dot(edge,edge)*strength*100000.0,color.a);}");
    f.call(this, a.ink, { strength: b * b * b * b * b, texSize: [this.width, this.height] });return this;
  }function Z(b, d, c, e) {
    a.bulgePinch = a.bulgePinch || u("uniform float radius;uniform float strength;uniform vec2 center;", "coord-=center;float distance=length(coord);if(distance<radius){float percent=distance/radius;if(strength>0.0){coord*=mix(1.0,smoothstep(0.0,radius/distance,percent),strength*0.75);}else{coord*=mix(1.0,pow(percent,1.0+strength*0.75)*radius/distance,1.0-percent);}}coord+=center;");
    f.call(this, a.bulgePinch, { radius: c, strength: q(-1, e, 1), center: [b, d], texSize: [this.width, this.height] });return this;
  }function $(b, d, c) {
    a.matrixWarp = a.matrixWarp || u("uniform mat3 matrix;uniform bool useTextureSpace;", "if(useTextureSpace)coord=coord/texSize*2.0-1.0;vec3 warp=matrix*vec3(coord,1.0);coord=warp.xy/warp.z;if(useTextureSpace)coord=(coord*0.5+0.5)*texSize;");b = Array.prototype.concat.apply([], b);if (4 == b.length) b = [b[0], b[1], 0, b[2], b[3], 0, 0, 0, 1];else if (9 != b.length) throw "can only warp with 2x2 or 3x3 matrix";f.call(this, a.matrixWarp, { matrix: d ? y(b) : b, texSize: [this.width, this.height], useTextureSpace: c | 0 });return this;
  }function aa(a, d) {
    var c = x.apply(null, d),
        e = x.apply(null, a),
        c = y(c);return this.matrixWarp([c[0] * e[0] + c[1] * e[3] + c[2] * e[6], c[0] * e[1] + c[1] * e[4] + c[2] * e[7], c[0] * e[2] + c[1] * e[5] + c[2] * e[8], c[3] * e[0] + c[4] * e[3] + c[5] * e[6], c[3] * e[1] + c[4] * e[4] + c[5] * e[7], c[3] * e[2] + c[4] * e[5] + c[5] * e[8], c[6] * e[0] + c[7] * e[3] + c[8] * e[6], c[6] * e[1] + c[7] * e[4] + c[8] * e[7], c[6] * e[2] + c[7] * e[5] + c[8] * e[8]]);
  }function ba(b, d, c, e) {
    a.swirl = a.swirl || u("uniform float radius;uniform float angle;uniform vec2 center;", "coord-=center;float distance=length(coord);if(distance<radius){float percent=(radius-distance)/radius;float theta=percent*percent*angle;float s=sin(theta);float c=cos(theta);coord=vec2(coord.x*c-coord.y*s,coord.x*s+coord.y*c);}coord+=center;");
    f.call(this, a.swirl, { radius: c, center: [b, d], angle: e, texSize: [this.width, this.height] });return this;
  }var v = {};(function () {
    function a(b) {
      if (!b.getExtension("OES_texture_float")) return !1;var c = b.createFramebuffer(),
          e = b.createTexture();b.bindTexture(b.TEXTURE_2D, e);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.NEAREST);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, b.NEAREST);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE);
      b.texImage2D(b.TEXTURE_2D, 0, b.RGBA, 1, 1, 0, b.RGBA, b.UNSIGNED_BYTE, null);b.bindFramebuffer(b.FRAMEBUFFER, c);b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, e, 0);c = b.createTexture();b.bindTexture(b.TEXTURE_2D, c);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.LINEAR);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, b.LINEAR);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE);b.texImage2D(b.TEXTURE_2D, 0, b.RGBA, 2, 2, 0, b.RGBA, b.FLOAT, new Float32Array([2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));var e = b.createProgram(),
          d = b.createShader(b.VERTEX_SHADER),
          g = b.createShader(b.FRAGMENT_SHADER);b.shaderSource(d, "attribute vec2 vertex;void main(){gl_Position=vec4(vertex,0.0,1.0);}");b.shaderSource(g, "uniform sampler2D texture;void main(){gl_FragColor=texture2D(texture,vec2(0.5));}");b.compileShader(d);b.compileShader(g);b.attachShader(e, d);b.attachShader(e, g);b.linkProgram(e);d = b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER, d);b.bufferData(b.ARRAY_BUFFER, new Float32Array([0, 0]), b.STREAM_DRAW);b.enableVertexAttribArray(0);b.vertexAttribPointer(0, 2, b.FLOAT, !1, 0, 0);d = new Uint8Array(4);b.useProgram(e);b.viewport(0, 0, 1, 1);b.bindTexture(b.TEXTURE_2D, c);b.drawArrays(b.POINTS, 0, 1);b.readPixels(0, 0, 1, 1, b.RGBA, b.UNSIGNED_BYTE, d);return 127 === d[0] || 128 === d[0];
    }function d() {}function c(a) {
      "OES_texture_float_linear" === a ? (void 0 === this.$OES_texture_float_linear$ && Object.defineProperty(this, "$OES_texture_float_linear$", { enumerable: !1, configurable: !1, writable: !1, value: new d() }), a = this.$OES_texture_float_linear$) : a = n.call(this, a);return a;
    }function e() {
      var a = f.call(this);-1 === a.indexOf("OES_texture_float_linear") && a.push("OES_texture_float_linear");return a;
    }try {
      var g = document.createElement("canvas").getContext("experimental-webgl");
    } catch (l) {}if (g && -1 === g.getSupportedExtensions().indexOf("OES_texture_float_linear") && a(g)) {
      var n = WebGLRenderingContext.prototype.getExtension,
          f = WebGLRenderingContext.prototype.getSupportedExtensions;
      WebGLRenderingContext.prototype.getExtension = c;WebGLRenderingContext.prototype.getSupportedExtensions = e;
    }
  })();var a;v.canvas = function () {
    var b = document.createElement("canvas");try {
      a = b.getContext("experimental-webgl", { premultipliedAlpha: !1 });
    } catch (d) {
      a = null;
    }if (!a) throw "This browser does not support WebGL";b._ = { gl: a, isInitialized: !1, texture: null, spareTexture: null, flippedShader: null };b.texture = k(A);b.draw = k(C);b.update = k(D);b.replace = k(E);b.contents = k(F);b.getPixelArray = k(G);b.brightnessContrast = k(H);
    b.hexagonalPixelate = k(X);b.hueSaturation = k(K);b.colorHalftone = k(U);b.triangleBlur = k(S);b.unsharpMask = k(N);b.perspective = k(aa);b.matrixWarp = k($);b.bulgePinch = k(Z);b.tiltShift = k(R);b.dotScreen = k(V);b.edgeWork = k(W);b.lensBlur = k(Q);b.zoomBlur = k(T);b.noise = k(L);b.denoise = k(J);b.curves = k(I);b.swirl = k(ba);b.ink = k(Y);b.vignette = k(P);b.vibrance = k(O);b.sepia = k(M);return b;
  };v.splineInterpolate = t;var h = function () {
    function b(b, c) {
      var e = a.createShader(b);a.shaderSource(e, c);a.compileShader(e);if (!a.getShaderParameter(e, a.COMPILE_STATUS)) throw "compile error: " + a.getShaderInfoLog(e);return e;
    }function d(d, l) {
      this.texCoordAttribute = this.vertexAttribute = null;this.program = a.createProgram();d = d || c;l = l || e;l = "precision highp float;" + l;a.attachShader(this.program, b(a.VERTEX_SHADER, d));a.attachShader(this.program, b(a.FRAGMENT_SHADER, l));a.linkProgram(this.program);if (!a.getProgramParameter(this.program, a.LINK_STATUS)) throw "link error: " + a.getProgramInfoLog(this.program);
    }var c = "attribute vec2 vertex;attribute vec2 _texCoord;varying vec2 texCoord;void main(){texCoord=_texCoord;gl_Position=vec4(vertex*2.0-1.0,0.0,1.0);}",
        e = "uniform sampler2D texture;varying vec2 texCoord;void main(){gl_FragColor=texture2D(texture,texCoord);}";d.prototype.destroy = function () {
      a.deleteProgram(this.program);this.program = null;
    };d.prototype.uniforms = function (b) {
      a.useProgram(this.program);for (var e in b) {
        if (b.hasOwnProperty(e)) {
          var c = a.getUniformLocation(this.program, e);if (null !== c) {
            var d = b[e];if ("[object Array]" == Object.prototype.toString.call(d)) switch (d.length) {case 1:
                a.uniform1fv(c, new Float32Array(d));break;
              case 2:
                a.uniform2fv(c, new Float32Array(d));break;case 3:
                a.uniform3fv(c, new Float32Array(d));break;case 4:
                a.uniform4fv(c, new Float32Array(d));break;case 9:
                a.uniformMatrix3fv(c, !1, new Float32Array(d));break;case 16:
                a.uniformMatrix4fv(c, !1, new Float32Array(d));break;default:
                throw "dont't know how to load uniform \"" + e + '" of length ' + d.length;} else if ("[object Number]" == Object.prototype.toString.call(d)) a.uniform1f(c, d);else throw 'attempted to set uniform "' + e + '" to invalid value ' + (d || "undefined").toString();
          }
        }
      }return this;
    };d.prototype.textures = function (b) {
      a.useProgram(this.program);for (var c in b) {
        b.hasOwnProperty(c) && a.uniform1i(a.getUniformLocation(this.program, c), b[c]);
      }return this;
    };d.prototype.drawRect = function (b, c, e, d) {
      var f = a.getParameter(a.VIEWPORT);c = void 0 !== c ? (c - f[1]) / f[3] : 0;b = void 0 !== b ? (b - f[0]) / f[2] : 0;e = void 0 !== e ? (e - f[0]) / f[2] : 1;d = void 0 !== d ? (d - f[1]) / f[3] : 1;null == a.vertexBuffer && (a.vertexBuffer = a.createBuffer());a.bindBuffer(a.ARRAY_BUFFER, a.vertexBuffer);a.bufferData(a.ARRAY_BUFFER, new Float32Array([b, c, b, d, e, c, e, d]), a.STATIC_DRAW);null == a.texCoordBuffer && (a.texCoordBuffer = a.createBuffer(), a.bindBuffer(a.ARRAY_BUFFER, a.texCoordBuffer), a.bufferData(a.ARRAY_BUFFER, new Float32Array([0, 0, 0, 1, 1, 0, 1, 1]), a.STATIC_DRAW));null == this.vertexAttribute && (this.vertexAttribute = a.getAttribLocation(this.program, "vertex"), a.enableVertexAttribArray(this.vertexAttribute));null == this.texCoordAttribute && (this.texCoordAttribute = a.getAttribLocation(this.program, "_texCoord"), a.enableVertexAttribArray(this.texCoordAttribute));
      a.useProgram(this.program);a.bindBuffer(a.ARRAY_BUFFER, a.vertexBuffer);a.vertexAttribPointer(this.vertexAttribute, 2, a.FLOAT, !1, 0, 0);a.bindBuffer(a.ARRAY_BUFFER, a.texCoordBuffer);a.vertexAttribPointer(this.texCoordAttribute, 2, a.FLOAT, !1, 0, 0);a.drawArrays(a.TRIANGLE_STRIP, 0, 4);
    };d.getDefaultShader = function () {
      a.defaultShader = a.defaultShader || new d();return a.defaultShader;
    };return d;
  }();z.prototype.interpolate = function (a) {
    for (var d = 0, c = this.ya.length - 1; 1 < c - d;) {
      var e = c + d >> 1;this.xa[e] > a ? c = e : d = e;
    }var e = this.xa[c] - this.xa[d],
        g = (this.xa[c] - a) / e;a = (a - this.xa[d]) / e;return g * this.ya[d] + a * this.ya[c] + ((g * g * g - g) * this.y2[d] + (a * a * a - a) * this.y2[c]) * e * e / 6;
  };var r = function () {
    function b(b, c, d, f) {
      this.gl = a;this.id = a.createTexture();this.width = b;this.height = c;this.format = d;this.type = f;a.bindTexture(a.TEXTURE_2D, this.id);a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR);a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR);a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE);b && c && a.texImage2D(a.TEXTURE_2D, 0, this.format, b, c, 0, this.format, this.type, null);
    }function d(a) {
      null == c && (c = document.createElement("canvas"));c.width = a.width;c.height = a.height;a = c.getContext("2d");a.clearRect(0, 0, c.width, c.height);return a;
    }b.fromElement = function (c) {
      var d = new b(0, 0, a.RGBA, a.UNSIGNED_BYTE);d.loadContentsOf(c);return d;
    };b.prototype.loadContentsOf = function (b) {
      this.width = b.width || b.videoWidth;this.height = b.height || b.videoHeight;a.bindTexture(a.TEXTURE_2D, this.id);a.texImage2D(a.TEXTURE_2D, 0, this.format, this.format, this.type, b);
    };b.prototype.initFromBytes = function (b, c, d) {
      this.width = b;this.height = c;this.format = a.RGBA;this.type = a.UNSIGNED_BYTE;a.bindTexture(a.TEXTURE_2D, this.id);a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, b, c, 0, a.RGBA, this.type, new Uint8Array(d));
    };b.prototype.destroy = function () {
      a.deleteTexture(this.id);this.id = null;
    };b.prototype.use = function (b) {
      a.activeTexture(a.TEXTURE0 + (b || 0));a.bindTexture(a.TEXTURE_2D, this.id);
    };b.prototype.unuse = function (b) {
      a.activeTexture(a.TEXTURE0 + (b || 0));a.bindTexture(a.TEXTURE_2D, null);
    };b.prototype.ensureFormat = function (b, c, d, f) {
      if (1 == arguments.length) {
        var h = arguments[0];b = h.width;c = h.height;d = h.format;f = h.type;
      }if (b != this.width || c != this.height || d != this.format || f != this.type) this.width = b, this.height = c, this.format = d, this.type = f, a.bindTexture(a.TEXTURE_2D, this.id), a.texImage2D(a.TEXTURE_2D, 0, this.format, b, c, 0, this.format, this.type, null);
    };b.prototype.drawTo = function (b) {
      a.framebuffer = a.framebuffer || a.createFramebuffer();a.bindFramebuffer(a.FRAMEBUFFER, a.framebuffer);a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, this.id, 0);if (a.checkFramebufferStatus(a.FRAMEBUFFER) !== a.FRAMEBUFFER_COMPLETE) throw Error("incomplete framebuffer");a.viewport(0, 0, this.width, this.height);b();a.bindFramebuffer(a.FRAMEBUFFER, null);
    };var c = null;b.prototype.fillUsingCanvas = function (b) {
      b(d(this));this.format = a.RGBA;this.type = a.UNSIGNED_BYTE;a.bindTexture(a.TEXTURE_2D, this.id);a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, c);return this;
    };
    b.prototype.toImage = function (b) {
      this.use();h.getDefaultShader().drawRect();var f = 4 * this.width * this.height,
          k = new Uint8Array(f),
          n = d(this),
          p = n.createImageData(this.width, this.height);a.readPixels(0, 0, this.width, this.height, a.RGBA, a.UNSIGNED_BYTE, k);for (var m = 0; m < f; m++) {
        p.data[m] = k[m];
      }n.putImageData(p, 0, 0);b.src = c.toDataURL();
    };b.prototype.swapWith = function (a) {
      var b;b = a.id;a.id = this.id;this.id = b;b = a.width;a.width = this.width;this.width = b;b = a.height;a.height = this.height;this.height = b;b = a.format;a.format = this.format;this.format = b;
    };return b;
  }(),
      s = "float random(vec3 scale,float seed){return fract(sin(dot(gl_FragCoord.xyz+seed,scale))*43758.5453+seed);}";return v;
}();

exports.default = fx;

/***/ }),

/***/ "./src/js/libs/helpers.js":
/*!********************************!*\
  !*** ./src/js/libs/helpers.js ***!
  \********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * various helpers
 * 
 * @author ViliusL
 */
var Helper_class = function () {
	function Helper_class() {
		_classCallCheck(this, Helper_class);

		this.time = null;
	}

	_createClass(Helper_class, [{
		key: "get_url_parameters",
		value: function get_url_parameters() {
			var queryDict = {};
			location.search.substr(1).split("&").forEach(function (item) {
				queryDict[item.split("=")[0]] = item.split("=")[1];
			});

			return queryDict;
		}

		/**
   * starts timer
   */

	}, {
		key: "timer_start",
		value: function timer_start() {
			this.time = Date.now();
		}

		/**
   * calculates time between two calls.
   * 
   * @param {string} name Optional
   * @param {boolean} echo Default is true.
   */

	}, {
		key: "timer_end",
		value: function timer_end(name, echo) {
			var text = Math.round(Date.now() - this.time) / 1000 + " s";
			if (echo != undefined && echo === false) return text;
			if (name != undefined) text += ' (' + name + ')';
			console.log(text);
		}

		//format time

	}, {
		key: "format_time",
		value: function format_time(datetime) {
			return new Date(datetime).toJSON().slice(0, 19).replace(/T/g, ' ');
		}

		/**
   * Find the position of the first occurrence of string or false.
   * 
   * @param {string} haystack
   * @param {string} needle
   * @param {int} offset
   * @returns {Boolean|String}
   */

	}, {
		key: "strpos",
		value: function strpos(haystack, needle, offset) {
			var i = (haystack + '').indexOf(needle, offset || 0);
			return i === -1 ? false : i;
		}

		/**
   * return cookie value from global cookie
   * 
   * @param {string} name
   * @returns {object|string}
   */

	}, {
		key: "getCookie",
		value: function getCookie(name) {
			var cookie = this._getCookie('config');
			if (cookie == '') cookie = {};else cookie = JSON.parse(cookie);

			if (cookie[name] != undefined) return cookie[name];else return null;
		}

		/**
   * sets cookie value to global cookie
   * 
   * @param {type} name
   * @param {type} value
   * @returns {undefined}
   */

	}, {
		key: "setCookie",
		value: function setCookie(name, value) {
			var cookie = this._getCookie('config');
			if (cookie == '') cookie = {};else cookie = JSON.parse(cookie);

			cookie[name] = value;
			var cookie = JSON.stringify(cookie);

			this._setCookie('config', cookie);
		}
	}, {
		key: "_getCookie",
		value: function _getCookie(NameOfCookie) {
			if (document.cookie.length > 0) {
				var begin = document.cookie.indexOf(NameOfCookie + "=");
				if (begin != -1) {
					begin += NameOfCookie.length + 1;
					var end = document.cookie.indexOf(";", begin);
					if (end == -1) end = document.cookie.length;
					return document.cookie.substring(begin, end);
				}
			}
			return '';
		}
	}, {
		key: "_setCookie",
		value: function _setCookie(NameOfCookie, value, expire_days) {
			if (expire_days == undefined) expire_days = 180;
			var ExpireDate = new Date();
			ExpireDate.setTime(ExpireDate.getTime() + expire_days * 24 * 3600 * 1000);
			document.cookie = NameOfCookie + "=" + value + (expire_days == null ? "" : "; expires=" + ExpireDate.toGMTString());
		}
	}, {
		key: "delCookie",
		value: function delCookie(NameOfCookie) {
			if (this.getCookie(NameOfCookie)) {
				document.cookie = NameOfCookie + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
			}
		}
	}, {
		key: "getRandomInt",
		value: function getRandomInt(min, max) {
			return Math.floor(Math.random() * (max - min + 1)) + min;
		}
	}, {
		key: "font_pixel_to_height",
		value: function font_pixel_to_height(px) {
			return Math.round(px * 0.75);
		}
	}, {
		key: "rgbToHex",
		value: function rgbToHex(r, g, b) {
			if (r > 255 || g > 255 || b > 255) throw "Invalid color component";
			var tmp = (r << 16 | g << 8 | b).toString(16);

			return "#" + ("000000" + tmp).slice(-6);
		}
	}, {
		key: "rgb2hex_all",
		value: function rgb2hex_all(rgb) {
			rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
			return "#" + this.hex(rgb[1]) + this.hex(rgb[2]) + this.hex(rgb[3]);
		}
	}, {
		key: "hex",
		value: function hex(x) {
			x = parseInt(x);
			return ("0" + x.toString(16)).slice(-2);
		}
	}, {
		key: "hex2rgb",
		value: function hex2rgb(hex) {
			if (hex[0] == "#") hex = hex.substr(1);
			if (hex.length == 3) {
				var temp = hex;
				hex = '';
				temp = /^([a-f0-9])([a-f0-9])([a-f0-9])$/i.exec(temp).slice(1);
				for (var i = 0; i < 3; i++) {
					hex += temp[i] + temp[i];
				}
			}
			var triplets = /^([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i.exec(hex).slice(1);
			return {
				r: parseInt(triplets[0], 16),
				g: parseInt(triplets[1], 16),
				b: parseInt(triplets[2], 16),
				a: 255
			};
		}
	}, {
		key: "remove_selection",
		value: function remove_selection() {
			if (window.getSelection) {
				if (window.getSelection().empty) // Chrome
					window.getSelection().empty();else if (window.getSelection().removeAllRanges) // Firefox
					window.getSelection().removeAllRanges();
			} else if (document.selection) // IE?
				document.selection.empty();
		}

		//credits: richard maloney 2006

	}, {
		key: "darkenColor",
		value: function darkenColor(color, v) {
			if (color.length > 6) {
				color = color.substring(1, color.length);
			}
			var rgb = parseInt(color, 16);
			var r = Math.abs((rgb >> 16 & 0xFF) + v);
			if (r > 255) r = r - (r - 255);
			var g = Math.abs((rgb >> 8 & 0xFF) + v);
			if (g > 255) g = g - (g - 255);
			var b = Math.abs((rgb & 0xFF) + v);
			if (b > 255) b = b - (b - 255);
			r = Number(r < 0 || isNaN(r)) ? 0 : (r > 255 ? 255 : r).toString(16);
			if (r.length == 1) r = '0' + r;
			g = Number(g < 0 || isNaN(g)) ? 0 : (g > 255 ? 255 : g).toString(16);
			if (g.length == 1) g = '0' + g;
			b = Number(b < 0 || isNaN(b)) ? 0 : (b > 255 ? 255 : b).toString(16);
			if (b.length == 1) b = '0' + b;
			return "#" + r + g + b;
		}

		/**
   * JavaScript Number Formatter, author: KPL, KHL
   * 
   * @param {int} n
   * @param {int} decPlaces
   * @param {string} thouSeparator
   * @param {string} decSeparator
   * @returns {string}
   */

	}, {
		key: "number_format",
		value: function number_format(n, decPlaces, thouSeparator, decSeparator) {
			var decPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces;
			var decSeparator = decSeparator == undefined ? "." : decSeparator;
			var thouSeparator = thouSeparator == undefined ? "," : thouSeparator;
			var sign = n < 0 ? "-" : "";
			var i = parseInt(n = Math.abs(+n || 0).toFixed(decPlaces)) + "";
			var j = (j = i.length) > 3 ? j % 3 : 0;
			return sign + (j ? i.substr(0, j) + thouSeparator : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thouSeparator) + (decPlaces ? decSeparator + Math.abs(n - i).toFixed(decPlaces).slice(2) : "");
		}
	}, {
		key: "check_input_color_support",
		value: function check_input_color_support() {
			var i = document.createElement("input");
			i.setAttribute("type", "color");
			return i.type !== "text";
		}
	}, {
		key: "b64toBlob",
		value: function b64toBlob(b64Data, contentType, sliceSize) {
			contentType = contentType || '';
			sliceSize = sliceSize || 512;

			var byteCharacters = atob(b64Data);
			var byteArrays = [];

			for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
				var slice = byteCharacters.slice(offset, offset + sliceSize);

				var byteNumbers = new Array(slice.length);
				for (var i = 0; i < slice.length; i++) {
					byteNumbers[i] = slice.charCodeAt(i);
				}

				var byteArray = new Uint8Array(byteNumbers);

				byteArrays.push(byteArray);
			}

			var blob = new Blob(byteArrays, { type: contentType });
			return blob;
		}
	}, {
		key: "escapeHtml",
		value: function escapeHtml(text) {
			return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
		}
	}, {
		key: "isNumeric",
		value: function isNumeric(n) {
			return !isNaN(parseFloat(n)) && isFinite(n);
		}

		/**
   * Converts an HSL color value to RGB. 
   * Assumes h, s, and l are contained in the set [0, 1]
   * Returns r, g, and b in the set [0, 255].
   *
   * @param {number} h The hue
   * @param {number} s The saturation
   * @param {number} l The lightness
   * @return {Array} The RGB representation
   */

	}, {
		key: "hslToRgb",
		value: function hslToRgb(h, s, l) {
			var r, g, b;

			if (s == 0) {
				r = g = b = l; // achromatic
			} else {
				var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
				var p = 2 * l - q;
				r = this.hue2rgb(p, q, h + 1 / 3);
				g = this.hue2rgb(p, q, h);
				b = this.hue2rgb(p, q, h - 1 / 3);
			}

			return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
		}
	}, {
		key: "hue2rgb",
		value: function hue2rgb(p, q, t) {
			if (t < 0) t += 1;
			if (t > 1) t -= 1;
			if (t < 1 / 6) return p + (q - p) * 6 * t;
			if (t < 1 / 2) return q;
			if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
			return p;
		}

		/**
   * Converts an RGB color value to HSL. Values are in range 0-1. 
   * But real ranges are 0-360, 0-100%, 0-100%
   * 
   * @param {number} r red color value
   * @param {number} g green color value
   * @param {number} b blue color value
   * @return {object} The HSL representation
   */

	}, {
		key: "rgbToHsl",
		value: function rgbToHsl(r, g, b) {
			r /= 255;
			g /= 255;
			b /= 255;
			var max = Math.max(r, g, b),
			    min = Math.min(r, g, b);
			var h,
			    s,
			    l = (max + min) / 2;

			if (max == min) {
				h = s = 0; // achromatic
			} else {
				var d = max - min;
				s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
				switch (max) {
					case r:
						h = (g - b) / d + (g < b ? 6 : 0);
						break;
					case g:
						h = (b - r) / d + 2;
						break;
					case b:
						h = (r - g) / d + 4;
						break;
				}
				h /= 6;
			}

			return { h: h, s: s, l: l };
		}
	}, {
		key: "ucfirst",
		value: function ucfirst(string) {
			return string.charAt(0).toUpperCase() + string.slice(1);
		}

		/**
   * change canvas size without loosing data
   * 
   * @param {canvas} canvas
   * @param {int} width
   * @param {int} height
   * @param {int} offset_x
   * @param {int} offset_y
   */

	}, {
		key: "change_canvas_size",
		value: function change_canvas_size(canvas, width, height, offset_x, offset_y) {
			if (offset_x == undefined) offset_x = 0;
			if (offset_y == undefined) offset_y = 0;

			//copy data;
			var tmp = document.createElement('canvas');
			var ctx = tmp.getContext("2d");
			tmp.width = canvas.width;
			tmp.height = canvas.height;
			ctx.drawImage(canvas, 0, 0);

			canvas.width = Math.max(1, width);
			canvas.height = Math.max(1, height);

			//restore image
			canvas.getContext("2d").drawImage(tmp, -offset_x, -offset_y);
		}
	}, {
		key: "image_round",
		value: function image_round(ctx_main, mouse_x, mouse_y, size_w, size_h, img_data) {
			var anti_aliasing = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;

			//create tmp canvas
			var canvasTmp = document.createElement('canvas');
			canvasTmp.width = size_w;
			canvasTmp.height = size_h;

			var size_half_w = Math.round(size_w / 2);
			var size_half_h = Math.round(size_h / 2);
			var ctx = canvasTmp.getContext("2d");
			var width = canvasTmp.width;
			var height = canvasTmp.height;
			var xx = mouse_x - size_half_w;
			var yy = mouse_y - size_half_h;

			ctx.clearRect(0, 0, width, height);
			ctx.save();
			//draw main data
			ctx.putImageData(img_data, 0, 0);
			ctx.globalCompositeOperation = 'destination-in';

			//create form
			var gradient = ctx.createRadialGradient(size_half_w, size_half_h, 0, size_half_w, size_half_h, size_half_w);
			gradient.addColorStop(0, '#ffffff');
			if (anti_aliasing == true) gradient.addColorStop(0.8, '#ffffff');else gradient.addColorStop(0.99, '#ffffff');
			gradient.addColorStop(1, 'rgba(255,255,255,0');
			ctx.fillStyle = gradient;

			ctx.beginPath();
			ctx.ellipse(size_half_w, size_half_h, size_w * 2, size_h * 2, 0, 0, 2 * Math.PI);
			ctx.fill();
			ctx_main.drawImage(canvasTmp, 0, 0, size_w, size_h, xx, yy, size_w, size_h);
			//reset
			ctx.restore();
			ctx.clearRect(0, 0, width, height);
		}

		//if IE 11 or Edge

	}, {
		key: "is_edge_or_ie",
		value: function is_edge_or_ie() {
			//ie11
			if (!window.ActiveXObject && "ActiveXObject" in window) return true;
			//edge
			if (navigator.userAgent.indexOf('Edge/') != -1) return true;
			return false;
		}
	}]);

	return Helper_class;
}();

exports.default = Helper_class;

/***/ }),

/***/ "./src/js/libs/imagefilters.js":
/*!*************************************!*\
  !*** ./src/js/libs/imagefilters.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});
//about - A Javascript Image filter library for the HTML5 Canvas tag. 
//author - https://github.com/arahaya/ImageFilters.js
//demo - http://www.arahaya.com/imagefilters/

var ImageFilters = {};
ImageFilters.utils = {
	initSampleCanvas: function initSampleCanvas() {
		var _canvas = document.createElement('canvas'),
		    _context = _canvas.getContext('2d');

		_canvas.width = 0;
		_canvas.height = 0;

		this.getSampleCanvas = function () {
			return _canvas;
		};
		this.getSampleContext = function () {
			return _context;
		};
		this.createImageData = _context.createImageData ? function (w, h) {
			return _context.createImageData(w, h);
		} : function (w, h) {
			return new ImageData(w, h);
		};
	},
	getSampleCanvas: function getSampleCanvas() {
		this.initSampleCanvas();
		return this.getSampleCanvas();
	},
	getSampleContext: function getSampleContext() {
		this.initSampleCanvas();
		return this.getSampleContext();
	},
	createImageData: function createImageData(w, h) {
		this.initSampleCanvas();
		return this.createImageData(w, h);
	},
	clamp: function clamp(value) {
		return value > 255 ? 255 : value < 0 ? 0 : value;
	},
	buildMap: function buildMap(f) {
		for (var m = [], k = 0, v; k < 256; k += 1) {
			m[k] = (v = f(k)) > 255 ? 255 : v < 0 ? 0 : v | 0;
		}
		return m;
	},
	applyMap: function applyMap(src, dst, map) {
		for (var i = 0, l = src.length; i < l; i += 4) {
			dst[i] = map[src[i]];
			dst[i + 1] = map[src[i + 1]];
			dst[i + 2] = map[src[i + 2]];
			dst[i + 3] = src[i + 3];
		}
	},
	mapRGB: function mapRGB(src, dst, func) {
		this.applyMap(src, dst, this.buildMap(func));
	},
	getPixelIndex: function getPixelIndex(x, y, width, height, edge) {
		if (x < 0 || x >= width || y < 0 || y >= height) {
			switch (edge) {
				case 1:
					// clamp
					x = x < 0 ? 0 : x >= width ? width - 1 : x;
					y = y < 0 ? 0 : y >= height ? height - 1 : y;
					break;
				case 2:
					// wrap
					x = (x %= width) < 0 ? x + width : x;
					y = (y %= height) < 0 ? y + height : y;
					break;
				default:
					// transparent
					return null;
			}
		}
		return y * width + x << 2;
	},
	getPixel: function getPixel(src, x, y, width, height, edge) {
		if (x < 0 || x >= width || y < 0 || y >= height) {
			switch (edge) {
				case 1:
					// clamp
					x = x < 0 ? 0 : x >= width ? width - 1 : x;
					y = y < 0 ? 0 : y >= height ? height - 1 : y;
					break;
				case 2:
					// wrap
					x = (x %= width) < 0 ? x + width : x;
					y = (y %= height) < 0 ? y + height : y;
					break;
				default:
					// transparent
					return 0;
			}
		}

		var i = y * width + x << 2;

		// ARGB
		return src[i + 3] << 24 | src[i] << 16 | src[i + 1] << 8 | src[i + 2];
	},
	getPixelByIndex: function getPixelByIndex(src, i) {
		return src[i + 3] << 24 | src[i] << 16 | src[i + 1] << 8 | src[i + 2];
	},
	/**
  * one of the most important functions in this library.
  * I want to make this as fast as possible.
  */
	copyBilinear: function copyBilinear(src, x, y, width, height, dst, dstIndex, edge) {
		var fx = x < 0 ? x - 1 | 0 : x | 0,
		    // Math.floor(x)
		fy = y < 0 ? y - 1 | 0 : y | 0,
		    // Math.floor(y)
		wx = x - fx,
		    wy = y - fy,
		    i,
		    nw = 0,
		    ne = 0,
		    sw = 0,
		    se = 0,
		    cx,
		    cy,
		    r,
		    g,
		    b,
		    a;

		if (fx >= 0 && fx < width - 1 && fy >= 0 && fy < height - 1) {
			// in bounds, no edge actions required
			i = fy * width + fx << 2;

			if (wx || wy) {
				nw = src[i + 3] << 24 | src[i] << 16 | src[i + 1] << 8 | src[i + 2];

				i += 4;
				ne = src[i + 3] << 24 | src[i] << 16 | src[i + 1] << 8 | src[i + 2];

				i = i - 8 + (width << 2);
				sw = src[i + 3] << 24 | src[i] << 16 | src[i + 1] << 8 | src[i + 2];

				i += 4;
				se = src[i + 3] << 24 | src[i] << 16 | src[i + 1] << 8 | src[i + 2];
			} else {
				// no interpolation required
				dst[dstIndex] = src[i];
				dst[dstIndex + 1] = src[i + 1];
				dst[dstIndex + 2] = src[i + 2];
				dst[dstIndex + 3] = src[i + 3];
				return;
			}
		} else {
			// edge actions required
			nw = this.getPixel(src, fx, fy, width, height, edge);

			if (wx || wy) {
				ne = this.getPixel(src, fx + 1, fy, width, height, edge);
				sw = this.getPixel(src, fx, fy + 1, width, height, edge);
				se = this.getPixel(src, fx + 1, fy + 1, width, height, edge);
			} else {
				// no interpolation required
				dst[dstIndex] = nw >> 16 & 0xFF;
				dst[dstIndex + 1] = nw >> 8 & 0xFF;
				dst[dstIndex + 2] = nw & 0xFF;
				dst[dstIndex + 3] = nw >> 24 & 0xFF;
				return;
			}
		}

		cx = 1 - wx;
		cy = 1 - wy;
		r = ((nw >> 16 & 0xFF) * cx + (ne >> 16 & 0xFF) * wx) * cy + ((sw >> 16 & 0xFF) * cx + (se >> 16 & 0xFF) * wx) * wy;
		g = ((nw >> 8 & 0xFF) * cx + (ne >> 8 & 0xFF) * wx) * cy + ((sw >> 8 & 0xFF) * cx + (se >> 8 & 0xFF) * wx) * wy;
		b = ((nw & 0xFF) * cx + (ne & 0xFF) * wx) * cy + ((sw & 0xFF) * cx + (se & 0xFF) * wx) * wy;
		a = ((nw >> 24 & 0xFF) * cx + (ne >> 24 & 0xFF) * wx) * cy + ((sw >> 24 & 0xFF) * cx + (se >> 24 & 0xFF) * wx) * wy;

		dst[dstIndex] = r > 255 ? 255 : r < 0 ? 0 : r | 0;
		dst[dstIndex + 1] = g > 255 ? 255 : g < 0 ? 0 : g | 0;
		dst[dstIndex + 2] = b > 255 ? 255 : b < 0 ? 0 : b | 0;
		dst[dstIndex + 3] = a > 255 ? 255 : a < 0 ? 0 : a | 0;
	},
	/**
  * @param r 0 <= n <= 255
  * @param g 0 <= n <= 255
  * @param b 0 <= n <= 255
  * @return Array(h, s, l)
  */
	rgbToHsl: function rgbToHsl(r, g, b) {
		r /= 255;
		g /= 255;
		b /= 255;

		//        var max = Math.max(r, g, b),
		//            min = Math.min(r, g, b),
		var max = r > g ? r > b ? r : b : g > b ? g : b,
		    min = r < g ? r < b ? r : b : g < b ? g : b,
		    chroma = max - min,
		    h = 0,
		    s = 0,

		// Lightness
		l = (min + max) / 2;

		if (chroma !== 0) {
			// Hue
			if (r === max) {
				h = (g - b) / chroma + (g < b ? 6 : 0);
			} else if (g === max) {
				h = (b - r) / chroma + 2;
			} else {
				h = (r - g) / chroma + 4;
			}
			h /= 6;

			// Saturation
			s = l > 0.5 ? chroma / (2 - max - min) : chroma / (max + min);
		}

		return [h, s, l];
	},
	/**
  * @param h 0.0 <= n <= 1.0
  * @param s 0.0 <= n <= 1.0
  * @param l 0.0 <= n <= 1.0
  * @return Array(r, g, b)
  */
	hslToRgb: function hslToRgb(h, s, l) {
		var m1,
		    m2,
		    hue,
		    r,
		    g,
		    b,
		    rgb = [];

		if (s === 0) {
			r = g = b = l * 255 + 0.5 | 0;
			rgb = [r, g, b];
		} else {
			if (l <= 0.5) {
				m2 = l * (s + 1);
			} else {
				m2 = l + s - l * s;
			}

			m1 = l * 2 - m2;
			hue = h + 1 / 3;

			var tmp;
			for (var i = 0; i < 3; i += 1) {
				if (hue < 0) {
					hue += 1;
				} else if (hue > 1) {
					hue -= 1;
				}

				if (6 * hue < 1) {
					tmp = m1 + (m2 - m1) * hue * 6;
				} else if (2 * hue < 1) {
					tmp = m2;
				} else if (3 * hue < 2) {
					tmp = m1 + (m2 - m1) * (2 / 3 - hue) * 6;
				} else {
					tmp = m1;
				}

				rgb[i] = tmp * 255 + 0.5 | 0;

				hue -= 1 / 3;
			}
		}

		return rgb;
	}
};

ImageFilters.Translate = function (srcImageData, x, y, interpolation) {};
ImageFilters.Scale = function (srcImageData, scaleX, scaleY, interpolation) {};
ImageFilters.Rotate = function (srcImageData, originX, originY, angle, resize, interpolation) {};
ImageFilters.Affine = function (srcImageData, matrix, resize, interpolation) {};
ImageFilters.UnsharpMask = function (srcImageData, level) {};

ImageFilters.ConvolutionFilter = function (srcImageData, matrixX, matrixY, matrix, divisor, bias, preserveAlpha, clamp, color, alpha) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	divisor = divisor || 1;
	bias = bias || 0;

	// default true
	preserveAlpha !== false && (preserveAlpha = true);
	clamp !== false && (clamp = true);

	color = color || 0;
	alpha = alpha || 0;

	var index = 0,
	    rows = matrixX >> 1,
	    cols = matrixY >> 1,
	    clampR = color >> 16 & 0xFF,
	    clampG = color >> 8 & 0xFF,
	    clampB = color & 0xFF,
	    clampA = alpha * 0xFF;

	for (var y = 0; y < srcHeight; y += 1) {
		for (var x = 0; x < srcWidth; x += 1, index += 4) {
			var r = 0,
			    g = 0,
			    b = 0,
			    a = 0,
			    replace = false,
			    mIndex = 0,
			    v;

			for (var row = -rows; row <= rows; row += 1) {
				var rowIndex = y + row,
				    offset;

				if (0 <= rowIndex && rowIndex < srcHeight) {
					offset = rowIndex * srcWidth;
				} else if (clamp) {
					offset = y * srcWidth;
				} else {
					replace = true;
				}

				for (var col = -cols; col <= cols; col += 1) {
					var m = matrix[mIndex++];

					if (m !== 0) {
						var colIndex = x + col;

						if (!(0 <= colIndex && colIndex < srcWidth)) {
							if (clamp) {
								colIndex = x;
							} else {
								replace = true;
							}
						}

						if (replace) {
							r += m * clampR;
							g += m * clampG;
							b += m * clampB;
							a += m * clampA;
						} else {
							var p = offset + colIndex << 2;
							r += m * srcPixels[p];
							g += m * srcPixels[p + 1];
							b += m * srcPixels[p + 2];
							a += m * srcPixels[p + 3];
						}
					}
				}
			}

			dstPixels[index] = (v = r / divisor + bias) > 255 ? 255 : v < 0 ? 0 : v | 0;
			dstPixels[index + 1] = (v = g / divisor + bias) > 255 ? 255 : v < 0 ? 0 : v | 0;
			dstPixels[index + 2] = (v = b / divisor + bias) > 255 ? 255 : v < 0 ? 0 : v | 0;
			dstPixels[index + 3] = preserveAlpha ? srcPixels[index + 3] : (v = a / divisor + bias) > 255 ? 255 : v < 0 ? 0 : v | 0;
		}
	}

	return dstImageData;
};

/**
 * @param threshold 0.0 <= n <= 1.0
 */
ImageFilters.Binarize = function (srcImageData, threshold) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	if (isNaN(threshold)) {
		threshold = 0.5;
	}

	threshold *= 255;

	for (var i = 0; i < srcLength; i += 4) {
		var avg = srcPixels[i] + srcPixels[i + 1] + srcPixels[i + 2] / 3;

		dstPixels[i] = dstPixels[i + 1] = dstPixels[i + 2] = avg <= threshold ? 0 : 255;
		dstPixels[i + 3] = 255;
	}

	return dstImageData;
};

ImageFilters.BlendAdd = function (srcImageData, blendImageData, dx, dy) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data,
	    blendPixels = blendImageData.data;

	var v;

	for (var i = 0; i < srcLength; i += 4) {
		dstPixels[i] = (v = srcPixels[i] + blendPixels[i]) > 255 ? 255 : v;
		dstPixels[i + 1] = (v = srcPixels[i + 1] + blendPixels[i + 1]) > 255 ? 255 : v;
		dstPixels[i + 2] = (v = srcPixels[i + 2] + blendPixels[i + 2]) > 255 ? 255 : v;
		dstPixels[i + 3] = 255;
	}

	return dstImageData;
};

ImageFilters.BlendSubtract = function (srcImageData, blendImageData, dx, dy) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data,
	    blendPixels = blendImageData.data;

	var v;

	for (var i = 0; i < srcLength; i += 4) {
		dstPixels[i] = (v = srcPixels[i] - blendPixels[i]) < 0 ? 0 : v;
		dstPixels[i + 1] = (v = srcPixels[i + 1] - blendPixels[i + 1]) < 0 ? 0 : v;
		dstPixels[i + 2] = (v = srcPixels[i + 2] - blendPixels[i + 2]) < 0 ? 0 : v;
		dstPixels[i + 3] = 255;
	}

	return dstImageData;
};

/**
 * Algorithm based on BoxBlurFilter.java by Huxtable.com
 * @see http://www.jhlabs.com/ip/blurring.html
 * Copyright 2005 Huxtable.com. All rights reserved.
 */
ImageFilters.BoxBlur = function () {
	var blur = function blur(src, dst, width, height, radius) {
		var tableSize = radius * 2 + 1;
		var radiusPlus1 = radius + 1;
		var widthMinus1 = width - 1;

		var r, g, b, a;

		var srcIndex = 0;
		var dstIndex;
		var p, next, prev;
		var i, l, x, y, nextIndex, prevIndex;

		var sumTable = [];
		for (i = 0, l = 256 * tableSize; i < l; i += 1) {
			sumTable[i] = i / tableSize | 0;
		}

		for (y = 0; y < height; y += 1) {
			r = g = b = a = 0;
			dstIndex = y;

			p = srcIndex << 2;
			r += radiusPlus1 * src[p];
			g += radiusPlus1 * src[p + 1];
			b += radiusPlus1 * src[p + 2];
			a += radiusPlus1 * src[p + 3];

			for (i = 1; i <= radius; i += 1) {
				p = srcIndex + (i < width ? i : widthMinus1) << 2;
				r += src[p];
				g += src[p + 1];
				b += src[p + 2];
				a += src[p + 3];
			}

			for (x = 0; x < width; x += 1) {
				p = dstIndex << 2;
				dst[p] = sumTable[r];
				dst[p + 1] = sumTable[g];
				dst[p + 2] = sumTable[b];
				dst[p + 3] = sumTable[a];

				nextIndex = x + radiusPlus1;
				if (nextIndex > widthMinus1) {
					nextIndex = widthMinus1;
				}

				prevIndex = x - radius;
				if (prevIndex < 0) {
					prevIndex = 0;
				}

				next = srcIndex + nextIndex << 2;
				prev = srcIndex + prevIndex << 2;

				r += src[next] - src[prev];
				g += src[next + 1] - src[prev + 1];
				b += src[next + 2] - src[prev + 2];
				a += src[next + 3] - src[prev + 3];

				dstIndex += height;
			}
			srcIndex += width;
		}
	};

	return function (srcImageData, hRadius, vRadius, quality) {
		var srcPixels = srcImageData.data,
		    srcWidth = srcImageData.width,
		    srcHeight = srcImageData.height,
		    srcLength = srcPixels.length,
		    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
		    dstPixels = dstImageData.data,
		    tmpImageData = this.utils.createImageData(srcWidth, srcHeight),
		    tmpPixels = tmpImageData.data;

		for (var i = 0; i < quality; i += 1) {
			// only use the srcPixels on the first loop
			blur(i ? dstPixels : srcPixels, tmpPixels, srcWidth, srcHeight, hRadius);
			blur(tmpPixels, dstPixels, srcHeight, srcWidth, vRadius);
		}

		return dstImageData;
	};
}();

/**
 * @ param strength 1 <= n <= 4
 */
ImageFilters.GaussianBlur = function (srcImageData, strength) {
	var size, matrix, divisor;

	switch (strength) {
		case 2:
			size = 5;
			matrix = [1, 1, 2, 1, 1, 1, 2, 4, 2, 1, 2, 4, 8, 4, 2, 1, 2, 4, 2, 1, 1, 1, 2, 1, 1];
			divisor = 52;
			break;
		case 3:
			size = 7;
			matrix = [1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 4, 2, 2, 1, 2, 2, 4, 8, 4, 2, 2, 2, 4, 8, 16, 8, 4, 2, 2, 2, 4, 8, 4, 2, 2, 1, 2, 2, 4, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1];
			divisor = 140;
			break;
		case 4:
			size = 15;
			matrix = [2, 2, 3, 4, 5, 5, 6, 6, 6, 5, 5, 4, 3, 2, 2, 2, 3, 4, 5, 7, 7, 8, 8, 8, 7, 7, 5, 4, 3, 2, 3, 4, 6, 7, 9, 10, 10, 11, 10, 10, 9, 7, 6, 4, 3, 4, 5, 7, 9, 10, 12, 13, 13, 13, 12, 10, 9, 7, 5, 4, 5, 7, 9, 11, 13, 14, 15, 16, 15, 14, 13, 11, 9, 7, 5, 5, 7, 10, 12, 14, 16, 17, 18, 17, 16, 14, 12, 10, 7, 5, 6, 8, 10, 13, 15, 17, 19, 19, 19, 17, 15, 13, 10, 8, 6, 6, 8, 11, 13, 16, 18, 19, 20, 19, 18, 16, 13, 11, 8, 6, 6, 8, 10, 13, 15, 17, 19, 19, 19, 17, 15, 13, 10, 8, 6, 5, 7, 10, 12, 14, 16, 17, 18, 17, 16, 14, 12, 10, 7, 5, 5, 7, 9, 11, 13, 14, 15, 16, 15, 14, 13, 11, 9, 7, 5, 4, 5, 7, 9, 10, 12, 13, 13, 13, 12, 10, 9, 7, 5, 4, 3, 4, 6, 7, 9, 10, 10, 11, 10, 10, 9, 7, 6, 4, 3, 2, 3, 4, 5, 7, 7, 8, 8, 8, 7, 7, 5, 4, 3, 2, 2, 2, 3, 4, 5, 5, 6, 6, 6, 5, 5, 4, 3, 2, 2];
			divisor = 2044;
			break;
		default:
			size = 3;
			matrix = [1, 2, 1, 2, 4, 2, 1, 2, 1];
			divisor = 16;
			break;
	}
	return this.ConvolutionFilter(srcImageData, size, size, matrix, divisor, 0, false);
};

/**
 * Stack Blur Algorithm by Mario Klingemann <mario@quasimondo.com>
 * @see http://incubator.quasimondo.com/processing/fast_blur_deluxe.php
 */
/*
 Copyright (c) 2010 Mario Klingemann
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
 files (the "Software"), to deal in the Software without
 restriction, including without limitation the rights to use,
 copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the
 Software is furnished to do so, subject to the following
 conditions:
 
 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
ImageFilters.StackBlur = function () {
	var mul_table = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];

	var shg_table = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];

	function BlurStack() {
		this.r = 0;
		this.g = 0;
		this.b = 0;
		this.a = 0;
		this.next = null;
	}

	return function (srcImageData, radius) {
		var srcPixels = srcImageData.data,
		    srcWidth = srcImageData.width,
		    srcHeight = srcImageData.height,
		    srcLength = srcPixels.length,
		    dstImageData = this.Clone(srcImageData),
		    dstPixels = dstImageData.data;

		var x,
		    y,
		    i,
		    p,
		    yp,
		    yi,
		    yw,
		    r_sum,
		    g_sum,
		    b_sum,
		    a_sum,
		    r_out_sum,
		    g_out_sum,
		    b_out_sum,
		    a_out_sum,
		    r_in_sum,
		    g_in_sum,
		    b_in_sum,
		    a_in_sum,
		    pr,
		    pg,
		    pb,
		    pa,
		    rbs,
		    div = radius + radius + 1,
		    w4 = srcWidth << 2,
		    widthMinus1 = srcWidth - 1,
		    heightMinus1 = srcHeight - 1,
		    radiusPlus1 = radius + 1,
		    sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2,
		    stackStart = new BlurStack(),
		    stack = stackStart,
		    stackIn,
		    stackOut,
		    stackEnd,
		    mul_sum = mul_table[radius],
		    shg_sum = shg_table[radius];

		for (i = 1; i < div; i += 1) {
			stack = stack.next = new BlurStack();
			if (i == radiusPlus1) {
				stackEnd = stack;
			}
		}

		stack.next = stackStart;
		yw = yi = 0;

		for (y = 0; y < srcHeight; y += 1) {
			r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;

			r_out_sum = radiusPlus1 * (pr = dstPixels[yi]);
			g_out_sum = radiusPlus1 * (pg = dstPixels[yi + 1]);
			b_out_sum = radiusPlus1 * (pb = dstPixels[yi + 2]);
			a_out_sum = radiusPlus1 * (pa = dstPixels[yi + 3]);

			r_sum += sumFactor * pr;
			g_sum += sumFactor * pg;
			b_sum += sumFactor * pb;
			a_sum += sumFactor * pa;

			stack = stackStart;

			for (i = 0; i < radiusPlus1; i += 1) {
				stack.r = pr;
				stack.g = pg;
				stack.b = pb;
				stack.a = pa;
				stack = stack.next;
			}

			for (i = 1; i < radiusPlus1; i += 1) {
				p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
				r_sum += (stack.r = pr = dstPixels[p]) * (rbs = radiusPlus1 - i);
				g_sum += (stack.g = pg = dstPixels[p + 1]) * rbs;
				b_sum += (stack.b = pb = dstPixels[p + 2]) * rbs;
				a_sum += (stack.a = pa = dstPixels[p + 3]) * rbs;

				r_in_sum += pr;
				g_in_sum += pg;
				b_in_sum += pb;
				a_in_sum += pa;

				stack = stack.next;
			}

			stackIn = stackStart;
			stackOut = stackEnd;

			for (x = 0; x < srcWidth; x += 1) {
				dstPixels[yi] = r_sum * mul_sum >> shg_sum;
				dstPixels[yi + 1] = g_sum * mul_sum >> shg_sum;
				dstPixels[yi + 2] = b_sum * mul_sum >> shg_sum;
				dstPixels[yi + 3] = a_sum * mul_sum >> shg_sum;

				r_sum -= r_out_sum;
				g_sum -= g_out_sum;
				b_sum -= b_out_sum;
				a_sum -= a_out_sum;

				r_out_sum -= stackIn.r;
				g_out_sum -= stackIn.g;
				b_out_sum -= stackIn.b;
				a_out_sum -= stackIn.a;

				p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;

				r_in_sum += stackIn.r = dstPixels[p];
				g_in_sum += stackIn.g = dstPixels[p + 1];
				b_in_sum += stackIn.b = dstPixels[p + 2];
				a_in_sum += stackIn.a = dstPixels[p + 3];

				r_sum += r_in_sum;
				g_sum += g_in_sum;
				b_sum += b_in_sum;
				a_sum += a_in_sum;

				stackIn = stackIn.next;

				r_out_sum += pr = stackOut.r;
				g_out_sum += pg = stackOut.g;
				b_out_sum += pb = stackOut.b;
				a_out_sum += pa = stackOut.a;

				r_in_sum -= pr;
				g_in_sum -= pg;
				b_in_sum -= pb;
				a_in_sum -= pa;

				stackOut = stackOut.next;

				yi += 4;
			}

			yw += srcWidth;
		}

		for (x = 0; x < srcWidth; x += 1) {
			g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;

			yi = x << 2;
			r_out_sum = radiusPlus1 * (pr = dstPixels[yi]);
			g_out_sum = radiusPlus1 * (pg = dstPixels[yi + 1]);
			b_out_sum = radiusPlus1 * (pb = dstPixels[yi + 2]);
			a_out_sum = radiusPlus1 * (pa = dstPixels[yi + 3]);

			r_sum += sumFactor * pr;
			g_sum += sumFactor * pg;
			b_sum += sumFactor * pb;
			a_sum += sumFactor * pa;

			stack = stackStart;

			for (i = 0; i < radiusPlus1; i += 1) {
				stack.r = pr;
				stack.g = pg;
				stack.b = pb;
				stack.a = pa;
				stack = stack.next;
			}

			yp = srcWidth;

			for (i = 1; i <= radius; i += 1) {
				yi = yp + x << 2;

				r_sum += (stack.r = pr = dstPixels[yi]) * (rbs = radiusPlus1 - i);
				g_sum += (stack.g = pg = dstPixels[yi + 1]) * rbs;
				b_sum += (stack.b = pb = dstPixels[yi + 2]) * rbs;
				a_sum += (stack.a = pa = dstPixels[yi + 3]) * rbs;

				r_in_sum += pr;
				g_in_sum += pg;
				b_in_sum += pb;
				a_in_sum += pa;

				stack = stack.next;

				if (i < heightMinus1) {
					yp += srcWidth;
				}
			}

			yi = x;
			stackIn = stackStart;
			stackOut = stackEnd;

			for (y = 0; y < srcHeight; y += 1) {
				p = yi << 2;
				dstPixels[p] = r_sum * mul_sum >> shg_sum;
				dstPixels[p + 1] = g_sum * mul_sum >> shg_sum;
				dstPixels[p + 2] = b_sum * mul_sum >> shg_sum;
				dstPixels[p + 3] = a_sum * mul_sum >> shg_sum;

				r_sum -= r_out_sum;
				g_sum -= g_out_sum;
				b_sum -= b_out_sum;
				a_sum -= a_out_sum;

				r_out_sum -= stackIn.r;
				g_out_sum -= stackIn.g;
				b_out_sum -= stackIn.b;
				a_out_sum -= stackIn.a;

				p = x + ((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * srcWidth << 2;

				r_sum += r_in_sum += stackIn.r = dstPixels[p];
				g_sum += g_in_sum += stackIn.g = dstPixels[p + 1];
				b_sum += b_in_sum += stackIn.b = dstPixels[p + 2];
				a_sum += a_in_sum += stackIn.a = dstPixels[p + 3];

				stackIn = stackIn.next;

				r_out_sum += pr = stackOut.r;
				g_out_sum += pg = stackOut.g;
				b_out_sum += pb = stackOut.b;
				a_out_sum += pa = stackOut.a;

				r_in_sum -= pr;
				g_in_sum -= pg;
				b_in_sum -= pb;
				a_in_sum -= pa;

				stackOut = stackOut.next;

				yi += srcWidth;
			}
		}

		return dstImageData;
	};
}();

/**
 * TV based algorithm
 */
ImageFilters.Brightness = function (srcImageData, brightness) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		value += brightness;
		return value > 255 ? 255 : value;
	});

	return dstImageData;
};

/**
 * GIMP algorithm modified. pretty close to fireworks
 * @param brightness -100 <= n <= 100
 * @param contrast -100 <= n <= 100
 */
ImageFilters.BrightnessContrastGimp = function (srcImageData, brightness, contrast) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data,
	    p4 = Math.PI / 4;

	// fix to -1 <= n <= 1
	brightness /= 100;

	// fix to -99 <= n <= 99
	contrast *= 0.99;
	// fix to -1 < n < 1
	contrast /= 100;
	// apply GIMP formula
	contrast = Math.tan((contrast + 1) * p4);

	// get the average color
	for (var avg = 0, i = 0; i < srcLength; i += 4) {
		avg += srcPixels[i] * 19595 + srcPixels[i + 1] * 38470 + srcPixels[i + 2] * 7471 >> 16;
	}
	avg = avg / (srcLength / 4);

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		if (brightness < 0) {
			value = value * (1 + brightness);
		} else if (brightness > 0) {
			value = value + (255 - value) * brightness;
		}
		//value += brightness;

		if (contrast !== 0) {
			value = (value - avg) * contrast + avg;
		}
		return value + 0.5 | 0;
	});
	return dstImageData;
};

/**
 * more like the new photoshop algorithm
 * @param brightness -100 <= n <= 100
 * @param contrast -100 <= n <= 100
 */
ImageFilters.BrightnessContrastPhotoshop = function (srcImageData, brightness, contrast) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	// fix to 0 <= n <= 2;
	brightness = (brightness + 100) / 100;
	contrast = (contrast + 100) / 100;

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		value *= brightness;
		value = (value - 127.5) * contrast + 127.5;
		return value + 0.5 | 0;
	});
	return dstImageData;
};

ImageFilters.Channels = function (srcImageData, channel) {
	var matrix;

	switch (channel) {
		case 2:
			// green
			matrix = [0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0];
			break;
		case 3:
			// blue
			matrix = [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
			break;
		default:
			// red
			matrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0];
			break;

	}

	return this.ColorMatrixFilter(srcImageData, matrix);
};

ImageFilters.Clone = function (srcImageData) {
	return this.Copy(srcImageData, this.utils.createImageData(srcImageData.width, srcImageData.height));
};

/**
 * slower
 */
ImageFilters.CloneBuiltin = function (srcImageData) {
	var srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    canvas = this.utils.getSampleCanvas(),
	    context = this.utils.getSampleContext(),
	    dstImageData;

	canvas.width = srcWidth;
	canvas.height = srcHeight;

	context.putImageData(srcImageData, 0, 0);
	dstImageData = context.getImageData(0, 0, srcWidth, srcHeight);

	canvas.width = 0;
	canvas.height = 0;

	return dstImageData;
};

ImageFilters.ColorMatrixFilter = function (srcImageData, matrix) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	var m0 = matrix[0],
	    m1 = matrix[1],
	    m2 = matrix[2],
	    m3 = matrix[3],
	    m4 = matrix[4],
	    m5 = matrix[5],
	    m6 = matrix[6],
	    m7 = matrix[7],
	    m8 = matrix[8],
	    m9 = matrix[9],
	    m10 = matrix[10],
	    m11 = matrix[11],
	    m12 = matrix[12],
	    m13 = matrix[13],
	    m14 = matrix[14],
	    m15 = matrix[15],
	    m16 = matrix[16],
	    m17 = matrix[17],
	    m18 = matrix[18],
	    m19 = matrix[19];

	var value, i, r, g, b, a;
	for (i = 0; i < srcLength; i += 4) {
		r = srcPixels[i];
		g = srcPixels[i + 1];
		b = srcPixels[i + 2];
		a = srcPixels[i + 3];

		dstPixels[i] = (value = r * m0 + g * m1 + b * m2 + a * m3 + m4) > 255 ? 255 : value < 0 ? 0 : value | 0;
		dstPixels[i + 1] = (value = r * m5 + g * m6 + b * m7 + a * m8 + m9) > 255 ? 255 : value < 0 ? 0 : value | 0;
		dstPixels[i + 2] = (value = r * m10 + g * m11 + b * m12 + a * m13 + m14) > 255 ? 255 : value < 0 ? 0 : value | 0;
		dstPixels[i + 3] = (value = r * m15 + g * m16 + b * m17 + a * m18 + m19) > 255 ? 255 : value < 0 ? 0 : value | 0;
	}

	return dstImageData;
};

ImageFilters.ColorTransformFilter = function (srcImageData, redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier, redOffset, greenOffset, blueOffset, alphaOffset) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	var i, v;
	for (i = 0; i < srcLength; i += 4) {
		dstPixels[i] = (v = srcPixels[i] * redMultiplier + redOffset) > 255 ? 255 : v < 0 ? 0 : v;
		dstPixels[i + 1] = (v = srcPixels[i + 1] * greenMultiplier + greenOffset) > 255 ? 255 : v < 0 ? 0 : v;
		dstPixels[i + 2] = (v = srcPixels[i + 2] * blueMultiplier + blueOffset) > 255 ? 255 : v < 0 ? 0 : v;
		dstPixels[i + 3] = (v = srcPixels[i + 3] * alphaMultiplier + alphaOffset) > 255 ? 255 : v < 0 ? 0 : v;
	}

	return dstImageData;
};

ImageFilters.Copy = function (srcImageData, dstImageData) {
	var srcPixels = srcImageData.data,
	    srcLength = srcPixels.length,
	    dstPixels = dstImageData.data;

	while (srcLength--) {
		dstPixels[srcLength] = srcPixels[srcLength];
	}

	return dstImageData;
};

ImageFilters.Crop = function (srcImageData, x, y, width, height) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(width, height),
	    dstPixels = dstImageData.data;

	var srcLeft = Math.max(x, 0),
	    srcTop = Math.max(y, 0),
	    srcRight = Math.min(x + width, srcWidth),
	    srcBottom = Math.min(y + height, srcHeight),
	    dstLeft = srcLeft - x,
	    dstTop = srcTop - y,
	    srcRow,
	    srcCol,
	    srcIndex,
	    dstIndex;

	for (srcRow = srcTop, dstRow = dstTop; srcRow < srcBottom; srcRow += 1, dstRow += 1) {
		for (srcCol = srcLeft, dstCol = dstLeft; srcCol < srcRight; srcCol += 1, dstCol += 1) {
			srcIndex = srcRow * srcWidth + srcCol << 2;
			dstIndex = dstRow * width + dstCol << 2;
			dstPixels[dstIndex] = srcPixels[srcIndex];
			dstPixels[dstIndex + 1] = srcPixels[srcIndex + 1];
			dstPixels[dstIndex + 2] = srcPixels[srcIndex + 2];
			dstPixels[dstIndex + 3] = srcPixels[srcIndex + 3];
		}
	}

	return dstImageData;
};

ImageFilters.CropBuiltin = function (srcImageData, x, y, width, height) {
	var srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    canvas = this.utils.getSampleCanvas(),
	    context = this.utils.getSampleContext();

	canvas.width = srcWidth;
	canvas.height = srcHeight;
	context.putImageData(srcImageData, 0, 0);
	var result = context.getImageData(x, y, width, height);

	canvas.width = 0;
	canvas.height = 0;

	return result;
};

/**
 * sets to the average of the highest and lowest contrast
 */
ImageFilters.Desaturate = function (srcImageData) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	for (var i = 0; i < srcLength; i += 4) {
		var r = srcPixels[i],
		    g = srcPixels[i + 1],
		    b = srcPixels[i + 2],
		    max = r > g ? r > b ? r : b : g > b ? g : b,
		    min = r < g ? r < b ? r : b : g < b ? g : b,
		    avg = (max + min) / 2 + 0.5 | 0;

		dstPixels[i] = dstPixels[i + 1] = dstPixels[i + 2] = avg;
		dstPixels[i + 3] = srcPixels[i + 3];
	}

	return dstImageData;
};

ImageFilters.DisplacementMapFilter = function (srcImageData, mapImageData, mapX, mapY, componentX, componentY, scaleX, scaleY, mode) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = ImageFilters.Clone(srcImageData),
	    dstPixels = dstImageData.data;

	mapX || (mapX = 0);
	mapY || (mapY = 0);
	componentX || (componentX = 0); // red?
	componentY || (componentY = 0);
	scaleX || (scaleX = 0);
	scaleY || (scaleY = 0);
	mode || (mode = 2); // wrap

	var mapWidth = mapImageData.width,
	    mapHeight = mapImageData.height,
	    mapPixels = mapImageData.data,
	    mapRight = mapWidth + mapX,
	    mapBottom = mapHeight + mapY,
	    dstIndex,
	    srcIndex,
	    mapIndex,
	    cx,
	    cy,
	    tx,
	    ty,
	    x,
	    y;

	for (x = 0; x < srcWidth; x += 1) {
		for (y = 0; y < srcHeight; y += 1) {

			dstIndex = y * srcWidth + x << 2;

			if (x < mapX || y < mapY || x >= mapRight || y >= mapBottom) {
				// out of the map bounds
				// copy src to dst
				srcIndex = dstIndex;
			} else {
				// apply map
				mapIndex = (y - mapY) * mapWidth + (x - mapX) << 2;

				// tx = x + ((componentX(x, y) - 128) * scaleX) / 256
				cx = mapPixels[mapIndex + componentX];
				tx = x + ((cx - 128) * scaleX >> 8);

				// tx = y + ((componentY(x, y) - 128) * scaleY) / 256
				cy = mapPixels[mapIndex + componentY];
				ty = y + ((cy - 128) * scaleY >> 8);

				srcIndex = ImageFilters.utils.getPixelIndex(tx + 0.5 | 0, ty + 0.5 | 0, srcWidth, srcHeight, mode);
				if (srcIndex === null) {
					// if mode == ignore and (tx,ty) is out of src bounds
					// then copy (x,y) to dst
					srcIndex = dstIndex;
				}
			}

			dstPixels[dstIndex] = srcPixels[srcIndex];
			dstPixels[dstIndex + 1] = srcPixels[srcIndex + 1];
			dstPixels[dstIndex + 2] = srcPixels[srcIndex + 2];
			dstPixels[dstIndex + 3] = srcPixels[srcIndex + 3];
		}
	}

	return dstImageData;
};

/**
 * Floyd-Steinberg algorithm
 * @param levels 2 <= n <= 255
 */
ImageFilters.Dither = function (srcImageData, levels) {
	var srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    dstImageData = this.Clone(srcImageData),
	    dstPixels = dstImageData.data;

	levels = levels < 2 ? 2 : levels > 255 ? 255 : levels;

	// Build a color map using the same algorithm as the posterize filter.
	var posterize,
	    levelMap = [],
	    levelsMinus1 = levels - 1,
	    j = 0,
	    k = 0,
	    i;

	for (i = 0; i < levels; i += 1) {
		levelMap[i] = 255 * i / levelsMinus1;
	}

	posterize = this.utils.buildMap(function (value) {
		var ret = levelMap[j];

		k += levels;

		if (k > 255) {
			k -= 255;
			j += 1;
		}

		return ret;
	});

	// Apply the dithering algorithm to each pixel
	var x,
	    y,
	    index,
	    old_r,
	    old_g,
	    old_b,
	    new_r,
	    new_g,
	    new_b,
	    err_r,
	    err_g,
	    err_b,
	    nbr_r,
	    nbr_g,
	    nbr_b,
	    srcWidthMinus1 = srcWidth - 1,
	    srcHeightMinus1 = srcHeight - 1,
	    A = 7 / 16,
	    B = 3 / 16,
	    C = 5 / 16,
	    D = 1 / 16;

	for (y = 0; y < srcHeight; y += 1) {
		for (x = 0; x < srcWidth; x += 1) {
			// Get the current pixel.
			index = y * srcWidth + x << 2;

			old_r = dstPixels[index];
			old_g = dstPixels[index + 1];
			old_b = dstPixels[index + 2];

			// Quantize using the color map
			new_r = posterize[old_r];
			new_g = posterize[old_g];
			new_b = posterize[old_b];

			// Set the current pixel.
			dstPixels[index] = new_r;
			dstPixels[index + 1] = new_g;
			dstPixels[index + 2] = new_b;

			// Quantization errors
			err_r = old_r - new_r;
			err_g = old_g - new_g;
			err_b = old_b - new_b;

			// Apply the matrix.
			// x + 1, y
			index += 1 << 2;
			if (x < srcWidthMinus1) {
				nbr_r = dstPixels[index] + A * err_r;
				nbr_g = dstPixels[index + 1] + A * err_g;
				nbr_b = dstPixels[index + 2] + A * err_b;

				dstPixels[index] = nbr_r > 255 ? 255 : nbr_r < 0 ? 0 : nbr_r | 0;
				dstPixels[index + 1] = nbr_g > 255 ? 255 : nbr_g < 0 ? 0 : nbr_g | 0;
				dstPixels[index + 2] = nbr_b > 255 ? 255 : nbr_b < 0 ? 0 : nbr_b | 0;
			}

			// x - 1, y + 1
			index += srcWidth - 2 << 2;
			if (x > 0 && y < srcHeightMinus1) {
				nbr_r = dstPixels[index] + B * err_r;
				nbr_g = dstPixels[index + 1] + B * err_g;
				nbr_b = dstPixels[index + 2] + B * err_b;

				dstPixels[index] = nbr_r > 255 ? 255 : nbr_r < 0 ? 0 : nbr_r | 0;
				dstPixels[index + 1] = nbr_g > 255 ? 255 : nbr_g < 0 ? 0 : nbr_g | 0;
				dstPixels[index + 2] = nbr_b > 255 ? 255 : nbr_b < 0 ? 0 : nbr_b | 0;
			}

			// x, y + 1
			index += 1 << 2;
			if (y < srcHeightMinus1) {
				nbr_r = dstPixels[index] + C * err_r;
				nbr_g = dstPixels[index + 1] + C * err_g;
				nbr_b = dstPixels[index + 2] + C * err_b;

				dstPixels[index] = nbr_r > 255 ? 255 : nbr_r < 0 ? 0 : nbr_r | 0;
				dstPixels[index + 1] = nbr_g > 255 ? 255 : nbr_g < 0 ? 0 : nbr_g | 0;
				dstPixels[index + 2] = nbr_b > 255 ? 255 : nbr_b < 0 ? 0 : nbr_b | 0;
			}

			// x + 1, y + 1
			index += 1 << 2;
			if (x < srcWidthMinus1 && y < srcHeightMinus1) {
				nbr_r = dstPixels[index] + D * err_r;
				nbr_g = dstPixels[index + 1] + D * err_g;
				nbr_b = dstPixels[index + 2] + D * err_b;

				dstPixels[index] = nbr_r > 255 ? 255 : nbr_r < 0 ? 0 : nbr_r | 0;
				dstPixels[index + 1] = nbr_g > 255 ? 255 : nbr_g < 0 ? 0 : nbr_g | 0;
				dstPixels[index + 2] = nbr_b > 255 ? 255 : nbr_b < 0 ? 0 : nbr_b | 0;
			}
		}
	}

	return dstImageData;
};

ImageFilters.Edge = function (srcImageData) {
	//pretty close to Fireworks 'Find Edges' effect
	return this.ConvolutionFilter(srcImageData, 3, 3, [-1, -1, -1, -1, 8, -1, -1, -1, -1]);
};

ImageFilters.Emboss = function (srcImageData) {
	return this.ConvolutionFilter(srcImageData, 3, 3, [-2, -1, 0, -1, 1, 1, 0, 1, 2]);
};

ImageFilters.Enrich = function (srcImageData) {
	return this.ConvolutionFilter(srcImageData, 3, 3, [0, -2, 0, -2, 20, -2, 0, -2, 0], 10, -40);
};

ImageFilters.Flip = function (srcImageData, vertical) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	var x, y, srcIndex, dstIndex, i;

	for (y = 0; y < srcHeight; y += 1) {
		for (x = 0; x < srcWidth; x += 1) {
			srcIndex = y * srcWidth + x << 2;
			if (vertical) {
				dstIndex = (srcHeight - y - 1) * srcWidth + x << 2;
			} else {
				dstIndex = y * srcWidth + (srcWidth - x - 1) << 2;
			}

			dstPixels[dstIndex] = srcPixels[srcIndex];
			dstPixels[dstIndex + 1] = srcPixels[srcIndex + 1];
			dstPixels[dstIndex + 2] = srcPixels[srcIndex + 2];
			dstPixels[dstIndex + 3] = srcPixels[srcIndex + 3];
		}
	}

	return dstImageData;
};

ImageFilters.Gamma = function (srcImageData, gamma) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		value = 255 * Math.pow(value / 255, 1 / gamma) + 0.5;
		return value > 255 ? 255 : value + 0.5 | 0;
	});

	return dstImageData;
};

ImageFilters.GrayScale = function (srcImageData) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	for (var i = 0; i < srcLength; i += 4) {
		var intensity = srcPixels[i] * 19595 + srcPixels[i + 1] * 38470 + srcPixels[i + 2] * 7471 >> 16;
		//var intensity = (srcPixels[i] * 0.3086 + srcPixels[i + 1] * 0.6094 + srcPixels[i + 2] * 0.0820) | 0;
		dstPixels[i] = dstPixels[i + 1] = dstPixels[i + 2] = intensity;
		dstPixels[i + 3] = srcPixels[i + 3];
	}

	return dstImageData;
};

/**
 * @param hueDelta  -180 <= n <= 180
 * @param satDelta  -100 <= n <= 100
 * @param lightness -100 <= n <= 100
 */
ImageFilters.HSLAdjustment = function (srcImageData, hueDelta, satDelta, lightness) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	hueDelta /= 360;
	satDelta /= 100;
	lightness /= 100;

	var rgbToHsl = this.utils.rgbToHsl;
	var hslToRgb = this.utils.hslToRgb;
	var h, s, l, hsl, rgb, i;

	for (i = 0; i < srcLength; i += 4) {
		// convert to HSL
		hsl = rgbToHsl(srcPixels[i], srcPixels[i + 1], srcPixels[i + 2]);

		// hue
		h = hsl[0] + hueDelta;
		while (h < 0) {
			h += 1;
		}
		while (h > 1) {
			h -= 1;
		}

		// saturation
		s = hsl[1] + hsl[1] * satDelta;
		if (s < 0) {
			s = 0;
		} else if (s > 1) {
			s = 1;
		}

		// lightness
		l = hsl[2];
		if (lightness > 0) {
			l += (1 - l) * lightness;
		} else if (lightness < 0) {
			l += l * lightness;
		}

		// convert back to rgb
		rgb = hslToRgb(h, s, l);

		dstPixels[i] = rgb[0];
		dstPixels[i + 1] = rgb[1];
		dstPixels[i + 2] = rgb[2];
		dstPixels[i + 3] = srcPixels[i + 3];
	}

	return dstImageData;
};

ImageFilters.Invert = function (srcImageData) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		return 255 - value;
	});

	return dstImageData;
};

ImageFilters.Mosaic = function (srcImageData, blockSize) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	var cols = Math.ceil(srcWidth / blockSize),
	    rows = Math.ceil(srcHeight / blockSize),
	    row,
	    col,
	    x_start,
	    x_end,
	    y_start,
	    y_end,
	    x,
	    y,
	    yIndex,
	    index,
	    size,
	    r,
	    g,
	    b,
	    a;

	for (row = 0; row < rows; row += 1) {
		y_start = row * blockSize;
		y_end = y_start + blockSize;

		if (y_end > srcHeight) {
			y_end = srcHeight;
		}

		for (col = 0; col < cols; col += 1) {
			x_start = col * blockSize;
			x_end = x_start + blockSize;

			if (x_end > srcWidth) {
				x_end = srcWidth;
			}

			// get the average color from the src
			r = g = b = a = 0;
			size = (x_end - x_start) * (y_end - y_start);

			for (y = y_start; y < y_end; y += 1) {
				yIndex = y * srcWidth;

				for (x = x_start; x < x_end; x += 1) {
					index = yIndex + x << 2;
					r += srcPixels[index];
					g += srcPixels[index + 1];
					b += srcPixels[index + 2];
					a += srcPixels[index + 3];
				}
			}

			r = r / size + 0.5 | 0;
			g = g / size + 0.5 | 0;
			b = b / size + 0.5 | 0;
			a = a / size + 0.5 | 0;

			// fill the dst with that color
			for (y = y_start; y < y_end; y += 1) {
				yIndex = y * srcWidth;

				for (x = x_start; x < x_end; x += 1) {
					index = yIndex + x << 2;
					dstPixels[index] = r;
					dstPixels[index + 1] = g;
					dstPixels[index + 2] = b;
					dstPixels[index + 3] = a;
				}
			}
		}
	}

	return dstImageData;
};

/**
 * @param range  1 <= n <= 5
 * @param levels 1 <= n <= 256
 */
ImageFilters.Oil = function (srcImageData, range, levels) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	var index = 0,
	    rh = [],
	    gh = [],
	    bh = [],
	    rt = [],
	    gt = [],
	    bt = [],
	    x,
	    y,
	    i,
	    row,
	    col,
	    rowIndex,
	    colIndex,
	    offset,
	    srcIndex,
	    sr,
	    sg,
	    sb,
	    ri,
	    gi,
	    bi,
	    r,
	    g,
	    b;

	for (y = 0; y < srcHeight; y += 1) {
		for (x = 0; x < srcWidth; x += 1) {
			for (i = 0; i < levels; i += 1) {
				rh[i] = gh[i] = bh[i] = rt[i] = gt[i] = bt[i] = 0;
			}

			for (row = -range; row <= range; row += 1) {
				rowIndex = y + row;

				if (rowIndex < 0 || rowIndex >= srcHeight) {
					continue;
				}

				offset = rowIndex * srcWidth;

				for (col = -range; col <= range; col += 1) {
					colIndex = x + col;
					if (colIndex < 0 || colIndex >= srcWidth) {
						continue;
					}

					srcIndex = offset + colIndex << 2;
					sr = srcPixels[srcIndex];
					sg = srcPixels[srcIndex + 1];
					sb = srcPixels[srcIndex + 2];
					ri = sr * levels >> 8;
					gi = sg * levels >> 8;
					bi = sb * levels >> 8;
					rt[ri] += sr;
					gt[gi] += sg;
					bt[bi] += sb;
					rh[ri] += 1;
					gh[gi] += 1;
					bh[bi] += 1;
				}
			}

			r = g = b = 0;
			for (i = 1; i < levels; i += 1) {
				if (rh[i] > rh[r]) {
					r = i;
				}
				if (gh[i] > gh[g]) {
					g = i;
				}
				if (bh[i] > bh[b]) {
					b = i;
				}
			}

			dstPixels[index] = rt[r] / rh[r] | 0;
			dstPixels[index + 1] = gt[g] / gh[g] | 0;
			dstPixels[index + 2] = bt[b] / bh[b] | 0;
			dstPixels[index + 3] = srcPixels[index + 3];
			index += 4;
		}
	}

	return dstImageData;
};

ImageFilters.OpacityFilter = function (srcImageData, opacity) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	for (var i = 0; i < srcLength; i += 4) {
		dstPixels[i] = srcPixels[i];
		dstPixels[i + 1] = srcPixels[i + 1];
		dstPixels[i + 2] = srcPixels[i + 2];
		dstPixels[i + 3] = opacity;
	}

	return dstImageData;
};

/**
 * @param levels 2 <= n <= 255
 */
ImageFilters.Posterize = function (srcImageData, levels) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	levels = levels < 2 ? 2 : levels > 255 ? 255 : levels;

	var levelMap = [],
	    levelsMinus1 = levels - 1,
	    j = 0,
	    k = 0,
	    i;

	for (i = 0; i < levels; i += 1) {
		levelMap[i] = 255 * i / levelsMinus1;
	}

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		var ret = levelMap[j];

		k += levels;

		if (k > 255) {
			k -= 255;
			j += 1;
		}

		return ret;
	});

	return dstImageData;
};

/**
 * @param scale 0.0 <= n <= 5.0
 */
ImageFilters.Rescale = function (srcImageData, scale) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		value *= scale;
		return value > 255 ? 255 : value + 0.5 | 0;
	});

	return dstImageData;
};

/**
 * Nearest neighbor
 */
ImageFilters.ResizeNearestNeighbor = function (srcImageData, width, height) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(width, height),
	    dstPixels = dstImageData.data;

	var xFactor = srcWidth / width,
	    yFactor = srcHeight / height,
	    dstIndex = 0,
	    srcIndex,
	    x,
	    y,
	    offset;

	for (y = 0; y < height; y += 1) {
		offset = (y * yFactor | 0) * srcWidth;

		for (x = 0; x < width; x += 1) {
			srcIndex = offset + x * xFactor << 2;

			dstPixels[dstIndex] = srcPixels[srcIndex];
			dstPixels[dstIndex + 1] = srcPixels[srcIndex + 1];
			dstPixels[dstIndex + 2] = srcPixels[srcIndex + 2];
			dstPixels[dstIndex + 3] = srcPixels[srcIndex + 3];
			dstIndex += 4;
		}
	}

	return dstImageData;
};

/**
 * Bilinear
 */
ImageFilters.Resize = function (srcImageData, width, height) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(width, height),
	    dstPixels = dstImageData.data;

	var xFactor = srcWidth / width,
	    yFactor = srcHeight / height,
	    dstIndex = 0,
	    x,
	    y;

	for (y = 0; y < height; y += 1) {
		for (x = 0; x < width; x += 1) {
			this.utils.copyBilinear(srcPixels, x * xFactor, y * yFactor, srcWidth, srcHeight, dstPixels, dstIndex, 0);
			dstIndex += 4;
		}
	}

	return dstImageData;
};

/**
 * faster resizing using the builtin context.scale()
 * the resizing algorithm may be different between browsers
 * this might not work if the image is transparent.
 * to fix that we probably need two contexts
 */
ImageFilters.ResizeBuiltin = function (srcImageData, width, height) {
	var srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    canvas = this.utils.getSampleCanvas(),
	    context = this.utils.getSampleContext(),
	    dstImageData;

	canvas.width = Math.max(srcWidth, width);
	canvas.height = Math.max(srcHeight, height);
	context.save();

	context.putImageData(srcImageData, 0, 0);
	context.scale(width / srcWidth, height / srcHeight);
	context.drawImage(canvas, 0, 0);

	dstImageData = context.getImageData(0, 0, width, height);

	context.restore();
	canvas.width = 0;
	canvas.height = 0;

	return dstImageData;
};

ImageFilters.Sepia = function (srcImageData) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	var r, g, b, i, value;

	for (i = 0; i < srcLength; i += 4) {
		r = srcPixels[i];
		g = srcPixels[i + 1];
		b = srcPixels[i + 2];

		dstPixels[i] = (value = r * 0.393 + g * 0.769 + b * 0.189) > 255 ? 255 : value < 0 ? 0 : value + 0.5 | 0;
		dstPixels[i + 1] = (value = r * 0.349 + g * 0.686 + b * 0.168) > 255 ? 255 : value < 0 ? 0 : value + 0.5 | 0;
		dstPixels[i + 2] = (value = r * 0.272 + g * 0.534 + b * 0.131) > 255 ? 255 : value < 0 ? 0 : value + 0.5 | 0;
		dstPixels[i + 3] = srcPixels[i + 3];
	}

	return dstImageData;
};

/**
 * @param factor 1 <= n
 */
ImageFilters.Sharpen = function (srcImageData, factor) {
	//Convolution formula from VIGRA
	return this.ConvolutionFilter(srcImageData, 3, 3, [-factor / 16, -factor / 8, -factor / 16, -factor / 8, factor * 0.75 + 1, -factor / 8, -factor / 16, -factor / 8, -factor / 16]);
};

ImageFilters.Solarize = function (srcImageData) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	this.utils.mapRGB(srcPixels, dstPixels, function (value) {
		return value > 127 ? (value - 127.5) * 2 : (127.5 - value) * 2;
	});

	return dstImageData;
};

ImageFilters.Transpose = function (srcImageData) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcHeight, srcWidth),
	    dstPixels = dstImageData.data;

	var srcIndex, dstIndex;

	for (y = 0; y < srcHeight; y += 1) {
		for (x = 0; x < srcWidth; x += 1) {
			srcIndex = y * srcWidth + x << 2;
			dstIndex = x * srcHeight + y << 2;

			dstPixels[dstIndex] = srcPixels[srcIndex];
			dstPixels[dstIndex + 1] = srcPixels[srcIndex + 1];
			dstPixels[dstIndex + 2] = srcPixels[srcIndex + 2];
			dstPixels[dstIndex + 3] = srcPixels[srcIndex + 3];
		}
	}

	return dstImageData;
};

/**
 * @param centerX 0.0 <= n <= 1.0
 * @param centerY 0.0 <= n <= 1.0
 * @param radius
 * @param angle(degree)
 * @param smooth
 */
ImageFilters.Twril = function (srcImageData, centerX, centerY, radius, angle, edge, smooth) {
	var srcPixels = srcImageData.data,
	    srcWidth = srcImageData.width,
	    srcHeight = srcImageData.height,
	    srcLength = srcPixels.length,
	    dstImageData = this.utils.createImageData(srcWidth, srcHeight),
	    dstPixels = dstImageData.data;

	//convert position to px
	centerX = srcWidth * centerX;
	centerY = srcHeight * centerY;

	// degree to radian
	angle *= Math.PI / 180;

	var radius2 = radius * radius,
	    max_y = srcHeight - 1,
	    max_x = srcWidth - 1,
	    dstIndex = 0,
	    x,
	    y,
	    dx,
	    dy,
	    distance,
	    a,
	    tx,
	    ty,
	    srcIndex,
	    pixel,
	    i;

	for (y = 0; y < srcHeight; y += 1) {
		for (x = 0; x < srcWidth; x += 1) {
			dx = x - centerX;
			dy = y - centerY;
			distance = dx * dx + dy * dy;

			if (distance > radius2) {
				// out of the effected area. just copy the pixel
				dstPixels[dstIndex] = srcPixels[dstIndex];
				dstPixels[dstIndex + 1] = srcPixels[dstIndex + 1];
				dstPixels[dstIndex + 2] = srcPixels[dstIndex + 2];
				dstPixels[dstIndex + 3] = srcPixels[dstIndex + 3];
			} else {
				// main formula
				distance = Math.sqrt(distance);
				a = Math.atan2(dy, dx) + angle * (radius - distance) / radius;
				tx = centerX + distance * Math.cos(a);
				ty = centerY + distance * Math.sin(a);

				// copy target pixel
				if (smooth) {
					// bilinear
					this.utils.copyBilinear(srcPixels, tx, ty, srcWidth, srcHeight, dstPixels, dstIndex, edge);
				} else {
					// nearest neighbor
					// round tx, ty
					srcIndex = (ty + 0.5 | 0) * srcWidth + (tx + 0.5 | 0) << 2;
					dstPixels[dstIndex] = srcPixels[srcIndex];
					dstPixels[dstIndex + 1] = srcPixels[srcIndex + 1];
					dstPixels[dstIndex + 2] = srcPixels[srcIndex + 2];
					dstPixels[dstIndex + 3] = srcPixels[srcIndex + 3];
				}
			}

			dstIndex += 4;
		}
	}

	return dstImageData;
};

exports.default = ImageFilters;

/***/ }),

/***/ "./src/js/libs/jquery.translate.js":
/*!*****************************************!*\
  !*** ./src/js/libs/jquery.translate.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(jQuery) {

// https://github.com/jorgejeferson/translate.js/tree/39be8237666a76035fc210a28d8e431f1416579e
(function ($) {
	$.fn.translate = function (options) {
		var that = this; //a reference to ourselves
		var settings = {
			css: "trn",
			attrs: ["alt", "placeholder", "title"],
			lang: "pt",
			langDefault: "pt"
		};
		settings = $.extend(settings, options || {});
		if (settings.css.lastIndexOf(".", 0) !== 0) {
			//doesn't start with '.'
			settings.css = "." + settings.css;
		}
		var t = settings.t;
		//public methods
		this.lang = function (l) {
			if (l) {
				settings.lang = l;
				this.translate(settings); //translate everything
			}
			return settings.lang;
		};
		this.get = function (index) {
			var res = index;

			try {
				res = t[index][settings.lang];
			} catch (err) {
				//not found, return index
				return index;
			}
			if (res) {
				return res;
			} else {
				return index;
			}
		};
		this.g = this.get;
		//main
		this.find(settings.css).each(function (i) {
			var $this = $(this);

			var trn_key = $this.attr("data-trn-key");
			if (!trn_key) {
				trn_key = $this.html();
				$this.attr("data-trn-key", trn_key);
			}
			// Filtering attr
			$.each(this.attributes, function () {
				if ($.inArray(this.name, settings.attrs) !== -1) {
					var trn_attr_key = $this.attr("data-trn-attr");
					if (!trn_attr_key) {
						trn_attr_key = $this.attr(this.name);
						$this.attr("data-trn-attr", trn_attr_key);
					}
					$this.attr(this.name, that.get(trn_attr_key));
				}
			});
			$this.html(that.get(trn_key));
		});
		return this;
	};
})(jQuery);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")))

/***/ }),

/***/ "./src/js/libs/menu.js":
/*!*****************************!*\
  !*** ./src/js/libs/menu.js ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($, jQuery) {

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

//http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm
var ddsmoothmenu = {
    arrowimages: {
        down: ["rightarrowclass", "", 0],
        right: ["rightarrowclass", "", 0]
    },
    transition: {
        overtime: 0,
        outtime: 0
    }, //duration of slide in/out animation, in milliseconds
    shadow: false, //enable shadow?
    //showhidedelay:{showdelay:100,hidedelay:200}, //set delay in milliseconds before sub menus appear and disappear, respectively
    showhidedelay: {
        showdelay: 0,
        hidedelay: 0
    },
    zindexvalue: 1e3, //set z-index value for menus
    closeonnonmenuclick: true,
    closeonmouseout: false,
    overarrowre: /(?=\.(gif|jpg|jpeg|png|bmp))/i,
    overarrowaddtofilename: "_over",
    detecttouch: !!("ontouchstart" in window) || !!("ontouchstart" in document.documentElement) || !!window.ontouchstart || !!window.Touch && !!window.Touch.length || !!window.onmsgesturechange || window.DocumentTouch && window.document instanceof window.DocumentTouch,
    detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit") > -1,
    idevice: /ipad|iphone/i.test(navigator.userAgent),
    detectie6: function () {
        var e;
        return (e = /MSIE (\d+)/.exec(navigator.userAgent)) && e[1] < 7;
    }(),
    detectie9: function () {
        var e;
        return (e = /MSIE (\d+)/.exec(navigator.userAgent)) && e[1] > 8;
    }(),
    ie9shadow: function ie9shadow() {},
    css3support: typeof document.documentElement.style.boxShadow === "string" || !document.all && document.querySelector,
    prevobjs: [],
    menus: null,
    executelink: function executelink(e, t, n) {
        var r = t.length,
            i = n.target;
        while (--r > -1) {
            if (t[r] === this) {
                t.splice(r, 1);
                if (i.href !== ddsmoothmenu.emptyhash && i.href && e(i).is("a") && !e(i).children("span." + ddsmoothmenu.arrowimages.down[0] + ", span." + ddsmoothmenu.arrowimages.right[0]).length) {
                    if (i.target && i.target !== "_self") {
                        window.open(i.href, i.target);
                    } else {
                        window.location.href = i.href;
                    }
                    n.stopPropagation();
                }
            }
        }
    },
    repositionv: function repositionv(e, t, n, r, i, s, o) {
        o = o || 0;
        var u = 0,
            a = r + i;
        e.css({
            top: n,
            display: "block"
        });
        while (e.offset().top < i) {
            e.css({
                top: ++n
            });
            ++u;
        }
        if (!u && t.offset().top + t.outerHeight() < a && e.data("height") + e.offset().top > a) {
            e.css({
                top: i - t.parents("ul").last().offset().top - t.position().top
            });
        }
        s === "toggle" && e.css({
            display: "none"
        });
        if (n !== o) {
            e.addClass("repositionedv");
        }
        return [u, n];
    },
    updateprev: function updateprev(e, t, n) {
        var r = t.length,
            i,
            s = n.parents().add(this);
        while (--r > -1) {
            if (s.index(i = t[r]) < 0) {
                e(i).trigger("click", [1]);
                t.splice(r, 1);
            }
        }
        t.push(this);
    },
    subulpreventemptyclose: function subulpreventemptyclose(e) {
        var t = e.target;
        if (t.href === ddsmoothmenu.emptyhash && $(t).parent("li").find("ul").length < 1) {
            e.preventDefault();
            e.stopPropagation();
        }
    },
    getajaxmenu: function getajaxmenu(e, t, n) {
        var r = e("#" + t.contentsource[0]);
        r.html("Loading Menu...");
        e.ajax({
            url: t.contentsource[1],
            async: true,
            error: function error(e) {
                r.html("Error fetching content. Server Response: " + e.responseText);
            },
            success: function success(i) {
                r.html(i);
                !!!n && ddsmoothmenu.buildmenu(e, t);
            }
        });
    },
    closeall: function closeall(e) {
        var t = ddsmoothmenu,
            n;
        if (!t.globaltrackopen) {
            return;
        }
        if (e.type === "mouseleave" || (e.type === "click" || e.type === "touchstart") && t.menus.index(e.target) < 0) {
            n = t.prevobjs.length;
            while (--n > -1) {
                $(t.prevobjs[n]).trigger("click");
                t.prevobjs.splice(n, 1);
            }
        }
    },
    emptyhash: $('<a href="#"></a>').get(0).href,
    buildmenu: function buildmenu(e, t) {
        var n = ddsmoothmenu;
        n.globaltrackopen = n.closeonnonmenuclick || n.closeonmouseout;
        var r = 0;
        var i = n.globaltrackopen ? n.prevobjs : [];
        var s = e("#" + t.mainmenuid).removeClass("ddsmoothmenu ddsmoothmenu-v").addClass(t.classname || "ddsmoothmenu");
        t.repositionv = t.repositionv !== false;
        var o = s.find(">ul");
        var u = n.detecttouch ? "toggle" : t.method === "toggle" ? "toggle" : "hover";
        var a = o.find(">li>ul").parent();
        var f = t.orientation != "v" ? "down" : "right",
            l = e(document.body);
        o.click(function (e) {
            e.target.href === n.emptyhash && e.preventDefault();
        });
        if (u === "toggle") {
            if (n.globaltrackopen) {
                n.menus = n.menus ? n.menus.add(o.add(o.find("*"))) : o.add(o.find("*"));
            }
            if (n.closeonnonmenuclick) {
                if (f === "down") {
                    s.click(function (e) {
                        e.stopPropagation();
                    });
                }
                e(document).unbind("click.smoothmenu").bind("click.smoothmenu", n.closeall);
                if (n.idevice) {
                    document.removeEventListener("touchstart", n.closeall, false);
                    document.addEventListener("touchstart", n.closeall, false);
                }
            } else if (t.closeonnonmenuclick) {
                if (f === "down") {
                    s.click(function (e) {
                        e.stopPropagation();
                    });
                }
                e(document).bind("click." + t.mainmenuid, function (e) {
                    o.find("li>a.selected").parent().trigger("click");
                });
                if (n.idevice) {
                    document.addEventListener("touchstart", function (e) {
                        o.find("li>a.selected").parent().trigger("click");
                    }, false);
                }
            }
            if (n.closeonmouseout) {
                var c = f === "down" ? s : o;
                c.bind("mouseleave.smoothmenu", n.closeall);
            } else if (t.closeonmouseout) {
                var c = f === "down" ? s : o;
                c.bind("mouseleave.smoothmenu", function () {
                    o.find("li>a.selected").parent().trigger("click");
                });
            }
            if (!e('style[title="ddsmoothmenushadowsnone"]').length) {
                e("head").append('<style title="ddsmoothmenushadowsnone" type="text/css">.ddsmoothmenushadowsnone{display:none!important;}</style>');
            }
            var h;
            e(window).bind("resize scroll", function () {
                clearTimeout(h);
                var t = o.find("li>a.selected").parent(),
                    n = e(".ddshadow").addClass("ddsmoothmenushadowsnone");
                t.eq(0).trigger("click");
                t.trigger("click");
                h = setTimeout(function () {
                    n.removeClass("ddsmoothmenushadowsnone");
                }, 100);
            });
        }
        a.each(function () {
            function p() {
                a.removeClass("selected");
            }
            var s = e(this).css({
                zIndex: (t.zindexvalue || n.zindexvalue) + r--
            });
            var o = s.children("ul:eq(0)").css({
                display: "block"
            }).data("timers", {});
            var a = s.children("a:eq(0)").css({
                paddingRight: n.arrowimages[f][2]
            }).append('<span style="display: block;" class="' + n.arrowimages[f][0] + '"></span>');
            var c = {
                w: a.outerWidth(),
                h: s.innerHeight(),
                subulw: o.outerWidth(),
                subulh: o.outerHeight()
            };
            var h = f === "down" ? c.h : 0;
            o.css({
                top: h
            });
            u === "toggle" && o.click(n.subulpreventemptyclose);
            s[u](function (r) {
                if (!s.data("headers")) {
                    n.buildsubheaders(e, o.find(">li>ul").parent(), t, u, i);
                    s.data("headers", true).find(">ul").each(function (t, n) {
                        var r = e(n);
                        r.data("height", r.outerHeight());
                    }).css({
                        display: "none",
                        visibility: "visible"
                    });
                }
                u === "toggle" && n.updateprev.call(this, e, i, s);
                clearTimeout(o.data("timers").hidetimer);
                a.addClass("selected");
                o.data("timers").showtimer = setTimeout(function () {
                    var r = f === "down" ? 0 : c.w;
                    var i = r,
                        p,
                        d,
                        v,
                        m = 0;
                    r = s.offset().left + r + c.subulw > e(window).width() ? f === "down" ? -c.subulw + c.w : -c.w : r;
                    i = i !== r;
                    o.css({
                        top: h
                    }).removeClass("repositionedv");
                    if (t.repositionv && a.offset().top + h + o.data("height") > (v = e(window).height()) + (d = e(document).scrollTop())) {
                        p = (f === "down" ? 0 : a.outerHeight()) - o.data("height");
                        m = n.repositionv(o, a, p, v, d, u, h)[0];
                    }
                    o.css({
                        left: r,
                        width: c.subulw
                    }).stop(true, true).animate({
                        height: "show",
                        opacity: "show"
                    }, n.transition.overtime, function () {
                        this.style.removeAttribute && this.style.removeAttribute("filter");
                    });
                    if (i) {
                        o.addClass("repositioned");
                    } else {
                        o.removeClass("repositioned");
                    }
                    if (t.shadow) {
                        if (!s.data("$shadow")) {
                            s.data("$shadow", e("<div></div>").addClass("ddshadow toplevelshadow").prependTo(l).css({
                                zIndex: s.css("zIndex")
                            }));
                        }
                        n.ie9shadow(s.data("$shadow"));
                        var g = o.offset();
                        var y = g.left;
                        var b = g.top;
                        s.data("$shadow").css({
                            overflow: "visible",
                            width: c.subulw,
                            left: y,
                            top: b
                        }).stop(true, true).animate({
                            height: c.subulh
                        }, n.transition.overtime);
                    }
                }, n.showhidedelay.showdelay);
            }, function (t, r) {
                var a = s.data("$shadow");
                if (u === "hover") {
                    p();
                } else {
                    n.executelink.call(this, e, i, t);
                }
                clearTimeout(o.data("timers").showtimer);
                o.data("timers").hidetimer = setTimeout(function () {
                    o.stop(true, true).animate({
                        height: "hide",
                        opacity: "hide"
                    }, r || n.transition.outtime, function () {
                        u === "toggle" && p();
                    });
                    if (a) {
                        if (!n.css3support && n.detectwebkit) {
                            a.children("div:eq(0)").css({
                                opacity: 0
                            });
                        }
                        a.stop(true, true).animate({
                            height: 0
                        }, r || n.transition.outtime, function () {
                            if (u === "toggle") {
                                this.style.overflow = "hidden";
                            }
                        });
                    }
                }, n.showhidedelay.hidedelay);
            });
        });
    },
    buildsubheaders: function buildsubheaders(e, t, n, r, i) {
        t.each(function () {
            function l() {
                a.removeClass("selected");
            }
            var t = ddsmoothmenu;
            var s = e(this).css({
                zIndex: e(this).parent("ul").css("z-index")
            });
            var o = s.children("ul:eq(0)").css({
                display: "block"
            }).data("timers", {}),
                u;
            r === "toggle" && o.click(t.subulpreventemptyclose);
            var a = s.children("a:eq(0)").append('<span style="display: block;" class="' + t.arrowimages["right"][0] + '"></span>');
            var f = {
                w: a.outerWidth(),
                subulw: o.outerWidth(),
                subulh: o.outerHeight()
            };
            o.css({
                top: 0
            });
            s[r](function (l) {
                if (!s.data("headers")) {
                    t.buildsubheaders(e, o.find(">li>ul").parent(), n, r, i);
                    s.data("headers", true).find(">ul").each(function (t, n) {
                        var r = e(n);
                        r.data("height", r.height());
                    }).css({
                        display: "none",
                        visibility: "visible"
                    });
                }
                r === "toggle" && t.updateprev.call(this, e, i, s);
                clearTimeout(o.data("timers").hidetimer);
                a.addClass("selected");
                o.data("timers").showtimer = setTimeout(function () {
                    var i = f.w;
                    var l = i,
                        c,
                        h,
                        p,
                        d = 0;
                    i = s.offset().left + i + f.subulw > e(window).width() ? -f.w : i;
                    l = l !== i;
                    o.css({
                        top: 0
                    }).removeClass("repositionedv");
                    if (n.repositionv && a.offset().top + o.data("height") > (p = e(window).height()) + (h = e(document).scrollTop())) {
                        c = a.outerHeight() - o.data("height");
                        d = t.repositionv(o, a, c, p, h, r);
                        c = d[1];
                        d = d[0];
                    }
                    o.css({
                        left: i,
                        width: f.subulw
                    }).stop(true, true).animate({
                        height: "show",
                        opacity: "show"
                    }, t.transition.overtime, function () {
                        this.style.removeAttribute && this.style.removeAttribute("filter");
                    });
                    if (l) {
                        o.addClass("repositioned");
                    } else {
                        o.removeClass("repositioned");
                    }
                    if (n.shadow) {
                        if (!s.data("$shadow")) {
                            u = s.parents("li:eq(0)").data("$shadow");
                            s.data("$shadow", e("<div></div>").addClass("ddshadow").prependTo(u).css({
                                zIndex: u.css("z-index")
                            }));
                        }
                        var v = o.offset();
                        var m = i;
                        var g = s.position().top - (c ? o.data("height") - a.outerHeight() - d : 0);
                        if (t.detectwebkit && !t.css3support) {
                            s.data("$shadow").css({
                                opacity: 1
                            });
                        }
                        s.data("$shadow").css({
                            overflow: "visible",
                            width: f.subulw,
                            left: m,
                            top: g
                        }).stop(true, true).animate({
                            height: f.subulh
                        }, t.transition.overtime);
                    }
                }, t.showhidedelay.showdelay);
            }, function (n, u) {
                var a = s.data("$shadow");
                if (r === "hover") {
                    l();
                } else {
                    t.executelink.call(this, e, i, n);
                }
                clearTimeout(o.data("timers").showtimer);
                o.data("timers").hidetimer = setTimeout(function () {
                    o.stop(true, true).animate({
                        height: "hide",
                        opacity: "hide"
                    }, u || t.transition.outtime, function () {
                        r === "toggle" && l();
                    });
                    if (a) {
                        if (!t.css3support && t.detectwebkit) {
                            a.children("div:eq(0)").css({
                                opacity: 0
                            });
                        }
                        a.stop(true, true).animate({
                            height: 0
                        }, u || t.transition.outtime, function () {
                            if (r === "toggle") {
                                this.style.overflow = "hidden";
                            }
                        });
                    }
                }, t.showhidedelay.hidedelay);
            });
        });
    },
    init: function init(e) {
        function o() {
            if (s) {
                return;
            }
            if (_typeof(e.customtheme) == "object" && e.customtheme.length == 2) {
                var n = e.orientation == "v" ? t : t + ", " + t;
                i.push([n, " ul li a {background:", e.customtheme[0], ";}\n", t, " ul li a:hover {background:", e.customtheme[1], ";}"].join(""));
            }
            i.push('\n<style type="text/css">');
            i.reverse();
            jQuery("head").append(i.join("\n"));
        }
        if (this.detectie6 && parseFloat(jQuery.fn.jquery) > 1.3) {
            this.init = function (e) {
                if (_typeof(e.contentsource) == "object") {
                    jQuery(function (t) {
                        ddsmoothmenu.getajaxmenu(t, e, "nobuild");
                    });
                }
                return false;
            };
            jQuery('link[href*="ddsmoothmenu"]').attr("disabled", true);
            jQuery(function (e) {
                alert("You Seriously Need to Update Your Browser!\n\nDynamic Drive Smooth Navigational Menu Showing Text Only Menu(s)\n\nDEVELOPER's NOTE: This script will run in IE 6 when using jQuery 1.3.2 or less,\nbut not real well.");
                e('link[href*="ddsmoothmenu"]').attr("disabled", true);
            });
            return this.init(e);
        }
        var t = "#" + e.mainmenuid,
            n,
            r,
            i = ["</style>\n"],
            s = e.arrowswap ? 4 : 2;
        if (e.arrowswap) {
            n = ddsmoothmenu.arrowimages.right[1].replace(ddsmoothmenu.overarrowre, ddsmoothmenu.overarrowaddtofilename);
            r = ddsmoothmenu.arrowimages.down[1].replace(ddsmoothmenu.overarrowre, ddsmoothmenu.overarrowaddtofilename);
            jQuery(new Image()).bind("load error", function (n) {
                e.rightswap = n.type === "load";
                if (e.rightswap) {
                    i.push([t, " ul li a:hover .", ddsmoothmenu.arrowimages.right[0], ", ", t, " ul li a.selected .", ddsmoothmenu.arrowimages.right[0], " { background-image: url(", this.src, ");}"].join(""));
                }--s;
                o();
            }).attr("src", n);
            jQuery(new Image()).bind("load error", function (n) {
                e.downswap = n.type === "load";
                if (e.downswap) {
                    i.push([t, " ul li a:hover .", ddsmoothmenu.arrowimages.down[0], ", ", t, " ul li a.selected .", ddsmoothmenu.arrowimages.down[0], " { background-image: url(", this.src, ");}"].join(""));
                }--s;
                o();
            }).attr("src", r);
        }
        jQuery(new Image()).bind("load error", function (e) {
            if (e.type === "load") {
                i.push([t + " ul li a .", ddsmoothmenu.arrowimages.right[0], " { background: url(", this.src, ") no-repeat;width:", this.width, "px;height:", this.height, "px;}"].join(""));
            }--s;
            o();
        }).attr("src", ddsmoothmenu.arrowimages.right[1]);
        jQuery(new Image()).bind("load error", function (e) {
            if (e.type === "load") {
                i.push([t + " ul li a .", ddsmoothmenu.arrowimages.down[0], " { background: url(", this.src, ") no-repeat;width:", this.width, "px;height:", this.height, "px;}"].join(""));
            }--s;
            o();
        }).attr("src", ddsmoothmenu.arrowimages.down[1]);
        e.shadow = this.detectie6 && (e.method === "hover" || e.orientation === "v") ? false : e.shadow || this.shadow;
        jQuery(document).ready(function (t) {
            if (e.shadow && ddsmoothmenu.css3support) {
                t("body").addClass("ddcss3support");
            }
            if (_typeof(e.contentsource) == "object") {
                ddsmoothmenu.getajaxmenu(t, e);
            } else {
                ddsmoothmenu.buildmenu(t, e);
            }
        });
    }
};
if (function (e) {
    var t = false;
    try {
        e('<a href="#"></a>').toggle(function () {}, function () {
            t = true;
        }).trigger("click").trigger("click");
    } catch (n) {}
    return !t;
}(jQuery)) {
    (function () {
        var e = jQuery.fn.toggle;
        jQuery.extend(jQuery.fn, {
            toggle: function toggle(t, n) {
                if (!jQuery.isFunction(t) || !jQuery.isFunction(n)) {
                    return e.apply(this, arguments);
                }
                var r = arguments,
                    i = t.guid || jQuery.guid++,
                    s = 0,
                    o = function o(e) {
                    var n = (jQuery._data(this, "lastToggle" + t.guid) || 0) % s;
                    jQuery._data(this, "lastToggle" + t.guid, n + 1);
                    e.preventDefault();
                    return r[n].apply(this, arguments) || false;
                };
                o.guid = i;
                while (s < r.length) {
                    r[s++].guid = i;
                }
                return this.click(o);
            }
        });
    })();
}
if (ddsmoothmenu.detectie9) {
    (function (e) {
        function t(e, t) {
            return parseInt(e) + t + "px";
        }
        ddsmoothmenu.ie9shadow = function (n) {
            var r = document.defaultView.getComputedStyle(n.get(0), null),
                i = r.getPropertyValue("box-shadow").split(" "),
                s = {
                top: r.getPropertyValue("margin-top"),
                left: r.getPropertyValue("margin-left")
            };
            e("head").append(['\n<style title="ie9shadow" type="text/css">', ".ddcss3support .ddshadow {", "	box-shadow: " + t(i[0], 1) + " " + t(i[1], 1) + " " + i[2] + " " + i[3] + ";", "}", ".ddcss3support .ddshadow.toplevelshadow {", "	opacity: " + (e(".ddcss3support .ddshadow").css("opacity") - .1) + ";", "	margin-top: " + t(s.top, -1) + ";", "	margin-left: " + t(s.left, -1) + ";", "}", "</style>\n"].join("\n"));
            ddsmoothmenu.ie9shadow = function () {};
        };
        var n = e.fn.height,
            r = e.fn.width;
        e.extend(e.fn, {
            height: function height() {
                var e = this.get(0);
                if (this.length < 1 || arguments.length || e === window || e === document) {
                    return n.apply(this, arguments);
                }
                return parseFloat(document.defaultView.getComputedStyle(e, null).getPropertyValue("height"));
            },
            innerHeight: function innerHeight() {
                if (this.length < 1) {
                    return null;
                }
                var e = this.height(),
                    t = this.get(0),
                    n = document.defaultView.getComputedStyle(t, null);
                e += parseInt(n.getPropertyValue("padding-top"));
                e += parseInt(n.getPropertyValue("padding-bottom"));
                return e;
            },
            outerHeight: function outerHeight(e) {
                if (this.length < 1) {
                    return null;
                }
                var t = this.innerHeight(),
                    n = this.get(0),
                    r = document.defaultView.getComputedStyle(n, null);
                t += parseInt(r.getPropertyValue("border-top-width"));
                t += parseInt(r.getPropertyValue("border-bottom-width"));
                if (e) {
                    t += parseInt(r.getPropertyValue("margin-top"));
                    t += parseInt(r.getPropertyValue("margin-bottom"));
                }
                return t;
            },
            width: function width() {
                var e = this.get(0);
                if (this.length < 1 || arguments.length || e === window || e === document) {
                    return r.apply(this, arguments);
                }
                return parseFloat(document.defaultView.getComputedStyle(e, null).getPropertyValue("width"));
            },
            innerWidth: function innerWidth() {
                if (this.length < 1) {
                    return null;
                }
                var e = this.width(),
                    t = this.get(0),
                    n = document.defaultView.getComputedStyle(t, null);
                e += parseInt(n.getPropertyValue("padding-right"));
                e += parseInt(n.getPropertyValue("padding-left"));
                return e;
            },
            outerWidth: function outerWidth(e) {
                if (this.length < 1) {
                    return null;
                }
                var t = this.innerWidth(),
                    n = this.get(0),
                    r = document.defaultView.getComputedStyle(n, null);
                t += parseInt(r.getPropertyValue("border-right-width"));
                t += parseInt(r.getPropertyValue("border-left-width"));
                if (e) {
                    t += parseInt(r.getPropertyValue("margin-right"));
                    t += parseInt(r.getPropertyValue("margin-left"));
                }
                return t;
            }
        });
    })(jQuery);
};

//ddsmoothmenu.init({
//	mainmenuid: "main_menu",
//	method: 'toggle', //'hover' (default) or 'toggle'
//	contentsource: "markup",
//});

exports.default = ddsmoothmenu;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"), __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")))

/***/ }),

/***/ "./src/js/libs/popup.js":
/*!******************************!*\
  !*** ./src/js/libs/popup.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * user dialogs library
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * @author ViliusL
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * Usage:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * import Dialog_class from './libs/popup.js';
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * var POP = new popup();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * var settings = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		title: 'Differences',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		comment: '',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		preview: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		className: '',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		params: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *			{name: "param1", title: "Parameter #1:", value: "111"},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *			{name: "param2", title: "Parameter #2:", value: "222"},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		on_load: function(params){...},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		on_change: function(params, canvas_preview, w, h){...},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		on_finish: function(params){...},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      *		on_cancel: function(params){...},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * this.POP.show(settings);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * Params types:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - name		type				example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - ---------------------------------------------------------------
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - name		string				'parameter1'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - title		string				'enter value:'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - type		string				'select', 'textarea', 'color'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - value		string				'314'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - values		array fo strings	['one', 'two', 'three']
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - range		numbers interval	[0, 255]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - step		int/float			1	
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - placeholder	text			'enter number here'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - html		html text			'<b>bold</b>'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      * - function	function			'custom_function'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      */


__webpack_require__(/*! ./../../css/popup.css */ "./src/css/popup.css");

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseGui = __webpack_require__(/*! ./../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _translate = __webpack_require__(/*! ./../modules/help/translate.js */ "./src/js/modules/help/translate.js");

var _translate2 = _interopRequireDefault(_translate);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var template = '\n\t<button type="button" class="close" id="popup_close">&times;</button>\n\t<div id="pretitle_area"></div>\n\t<span class="grey right" id="popup_comment"></span>\n\t<h2 class="trn" id="popup_title"></h2>\n\t<div id="dialog_content">\n\t\t<div id="preview_content"></div>\n\t\t<div id="params_content"></div>\n\t</div>\n\t<div class="buttons">\n\t\t<button type="button" id="popup_ok" class="button trn">Ok</button>\n\t\t<button type="button" id="popup_cancel" class="button trn">Cancel</button>\n\t</div>\n';

var Dialog_class = function () {
	function Dialog_class() {
		_classCallCheck(this, Dialog_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;
		window.POP = this;

		this.active = false;
		this.title = null;
		this.onfinish = false;
		this.oncancel = false;
		this.preview = false;
		this.onload = false;
		this.onchange = false;
		this.width_mini = 225;
		this.height_mini = 200;
		this.effects = false;
		this.id = 0;
		this.parameters = [];
		this.Base_layers = new _baseLayers2.default();
		this.Base_gui = new _baseGui2.default();
		this.Help_translate = new _translate2.default();
		this.last_params_hash = '';
		this.layer_active_small = document.createElement("canvas");
		this.layer_active_small_ctx = this.layer_active_small.getContext("2d");
		this.ef_index = null; //current effect list key
		this.ef_prev_index = null;
		this.ef_next_index = null;

		this.set_events();
	}

	/**
  * shows dialog
  * 
  * @param {array} config
  */


	_createClass(Dialog_class, [{
		key: 'show',
		value: function show(config) {

			if (this.active == true) {
				this.hide();
			}

			this.title = config.title || '';
			this.parameters = config.params || [];
			this.onfinish = config.on_finish || false;
			this.oncancel = config.on_cancel || false;
			this.preview = config.preview || false;
			this.onchange = config.on_change || false;
			this.onload = config.on_load || false;
			this.effects = config.effects || false;
			this.className = config.className || '';
			this.comment = config.comment || '';

			this.show_action();
		}

		/**
   * hides dialog
   * 
   * @param {boolean} success
   * @returns {undefined}
   */

	}, {
		key: 'hide',
		value: function hide(success) {
			var params = this.get_params();

			if (success === false && this.oncancel) {
				this.oncancel(params);
			}
			document.getElementById("popup").style.display = 'none';
			this.parameters = [];
			this.active = false;
			this.preview = false;
			this.onload = false;
			this.onchange = false;
			this.effects = false;
			this.title = null;
			this.className = '';
			this.comment = '';
			this.onfinish = false;
			this.oncancel = false;
		}

		/* ----------------- private functions ---------------------------------- */

	}, {
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;

				if (code == 27) {
					//escape
					_this.hide(false);
				}
			}, false);
		}
	}, {
		key: 'onChangeEvent',
		value: function onChangeEvent(e) {
			var params = this.get_params();

			var hash = JSON.stringify(params);
			if (this.last_params_hash == hash) {
				//nothing changed
				return;
			}
			this.last_params_hash = hash;

			if (this.onchange != false) {
				if (this.preview != false) {
					var canvas_right = document.getElementById("pop_post");
					var ctx_right = canvas_right.getContext("2d");

					ctx_right.clearRect(0, 0, this.width_mini, this.height_mini);
					ctx_right.drawImage(this.layer_active_small, 0, 0, this.width_mini, this.height_mini);

					this.onchange(params, ctx_right, this.width_mini, this.height_mini, canvas_right);
				} else {
					this.onchange(params);
				}
			}
		}

		//renders preview. If input=range supported, is called on every param update - must be fast...

	}, {
		key: 'preview_handler',
		value: function preview_handler(e) {
			if (this.preview !== false) {
				this.onChangeEvent(e);
			}
		}

		//OK pressed - prepare data and call handlers

	}, {
		key: 'save',
		value: function save() {
			var params = this.get_params();

			if (this.onfinish) {
				this.onfinish(params);
			}

			this.hide(true);
		}

		//"Cancel" pressed

	}, {
		key: 'cancel',
		value: function cancel() {
			if (this.oncancel) {
				var params = this.get_params();
				this.oncancel(params);
			}
		}
	}, {
		key: 'get_params',
		value: function get_params() {
			var response = {};
			var inputs = document.getElementsByTagName('input');
			for (var i = 0; i < inputs.length; i++) {
				if (inputs[i].id.substr(0, 9) == 'pop_data_') {
					var key = inputs[i].id.substr(9);
					if (this.strpos(key, "_poptmp") != false) key = key.substring(0, this.strpos(key, "_poptmp"));
					var value = inputs[i].value;
					if (inputs[i].type == 'radio') {
						if (inputs[i].checked == true) response[key] = value;
					} else if (inputs[i].type == 'number') {
						response[key] = parseFloat(value);
					} else if (inputs[i].type == 'checkbox') {
						if (inputs[i].checked == true) response[key] = true;else response[key] = false;
					} else if (inputs[i].type == 'range') {
						response[key] = parseFloat(value);
					} else {
						response[key] = value;
					}
				}
			}
			var selects = document.getElementsByTagName('select');
			for (var i = 0; i < selects.length; i++) {
				if (selects[i].id.substr(0, 9) == 'pop_data_') {
					var key = selects[i].id.substr(9);
					var value = selects[i].value;
					response[key] = value;
				}
			}
			var textareas = document.getElementsByTagName('textarea');
			for (var i = 0; i < textareas.length; i++) {
				if (textareas[i].id.substr(0, 9) == 'pop_data_') {
					var key = textareas[i].id.substr(9);
					var value = textareas[i].value;
					response[key] = value;
				}
			}

			return response;
		}

		/**
   * show popup window.
   * used strings: "Ok", "Cancel", "Preview"
   */

	}, {
		key: 'show_action',
		value: function show_action() {
			this.id = this.getRandomInt(0, 999999999);
			if (this.active == true) {
				this.hide();
				return false;
			}
			this.active = true;

			//build content
			var html_pretitle_area = this.render_effect_browser();
			var html_preview_content = '';
			var html_params = '';

			//preview area
			if (this.preview !== false) {
				html_preview_content += '<div style="margin-top:10px;margin-bottom:15px;">';
				html_preview_content += '<canvas style="position:relative;float:left;margin:0 5px 5px 0;border:1px solid #393939;" width="' + this.width_mini + '" height="' + this.height_mini + '" id="pop_pre"></canvas>';
				html_preview_content += '<div id="canvas_preview_container">';
				html_preview_content += '	<canvas style="position:absolute;border:1px solid #393939;background-color:#ffffff;" width="' + this.width_mini + '" height="' + this.height_mini + '" id="pop_post_back"></canvas>';
				html_preview_content += '	<canvas style="position:relative;border:1px solid #393939;" width="' + this.width_mini + '" height="' + this.height_mini + '" id="pop_post"></canvas>';
				html_preview_content += '</div>';
				html_preview_content += '</div>';
			}

			//generate params
			html_params += this.generateParamsHtml();

			document.getElementById("popup").innerHTML = template;
			document.getElementById("pretitle_area").innerHTML = html_pretitle_area;
			document.getElementById("popup_title").innerHTML = this.title;
			document.getElementById("popup_comment").innerHTML = this.comment;
			document.getElementById("preview_content").innerHTML = html_preview_content;
			document.getElementById("params_content").innerHTML = html_params;
			if (this.onfinish != false) {
				document.getElementById("popup_cancel").style.display = '';
			} else {
				document.getElementById("popup_cancel").style.display = 'none';
			}

			document.getElementById("popup").style.display = "block";
			document.getElementById("popup").className = this.className;

			//events
			var _this = this;
			document.getElementById('popup_ok').addEventListener('click', function (event) {
				_this.save();
			});
			document.getElementById('popup_cancel').addEventListener('click', function (event) {
				_this.hide(false);
			});
			document.getElementById('popup_close').addEventListener('click', function (event) {
				_this.hide(false);
			});
			var targets = document.querySelectorAll('#popup input');
			for (var i = 0; i < targets.length; i++) {
				targets[i].addEventListener('keyup', function (event) {
					_this.onkeyup(event);
				});
			}

			//onload
			if (this.onload) {
				var params = this.get_params();
				this.onload(params);
			}

			//some events for effects browser
			this.add_effects_browser_events();

			//load preview
			if (this.preview !== false) {
				//get canvas from layer
				var canvas = this.Base_layers.convert_layer_to_canvas();

				//draw original image
				var canvas_left = document.getElementById("pop_pre");
				var pop_pre = canvas_left.getContext("2d");
				pop_pre.clearRect(0, 0, this.width_mini, this.height_mini);
				pop_pre.rect(0, 0, this.width_mini, this.height_mini);
				pop_pre.fillStyle = "#ffffff";
				pop_pre.fill();
				this.draw_background(pop_pre, this.width_mini, this.height_mini, 10);

				pop_pre.scale(this.width_mini / canvas.width, this.height_mini / canvas.height);
				pop_pre.drawImage(canvas, 0, 0);
				pop_pre.scale(1, 1);

				//prepare temp canvas for faster repaint
				this.layer_active_small.width = POP.width_mini;
				this.layer_active_small.height = POP.height_mini;
				this.layer_active_small_ctx.scale(this.width_mini / canvas.width, this.height_mini / canvas.height);
				this.layer_active_small_ctx.drawImage(canvas, 0, 0);
				this.layer_active_small_ctx.scale(1, 1);

				//draw right background
				var canvas_right_back = document.getElementById("pop_post_back").getContext("2d");
				this.draw_background(canvas_right_back, this.width_mini, this.height_mini, 10);

				//copy to right side
				var canvas_right = document.getElementById("pop_post").getContext("2d");
				canvas_right.clearRect(0, 0, this.width_mini, this.height_mini);
				canvas_right.drawImage(canvas_left, 0, 0, this.width_mini, this.height_mini);

				//prepare temp canvas
				this.preview_handler();
			}

			//call translation again to translate popup
			this.Help_translate.translate(_config2.default.LANG);
		}
	}, {
		key: 'generateParamsHtml',
		value: function generateParamsHtml() {
			var html = '<table style="width:99%;">';
			for (var i in this.parameters) {
				var parameter = this.parameters[i];

				html += '<tr id="popup-tr-' + this.parameters[i].name + '">';
				if (title != 'Error' && parameter.title != undefined) html += '<th class="trn">' + parameter.title + '</th>';
				if (parameter.name != undefined) {
					if (parameter.values != undefined) {
						if (parameter.values.length > 10 || parameter.type == 'select') {
							//drop down
							html += '<td colspan="2"><select onchange="POP.onChangeEvent();" style="font-size:12px;" id="pop_data_' + parameter.name + '">';
							var k = 0;
							for (var j in parameter.values) {
								var sel = '';
								if (parameter.value == parameter.values[j]) sel = 'selected="selected"';
								if (parameter.value == undefined && k == 0) sel = 'selected="selected"';
								html += '<option ' + sel + ' name="' + parameter.values[j] + '">' + parameter.values[j] + '</option>';
								k++;
							}
							html += '</select></td>';
						} else {
							//radio
							html += '<td colspan="2">';
							if (parameter.values.length > 2) html += '<div class="group">';
							var k = 0;
							for (var j in parameter.values) {
								var ch = '';
								if (parameter.value == parameter.values[j]) ch = 'checked="checked"';
								if (parameter.value == undefined && k == 0) ch = 'checked="checked"';

								var title = parameter.values[j];
								var parts = parameter.values[j].split(" - ");
								if (parts.length > 1) {
									title = parts[0] + ' - <span class="trn">' + parts[1] + '</span>';
								}

								html += '<input type="radio" onchange="POP.onChangeEvent();" ' + ch + ' name="' + parameter.name + '" id="pop_data_' + parameter.name + "_poptmp" + j + '" value="' + parameter.values[j] + '">';
								html += '<label style="margin-right:20px;" class="trn" for="pop_data_' + parameter.name + "_poptmp" + j + '">' + title + '</label>';
								if (parameter.values.length > 2) html += '<br />';
								k++;
							}
							if (parameter.values.length > 2) html += '</div>';
							html += '</td>';
						}
					} else if (parameter.value != undefined) {
						//input, range, textarea, color
						var step = 1;
						if (parameter.step != undefined) step = parameter.step;
						if (parameter.range != undefined) {
							//range
							html += '<td><input type="range" name="' + parameter.name + '" id="pop_data_' + parameter.name + '" value="' + parameter.value + '" min="' + parameter.range[0] + '" max="' + parameter.range[1] + '" step="' + step + '" oninput="document.getElementById(\'pv' + i + '\').innerHTML=Math.round(this.value*100)/100;POP.preview_handler();" onchange="POP.onChangeEvent();" /></td>';
							html += '<td style="padding-left:10px;width:50px;" id="pv' + i + '">' + parameter.value + '</td>';
						} else if (parameter.type == 'color') {
							//color
							html += '<td><input type="color" id="pop_data_' + parameter.name + '" value="' + parameter.value + '" onchange="POP.onChangeEvent();" /></td>';
						} else if (typeof parameter.value == 'boolean') {
							var checked = '';
							if (parameter.value === true) checked = 'checked';
							html += '<td class="checkbox"><input type="checkbox" id="pop_data_' + parameter.name + '" ' + checked + ' onclick="POP.onChangeEvent();" > <label class="trn" for="pop_data_' + parameter.name + '">Toggle</label></td>';
						} else {
							//input or textarea
							if (parameter.placeholder == undefined) parameter.placeholder = '';
							if (parameter.type == 'textarea') {
								html += '<td><textarea rows="10" id="pop_data_' + parameter.name + '" onchange="POP.onChangeEvent();" placeholder="' + parameter.placeholder + '">' + parameter.value + '</textarea></td>';
							} else {
								var input_type = "text";
								if (parameter.placeholder != undefined && parameter.placeholder != '' && !isNaN(parameter.placeholder)) input_type = 'number';
								if (parameter.value != undefined && typeof parameter.value == 'number') input_type = 'number';

								html += '<td colspan="2"><input type="' + input_type + '" id="pop_data_' + parameter.name + '" onchange="POP.onChangeEvent();" value="' + parameter.value + '" placeholder="' + parameter.placeholder + '" /></td>';
							}
						}
					}
				} else if (parameter.function != undefined) {
					//custom function
					var result;
					result = parameter.function();
					html += '<td colspan="3">' + result + '</td>';
				} else if (parameter.html != undefined) {
					//html
					html += '<td style="padding-bottom:3px;padding-top:3px;" colspan="2">' + parameter.html + '</td>';
				} else if (parameter.title == undefined) {
					//gap
					html += '<td style="padding-bottom:3px;padding-top:3px;" colspan="2"></td>';
				} else {
					//locked fields without name
					var str = "" + parameter.value;
					var id_tmp = parameter.title.toLowerCase().replace(/[^\w]+/g, '').replace(/ +/g, '-');
					id_tmp = id_tmp.substring(0, 10);
					if (str.length < 40) html += '<td colspan="2"><div class="trn" id="pop_data_' + id_tmp + '" style="padding: 2px 0px;">' + parameter.value + '</div></td>';else html += '<td style="font-size:11px;" colspan="2"><textarea disabled="disabled">' + parameter.value + '</textarea></td>';
				}
				html += '</tr>';
			}
			html += '</table>';

			return html;
		}

		//validate input field, unless browser supports input=range

	}, {
		key: 'validate',
		value: function validate(field) {
			for (var i in this.parameters) {
				var parameter = this.parameters[i];
				if ("pop_data_" + parameter.name == field.id && parameter.range != undefined) {
					if (field.value == '-' || field.value == '') return true;

					var value = parseFloat(field.value);
					if (isNaN(value) || value != field.value) field.value = parameter.value; //not number
					if (value < parameter.range[0]) field.value = parameter.range[0]; //less then min
					else if (value > parameter.range[1]) field.value = parameter.range[1]; //more then max
				}
			}
		}

		//on key press inside input text

	}, {
		key: 'onkeyup',
		value: function onkeyup(event) {
			if (event.keyCode == "13") {
				//Enter was pressed
				this.save();
			}
		}
	}, {
		key: 'get_dimensions',
		value: function get_dimensions() {
			var theWidth, theHeight;
			if (window.innerWidth) {
				theWidth = window.innerWidth;
			} else if (document.documentElement && document.documentElement.clientWidth) {
				theWidth = document.documentElement.clientWidth;
			} else if (document.body) {
				theWidth = document.body.clientWidth;
			}
			if (window.innerHeight) {
				theHeight = window.innerHeight;
			} else if (document.documentElement && document.documentElement.clientHeight) {
				theHeight = document.documentElement.clientHeight;
			} else if (document.body) {
				theHeight = document.body.clientHeight;
			}
			return [theWidth, theHeight];
		}
	}, {
		key: 'getRandomInt',
		value: function getRandomInt(min, max) {
			return Math.floor(Math.random() * (max - min + 1)) + min;
		}
	}, {
		key: 'strpos',
		value: function strpos(haystack, needle, offset) {
			var i = (haystack + '').indexOf(needle, offset || 0);
			return i === -1 ? false : i;
		}
	}, {
		key: 'draw_background',
		value: function draw_background(canvas, W, H, gap, force) {
			if (_config2.default.TRANSPARENCY == false && force == undefined) {
				canvas.beginPath();
				canvas.rect(0, 0, W, H);
				canvas.fillStyle = "#ffffff";
				canvas.fill();
				return false;
			}
			if (gap == undefined) gap = 10;
			var fill = true;
			for (var i = 0; i < W; i = i + gap) {
				if (i % (gap * 2) == 0) fill = true;else fill = false;
				for (var j = 0; j < H; j = j + gap) {
					if (fill == true) {
						canvas.fillStyle = '#eeeeee';
						canvas.fillRect(i, j, gap, gap);
						fill = false;
					} else fill = true;
				}
			}
		}
	}, {
		key: 'ucfirst',
		value: function ucfirst(string) {
			return string.charAt(0).toUpperCase() + string.slice(1);
		}
	}, {
		key: 'get_effects_list',
		value: function get_effects_list() {
			var list = [];

			for (var i in this.Base_gui.modules) {
				if (i.indexOf("effects") == -1 || i.indexOf("abstract") > -1) continue;

				list[i] = this.Base_gui.modules[i];
			}

			return list;
		}
	}, {
		key: 'render_effect_browser',
		value: function render_effect_browser() {
			if (this.effects == false) return '';

			var html = '';
			var filters_config = this.get_effects_list();
			var breaking = false;
			this.ef_index = null;
			this.ef_next_index = null;
			this.ef_prev_index = null;
			for (var key in filters_config) {
				if (breaking == true) {
					this.ef_next_index = key;
					break;
				}
				var title = this.get_filter_title(key);
				if (title.toLowerCase() == this.title.toLowerCase()) {
					this.ef_index = key;
					breaking = true;
					continue;
				}
				this.ef_prev_index = key;
			}

			html += '<span style="float:right;">';
			html += '<input id="previous_filter" type="button" value="&lt;"> ';
			html += '<select id="effect_browser">';
			html += '<option class="trn" value="">--- Select effect ---</option>';
			for (var key in filters_config) {
				var title = this.get_filter_title(key);
				title = this.ucfirst(title);
				var selected = '';
				if (title.toLowerCase() == this.title.toLowerCase()) var selected = 'selected';
				html += ' <option ' + selected + ' value="' + key + '">' + title + '</option>';
			}
			html += '</select>';
			html += ' <input id="next_filter" onclick="" type="button" value="&gt;"> ';
			html += '</span>';

			return html;
		}
	}, {
		key: 'add_effects_browser_events',
		value: function add_effects_browser_events() {
			if (this.effects == false) return;

			var _this = this;
			var filters_config = this.get_effects_list();
			var prev_index = this.ef_prev_index;
			var next_index = this.ef_next_index;

			document.getElementById('previous_filter').disabled = false;
			document.getElementById('next_filter').disabled = false;
			if (prev_index == null) {
				document.getElementById('previous_filter').disabled = true;
			}
			if (next_index == null) {
				document.getElementById('next_filter').disabled = true;
			}
			//previous
			document.getElementById('previous_filter').addEventListener('click', function (event) {
				_this.hide(false);
				var function_name = prev_index.toLowerCase().replace(/ /g, '_').replace('effects/', '');
				filters_config[prev_index][function_name]();
			});
			//next
			document.getElementById('next_filter').addEventListener('click', function (event) {
				_this.hide(false);
				var function_name = next_index.toLowerCase().replace(/ /g, '_').replace('effects/', '');
				filters_config[next_index][function_name]();
			});
			//onchange
			var effect_browser = document.getElementById('effect_browser');
			effect_browser.addEventListener('change', function (event) {
				_this.hide(false);
				var value = effect_browser.options[effect_browser.selectedIndex].value;
				var function_name = value.toLowerCase().replace(/ /g, '_').replace('effects/', '');
				filters_config[value][function_name]();
			});
		}
	}, {
		key: 'get_filter_title',
		value: function get_filter_title(key) {
			var title = key.replace('effects/', '').replace(/_/g, ' ');

			//exceptions
			if (title == 'negative') title = 'invert';

			return title;
		}
	}]);

	return Dialog_class;
}();

exports.default = Dialog_class;

/***/ }),

/***/ "./src/js/libs/vintage.js":
/*!********************************!*\
  !*** ./src/js/libs/vintage.js ***!
  \********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _glfx = __webpack_require__(/*! ./glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _imagefilters = __webpack_require__(/*! ./imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * adds vintage effect
 * 
 * @author ViliusL
 * 
 * Functions:
 * - adjust_color
 * - lower_contrast
 * - blur
 * - light_leak
 * - chemicals
 * - exposure
 * - grains
 * - grains_big
 * - optics
 * - dusts
 *
 * Usage:	VINTAGE.___function___(canvas,, param1, param2, ...);
 * 
 * libs:		
 * - imagefilters.js, url: https://github.com/arahaya/ImageFilters.js
 * - glfx.js url: http://evanw.github.com/glfx.js/
 */
var Vintage_class = function () {
	function Vintage_class(width, height) {
		_classCallCheck(this, Vintage_class);

		this.fx_filter = false;
		this.exposure_rand = null;
		this.lightLeakX = null;
		this.lightLeakY = null;

		this.reset_random_values(width, height);
	}

	/**
  * apply all affect
  * 
  * @param {canvas} canvas
  * @param {int} level 0-100
  */


	_createClass(Vintage_class, [{
		key: 'apply_all',
		value: function apply_all(canvas, level) {
			//adjust from scale [0-100] to our scale.
			var red_offset = level * 1; //[0, 100]
			var contrast = level / 2; //[0, 50]
			//var blur = level / 100; //[0, 1]
			var light_leak = level * 1.5; //[0, 150]
			var de_saturation = level * 1; //[0, 100]
			var exposure = level * 1.5; //[0, 150]
			var grains = level / 2; //[0, 50]
			var big_grains = level / 5; //[0, 20]
			var vignette_size = level / 200; //[0, 0.5]
			var vignette_amount = level / 142; //[0, 0.7]
			var dust_level = level * 1; //[0, 100]

			this.adjust_color(canvas, red_offset);
			this.lower_contrast(canvas, contrast);
			//this.blur(canvas, blur);
			this.light_leak(canvas, light_leak);
			this.chemicals(canvas, de_saturation);
			this.exposure(canvas, exposure);
			this.grains(canvas, grains);
			this.grains_big(canvas, big_grains);
			this.optics(canvas, vignette_size, vignette_amount);
			this.dusts(canvas, dust_level);
		}

		/**
   * reset random values again.
   * 
   * @param {int} width
   * @param {int} height
   */

	}, {
		key: 'reset_random_values',
		value: function reset_random_values(width, height) {
			this.exposure_rand = this.getRandomInt(1, 10);
			this.lightLeakX = this.getRandomInt(0, width);
			this.lightLeakY = this.getRandomInt(0, height);
		}

		//increasing red color

	}, {
		key: 'adjust_color',
		value: function adjust_color(canvas, level_red) {
			//level = [0, 200], default 70
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			var param_green = 0;
			var param_blue = 0;
			var imageData = context.getImageData(0, 0, W, H);
			var filtered = _imagefilters2.default.ColorTransformFilter(imageData, 1, 1, 1, 1, level_red, param_green, param_blue, 1);
			context.putImageData(filtered, 0, 0);
		}

		//decreasing contrast

	}, {
		key: 'lower_contrast',
		value: function lower_contrast(canvas, level) {
			//level = [0, 50], default 15
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			var imageData = context.getImageData(0, 0, W, H);
			var filtered = _imagefilters2.default.BrightnessContrastPhotoshop(imageData, 0, -level);
			context.putImageData(filtered, 0, 0);
		}

		//adding blur

	}, {
		key: 'blur',
		value: function blur(canvas, level) {
			//level = [0, 2], default 0
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			if (level < 1) return context;
			var imageData = context.getImageData(0, 0, W, H);
			var filtered = _imagefilters2.default.GaussianBlur(imageData, level);
			context.putImageData(filtered, 0, 0);
		}

		//creating transparent #ffa500 radial gradients

	}, {
		key: 'light_leak',
		value: function light_leak(canvas, level) {
			//level = [0, 150], default 90
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			var click_x = this.lightLeakX;
			var click_y = this.lightLeakY;
			var distance = Math.min(W, H) * 0.6;
			var radgrad = context.createRadialGradient(click_x, click_y, distance * level / 255, click_x, click_y, distance);
			radgrad.addColorStop(0, "rgba(255, 165, 0, " + level / 255 + ")");
			radgrad.addColorStop(1, "rgba(255, 255, 255, 0)");

			context.fillStyle = radgrad;
			context.fillRect(0, 0, W, H);
		}

		//de-saturate

	}, {
		key: 'chemicals',
		value: function chemicals(canvas, level) {
			//level = [0, 100], default 40
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			var imageData = context.getImageData(0, 0, W, H);
			var filtered = _imagefilters2.default.HSLAdjustment(imageData, 0, -level, 0);
			context.putImageData(filtered, 0, 0);
		}

		//creating transparent vertical black-to-white gradients

	}, {
		key: 'exposure',
		value: function exposure(canvas, level) {
			//level = [0, 150], default 80
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			context.rect(0, 0, W, H);
			var grd = context.createLinearGradient(0, 0, 0, H);
			if (this.exposure_rand < 5) {
				//dark at top
				grd.addColorStop(0, "rgba(0, 0, 0, " + level / 255 + ")");
				grd.addColorStop(1, "rgba(255, 255, 255, " + level / 255 + ")");
			} else {
				//bright at top
				grd.addColorStop(0, "rgba(255, 255, 255, " + level / 255 + ")");
				grd.addColorStop(1, "rgba(0, 0, 0, " + level / 255 + ")");
			}
			context.fillStyle = grd;
			context.fill();
		}

		//add grains, noise

	}, {
		key: 'grains',
		value: function grains(canvas, level) {
			//level = [0, 50], default 10
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			if (level == 0) return context;
			var img = context.getImageData(0, 0, W, H);
			var imgData = img.data;
			for (var j = 0; j < H; j++) {
				for (var i = 0; i < W; i++) {
					var x = (i + j * W) * 4;
					if (imgData[x + 3] == 0) continue; //transparent
					//increase it's lightness
					var delta = this.getRandomInt(0, level);
					if (delta == 0) continue;

					if (imgData[x] - delta < 0) imgData[x] = -(imgData[x] - delta);else imgData[x] = imgData[x] - delta;
					if (imgData[x + 1] - delta < 0) imgData[x + 1] = -(imgData[x + 1] - delta);else imgData[x + 1] = imgData[x + 1] - delta;
					if (imgData[x + 2] - delta < 0) imgData[x + 2] = -(imgData[x + 2] - delta);else imgData[x + 2] = imgData[x + 2] - delta;
				}
			}
			context.putImageData(img, 0, 0);
		}

		//add big grains, noise

	}, {
		key: 'grains_big',
		value: function grains_big(canvas, level) {
			//level = [0, 50], default 20
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			if (level == 0) return context;
			var n = W * H / 100 * level; //density
			var color = 200;
			for (var i = 0; i < n; i++) {
				var power = this.getRandomInt(5, 10 + level);
				var size = 2;
				var x = this.getRandomInt(0, W);
				var y = this.getRandomInt(0, H);
				context.fillStyle = "rgba(" + color + ", " + color + ", " + color + ", " + power / 255 + ")";
				context.fillRect(x, y, size, size);
			}
		}

		//adding vignette effect - blurred dark borders

	}, {
		key: 'optics',
		value: function optics(canvas, param1, param2) {
			//param1 [0, 0.5], param2 [0, 0.7], default 0.3, 0.5
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var texture = this.fx_filter.texture(context.getImageData(0, 0, W, H));
			this.fx_filter.draw(texture).vignette(param1, param2).update();
			context.drawImage(this.fx_filter, 0, 0);
		}

		//add dust and hairs

	}, {
		key: 'dusts',
		value: function dusts(canvas, level) {
			//level = [0, 100], default 70
			var context = canvas.getContext("2d");
			var W = canvas.width;
			var H = canvas.height;

			var n = level / 100 * (W * H) / 1000;
			//add dust
			context.fillStyle = "rgba(200, 200, 200, 0.3)";
			for (var i = 0; i < n; i++) {
				var x = this.getRandomInt(0, W);
				var y = this.getRandomInt(0, H);
				var mode = this.getRandomInt(1, 2);
				if (mode == 1) {
					var w = 1;
					var h = this.getRandomInt(1, 3);
				} else if (mode == 2) {
					var w = this.getRandomInt(1, 3);
					var h = 1;
				}
				context.beginPath();
				context.rect(x, y, w, h);
				context.fill();
			}

			//add hairs
			context.strokeStyle = "rgba(200, 200, 200, 0.2)";
			for (var i = 0; i < n / 20; i++) {
				var x = this.getRandomInt(0, W);
				var y = this.getRandomInt(0, H);
				var radius = this.getRandomInt(5, 10);
				var start_nr = this.getRandomInt(0, 20) / 10;
				var start_angle = Math.PI * start_nr;
				var end_angle = Math.PI * (start_nr + this.getRandomInt(7, 15) / 10);
				context.beginPath();
				context.arc(x, y, radius, start_angle, end_angle);
				context.stroke();
			}

			return context;
		}

		//random number generator

	}, {
		key: 'getRandomInt',
		value: function getRandomInt(min, max) {
			return Math.floor(Math.random() * (max - min + 1)) + min;
		}
	}]);

	return Vintage_class;
}();

exports.default = Vintage_class;

/***/ }),

/***/ "./src/js/libs/zoomView.js":
/*!*********************************!*\
  !*** ./src/js/libs/zoomView.js ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});
//handles zoom and pan
//https://stackoverflow.com/questions/44009094/how-to-bound-image-pan-when-zooming-html-canvas/44015705#44015705
var zoomView = function () {
	var matrix = [1, 0, 0, 1, 0, 0]; // current view transform
	var invMatrix = [1, 0, 0, 1, 0, 0]; // current inverse view transform
	var m = matrix; // alias
	var im = invMatrix; // alias
	var scale = 1; // current scale
	var bounds = {
		topLeft: 0,
		left: 0,
		right: 200,
		bottom: 200
	};
	var useConstraint = true; // if true then limit pan and zoom to 
	// keep bounds within the current context

	var maxScale = 1;
	var workPoint1 = { x: 0, y: 0 };
	var workPoint2 = { x: 0, y: 0 };
	var wp1 = workPoint1; // alias
	var wp2 = workPoint2; // alias
	var ctx;
	var pos = { // current position of origin
		x: 0,
		y: 0
	};
	var dirty = true;
	var API = {
		canvasDefault: function canvasDefault() {
			ctx.setTransform(1, 0, 0, 1, 0, 0);
		},
		apply: function apply() {
			if (dirty) {
				this.update();
			}
			ctx.setTransform(m[0], m[1], m[2], m[3], m[4], m[5]);
		},
		getScale: function getScale() {
			return scale;
		},
		getMaxScale: function getMaxScale() {
			return maxScale;
		},

		matrix: matrix, // expose the matrix
		invMatrix: invMatrix, // expose the inverse matrix
		update: function update() {
			// call to update transforms
			dirty = false;
			m[3] = m[0] = scale;
			m[1] = m[2] = 0;
			m[4] = pos.x;
			m[5] = pos.y;
			if (useConstraint) {
				this.constrain();
			}
			this.invScale = 1 / scale;
			// calculate the inverse transformation
			var cross = m[0] * m[3] - m[1] * m[2];
			im[0] = m[3] / cross;
			im[1] = -m[1] / cross;
			im[2] = -m[2] / cross;
			im[3] = m[0] / cross;
		},
		constrain: function constrain() {
			maxScale = Math.min(ctx.canvas.width / (bounds.right - bounds.left), ctx.canvas.height / (bounds.bottom - bounds.top));
			if (scale < maxScale) {
				m[0] = m[3] = scale = maxScale;
			}
			wp1.x = bounds.left;
			wp1.y = bounds.top;
			this.toScreen(wp1, wp2);
			if (wp2.x > 0) {
				m[4] = pos.x -= wp2.x;
			}
			if (wp2.y > 0) {
				m[5] = pos.y -= wp2.y;
			}
			wp1.x = bounds.right;
			wp1.y = bounds.bottom;
			this.toScreen(wp1, wp2);
			if (wp2.x < ctx.canvas.width) {
				m[4] = pos.x -= wp2.x - ctx.canvas.width;
			}
			if (wp2.y < ctx.canvas.height) {
				m[5] = pos.y -= wp2.y - ctx.canvas.height;
			}
		},
		toWorld: function toWorld(from_x, from_y) {
			// convert screen to world coords
			var xx, yy;
			var pointW = {};
			if (dirty) {
				this.update();
			}
			xx = from_x - m[4];
			yy = from_y - m[5];
			pointW.x = xx * im[0] + yy * im[2];
			pointW.y = xx * im[1] + yy * im[3];
			return pointW;
		},
		toScreen: function toScreen(from) {
			var point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
			// convert world coords to screen coords
			if (dirty) {
				this.update();
			}
			point.x = from.x * m[0] + from.y * m[2] + m[4];
			point.y = from.x * m[1] + from.y * m[3] + m[5];
			return point;
		},
		scaleAt: function scaleAt(x_from, y_from, amount) {
			// at in screen coords
			if (dirty) {
				this.update();
			}
			scale *= amount;
			pos.x = x_from - (x_from - pos.x) * amount;
			pos.y = y_from - (y_from - pos.y) * amount;
			dirty = true;
		},
		move: function move(move_x, move_y) {
			// move is in screen coords
			pos.x += move_x;
			pos.y += move_y;
			dirty = true;
		},
		setContext: function setContext(context) {
			ctx = context;
			dirty = true;
		},
		setBounds: function setBounds(top, left, right, bottom) {
			bounds.top = top;
			bounds.left = left;
			bounds.right = right;
			bounds.bottom = bottom;
			useConstraint = true;
			dirty = true;
		}
	};
	return API;
}();

exports.default = zoomView;

/***/ }),

/***/ "./src/js/main.js":
/*!************************!*\
  !*** ./src/js/main.js ***!
  \************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__(/*! ./../css/reset.css */ "./src/css/reset.css");

__webpack_require__(/*! ./../css/layout.css */ "./src/css/layout.css");

__webpack_require__(/*! ./../css/menu.css */ "./src/css/menu.css");

__webpack_require__(/*! ./../css/print.css */ "./src/css/print.css");

__webpack_require__(/*! ./../../node_modules/alertifyjs/build/css/alertify.min.css */ "./node_modules/alertifyjs/build/css/alertify.min.css");

var _config = __webpack_require__(/*! ./config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseGui = __webpack_require__(/*! ./core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _baseLayers = __webpack_require__(/*! ./core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseTools = __webpack_require__(/*! ./core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseState = __webpack_require__(/*! ./core/base-state.js */ "./src/js/core/base-state.js");

var _baseState2 = _interopRequireDefault(_baseState);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * miniPaint - https://github.com/viliusle/miniPaint
 * author: Vilius L.
 */

//css
window.addEventListener('load', function (e) {
	//initiate app
	var Layers = new _baseLayers2.default();
	var Base_tools = new _baseTools2.default(true);
	var GUI = new _baseGui2.default();
	var Base_state = new _baseState2.default();

	//register as global for quick or external access
	window.Layers = Layers;
	window.AppConfig = _config2.default;
	window.State = Base_state; // window.State.save();

	//render all
	GUI.load_modules();
	GUI.load_default_values();
	GUI.render_main_gui();

	Layers.init();
}, false);
//js

/***/ }),

/***/ "./src/js/modules sync recursive \\.js$":
/*!***********************************!*\
  !*** ./src/js/modules sync \.js$ ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./edit/paste.js": "./src/js/modules/edit/paste.js",
	"./edit/selection.js": "./src/js/modules/edit/selection.js",
	"./edit/undo.js": "./src/js/modules/edit/undo.js",
	"./effects/abstract/css.js": "./src/js/modules/effects/abstract/css.js",
	"./effects/black_and_white.js": "./src/js/modules/effects/black_and_white.js",
	"./effects/blueprint.js": "./src/js/modules/effects/blueprint.js",
	"./effects/blur.js": "./src/js/modules/effects/blur.js",
	"./effects/box_blur.js": "./src/js/modules/effects/box_blur.js",
	"./effects/brightness.js": "./src/js/modules/effects/brightness.js",
	"./effects/contrast.js": "./src/js/modules/effects/contrast.js",
	"./effects/denoise.js": "./src/js/modules/effects/denoise.js",
	"./effects/dither.js": "./src/js/modules/effects/dither.js",
	"./effects/dot_screen.js": "./src/js/modules/effects/dot_screen.js",
	"./effects/edge.js": "./src/js/modules/effects/edge.js",
	"./effects/emboss.js": "./src/js/modules/effects/emboss.js",
	"./effects/enrich.js": "./src/js/modules/effects/enrich.js",
	"./effects/grains.js": "./src/js/modules/effects/grains.js",
	"./effects/grayscale.js": "./src/js/modules/effects/grayscale.js",
	"./effects/heatmap.js": "./src/js/modules/effects/heatmap.js",
	"./effects/hue_rotate.js": "./src/js/modules/effects/hue_rotate.js",
	"./effects/mosaic.js": "./src/js/modules/effects/mosaic.js",
	"./effects/negative.js": "./src/js/modules/effects/negative.js",
	"./effects/night_vision.js": "./src/js/modules/effects/night_vision.js",
	"./effects/oil.js": "./src/js/modules/effects/oil.js",
	"./effects/pencil.js": "./src/js/modules/effects/pencil.js",
	"./effects/saturate.js": "./src/js/modules/effects/saturate.js",
	"./effects/sepia.js": "./src/js/modules/effects/sepia.js",
	"./effects/shadow.js": "./src/js/modules/effects/shadow.js",
	"./effects/sharpen.js": "./src/js/modules/effects/sharpen.js",
	"./effects/solarize.js": "./src/js/modules/effects/solarize.js",
	"./effects/tilt_shift.js": "./src/js/modules/effects/tilt_shift.js",
	"./effects/vibrance.js": "./src/js/modules/effects/vibrance.js",
	"./effects/vignette.js": "./src/js/modules/effects/vignette.js",
	"./effects/vintage.js": "./src/js/modules/effects/vintage.js",
	"./effects/zoom_blur.js": "./src/js/modules/effects/zoom_blur.js",
	"./file/new.js": "./src/js/modules/file/new.js",
	"./file/open.js": "./src/js/modules/file/open.js",
	"./file/print.js": "./src/js/modules/file/print.js",
	"./file/quickload.js": "./src/js/modules/file/quickload.js",
	"./file/quicksave.js": "./src/js/modules/file/quicksave.js",
	"./file/save.js": "./src/js/modules/file/save.js",
	"./file/search.js": "./src/js/modules/file/search.js",
	"./help/about.js": "./src/js/modules/help/about.js",
	"./help/shortcuts.js": "./src/js/modules/help/shortcuts.js",
	"./help/translate.js": "./src/js/modules/help/translate.js",
	"./image/auto_adjust.js": "./src/js/modules/image/auto_adjust.js",
	"./image/color_corrections.js": "./src/js/modules/image/color_corrections.js",
	"./image/decrease_colors.js": "./src/js/modules/image/decrease_colors.js",
	"./image/flip.js": "./src/js/modules/image/flip.js",
	"./image/grid.js": "./src/js/modules/image/grid.js",
	"./image/histogram.js": "./src/js/modules/image/histogram.js",
	"./image/information.js": "./src/js/modules/image/information.js",
	"./image/opacity.js": "./src/js/modules/image/opacity.js",
	"./image/palette.js": "./src/js/modules/image/palette.js",
	"./image/resize.js": "./src/js/modules/image/resize.js",
	"./image/rotate.js": "./src/js/modules/image/rotate.js",
	"./image/size.js": "./src/js/modules/image/size.js",
	"./image/translate.js": "./src/js/modules/image/translate.js",
	"./image/trim.js": "./src/js/modules/image/trim.js",
	"./image/zoom.js": "./src/js/modules/image/zoom.js",
	"./layer/clear.js": "./src/js/modules/layer/clear.js",
	"./layer/composition.js": "./src/js/modules/layer/composition.js",
	"./layer/delete.js": "./src/js/modules/layer/delete.js",
	"./layer/differences.js": "./src/js/modules/layer/differences.js",
	"./layer/duplicate.js": "./src/js/modules/layer/duplicate.js",
	"./layer/flatten.js": "./src/js/modules/layer/flatten.js",
	"./layer/merge.js": "./src/js/modules/layer/merge.js",
	"./layer/move.js": "./src/js/modules/layer/move.js",
	"./layer/new.js": "./src/js/modules/layer/new.js",
	"./layer/raster.js": "./src/js/modules/layer/raster.js",
	"./layer/rename.js": "./src/js/modules/layer/rename.js",
	"./layer/visibility.js": "./src/js/modules/layer/visibility.js",
	"./tools/borders.js": "./src/js/modules/tools/borders.js",
	"./tools/color_to_alpha.js": "./src/js/modules/tools/color_to_alpha.js",
	"./tools/color_zoom.js": "./src/js/modules/tools/color_zoom.js",
	"./tools/content_fill.js": "./src/js/modules/tools/content_fill.js",
	"./tools/keypoints.js": "./src/js/modules/tools/keypoints.js",
	"./tools/replace_color.js": "./src/js/modules/tools/replace_color.js",
	"./tools/restore_alpha.js": "./src/js/modules/tools/restore_alpha.js",
	"./tools/settings.js": "./src/js/modules/tools/settings.js",
	"./tools/sprites.js": "./src/js/modules/tools/sprites.js"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./src/js/modules sync recursive \\.js$";

/***/ }),

/***/ "./src/js/modules/edit/paste.js":
/*!**************************************!*\
  !*** ./src/js/modules/edit/paste.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Edit_paste_class = function () {
	function Edit_paste_class() {
		_classCallCheck(this, Edit_paste_class);
	}

	_createClass(Edit_paste_class, [{
		key: 'paste',
		value: function paste() {
			_alertifyMin2.default.error('Use Ctrl+V keyboard shortcut to paste from Clipboard.');
		}
	}]);

	return Edit_paste_class;
}();

exports.default = Edit_paste_class;

/***/ }),

/***/ "./src/js/modules/edit/selection.js":
/*!******************************************!*\
  !*** ./src/js/modules/edit/selection.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _selection = __webpack_require__(/*! ./../../tools/selection.js */ "./src/js/tools/selection.js");

var _selection2 = _interopRequireDefault(_selection);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Edit_selection_class = function () {
	function Edit_selection_class() {
		_classCallCheck(this, Edit_selection_class);

		this.Base_layers = new _baseLayers2.default();
		this.Selection = new _selection2.default(this.Base_layers.ctx);
	}

	_createClass(Edit_selection_class, [{
		key: 'select_all',
		value: function select_all() {
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			this.Selection.select_all();
		}
	}, {
		key: 'delete',
		value: function _delete() {
			window.State.save();
			this.Selection.delete_selection();
		}
	}]);

	return Edit_selection_class;
}();

exports.default = Edit_selection_class;

/***/ }),

/***/ "./src/js/modules/edit/undo.js":
/*!*************************************!*\
  !*** ./src/js/modules/edit/undo.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _baseState = __webpack_require__(/*! ./../../core/base-state.js */ "./src/js/core/base-state.js");

var _baseState2 = _interopRequireDefault(_baseState);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Edit_undo_class = function () {
	function Edit_undo_class() {
		_classCallCheck(this, Edit_undo_class);

		this.Base_state = new _baseState2.default();
	}

	_createClass(Edit_undo_class, [{
		key: 'undo',
		value: function undo() {
			this.Base_state.undo();
		}
	}]);

	return Edit_undo_class;
}();

exports.default = Edit_undo_class;

/***/ }),

/***/ "./src/js/modules/effects/abstract/css.js":
/*!************************************************!*\
  !*** ./src/js/modules/effects/abstract/css.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_common_class = function () {
	function Effects_common_class() {
		_classCallCheck(this, Effects_common_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
		this.params = null;
	}

	_createClass(Effects_common_class, [{
		key: 'show_dialog',
		value: function show_dialog(type, params) {
			var _this = this;
			var title = this.Helper.ucfirst(type);
			title = title.replace(/-/g, ' ');
			if (type == 'shadow') type = 'drop-shadow';

			var settings = {
				title: title,
				preview: true,
				effects: true,
				params: params,
				on_change: function on_change(params, canvas_preview, w, h) {
					_this.params = params;
					canvas_preview.filter = _this.preview(params, type);
					canvas_preview.drawImage(this.layer_active_small, 0, 0);
				},
				on_finish: function on_finish(params) {

					window.State.save();
					_this.params = params;
					_this.save(params, type);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params, type) {
			params.value = this.convert_value(params.value, params, 'save');

			this.Base_layers.add_filter(null, type, params);
		}
	}, {
		key: 'preview',
		value: function preview(params, type) {
			var value = this.convert_value(params.value, params, 'preview');
			return type + "(" + value + ")";
		}
	}, {
		key: 'convert_value',
		value: function convert_value(value, params) {
			return value;
		}
	}]);

	return Effects_common_class;
}();

exports.default = Effects_common_class;

/***/ }),

/***/ "./src/js/modules/effects/black_and_white.js":
/*!***************************************************!*\
  !*** ./src/js/modules/effects/black_and_white.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_backAndWhite_class = function () {
	function Effects_backAndWhite_class() {
		_classCallCheck(this, Effects_backAndWhite_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(Effects_backAndWhite_class, [{
		key: 'black_and_white',
		value: function black_and_white() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			//create tmp canvas
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//calc default level
			var default_level = this.thresholding(ctx, canvas.width, canvas.height, true);

			var settings = {
				title: 'Black and White',
				preview: true,
				effects: true,
				params: [{ name: "level", title: "Level:", value: default_level, range: [0, 255] }, { name: "dithering", title: "Dithering:", value: false }],
				on_change: function on_change(params, canvas_preview, w, h) {
					//check params
					var level = document.getElementById("pop_data_level");
					if (params.dithering == false) level.disabled = false;else level.disabled = true;

					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var W = data.width;
			var H = data.height;

			//create tmp canvas
			var canvas = document.createElement('canvas');
			canvas.width = W;
			canvas.height = H;

			var imgData = data.data;
			var grey, c, quant_error, m;
			if (params.dithering !== true) {
				//no differing
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent
					grey = Math.round(0.2126 * imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);
					if (grey <= params.level) c = 0;else c = 255;
					imgData[i] = c;
					imgData[i + 1] = c;
					imgData[i + 2] = c;
				}
			} else {
				//Floyd–Steinberg dithering
				var img2 = canvas.getContext("2d").getImageData(0, 0, W, H);
				var imgData2 = img2.data;
				for (var j = 0; j < H; j++) {
					for (var i = 0; i < W; i++) {
						var k = j * (W * 4) + i * 4;
						if (imgData[k + 3] == 0) continue; //transparent

						grey = Math.round(0.2126 * imgData[k] + 0.7152 * imgData[k + 1] + 0.0722 * imgData[k + 2]);
						grey = grey + imgData2[k]; //add data shft from previous iterations
						c = Math.floor(grey / 256);
						if (c == 1) c = 255;
						imgData[k] = c;
						imgData[k + 1] = c;
						imgData[k + 2] = c;
						quant_error = grey - c;
						if (i + 1 < W) {
							m = k + 4;
							imgData2[m] += Math.round(quant_error * 7 / 16);
						}
						if (i - 1 > 0 && j + 1 < H) {
							m = k - 4 + W * 4;
							imgData2[m] += Math.round(quant_error * 3 / 16);
						}
						if (j + 1 < H) {
							m = k + W * 4;
							imgData2[m] += Math.round(quant_error * 5 / 16);
						}
						if (i + 1 < W && j + 1 < H) {
							m = k + 4 + W * 4;
							imgData2[m] += Math.round(quant_error * 1 / 16);
						}
					}
				}
			}
			return data;
		}
	}, {
		key: 'thresholding',
		value: function thresholding(ctx, W, H, only_level) {
			var img = ctx.getImageData(0, 0, W, H);
			var imgData = img.data;
			var hist_data = [];
			var grey;
			for (var i = 0; i <= 255; i++) {
				hist_data[i] = 0;
			}for (var i = 0; i < imgData.length; i += 4) {
				grey = Math.round(0.2126 * imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);
				hist_data[grey]++;
			}
			var level = this.otsu(hist_data, W * H);
			if (only_level === true) return level;
			var c;
			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent
				grey = Math.round(0.2126 * imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);
				if (grey < level) c = 0;else c = 255;
				imgData[i] = c;
				imgData[i + 1] = c;
				imgData[i + 2] = c;
			}
			ctx.putImageData(img, 0, 0);
		}

		//http://en.wikipedia.org/wiki/Otsu%27s_Method

	}, {
		key: 'otsu',
		value: function otsu(histogram, total) {
			var sum = 0;
			for (var i = 1; i < 256; ++i) {
				sum += i * histogram[i];
			}var mB, mF, between;
			var sumB = 0;
			var wB = 0;
			var wF = 0;
			var max = 0;
			var threshold = 0;
			for (var i = 0; i < 256; ++i) {
				wB += histogram[i];
				if (wB == 0) continue;
				wF = total - wB;
				if (wF == 0) break;
				sumB += i * histogram[i];
				mB = sumB / wB;
				mF = (sum - sumB) / wF;
				between = wB * wF * Math.pow(mB - mF, 2);
				if (between > max) {
					max = between;
					threshold = i;
				}
			}
			return threshold;
		}
	}]);

	return Effects_backAndWhite_class;
}();

exports.default = Effects_backAndWhite_class;

/***/ }),

/***/ "./src/js/modules/effects/blueprint.js":
/*!*********************************************!*\
  !*** ./src/js/modules/effects/blueprint.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_blueprint_class = function () {
	function Effects_blueprint_class() {
		_classCallCheck(this, Effects_blueprint_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.ImageFilters = _imagefilters2.default;
		this.fx_filter = false;
	}

	_createClass(Effects_blueprint_class, [{
		key: 'blueprint',
		value: function blueprint() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Blueprint',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					var data = _this.change(canvas_, canvas_.width, canvas_.height);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, canvas.width, canvas.height);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, width, height) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}
			var ctx = canvas.getContext("2d");

			//create blue layer
			var canvas2 = document.createElement('canvas');
			var ctx2 = canvas2.getContext("2d");
			canvas2.width = width;
			canvas2.height = height;
			ctx2.fillStyle = '#0e58a3';
			ctx2.fillRect(0, 0, width, height);

			//apply edges
			var img = ctx.getImageData(0, 0, width, height);
			var img = this.ImageFilters.Edge(img);
			ctx.putImageData(img, 0, 0);

			//denoise
			var texture = this.fx_filter.texture(canvas);
			this.fx_filter.draw(texture).denoise(20).update(); //effect
			canvas = this.fx_filter;

			//Brightness
			var img = ctx.getImageData(0, 0, width, height);
			var img = this.ImageFilters.BrightnessContrastPhotoshop(img, 80, 0);
			ctx.putImageData(img, 0, 0);

			//merge
			ctx2.globalCompositeOperation = "screen";
			ctx2.filter = 'grayscale(1)';
			ctx2.drawImage(canvas, 0, 0);
			ctx2.globalCompositeOperation = "source-over";
			ctx2.filter = 'none';

			//draw lines
			this.draw_grid(ctx2, 20);

			return canvas2;
		}

		/**
   * draw grid
   * 
   * @param {CanvasContext} ctx
   * @param {Int} size
   */

	}, {
		key: 'draw_grid',
		value: function draw_grid(ctx, size) {
			if (this.grid == false) return;

			var width = _config2.default.WIDTH;
			var height = _config2.default.HEIGHT;
			var color_main = 'rgba(255, 255, 255, 0.5)';
			var color_small = 'rgba(255, 255, 255, 0.1)';

			//size
			if (size != undefined && size != undefined) this.grid_size = [size, size];else {
				size = this.grid_size[0];
				size = this.grid_size[1];
			}
			size = parseInt(size);
			size = parseInt(size);
			ctx.lineWidth = 1;
			ctx.beginPath();
			if (size < 2) size = 2;
			if (size < 2) size = 2;
			for (var i = size; i < width; i = i + size) {
				if (size == 0) break;
				if (i % (size * 5) == 0) {
					//main lines
					ctx.strokeStyle = color_main;
				} else {
					//small lines
					ctx.strokeStyle = color_small;
				}
				ctx.beginPath();
				ctx.moveTo(0.5 + i, 0);
				ctx.lineTo(0.5 + i, height);
				ctx.stroke();
			}
			for (var i = size; i < height; i = i + size) {
				if (size == 0) break;
				if (i % (size * 5) == 0) {
					//main lines
					ctx.strokeStyle = color_main;
				} else {
					//small lines
					ctx.strokeStyle = color_small;
				}
				ctx.beginPath();
				ctx.moveTo(0, 0.5 + i);
				ctx.lineTo(width, 0.5 + i);
				ctx.stroke();
			}
		}
	}]);

	return Effects_blueprint_class;
}();

exports.default = Effects_blueprint_class;

/***/ }),

/***/ "./src/js/modules/effects/blur.js":
/*!****************************************!*\
  !*** ./src/js/modules/effects/blur.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_blur_class = function (_Effects_common_class) {
	_inherits(Effects_blur_class, _Effects_common_class);

	function Effects_blur_class() {
		_classCallCheck(this, Effects_blur_class);

		var _this = _possibleConstructorReturn(this, (Effects_blur_class.__proto__ || Object.getPrototypeOf(Effects_blur_class)).call(this));

		_this.POP = new _popup2.default();
		return _this;
	}

	_createClass(Effects_blur_class, [{
		key: 'blur',
		value: function blur() {
			var params = [{ name: "value", title: "Percentage:", value: 5, range: [0, 50] }];
			this.show_dialog('blur', params);
		}
	}, {
		key: 'convert_value',
		value: function convert_value(value, params, type) {

			//adapt size to real canvas dimensions
			if (type == 'preview') {
				var diff = this.POP.width_mini / this.POP.height_mini / (_config2.default.WIDTH / _config2.default.HEIGHT);

				value = value * diff;
			}

			return value + 'px';
		}
	}]);

	return Effects_blur_class;
}(_css2.default);

exports.default = Effects_blur_class;

/***/ }),

/***/ "./src/js/modules/effects/box_blur.js":
/*!********************************************!*\
  !*** ./src/js/modules/effects/box_blur.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_boxBlur_class = function () {
	function Effects_boxBlur_class() {
		_classCallCheck(this, Effects_boxBlur_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_boxBlur_class, [{
		key: 'box_blur',
		value: function box_blur() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Box blur',
				preview: true,
				effects: true,
				params: [{ name: "param1", title: "H Radius:", value: 3, range: [1, 20] }, { name: "param2", title: "V Radius:", value: 3, range: [1, 20] }, { name: "param3", title: "Quality:", value: 3, range: [1, 20] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var param1 = params.param1;
			var param2 = params.param2;
			var param3 = params.param3;

			var filtered = _imagefilters2.default.BoxBlur(data, param1, param2, param3);

			return filtered;
		}
	}]);

	return Effects_boxBlur_class;
}();

exports.default = Effects_boxBlur_class;

/***/ }),

/***/ "./src/js/modules/effects/brightness.js":
/*!**********************************************!*\
  !*** ./src/js/modules/effects/brightness.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_brightness_class = function (_Effects_common_class) {
	_inherits(Effects_brightness_class, _Effects_common_class);

	function Effects_brightness_class() {
		_classCallCheck(this, Effects_brightness_class);

		return _possibleConstructorReturn(this, (Effects_brightness_class.__proto__ || Object.getPrototypeOf(Effects_brightness_class)).apply(this, arguments));
	}

	_createClass(Effects_brightness_class, [{
		key: "brightness",
		value: function brightness() {
			var params = [{ name: "value", title: "Percentage:", value: 30, range: [-100, 100] }];
			this.show_dialog('brightness', params);
		}
	}, {
		key: "convert_value",
		value: function convert_value(value) {
			var system_value;
			if (value > 0) {
				system_value = value / 100 + 1;
			} else if (value < 0) {
				system_value = value / 100 + 1;
			} else {
				system_value = 1;
			}

			return system_value;
		}
	}]);

	return Effects_brightness_class;
}(_css2.default);

exports.default = Effects_brightness_class;

/***/ }),

/***/ "./src/js/modules/effects/contrast.js":
/*!********************************************!*\
  !*** ./src/js/modules/effects/contrast.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_contrast_class = function (_Effects_common_class) {
	_inherits(Effects_contrast_class, _Effects_common_class);

	function Effects_contrast_class() {
		_classCallCheck(this, Effects_contrast_class);

		return _possibleConstructorReturn(this, (Effects_contrast_class.__proto__ || Object.getPrototypeOf(Effects_contrast_class)).apply(this, arguments));
	}

	_createClass(Effects_contrast_class, [{
		key: "contrast",
		value: function contrast() {
			var params = [{ name: "value", title: "Percentage:", value: 40, range: [-100, 100] }];
			this.show_dialog('contrast', params);
		}
	}, {
		key: "convert_value",
		value: function convert_value(value) {
			var system_value;
			if (value > 0) {
				system_value = value / 100 + 1;
			} else if (value < 0) {
				system_value = value / 100 + 1;
			} else {
				system_value = 1;
			}

			return system_value;
		}
	}]);

	return Effects_contrast_class;
}(_css2.default);

exports.default = Effects_contrast_class;

/***/ }),

/***/ "./src/js/modules/effects/denoise.js":
/*!*******************************************!*\
  !*** ./src/js/modules/effects/denoise.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_denoise_class = function () {
	function Effects_denoise_class() {
		_classCallCheck(this, Effects_denoise_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.fx_filter = false;
	}

	_createClass(Effects_denoise_class, [{
		key: 'denoise',
		value: function denoise() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Denoise',
				preview: true,
				effects: true,
				params: [{ name: "param1", title: "Exponent:", value: 20, range: [0, 50] }],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					var data = _this.change(canvas_, params);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, params);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var param1 = parseFloat(params.param1);

			var texture = this.fx_filter.texture(canvas);
			this.fx_filter.draw(texture).denoise(param1).update(); //effect

			return this.fx_filter;
		}
	}]);

	return Effects_denoise_class;
}();

exports.default = Effects_denoise_class;

/***/ }),

/***/ "./src/js/modules/effects/dither.js":
/*!******************************************!*\
  !*** ./src/js/modules/effects/dither.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_dither_class = function () {
	function Effects_dither_class() {
		_classCallCheck(this, Effects_dither_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_dither_class, [{
		key: 'dither',
		value: function dither() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Dither',
				preview: true,
				effects: true,
				params: [{ name: "param1", title: "Levels:", value: "8", range: [2, 32] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var param1 = parseFloat(params.param1);

			var filtered = _imagefilters2.default.Dither(data, param1);

			return filtered;
		}
	}]);

	return Effects_dither_class;
}();

exports.default = Effects_dither_class;

/***/ }),

/***/ "./src/js/modules/effects/dot_screen.js":
/*!**********************************************!*\
  !*** ./src/js/modules/effects/dot_screen.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_dotScreen_class = function () {
	function Effects_dotScreen_class() {
		_classCallCheck(this, Effects_dotScreen_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.fx_filter = false;
	}

	_createClass(Effects_dotScreen_class, [{
		key: 'dot_screen',
		value: function dot_screen() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Dot Screen',
				preview: true,
				effects: true,
				params: [{ name: "size", title: "Size:", value: "3", range: [1, 20] }],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					var data = _this.change(canvas_, params);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, params);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var size = parseFloat(params.size);

			var texture = this.fx_filter.texture(canvas);
			this.fx_filter.draw(texture).dotScreen(Math.round(canvas.width / 2), Math.round(canvas.height / 2), 0, size).update();

			return this.fx_filter;
		}
	}]);

	return Effects_dotScreen_class;
}();

exports.default = Effects_dotScreen_class;

/***/ }),

/***/ "./src/js/modules/effects/edge.js":
/*!****************************************!*\
  !*** ./src/js/modules/effects/edge.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_edge_class = function () {
	function Effects_edge_class() {
		_classCallCheck(this, Effects_edge_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_edge_class, [{
		key: 'edge',
		value: function edge() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Edge',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var filtered = _imagefilters2.default.Edge(data);

			return filtered;
		}
	}]);

	return Effects_edge_class;
}();

exports.default = Effects_edge_class;

/***/ }),

/***/ "./src/js/modules/effects/emboss.js":
/*!******************************************!*\
  !*** ./src/js/modules/effects/emboss.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_emboss_class = function () {
	function Effects_emboss_class() {
		_classCallCheck(this, Effects_emboss_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_emboss_class, [{
		key: 'emboss',
		value: function emboss() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Emboss',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var filtered = _imagefilters2.default.Emboss(data);

			return filtered;
		}
	}]);

	return Effects_emboss_class;
}();

exports.default = Effects_emboss_class;

/***/ }),

/***/ "./src/js/modules/effects/enrich.js":
/*!******************************************!*\
  !*** ./src/js/modules/effects/enrich.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_enrich_class = function () {
	function Effects_enrich_class() {
		_classCallCheck(this, Effects_enrich_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_enrich_class, [{
		key: 'enrich',
		value: function enrich() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Enrich',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var filtered = _imagefilters2.default.Enrich(data);

			return filtered;
		}
	}]);

	return Effects_enrich_class;
}();

exports.default = Effects_enrich_class;

/***/ }),

/***/ "./src/js/modules/effects/grains.js":
/*!******************************************!*\
  !*** ./src/js/modules/effects/grains.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_grains_class = function () {
	function Effects_grains_class() {
		_classCallCheck(this, Effects_grains_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(Effects_grains_class, [{
		key: 'grains',
		value: function grains() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Grains',
				preview: true,
				effects: true,
				params: [{ name: "level", title: "Level:", value: "30", range: [0, 50] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			if (params.level == 0) return data;
			var imgData = data.data;

			var H = data.height;
			var W = data.width;

			for (var j = 0; j < H; j++) {
				for (var i = 0; i < W; i++) {
					var x = (i + j * W) * 4;
					if (imgData[x + 3] == 0) continue; //transparent
					//increase it's lightness
					var delta = this.Helper.getRandomInt(0, params.level);
					if (delta == 0) continue;

					if (imgData[x] - delta < 0) imgData[x] = -(imgData[x] - delta);else imgData[x] = imgData[x] - delta;
					if (imgData[x + 1] - delta < 0) imgData[x + 1] = -(imgData[x + 1] - delta);else imgData[x + 1] = imgData[x + 1] - delta;
					if (imgData[x + 2] - delta < 0) imgData[x + 2] = -(imgData[x + 2] - delta);else imgData[x + 2] = imgData[x + 2] - delta;
				}
			}

			return data;
		}
	}]);

	return Effects_grains_class;
}();

exports.default = Effects_grains_class;

/***/ }),

/***/ "./src/js/modules/effects/grayscale.js":
/*!*********************************************!*\
  !*** ./src/js/modules/effects/grayscale.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_grayscale_class = function (_Effects_common_class) {
	_inherits(Effects_grayscale_class, _Effects_common_class);

	function Effects_grayscale_class() {
		_classCallCheck(this, Effects_grayscale_class);

		return _possibleConstructorReturn(this, (Effects_grayscale_class.__proto__ || Object.getPrototypeOf(Effects_grayscale_class)).apply(this, arguments));
	}

	_createClass(Effects_grayscale_class, [{
		key: "grayscale",
		value: function grayscale() {
			var params = [{ name: "value", title: "Percentage:", value: 100, range: [0, 100] }];
			this.show_dialog('grayscale', params);
		}
	}, {
		key: "convert_value",
		value: function convert_value(value) {
			var system_value = value / 100;

			return system_value;
		}
	}]);

	return Effects_grayscale_class;
}(_css2.default);

exports.default = Effects_grayscale_class;

/***/ }),

/***/ "./src/js/modules/effects/heatmap.js":
/*!*******************************************!*\
  !*** ./src/js/modules/effects/heatmap.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_heatmap_class = function () {
	function Effects_heatmap_class() {
		_classCallCheck(this, Effects_heatmap_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_heatmap_class, [{
		key: 'heatmap',
		value: function heatmap() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Heatmap',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var imgData = data.data;
			var grey, RGB;

			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent
				grey = Math.round(0.2126 * imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);
				RGB = this.color2heat(grey);
				imgData[i] = RGB.R;
				imgData[i + 1] = RGB.G;
				imgData[i + 2] = RGB.B;
			}

			return data;
		}
	}, {
		key: 'color2heat',
		value: function color2heat(value) {
			var RGB = { R: 0, G: 0, B: 0 };
			value = value / 255;
			if (0 <= value && value <= 1 / 8) {
				RGB.R = 0;
				RGB.G = 0;
				RGB.B = 4 * value + .5; // .5 - 1 // b = 1/2
			} else if (1 / 8 < value && value <= 3 / 8) {
				RGB.R = 0;
				RGB.G = 4 * value - .5; // 0 - 1 // b = - 1/2
				RGB.B = 1; // small fix
			} else if (3 / 8 < value && value <= 5 / 8) {
				RGB.R = 4 * value - 1.5; // 0 - 1 // b = - 3/2
				RGB.G = 1;
				RGB.B = -4 * value + 2.5; // 1 - 0 // b = 5/2
			} else if (5 / 8 < value && value <= 7 / 8) {
				RGB.R = 1;
				RGB.G = -4 * value + 3.5; // 1 - 0 // b = 7/2
				RGB.B = 0;
			} else if (7 / 8 < value && value <= 1) {
				RGB.R = -4 * value + 4.5; // 1 - .5 // b = 9/2
				RGB.G = 0;
				RGB.B = 0;
			} else {
				// should never happen - value > 1
				RGB.R = .5;
				RGB.G = 0;
				RGB.B = 0;
			}
			// scale for hex conversion
			RGB.R *= 255;
			RGB.G *= 255;
			RGB.B *= 255;

			RGB.R = Math.round(RGB.R);
			RGB.G = Math.round(RGB.G);
			RGB.B = Math.round(RGB.B);

			return RGB;
		}
	}]);

	return Effects_heatmap_class;
}();

exports.default = Effects_heatmap_class;

/***/ }),

/***/ "./src/js/modules/effects/hue_rotate.js":
/*!**********************************************!*\
  !*** ./src/js/modules/effects/hue_rotate.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_hueRotate_class = function (_Effects_common_class) {
	_inherits(Effects_hueRotate_class, _Effects_common_class);

	function Effects_hueRotate_class() {
		_classCallCheck(this, Effects_hueRotate_class);

		return _possibleConstructorReturn(this, (Effects_hueRotate_class.__proto__ || Object.getPrototypeOf(Effects_hueRotate_class)).apply(this, arguments));
	}

	_createClass(Effects_hueRotate_class, [{
		key: "hue_rotate",
		value: function hue_rotate() {
			var params = [{ name: "value", title: "Degree:", value: 90, range: [0, 360] }];
			this.show_dialog('hue-rotate', params);
		}
	}, {
		key: "convert_value",
		value: function convert_value(value) {
			return value + 'deg';
		}
	}]);

	return Effects_hueRotate_class;
}(_css2.default);

exports.default = Effects_hueRotate_class;

/***/ }),

/***/ "./src/js/modules/effects/mosaic.js":
/*!******************************************!*\
  !*** ./src/js/modules/effects/mosaic.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_mosaic_class = function () {
	function Effects_mosaic_class() {
		_classCallCheck(this, Effects_mosaic_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_mosaic_class, [{
		key: 'mosaic',
		value: function mosaic() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Mosaic',
				preview: true,
				effects: true,
				params: [{ name: "size", title: "Size:", value: 10, range: [1, 100] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var size = parseFloat(params.size);

			//convert % to px
			size = Math.min(data.width, data.height) * size / 100;
			size = Math.round(size);

			var filtered = _imagefilters2.default.Mosaic(data, size);

			return filtered;
		}
	}]);

	return Effects_mosaic_class;
}();

exports.default = Effects_mosaic_class;

/***/ }),

/***/ "./src/js/modules/effects/negative.js":
/*!********************************************!*\
  !*** ./src/js/modules/effects/negative.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_negative_class = function (_Effects_common_class) {
	_inherits(Effects_negative_class, _Effects_common_class);

	function Effects_negative_class() {
		_classCallCheck(this, Effects_negative_class);

		return _possibleConstructorReturn(this, (Effects_negative_class.__proto__ || Object.getPrototypeOf(Effects_negative_class)).apply(this, arguments));
	}

	_createClass(Effects_negative_class, [{
		key: "negative",
		value: function negative() {
			var params = [{ name: "value", title: "Percentage:", value: 100, range: [0, 100] }];
			this.show_dialog('invert', params);
		}
	}, {
		key: "convert_value",
		value: function convert_value(value) {
			var system_value = value / 100;
			return system_value;
		}
	}]);

	return Effects_negative_class;
}(_css2.default);

exports.default = Effects_negative_class;

/***/ }),

/***/ "./src/js/modules/effects/night_vision.js":
/*!************************************************!*\
  !*** ./src/js/modules/effects/night_vision.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_nightVision_class = function () {
	function Effects_nightVision_class() {
		_classCallCheck(this, Effects_nightVision_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.fx_filter = false;
		this.ImageFilters = _imagefilters2.default;
	}

	_createClass(Effects_nightVision_class, [{
		key: 'night_vision',
		value: function night_vision() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Night Vision',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					var data = _this.change(canvas_, canvas_.width, canvas_.height);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, canvas.width, canvas.height);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, width, height) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			//create second copy
			var canvas2 = document.createElement('canvas');
			var ctx2 = canvas2.getContext("2d");
			canvas2.width = width;
			canvas2.height = height;
			ctx2.drawImage(canvas, 0, 0);

			// green overlay
			var img = ctx2.getImageData(0, 0, width, height);
			//RGB corrections
			var img = this.ImageFilters.ColorTransformFilter(img, 1, 1, 1, 1, 0, 100, 0, 1);
			//hue/saturation/luminance
			var img = this.ImageFilters.HSLAdjustment(img, 0, 0, -50);
			ctx2.putImageData(img, 0, 0);

			//vignete
			var texture = this.fx_filter.texture(canvas2);
			this.fx_filter.draw(texture).vignette(0.2, 0.9).update(); //effect
			canvas2 = this.fx_filter;

			return canvas2;
		}
	}]);

	return Effects_nightVision_class;
}();

exports.default = Effects_nightVision_class;

/***/ }),

/***/ "./src/js/modules/effects/oil.js":
/*!***************************************!*\
  !*** ./src/js/modules/effects/oil.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_oil_class = function () {
	function Effects_oil_class() {
		_classCallCheck(this, Effects_oil_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_oil_class, [{
		key: 'oil',
		value: function oil() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Oil',
				preview: true,
				effects: true,
				params: [{ name: "param1", title: "Range:", value: 2, range: [1, 10] }, { name: "param2", title: "Levels:", value: "32", range: [1, 256] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var param1 = parseFloat(params.param1);
			var param2 = parseInt(params.param2);

			var filtered = _imagefilters2.default.Oil(data, param1, param2);

			return filtered;
		}
	}]);

	return Effects_oil_class;
}();

exports.default = Effects_oil_class;

/***/ }),

/***/ "./src/js/modules/effects/pencil.js":
/*!******************************************!*\
  !*** ./src/js/modules/effects/pencil.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_pencil_class = function () {
	function Effects_pencil_class() {
		_classCallCheck(this, Effects_pencil_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_pencil_class, [{
		key: 'pencil',
		value: function pencil() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Pencil',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					var data = _this.change(canvas_, canvas_.width, canvas_.height);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, canvas.width, canvas.height);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, width, height) {
			var offset = Math.min(width, height) / 1000;
			offset = Math.ceil(offset);

			//create second copy
			var canvas2 = document.createElement('canvas');
			var ctx2 = canvas2.getContext("2d");
			canvas2.width = width;
			canvas2.height = height;
			ctx2.drawImage(canvas, -offset, -offset);

			//merge
			ctx2.globalCompositeOperation = "difference";
			ctx2.drawImage(canvas, 0, 0);
			ctx2.globalCompositeOperation = "source-over";

			//apply more effects
			ctx2.filter = 'brightness(2) invert(1) grayscale(1)';
			ctx2.drawImage(canvas2, 0, 0);
			ctx2.filter = 'none';

			return canvas2;
		}
	}]);

	return Effects_pencil_class;
}();

exports.default = Effects_pencil_class;

/***/ }),

/***/ "./src/js/modules/effects/saturate.js":
/*!********************************************!*\
  !*** ./src/js/modules/effects/saturate.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_saturate_class = function (_Effects_common_class) {
	_inherits(Effects_saturate_class, _Effects_common_class);

	function Effects_saturate_class() {
		_classCallCheck(this, Effects_saturate_class);

		return _possibleConstructorReturn(this, (Effects_saturate_class.__proto__ || Object.getPrototypeOf(Effects_saturate_class)).apply(this, arguments));
	}

	_createClass(Effects_saturate_class, [{
		key: "saturate",
		value: function saturate() {
			var params = [{ name: "value", title: "Percentage:", value: -50, range: [-100, 100] }];
			this.show_dialog('saturate', params);
		}
	}, {
		key: "convert_value",
		value: function convert_value(value) {
			var system_value;
			if (value > 0) {
				system_value = value / 100 + 1;
			} else if (value < 0) {
				system_value = value / 100 + 1;
			} else {
				system_value = 1;
			}

			return system_value;
		}
	}]);

	return Effects_saturate_class;
}(_css2.default);

exports.default = Effects_saturate_class;

/***/ }),

/***/ "./src/js/modules/effects/sepia.js":
/*!*****************************************!*\
  !*** ./src/js/modules/effects/sepia.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_sepia_class = function (_Effects_common_class) {
	_inherits(Effects_sepia_class, _Effects_common_class);

	function Effects_sepia_class() {
		_classCallCheck(this, Effects_sepia_class);

		return _possibleConstructorReturn(this, (Effects_sepia_class.__proto__ || Object.getPrototypeOf(Effects_sepia_class)).apply(this, arguments));
	}

	_createClass(Effects_sepia_class, [{
		key: "sepia",
		value: function sepia() {
			var params = [{ name: "value", title: "Percentage:", value: 60, range: [0, 100] }];
			this.show_dialog('sepia', params);
		}
	}, {
		key: "convert_value",
		value: function convert_value(value) {
			var system_value = value / 100;

			return system_value;
		}
	}]);

	return Effects_sepia_class;
}(_css2.default);

exports.default = Effects_sepia_class;

/***/ }),

/***/ "./src/js/modules/effects/shadow.js":
/*!******************************************!*\
  !*** ./src/js/modules/effects/shadow.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _css = __webpack_require__(/*! ./abstract/css.js */ "./src/js/modules/effects/abstract/css.js");

var _css2 = _interopRequireDefault(_css);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Effects_brightness_class = function (_Effects_common_class) {
	_inherits(Effects_brightness_class, _Effects_common_class);

	function Effects_brightness_class() {
		_classCallCheck(this, Effects_brightness_class);

		var _this = _possibleConstructorReturn(this, (Effects_brightness_class.__proto__ || Object.getPrototypeOf(Effects_brightness_class)).call(this));

		_this.POP = new _popup2.default();
		return _this;
	}

	_createClass(Effects_brightness_class, [{
		key: 'shadow',
		value: function shadow() {
			var params = [{ name: "x", title: "Offset X:", value: 10, range: [-100, 100] }, { name: "y", title: "Offset Y:", value: 10, range: [-100, 100] }, { name: "value", title: "Radius:", value: 5, range: [0, 100] }, { name: "color", title: "Color:", value: "#000000", type: 'color' }];
			this.show_dialog('shadow', params);
		}
	}, {
		key: 'convert_value',
		value: function convert_value(value, params, type) {
			var system_value = value;

			//adapt size to real canvas dimensions
			if (type == 'preview') {
				var diff = this.POP.width_mini / this.POP.height_mini / (_config2.default.WIDTH / _config2.default.HEIGHT);

				params.x = params.x * (this.POP.width_mini / _config2.default.WIDTH);
				params.y = params.y * (this.POP.height_mini / _config2.default.HEIGHT);
				params.value = params.value * diff;
			}

			return params.x + "px " + params.y + "px " + params.value + "px " + params.color;
		}
	}]);

	return Effects_brightness_class;
}(_css2.default);

;

exports.default = Effects_brightness_class;

/***/ }),

/***/ "./src/js/modules/effects/sharpen.js":
/*!*******************************************!*\
  !*** ./src/js/modules/effects/sharpen.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_sharpen_class = function () {
	function Effects_sharpen_class() {
		_classCallCheck(this, Effects_sharpen_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_sharpen_class, [{
		key: 'sharpen',
		value: function sharpen() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Sharpen',
				preview: true,
				effects: true,
				params: [{ name: "param1", title: "Factor:", value: "3", range: [1, 10], step: 0.1 }],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var param1 = parseFloat(params.param1);

			var filtered = _imagefilters2.default.Sharpen(data, param1);

			return filtered;
		}
	}]);

	return Effects_sharpen_class;
}();

exports.default = Effects_sharpen_class;

/***/ }),

/***/ "./src/js/modules/effects/solarize.js":
/*!********************************************!*\
  !*** ./src/js/modules/effects/solarize.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_solarize_class = function () {
	function Effects_solarize_class() {
		_classCallCheck(this, Effects_solarize_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Effects_solarize_class, [{
		key: 'solarize',
		value: function solarize() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Solarize',
				preview: true,
				effects: true,
				params: [],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, params) {
			var filtered = _imagefilters2.default.Solarize(data);

			return filtered;
		}
	}]);

	return Effects_solarize_class;
}();

exports.default = Effects_solarize_class;

/***/ }),

/***/ "./src/js/modules/effects/tilt_shift.js":
/*!**********************************************!*\
  !*** ./src/js/modules/effects/tilt_shift.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_tiltShift_class = function () {
	function Effects_tiltShift_class() {
		_classCallCheck(this, Effects_tiltShift_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.fx_filter = false;
	}

	_createClass(Effects_tiltShift_class, [{
		key: 'tilt_shift',
		value: function tilt_shift() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Tilt Shift',
				preview: true,
				effects: true,
				params: [
				//extra
				{ name: "param7", title: "Saturation:", value: "3", range: [0, 20] }, { name: "param8", title: "Sharpen:", value: "1", range: [0, 5] },
				//main
				{ name: "param1", title: "Blur Radius:", value: 10, range: [0, 30] }, { name: "param2", title: "Gradient Radius:", value: 70, range: [40, 100] },
				//startX, startY, endX, endY
				{ name: "param3", title: "X start:", value: 0, range: [0, 100] }, { name: "param4", title: "Y start:", value: 50, range: [0, 100] }, { name: "param5", title: "X end:", value: 100, range: [0, 100] }, { name: "param6", title: "Y end:", value: 50, range: [0, 100] }],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					//recalc param by size
					_this.change(canvas_, params);

					//convert % to px for line
					params.param3 = canvas_.width * params.param3 / 100;
					params.param4 = canvas_.height * params.param4 / 100;
					params.param5 = canvas_.width * params.param5 / 100;
					params.param6 = canvas_.height * params.param6 / 100;

					//draw line
					canvas_preview.beginPath();
					canvas_preview.strokeStyle = "#ff0000";
					canvas_preview.lineWidth = 1;
					canvas_preview.moveTo(params.param3 + 0.5, params.param4 + 0.5);
					canvas_preview.lineTo(params.param5 + 0.5, params.param6 + 0.5);
					canvas_preview.stroke();
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			this.change(canvas, params);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var param1 = parseInt(params.param1);
			var param2 = parseInt(params.param2);
			var param3 = parseInt(params.param3);
			var param4 = parseInt(params.param4);
			var param5 = parseInt(params.param5);
			var param6 = parseInt(params.param6);
			var param7 = parseInt(params.param7);
			var param8 = parseInt(params.param8);

			//convert % to px
			param1 = canvas.height * param1 / 100;
			param2 = canvas.height * param2 / 100;
			param3 = canvas.width * param3 / 100;
			param4 = canvas.height * param4 / 100;
			param5 = canvas.width * param5 / 100;
			param6 = canvas.height * param6 / 100;

			var ctx = canvas.getContext("2d");

			//main effect
			var texture = this.fx_filter.texture(canvas);
			this.fx_filter.draw(texture).tiltShift(param3, param4, param5, param6, param1, param2).update();
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(this.fx_filter, 0, 0);

			//saturation
			var data = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = _imagefilters2.default.HSLAdjustment(data, 0, param7, 0);
			ctx.putImageData(data, 0, 0);

			//sharpen
			var data = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = _imagefilters2.default.Sharpen(data, param8);
			ctx.putImageData(data, 0, 0);
		}
	}]);

	return Effects_tiltShift_class;
}();

exports.default = Effects_tiltShift_class;

/***/ }),

/***/ "./src/js/modules/effects/vibrance.js":
/*!********************************************!*\
  !*** ./src/js/modules/effects/vibrance.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_vibrance_class = function () {
	function Effects_vibrance_class() {
		_classCallCheck(this, Effects_vibrance_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.fx_filter = false;
	}

	_createClass(Effects_vibrance_class, [{
		key: 'vibrance',
		value: function vibrance() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Vibrance',
				preview: true,
				effects: true,
				params: [{ name: "level", title: "Level:", value: "0.5", range: [-1, 1], step: 0.01 }],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					var data = _this.change(canvas_, params);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, params);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var param1 = parseFloat(params.level);

			var texture = this.fx_filter.texture(canvas);
			this.fx_filter.draw(texture).vibrance(param1).update(); //effect

			return this.fx_filter;
		}
	}]);

	return Effects_vibrance_class;
}();

exports.default = Effects_vibrance_class;

/***/ }),

/***/ "./src/js/modules/effects/vignette.js":
/*!********************************************!*\
  !*** ./src/js/modules/effects/vignette.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_vignette_class = function () {
	function Effects_vignette_class() {
		_classCallCheck(this, Effects_vignette_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.fx_filter = false;
	}

	_createClass(Effects_vignette_class, [{
		key: 'vignette',
		value: function vignette() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Vignette',
				preview: true,
				effects: true,
				params: [{ name: "param1", title: "Level:", value: "0.5", range: [0, 1], step: 0.01 }, { name: "param2", title: "Size:", value: "0.5", range: [0, 1], step: 0.01 }],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					var data = _this.change(canvas_, params);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, params);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var param1 = parseFloat(params.param1);
			var param2 = parseFloat(params.param2);

			var texture = this.fx_filter.texture(canvas);
			this.fx_filter.draw(texture).vignette(param1, param2).update(); //effect

			return this.fx_filter;
		}
	}]);

	return Effects_vignette_class;
}();

exports.default = Effects_vignette_class;

/***/ }),

/***/ "./src/js/modules/effects/vintage.js":
/*!*******************************************!*\
  !*** ./src/js/modules/effects/vintage.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _vintage = __webpack_require__(/*! ./../../libs/vintage.js */ "./src/js/libs/vintage.js");

var _vintage2 = _interopRequireDefault(_vintage);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_vintage_class = function () {
	function Effects_vintage_class() {
		_classCallCheck(this, Effects_vintage_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Vintage = new _vintage2.default(_config2.default.WIDTH, _config2.default.HEIGHT);
	}

	_createClass(Effects_vintage_class, [{
		key: 'vintage',
		value: function vintage() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			this.Vintage.reset_random_values(_config2.default.WIDTH, _config2.default.HEIGHT);

			var settings = {
				title: 'Vintage',
				preview: true,
				effects: true,
				params: [{ name: "level", title: "Level:", value: 50, range: [0, 100] }],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					_this.change(canvas_, params);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			this.change(canvas, params);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			var level = parseInt(params.level);

			this.Vintage.apply_all(canvas, level);
		}
	}]);

	return Effects_vintage_class;
}();

exports.default = Effects_vintage_class;

/***/ }),

/***/ "./src/js/modules/effects/zoom_blur.js":
/*!*********************************************!*\
  !*** ./src/js/modules/effects/zoom_blur.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _glfx = __webpack_require__(/*! ./../../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Effects_zoomBlur_class = function () {
	function Effects_zoomBlur_class() {
		_classCallCheck(this, Effects_zoomBlur_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.fx_filter = false;
	}

	_createClass(Effects_zoomBlur_class, [{
		key: 'zoom_blur',
		value: function zoom_blur() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			//get layer size
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);

			var settings = {
				title: 'Zoom blur',
				preview: true,
				effects: true,
				params: [{ name: "param1", title: "Strength:", value: "0.3", range: [0, 1], step: 0.01 }, { name: "param2", title: "Center x:", value: Math.round(canvas.width / 2), range: [0, canvas.width] }, { name: "param3", title: "Center y:", value: Math.round(canvas.height / 2), range: [0, canvas.height] }],
				on_change: function on_change(params, canvas_preview, w, h, canvas_) {
					//recalc param by size
					params.param2 = params.param2 / canvas.width * w;
					params.param3 = params.param3 / canvas.height * h;

					var data = _this.change(canvas_, params);
					canvas_preview.clearRect(0, 0, canvas_.width, canvas_.height);
					canvas_preview.drawImage(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save',
		value: function save(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var data = this.change(canvas, params);
			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var param1 = parseFloat(params.param1);
			var param2 = parseInt(params.param2);
			var param3 = parseInt(params.param3);

			var texture = this.fx_filter.texture(canvas);
			this.fx_filter.draw(texture).zoomBlur(param2, param3, param1).update(); //effect

			return this.fx_filter;
		}
	}]);

	return Effects_zoomBlur_class;
}();

exports.default = Effects_zoomBlur_class;

/***/ }),

/***/ "./src/js/modules/file/new.js":
/*!************************************!*\
  !*** ./src/js/modules/file/new.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/** 
 * manages files / new
 * 
 * @author ViliusL
 */
var File_new_class = function () {
	function File_new_class() {
		_classCallCheck(this, File_new_class);

		this.Base_gui = new _baseGui2.default();
		this.Base_layers = new _baseLayers2.default();
		this.POP = new _popup2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(File_new_class, [{
		key: 'new',
		value: function _new() {
			window.State.save();

			var _this = this;
			var w = _config2.default.WIDTH;
			var h = _config2.default.HEIGHT;
			var common_dimensions = this.Base_gui.common_dimensions;
			var resolutions = ['Custom'];

			for (var i in common_dimensions) {
				var value = common_dimensions[i];
				resolutions.push(value[0] + 'x' + value[1] + ' - ' + value[2]);
			}

			var save_resolution_cookie = this.Helper.getCookie('save_resolution');
			if (save_resolution_cookie) {
				var save_resolution = true;
				var last_resolution = this.Helper.getCookie('last_resolution');
				if (last_resolution) {
					last_resolution = JSON.parse(last_resolution);
					w = parseInt(last_resolution[0]);
					h = parseInt(last_resolution[1]);
				}
			} else {
				var save_resolution = false;
			}

			var transparency_cookie = this.Helper.getCookie('transparency');
			if (transparency_cookie === null) {
				//default
				transparency_cookie = false;
			}
			if (transparency_cookie) {
				var transparency = true;
			} else {
				var transparency = false;
			}

			var settings = {
				title: 'New file',
				params: [{ name: "width", title: "Width:", value: w }, { name: "height", title: "Height:", value: h }, { name: "resolution", title: "Resolution:", values: resolutions }, { name: "transparency", title: "Transparent:", value: transparency }, { name: "save_resolution", title: "Save resolution:", value: save_resolution }],
				on_finish: function on_finish(params) {
					_this.new_handler(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'new_handler',
		value: function new_handler(response) {
			var width = parseInt(response.width);
			var height = parseInt(response.height);
			var resolution = response.resolution;
			var save_resolution = response.save_resolution;
			var transparency = response.transparency;

			if (resolution != 'Custom') {
				var dim = resolution.split(" ");
				dim = dim[0].split("x");
				width = dim[0];
				height = dim[1];
			}
			if (transparency == true) _config2.default.TRANSPARENCY = true;else _config2.default.TRANSPARENCY = false;

			_config2.default.ZOOM = 1;
			_config2.default.WIDTH = parseInt(width);
			_config2.default.HEIGHT = parseInt(height);
			this.Base_gui.prepare_canvas();

			//prepare layers
			this.Base_layers.reset_layers();
			this.Base_layers.init_zoom_lib();
			this.Base_layers.insert({});
			_config2.default.need_render = true;

			//reset EXIF
			_config2.default.layer._exif = null;

			//last resolution
			var last_resolution = JSON.stringify([_config2.default.WIDTH, _config2.default.HEIGHT]);
			this.Helper.setCookie('last_resolution', last_resolution);

			//save_resolution
			if (save_resolution) {
				this.Helper.setCookie('save_resolution', 1);
			} else {
				this.Helper.setCookie('save_resolution', 0);
			}

			//transparency
			if (transparency) {
				this.Helper.setCookie('transparency', 1);
			} else {
				this.Helper.setCookie('transparency', 0);
			}
		}
	}]);

	return File_new_class;
}();

exports.default = File_new_class;

/***/ }),

/***/ "./src/js/modules/file/open.js":
/*!*************************************!*\
  !*** ./src/js/modules/file/open.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _clipboard = __webpack_require__(/*! ./../../libs/clipboard.js */ "./src/js/libs/clipboard.js");

var _clipboard2 = _interopRequireDefault(_clipboard);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _exif = __webpack_require__(/*! ./../../../../node_modules/exif-js/exif.js */ "./node_modules/exif-js/exif.js");

var _exif2 = _interopRequireDefault(_exif);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

/** 
 * manages files / open
 * 
 * @author ViliusL
 */

var File_open_class = function () {
	function File_open_class() {
		_classCallCheck(this, File_open_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		var _this = this;
		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Base_gui = new _baseGui2.default();
		this.Helper = new _helpers2.default();

		//clipboard class
		this.Clipboard_class = new _clipboard2.default(function (data, w, h) {
			_this.on_paste(data, w, h);
		});

		this.events();

		this.maybe_file_open_url_handler();
	}

	_createClass(File_open_class, [{
		key: 'events',
		value: function events() {
			var _this = this;

			window.ondrop = function (e) {
				//drop
				e.preventDefault();
				_this.open_handler(e);
			};
			window.ondragover = function (e) {
				e.preventDefault();
			};
		}
	}, {
		key: 'on_paste',
		value: function on_paste(data, width, height) {
			var new_layer = {
				name: 'Paste',
				type: 'image',
				data: data
			};
			this.Base_layers.insert(new_layer);
		}
	}, {
		key: 'open_file',
		value: function open_file() {
			var _this = this;

			_alertifyMin2.default.success('You can also drag and drop items into browser.');

			document.getElementById("tmp").innerHTML = '';
			var a = document.createElement('input');
			a.setAttribute("id", "file_open");
			a.type = 'file';
			a.multiple = 'multiple';
			document.getElementById("tmp").appendChild(a);
			document.getElementById('file_open').addEventListener('change', function (e) {
				_this.open_handler(e);
			}, false);

			//force click
			document.querySelector('#file_open').click();
		}
	}, {
		key: 'open_webcam',
		value: function open_webcam() {
			var _this = this;
			var video = document.createElement('video');
			video.autoplay = true;
			video.style.maxWidth = '100%';
			var track = null;

			function handleSuccess(stream) {
				track = stream.getTracks()[0];
				video.srcObject = stream;
			}

			function handleError(error) {
				_alertifyMin2.default.error('Sorry, cold not load getUserMedia() data: ' + error);
			}

			var settings = {
				title: 'Webcam',
				params: [{ title: "Stream:", html: '<div id="webcam_container"></div>' }],
				on_load: function on_load(params) {
					document.getElementById('webcam_container').appendChild(video);
				},
				on_finish: function on_finish(params) {
					//capture data
					var width = video.videoWidth;
					var height = video.videoHeight;

					var tmpCanvas = document.createElement('canvas');
					var tmpCanvasCtx = tmpCanvas.getContext("2d");
					tmpCanvas.width = width;
					tmpCanvas.height = height;
					tmpCanvasCtx.drawImage(video, 0, 0);

					//create requested layer
					var new_layer = {
						name: "Webcam #" + _this.Base_layers.auto_increment,
						type: 'image',
						data: tmpCanvas.toDataURL("image/png"),
						width: width,
						height: height,
						width_original: width,
						height_original: height
					};
					this.Base_layers.insert(new_layer);
					_this.Base_layers.autoresize(width, height);

					//destroy
					if (track != null) {
						track.stop();
					}
					video.pause();
					video.src = "";
					video.load();
				},
				on_cancel: function on_cancel(params) {
					if (track != null) {
						track.stop();
					}
					video.pause();
					video.src = "";
					video.load();
				}
			};
			this.POP.show(settings);

			navigator.mediaDevices.getUserMedia({ audio: false, video: true }).then(handleSuccess).catch(handleError);
		}
	}, {
		key: 'open_dir',
		value: function open_dir() {
			var _this = this;

			document.getElementById("tmp").innerHTML = '';
			var a = document.createElement('input');
			a.setAttribute("id", "file_open_dir");
			a.type = 'file';
			a.webkitdirectory = 'webkitdirectory';
			document.getElementById("tmp").appendChild(a);
			document.getElementById('file_open_dir').addEventListener('change', function (e) {
				_this.open_handler(e);
			}, false);

			//force click
			document.querySelector('#file_open_dir').click();
		}

		/**
   * opens data URLs, like: "data:image/png;base64,xxxxxx"
   * 
   * data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAG0lEQVQYV2N89+7df0FBQQbG/////3///j0DAF9wCsg9spQfAAAAAElFTkSuQmCC
   */

	}, {
		key: 'open_data_url',
		value: function open_data_url() {
			var _this = this;

			var settings = {
				title: 'Open data URL',
				params: [{ name: "data", title: "Data URL:", type: "textarea", value: "" }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.file_open_data_url_handler(params.data);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'file_open_data_url_handler',
		value: function file_open_data_url_handler(data) {
			var _this = this;
			if (data == '') return;

			var img = new Image();
			img.crossOrigin = "Anonymous";
			img.onload = function () {
				var new_layer = {
					name: "Data URL",
					type: 'image',
					link: img,
					width: img.width,
					height: img.height,
					width_original: img.width,
					height_original: img.height
				};
				_this.Base_layers.insert(new_layer);
				_this.Base_layers.autoresize(img.width, img.height);
				img.onload = function () {
					_config2.default.need_render = true;
				};
			};
			img.onerror = function (ex) {
				_alertifyMin2.default.error('Sorry, image could not be loaded. Try copy image and paste it.');
			};
			img.src = data;
		}
	}, {
		key: 'open_url',
		value: function open_url() {
			var _this = this;

			var settings = {
				title: 'Open URL',
				params: [{ name: "url", title: "URL:", value: "" }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.file_open_url_handler(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'open_handler',
		value: function open_handler(e) {
			var _this = this;
			var files = e.target.files;

			window.State.save();
			var auto_increment = this.Base_layers.auto_increment;

			if (files == undefined) {
				//drag and drop
				files = e.dataTransfer.files;
			}

			//sort
			var orders = [];
			for (var i = 0, f; i < files.length; i++) {
				orders.push(files[i].name);
			}
			orders.sort();
			var order_map = [];
			for (var i in orders) {
				order_map[orders[i]] = parseInt(i);
			}

			for (var i = 0, f; i < files.length; i++) {
				f = files[i];
				if (!f.type.match('image.*') && !f.name.match('.json')) {
					_alertifyMin2.default.error('Wrong file type, must be image or json.');
					continue;
				}
				if (files.length == 1) this.SAVE_NAME = f.name.split('.')[f.name.split('.').length - 2];

				var FR = new FileReader();
				FR.file = files[i];

				FR.onload = function (event) {
					if (this.file.type.match('image.*')) {
						var order = auto_increment + order_map[this.file.name];
						//image
						var new_layer = {
							name: this.file.name,
							type: 'image',
							data: event.target.result,
							order: order
						};
						_this.Base_layers.insert(new_layer);
						_this.extract_exif(this.file);
					} else {
						//json
						var response = _this.load_json(event.target.result);
						if (response === true) {
							return false;
						}
					}
				};
				if (f.type == "text/plain") FR.readAsText(f);else if (f.name.match('.json')) FR.readAsText(f);else FR.readAsDataURL(f);
			}
		}
	}, {
		key: 'open_template_test',
		value: function open_template_test() {
			var _this = this;

			window.fetch("images/test-collection.json").then(function (response) {
				return response.json();
			}).then(function (json) {
				_this.load_json(json, false);
			}).catch(function (ex) {
				_alertifyMin2.default.error('Sorry, image could not be loaded.');
			});
		}

		/**
   * check if url has url params, for example: https://viliusle.github.io/miniPaint/?image=http://i.imgur.com/ATda8Ae.jpg
   */

	}, {
		key: 'maybe_file_open_url_handler',
		value: function maybe_file_open_url_handler() {
			var _this = this;
			var url_params = this.Helper.get_url_parameters();

			if (url_params.image != undefined) {
				//found params - try to load it
				if (url_params.image.toLowerCase().indexOf('.json') == url_params.image.length - 5) {
					//load json
					window.fetch(url_params.image).then(function (response) {
						return response.json();
					}).then(function (json) {
						_this.load_json(json, false);
					}).catch(function (ex) {
						_alertifyMin2.default.error('Sorry, image could not be loaded.');
					});
				} else {
					//load image
					var data = {
						url: url_params.image
					};
					this.file_open_url_handler(data);
				}
			}
		}

		//handler for open url. Example url: http://i.imgur.com/ATda8Ae.jpg

	}, {
		key: 'file_open_url_handler',
		value: function file_open_url_handler(user_response) {
			var _this = this;
			var url = user_response.url;
			if (url == '') return;

			var layer_name = url.replace(/^.*[\\\/]/, '');

			var img = new Image();
			img.crossOrigin = "Anonymous";
			img.onload = function () {
				var new_layer = {
					name: layer_name,
					type: 'image',
					link: img,
					width: img.width,
					height: img.height,
					width_original: img.width,
					height_original: img.height
				};
				img.onload = function () {
					_config2.default.need_render = true;
				};
				_this.Base_layers.insert(new_layer);
				_this.Base_layers.autoresize(img.width, img.height);
			};
			img.onerror = function (ex) {
				_alertifyMin2.default.error('Sorry, image could not be loaded. Try copy image and paste it.');
			};
			img.src = url;
		}
	}, {
		key: 'load_json',
		value: function load_json(data) {
			var json;
			if (typeof data == 'string') json = JSON.parse(data);else json = data;
			if (json.info.version == undefined) {
				json.info.version = "3";
			}
			if (json.info.version < "4") {
				//convert from v3 to v4
				for (var i in json.layers) {
					//layers data
					json.layers[i].id = parseInt(i) + 1;
					json.layers[i].opacity = json.layers[i].opacity * 100 || 100;
					json.layers[i].type = "image";
					json.layers[i].width = json.info.width;
					json.layers[i].height = json.info.height;
					json.layers[i].visible = json.layers[i].visible == true; //convert to boolean
					delete json.layers[i].title;
				}
				json.data = [];
				for (var i in json.image_data) {
					//image data
					var new_id = null;
					for (var j in json.layers) {
						if (json.layers[j].name == json.image_data[i].name) {
							new_id = json.layers[j].id;
						}
					}
					if (new_id == null) continue;
					json.data.push({
						id: new_id,
						data: json.image_data[i].data
					});
				}
			}

			//set attributes
			_config2.default.ZOOM = 1;
			_config2.default.WIDTH = parseInt(json.info.width);
			_config2.default.HEIGHT = parseInt(json.info.height);
			this.Base_layers.reset_layers();
			this.Base_gui.prepare_canvas();

			for (var i in json.layers) {
				var value = json.layers[i];

				if (value.type == 'image') {
					//add image data
					value.link = null;
					for (var j in json.data) {
						if (json.data[j].id == value.id) {
							value.data = json.data[j].data;
						}
					}
				}

				this.Base_layers.insert(value, false);
			}
			if (json.info.layer_active != undefined) {
				this.Base_layers.select(json.info.layer_active);
			}
		}
	}, {
		key: 'extract_exif',
		value: function extract_exif(object) {
			var exif_data = {
				general: [],
				exif: []
			};

			//exif data
			_exif2.default.getData(object, function () {
				exif_data.exif = this.exifdata;
				delete this.exifdata.thumbnail;
			});

			//general
			if (object.name != undefined) exif_data.general.Name = object.name;
			if (object.size != undefined) exif_data.general.Size = this.Helper.number_format(object.size / 1000, 2) + ' KB';
			if (object.type != undefined) exif_data.general.Type = object.type;
			if (object.lastModified != undefined) exif_data.general['Last modified'] = this.Helper.format_time(object.lastModified);

			//save
			_config2.default.layer._exif = exif_data;
		}
	}]);

	return File_open_class;
}();

exports.default = File_open_class;

/***/ }),

/***/ "./src/js/modules/file/print.js":
/*!**************************************!*\
  !*** ./src/js/modules/file/print.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/** 
 * manages files / print
 * 
 * @author ViliusL
 */
var File_print_class = function () {
  function File_print_class() {
    _classCallCheck(this, File_print_class);
  }

  _createClass(File_print_class, [{
    key: "print",
    value: function print() {
      window.print();
    }
  }]);

  return File_print_class;
}();

exports.default = File_print_class;

/***/ }),

/***/ "./src/js/modules/file/quickload.js":
/*!******************************************!*\
  !*** ./src/js/modules/file/quickload.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _open = __webpack_require__(/*! ./open.js */ "./src/js/modules/file/open.js");

var _open2 = _interopRequireDefault(_open);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/** 
 * manages files / quick-load
 * 
 * @author ViliusL
 */
var File_quickload_class = function () {
	function File_quickload_class() {
		_classCallCheck(this, File_quickload_class);

		this.Base_layers = new _baseLayers2.default();
		this.File_open = new _open2.default();

		this.set_events();
	}

	_createClass(File_quickload_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;

				if (code == 121) {
					//F10
					_this.quickload();
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'quickload',
		value: function quickload() {
			//load image data
			var json = localStorage.getItem('quicksave_data');
			if (json == '' || json == null) {
				//nothing was found
				return false;
			}

			this.File_open.load_json(json);
		}
	}]);

	return File_quickload_class;
}();

exports.default = File_quickload_class;

/***/ }),

/***/ "./src/js/modules/file/quicksave.js":
/*!******************************************!*\
  !*** ./src/js/modules/file/quicksave.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _save = __webpack_require__(/*! ./save.js */ "./src/js/modules/file/save.js");

var _save2 = _interopRequireDefault(_save);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/** 
 * manages files / quick-save
 * 
 * @author ViliusL
 */
var File_quicksave_class = function () {
	function File_quicksave_class() {
		_classCallCheck(this, File_quicksave_class);

		this.POP = new _popup2.default();
		this.File_save = new _save2.default();

		this.set_events();
	}

	_createClass(File_quicksave_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;

				if (code == 120) {
					//F9
					_this.quicksave();
				}
			}, false);
		}
	}, {
		key: 'quicksave',
		value: function quicksave() {
			//save image data
			var data_json = this.File_save.export_as_json();
			if (data_json.length > 5000000) {
				_alertifyMin2.default.error('Sorry, image is too big, max 5 MB.');
				return false;
			}
			localStorage.setItem('quicksave_data', data_json);
		}
	}]);

	return File_quicksave_class;
}();

exports.default = File_quicksave_class;

/***/ }),

/***/ "./src/js/modules/file/save.js":
/*!*************************************!*\
  !*** ./src/js/modules/file/save.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _canvasToBlobMin = __webpack_require__(/*! ./../../../../node_modules/blueimp-canvas-to-blob/js/canvas-to-blob.min.js */ "./node_modules/blueimp-canvas-to-blob/js/canvas-to-blob.min.js");

var _canvasToBlobMin2 = _interopRequireDefault(_canvasToBlobMin);

var _FileSaverMin = __webpack_require__(/*! ./../../../../node_modules/file-saver/FileSaver.min.js */ "./node_modules/file-saver/FileSaver.min.js");

var _FileSaverMin2 = _interopRequireDefault(_FileSaverMin);

var _gif = __webpack_require__(/*! ./../../libs/gifjs/gif.js */ "./src/js/libs/gifjs/gif.js");

var _gif2 = _interopRequireDefault(_gif);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

/** 
 * manages files / save
 * 
 * @author ViliusL
 */

var File_save_class = function () {
	function File_save_class() {
		_classCallCheck(this, File_save_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
		this.POP = new _popup2.default();

		this.set_events();

		//save types config
		this.SAVE_TYPES = ["PNG - Portable Network Graphics", "JPG - JPG/JPEG Format", "JSON - Full layers data", //aka PSD
		"WEBP - Weppy File Format", //chrome only
		"GIF - Graphics Interchange Format", //animated GIF
		"BMP - Windows Bitmap"];
	}

	_createClass(File_save_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 83) {
					//save
					_this.save();
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'save',
		value: function save() {
			var _this = this;

			//find default format
			var save_default = this.SAVE_TYPES[0]; //png
			if (this.Helper.getCookie('save_default') == 'jpg') save_default = this.SAVE_TYPES[1]; //jpg

			var calc_size_value = false;
			var calc_size = false;
			if (_config2.default.WIDTH * _config2.default.HEIGHT < 1000000) {
				calc_size_value = true;
				calc_size = true;
			}

			var file_name = _config2.default.layers[0].name;
			var parts = file_name.split('.');
			if (parts.length > 1) file_name = parts[parts.length - 2];
			file_name = file_name.replace(/ /g, "-");

			var settings = {
				title: 'Save as',
				params: [{ name: "name", title: "File name:", value: file_name }, { name: "type", title: "Save as type:", values: this.SAVE_TYPES, value: save_default }, { name: "quality", title: "Quality:", value: 90, range: [1, 100] }, { title: "File size:", html: '<span id="file_size">-</span>' }, { name: "calc_size", title: "Show file size:", value: calc_size_value }, { name: "layers", title: "Save layers:", values: ['All', 'Selected', 'Separated'] }, { name: "delay", title: "Gif delay:", value: 400 }],
				on_change: function on_change(params, canvas_preview, w, h) {
					_this.save_dialog_onchange();
				},
				on_finish: function on_finish(params) {
					if (params.layers == 'Separated') {
						var active_layer = _config2.default.layer.id;
						params.layers = 'Selected';
						for (var i in _config2.default.layers) {
							if (_config2.default.layers[i].visible == false) continue;

							this.Base_layers.select(_config2.default.layers[i].id);
							_this.save_action(params, true);
						}
						this.Base_layers.select(active_layer);
					} else {
						_this.save_action(params);
					}
				}
			};
			this.POP.show(settings);

			document.getElementById("pop_data_name").select();

			if (calc_size == true) {
				//calc size once
				this.save_dialog_onchange();
			}
		}
	}, {
		key: 'save_data_url',
		value: function save_data_url() {
			var max = 10 * 1000 * 1000;
			if (_config2.default.WIDTH * _config2.default.WIDTH > 10 * 1000 * 1000) {
				_alertifyMin2.default.error('Size is too big, max ' + this.Helper.number_format(max, 0) + ' pixels.');
				return;
			}

			var canvas = document.createElement('canvas');
			var ctx = canvas.getContext("2d");
			canvas.width = _config2.default.WIDTH;
			canvas.height = _config2.default.HEIGHT;

			this.disable_canvas_smooth(ctx);

			//ask data
			this.Base_layers.convert_layers_to_canvas(ctx);
			var data_url = canvas.toDataURL();

			max = 1 * 1000 * 1000;
			if (data_url.length > max) {
				_alertifyMin2.default.error('Size is too big, max ' + this.Helper.number_format(max, 0) + ' bytes.');
				return;
			}

			var settings = {
				title: 'Data URL',
				params: [{ name: "url", title: "URL:", type: "textarea", value: data_url }]
			};
			this.POP.show(settings);
		}
	}, {
		key: 'update_file_size',
		value: function update_file_size(file_size) {
			if (typeof file_size == 'string') {
				document.getElementById('file_size').innerHTML = file_size;
				return;
			}

			if (file_size > 1024 * 1024) file_size = this.Helper.number_format(file_size / 1024 / 1024, 2) + ' MB';else if (file_size > 1024) file_size = this.Helper.number_format(file_size / 1024, 2) + ' KB';else file_size = file_size + ' B';
			document.getElementById('file_size').innerHTML = file_size;
		}

		/**
   * /activated on save dialog parameters change - used for calculating file size
   */

	}, {
		key: 'save_dialog_onchange',
		value: function save_dialog_onchange() {
			var _this = this;
			this.update_file_size('...');

			var user_response = this.POP.get_params();

			var quality = parseInt(user_response.quality);
			if (quality > 100 || quality < 1 || isNaN(quality) == true) quality = 90;
			quality = quality / 100;

			//detect type
			var type = user_response.type;
			var parts = type.split(" ");
			type = parts[0];

			if (type == 'JPG' || type == 'WEBP') document.getElementById('popup-tr-quality').style.display = '';else document.getElementById('popup-tr-quality').style.display = 'none';

			if (type == 'GIF') document.getElementById('popup-tr-delay').style.display = '';else document.getElementById('popup-tr-delay').style.display = 'none';

			if (type == 'JSON' || type == 'GIF') document.getElementById('popup-tr-layers').style.display = 'none';else document.getElementById('popup-tr-layers').style.display = '';

			if (user_response.layers == 'Separated') document.getElementById('pop_data_name').disabled = true;else document.getElementById('pop_data_name').disabled = false;

			if (user_response.calc_size == false || user_response.layers == 'Separated') {
				document.getElementById('file_size').innerHTML = '-';
				return;
			}

			if (type != 'JSON' && type != 'GIF') {
				//create temp canvas
				var canvas = document.createElement('canvas');
				var ctx = canvas.getContext("2d");
				canvas.width = _config2.default.WIDTH;
				canvas.height = _config2.default.HEIGHT;
				this.disable_canvas_smooth(ctx);

				//ask data
				if (user_response.layers == 'Selected' && type != 'GIF' && _config2.default.layer.type != null) {
					//only current layer !!!
					var layer = _config2.default.layer;

					var initial_x = null;
					var initial_y = null;
					if (layer.x != null && layer.y != null && layer.width != null && layer.height != null) {
						//change position to top left corner
						initial_x = layer.x;
						initial_y = layer.y;
						layer.x = 0;
						layer.y = 0;

						canvas.width = layer.width;
						canvas.height = layer.height;
					}

					this.Base_layers.convert_layers_to_canvas(ctx, layer.id);

					if (initial_x != null && initial_x != null) {
						//restore position
						layer.x = initial_x;
						layer.y = initial_y;
					}
				} else {
					this.Base_layers.convert_layers_to_canvas(ctx);
				}
			}

			if (type != 'JSON' && (type == 'JPG' || _config2.default.TRANSPARENCY == false)) {
				//add white background
				ctx.globalCompositeOperation = 'destination-over';
				this.fillCanvasBackground(ctx, '#ffffff');
				ctx.globalCompositeOperation = 'source-over';
			}

			//calc size
			if (type == 'PNG') {
				//png
				canvas.toBlob(function (blob) {
					_this.update_file_size(blob.size);
				});
			} else if (type == 'JPG') {
				//jpg
				canvas.toBlob(function (blob) {
					_this.update_file_size(blob.size);
				}, "image/jpeg", quality);
			} else if (type == 'WEBP') {
				//WEBP - new format for chrome only
				var data_header = "image/webp";

				//check support
				if (this.check_format_support(canvas, data_header, false) == false) {
					this.update_file_size('-');
					return;
				}

				canvas.toBlob(function (blob) {
					_this.update_file_size(blob.size);
				}, data_header, quality);
			} else if (type == 'BMP') {
				//bmp
				var data_header = "image/bmp";

				//check support
				if (this.check_format_support(canvas, data_header, false) == false) {
					this.update_file_size('-');
					return;
				}

				canvas.toBlob(function (blob) {
					_this.update_file_size(blob.size);
				}, data_header);
			} else if (type == 'JSON') {
				//json
				var data_json = this.export_as_json();

				var blob = new Blob([data_json], { type: "text/plain" });
				this.update_file_size(blob.size);
			} else if (type == 'GIF') {
				//gif
				this.update_file_size('-');
			}
		}

		/**
   * saves data in requested way
   * 
   * @param {object} user_response parameters
   * @param {boolean} autoname if use name from layer, false by default
   */

	}, {
		key: 'save_action',
		value: function save_action(user_response, autoname) {
			var fname = user_response.name;
			if (autoname === true && user_response.layers == 'Selected') {
				fname = _config2.default.layer.name;
			}

			var quality = parseInt(user_response.quality);
			if (quality > 100 || quality < 1 || isNaN(quality) == true) quality = 90;
			quality = quality / 100;

			var delay = parseInt(user_response.delay);
			if (delay < 0 || isNaN(delay) == true) delay = 400;

			//detect type
			var type = user_response.type;
			var parts = type.split(" ");
			type = parts[0];

			if (this.Helper.strpos(fname, '.png') !== false) type = 'PNG';else if (this.Helper.strpos(fname, '.jpg') !== false) type = 'JPG';else if (this.Helper.strpos(fname, '.json') !== false) type = 'JSON';else if (this.Helper.strpos(fname, '.bmp') !== false) type = 'BMP';else if (this.Helper.strpos(fname, '.webp') !== false) type = 'WEBP';

			//save type as cookie
			var save_default = this.SAVE_TYPES[0]; //png
			if (this.Helper.getCookie('save_default') == 'jpg') save_default = this.SAVE_TYPES[1]; //jpg
			if (user_response.type != save_default && user_response.type == this.SAVE_TYPES[0]) this.Helper.setCookie('save_default', 'png');else if (user_response.type != save_default && user_response.type == this.SAVE_TYPES[1]) this.Helper.setCookie('save_default', 'jpg');

			if (type != 'JSON') {
				//temp canvas
				var canvas;
				var ctx;

				//get data
				if (user_response.layers == 'Selected' && type != 'GIF') {
					canvas = this.Base_layers.convert_layer_to_canvas();
					ctx = canvas.getContext("2d");
				} else {
					canvas = document.createElement('canvas');
					ctx = canvas.getContext("2d");
					canvas.width = _config2.default.WIDTH;
					canvas.height = _config2.default.HEIGHT;
					this.disable_canvas_smooth(ctx);

					this.Base_layers.convert_layers_to_canvas(ctx);
				}
			}

			if (type != 'JSON' && (type == 'JPG' || _config2.default.TRANSPARENCY == false)) {
				//add white background
				ctx.globalCompositeOperation = 'destination-over';
				this.fillCanvasBackground(ctx, '#ffffff');
				ctx.globalCompositeOperation = 'source-over';
			}

			if (type == 'PNG') {
				//png - default format
				if (this.Helper.strpos(fname, '.png') == false) fname = fname + ".png";

				//simple save example
				//var link = document.createElement('a');
				//link.download = fname;
				//link.href = canvas.toDataURL();
				//link.click();

				//save using lib
				canvas.toBlob(function (blob) {
					_FileSaverMin2.default.saveAs(blob, fname);
				});
			} else if (type == 'JPG') {
				//jpg
				if (this.Helper.strpos(fname, '.jpg') == false) fname = fname + ".jpg";

				canvas.toBlob(function (blob) {
					_FileSaverMin2.default.saveAs(blob, fname);
				}, "image/jpeg", quality);
			} else if (type == 'WEBP') {
				//WEBP - new format for chrome only
				if (this.Helper.strpos(fname, '.webp') == false) fname = fname + ".webp";
				var data_header = "image/webp";

				//check support
				if (this.check_format_support(canvas, data_header) == false) return false;

				canvas.toBlob(function (blob) {
					_FileSaverMin2.default.saveAs(blob, fname);
				}, data_header, quality);
			} else if (type == 'BMP') {
				//bmp
				if (this.Helper.strpos(fname, '.bmp') == false) fname = fname + ".bmp";
				var data_header = "image/bmp";

				//check support
				if (this.check_format_support(canvas, data_header) == false) return false;

				canvas.toBlob(function (blob) {
					_FileSaverMin2.default.saveAs(blob, fname);
				}, data_header);
			} else if (type == 'JSON') {
				//json - full data with layers
				if (this.Helper.strpos(fname, '.json') == false) fname = fname + ".json";

				var data_json = this.export_as_json();

				var blob = new Blob([data_json], { type: "text/plain" });
				//var data = window.URL.createObjectURL(blob); //html5
				_FileSaverMin2.default.saveAs(blob, fname);
			} else if (type == 'GIF') {
				//gif
				var cores = navigator.hardwareConcurrency || 4;
				var gif_settings = {
					workers: cores,
					quality: 10, //1-30, lower is better
					repeat: 0,
					width: _config2.default.WIDTH,
					height: _config2.default.HEIGHT,
					dither: 'FloydSteinberg-serpentine',
					workerScript: './src/js/libs/gifjs/gif.worker.js'
				};
				if (_config2.default.TRANSPARENCY == true) {
					gif_settings.transparent = 'rgba(0,0,0,0)';
				}
				var gif = new _gif2.default(gif_settings);

				//add frames
				for (var i = 0; i < _config2.default.layers.length; i++) {
					if (_config2.default.layers[i].visible == false) continue;

					ctx.clearRect(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT);
					if (_config2.default.TRANSPARENCY == false) {
						this.fillCanvasBackground(ctx, '#ffffff');
					}
					this.Base_layers.convert_layers_to_canvas(ctx, _config2.default.layers[i].id);

					gif.addFrame(ctx, { copy: true, delay: delay });
				}
				gif.render();
				gif.on('finished', function (blob) {
					_FileSaverMin2.default.saveAs(blob, fname);
				});
			}
		}
	}, {
		key: 'fillCanvasBackground',
		value: function fillCanvasBackground(ctx, color) {
			var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _config2.default.WIDTH;
			var height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _config2.default.HEIGHT;

			ctx.beginPath();
			ctx.rect(0, 0, width, height);
			ctx.fillStyle = color;
			ctx.fill();
		}
	}, {
		key: 'check_format_support',
		value: function check_format_support(canvas, data_header, show_error) {
			var data = canvas.toDataURL(data_header);
			var actualType = data.replace(/^data:([^;]*).*/, '$1');

			if (data_header != actualType && data_header != "text/plain") {
				if (show_error == undefined || show_error == true) {
					//error - no support
					_alertifyMin2.default.error('Your browser does not support this format.');
				}
				return false;
			}
			return true;
		}

		/**
   * exports all layers to JSON
   */

	}, {
		key: 'export_as_json',
		value: function export_as_json() {
			var export_data = {};

			//get date
			var today = new Date();
			var yyyy = today.getFullYear();
			var mm = today.getMonth() + 1; //January is 0!
			var dd = today.getDate();
			if (dd < 10) dd = '0' + dd;
			if (mm < 10) mm = '0' + mm;
			var today = yyyy + '-' + mm + '-' + dd;

			//data
			var export_data = {};
			export_data.info = {
				width: _config2.default.WIDTH,
				height: _config2.default.HEIGHT,
				about: 'Image data with multi-layers. Can be opened using miniPaint - ' + 'https://github.com/viliusle/miniPaint',
				date: today,
				version: "4.2.3",
				layer_active: _config2.default.layer.id
			};

			//layers
			export_data.layers = [];
			for (var i in _config2.default.layers) {
				var layer = {};
				for (var j in _config2.default.layers[i]) {
					if (j[0] == '_' || j == 'link_canvas') {
						//private data
						continue;
					}

					layer[j] = _config2.default.layers[i][j];
				}
				export_data.layers.push(layer);
			}

			//image data
			export_data.data = [];
			for (var i in _config2.default.layers) {
				if (_config2.default.layers[i].type != 'image') continue;

				var canvas = document.createElement('canvas');
				canvas.width = _config2.default.layers[i].width_original;
				canvas.height = _config2.default.layers[i].height_original;
				this.disable_canvas_smooth(canvas.getContext("2d"));

				canvas.getContext('2d').drawImage(_config2.default.layers[i].link, 0, 0);

				var data_tmp = canvas.toDataURL("image/png");
				export_data.data.push({
					id: _config2.default.layers[i].id,
					data: data_tmp
				});
				canvas.width = 1;
				canvas.height = 1;
			}

			return JSON.stringify(export_data, null, "\t");
		}

		/**
   * removes smoothing, because it look ugly during zoom
   * 
   * @param {ctx} ctx
   */

	}, {
		key: 'disable_canvas_smooth',
		value: function disable_canvas_smooth(ctx) {
			ctx.webkitImageSmoothingEnabled = false;
			ctx.oImageSmoothingEnabled = false;
			ctx.msImageSmoothingEnabled = false;
			ctx.imageSmoothingEnabled = false;
		}
	}]);

	return File_save_class;
}();

exports.default = File_save_class;

/***/ }),

/***/ "./src/js/modules/file/search.js":
/*!***************************************!*\
  !*** ./src/js/modules/file/search.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _open = __webpack_require__(/*! ./open.js */ "./src/js/modules/file/open.js");

var _open2 = _interopRequireDefault(_open);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/** 
 * manages image search on https://pixabay.com/en/service/about/api/
 */
var File_search_media_class = function () {
	function File_search_media_class() {
		_classCallCheck(this, File_search_media_class);

		this.File_open = new _open2.default();
		this.POP = new _popup2.default();
		this.cache = [];
	}

	/**
  * Image search api
  * 
  * @param {string} query
  * @param {array} data
  */


	_createClass(File_search_media_class, [{
		key: 'search',
		value: function search() {
			var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
			var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

			var _this = this;
			var html = '';

			var key = _config2.default.pixabay_key;
			key = key.split("").reverse().join("");

			if (data.length > 0) {
				for (var i in data) {
					html += '<div class="item pointer">';
					html += '<img class="displayBlock" alt="" src="' + data[i].previewURL + '" data-url="' + data[i].webformatURL + '" />';
					html += '</div>';
				}
				//fix for last line
				html += '<div class="item"></div>';
				html += '<div class="item"></div>';
				html += '<div class="item"></div>';
				html += '<div class="item"></div>';
			}

			var settings = {
				title: 'Search',
				comment: 'Source: <a class="grey" href="https://pixabay.com/">pixabay.com</a>.',
				className: 'wide',
				params: [{ name: "query", title: "Keyword:", value: query }],
				on_load: function on_load(params) {
					var node = document.createElement("div");
					node.classList.add('flex-container');
					node.innerHTML = html;
					document.querySelector('#popup #dialog_content').appendChild(node);
					//events
					var targets = document.querySelectorAll('#popup .item img');
					for (var i = 0; i < targets.length; i++) {
						targets[i].addEventListener('click', function (event) {
							//we have click
							window.State.save();
							this.dataset.url = this.dataset.url.replace('_640.', '_960.');
							var data = {
								url: this.dataset.url
							};
							_this.File_open.file_open_url_handler(data);
						});
					}
				},
				on_finish: function on_finish(params) {
					if (params.query == '') return;

					if (_this.cache[params.query] != undefined) {
						//using cache

						setTimeout(function () {
							//only call same function after all handlers finishes
							var data = _this.cache[params.query];
							if (parseInt(data.totalHits) == 0) {
								_alertifyMin2.default.error('Your search did not match any images.');
							}
							_this.search(params.query, data.hits);
						}, 100);
					} else {
						//query to service
						var URL = "https://pixabay.com/api/?key=" + key + "&per_page=50&q=" + encodeURIComponent(params.query);
						$.getJSON(URL, function (data) {
							_this.cache[params.query] = data;

							if (parseInt(data.totalHits) == 0) {
								_alertifyMin2.default.error('Your search did not match any images.');
							}
							_this.search(params.query, data.hits);
						}).fail(function () {
							_alertifyMin2.default.error('Error connecting to service.');
						});
					}
				}
			};
			this.POP.show(settings);
		}
	}]);

	return File_search_media_class;
}();

exports.default = File_search_media_class;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")))

/***/ }),

/***/ "./src/js/modules/help/about.js":
/*!**************************************!*\
  !*** ./src/js/modules/help/about.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Help_about_class = function () {
	function Help_about_class() {
		_classCallCheck(this, Help_about_class);

		this.POP = new _popup2.default();
	}

	//about


	_createClass(Help_about_class, [{
		key: 'about',
		value: function about() {
			var email = 'www.viliusl@gmail.com';

			var settings = {
				title: 'About',
				params: [{ title: "", html: '<img style="height:64px;" class="about-logo" alt="" src="images/logo-colors.png" />' }, { title: "Name:", html: '<span class="about-name">miniPaint</span>' }, { title: "Version:", value: "4.2.3" }, { title: "Description:", value: "Online image editor." }, { title: "Author:", value: 'ViliusL' }, { title: "Email:", html: '<a href="mailto:' + email + '">' + email + '</a>' }, { title: "GitHub:", html: '<a href="https://github.com/viliusle/miniPaint">https://github.com/viliusle/miniPaint</a>' }, { title: "Website:", html: '<a href="https://viliusle.github.io/miniPaint/">https://viliusle.github.io/miniPaint/</a>' }]
			};
			this.POP.show(settings);
		}
	}]);

	return Help_about_class;
}();

exports.default = Help_about_class;

/***/ }),

/***/ "./src/js/modules/help/shortcuts.js":
/*!******************************************!*\
  !*** ./src/js/modules/help/shortcuts.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Help_shortcuts_class = function () {
	function Help_shortcuts_class() {
		_classCallCheck(this, Help_shortcuts_class);

		this.POP = new _popup2.default();
	}

	//shortcuts


	_createClass(Help_shortcuts_class, [{
		key: 'shortcuts',
		value: function shortcuts() {
			var settings = {
				title: 'Keyboard Shortcuts',
				params: [{ title: "F9", value: 'Quick save' }, { title: "F10", value: 'Quick load' }, { title: "S", value: 'Save' }, { title: "T", value: 'Trim' }, { title: "F", value: 'Auto adjust colors' }, { title: "G", value: 'Grid on/off' }, { title: "L", value: 'Rotate left' }, { title: "N", value: 'New layer' }, { title: "R", value: 'Resize' }, { title: "Scroll up", value: 'Zoom in' }, { title: "Scroll down", value: 'Zoom out' }, { title: "CTRL + Z", value: 'Undo' }, { title: "CTRL + A", value: 'Select all' }, { title: "CTRL + V", value: 'Paste' }]
			};
			this.POP.show(settings);
		}
	}]);

	return Help_shortcuts_class;
}();

exports.default = Help_shortcuts_class;

/***/ }),

/***/ "./src/js/modules/help/translate.js":
/*!******************************************!*\
  !*** ./src/js/modules/help/translate.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function($) {

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _jqueryTranslate = __webpack_require__(/*! ./../../libs/jquery.translate.js */ "./src/js/libs/jquery.translate.js");

var _jqueryTranslate2 = _interopRequireDefault(_jqueryTranslate);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Help_translate_class = function () {
	function Help_translate_class() {
		_classCallCheck(this, Help_translate_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Helper = new _helpers2.default();
		this.translations = {};

		this.load_translations();
	}

	//change language


	_createClass(Help_translate_class, [{
		key: 'translate',
		value: function translate(lang_code) {
			if (lang_code == undefined) {
				lang_code = this.Helper.getCookie('language');
				if (!lang_code) {
					return;
				}
			}

			if (lang_code != undefined && lang_code != _config2.default.LANG) {
				//save cookie
				this.Helper.setCookie('language', lang_code);
			}

			var first = this.translations[Object.keys(this.translations)[0]];

			if (first[lang_code] != undefined || lang_code == 'en') {
				//translate
				$('body').translate({ lang: lang_code, t: this.translations });
				_config2.default.LANG = lang_code;
			} else {
				_alertifyMin2.default.error('Translate error, can not find dictionary: ' + lang_code);
			}
		}
	}, {
		key: 'load_translations',
		value: function load_translations() {
			var _this = this;
			var modules_context = __webpack_require__("./src/js/languages sync recursive \\.json$");
			modules_context.keys().forEach(function (key) {
				if (key.indexOf('Base' + '/') < 0 && key.indexOf('empty') < 0) {
					var moduleKey = key.replace('./', '').replace('.json', '');
					var classObj = modules_context(key);

					for (var i in classObj) {
						if (_this.translations[i] == undefined) {
							_this.translations[i] = {
								en: i
							};
						}
						_this.translations[i][moduleKey] = classObj[i];
					}
				}
			});
		}
	}]);

	return Help_translate_class;
}();

exports.default = Help_translate_class;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")))

/***/ }),

/***/ "./src/js/modules/image/auto_adjust.js":
/*!*********************************************!*\
  !*** ./src/js/modules/image/auto_adjust.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Image_autoAdjust_class = function () {
	function Image_autoAdjust_class() {
		_classCallCheck(this, Image_autoAdjust_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();

		this.set_events();
	}

	_createClass(Image_autoAdjust_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 70 && event.ctrlKey != true && event.metaKey != true) {
					//F - adjust
					_this.auto_adjust();
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'auto_adjust',
		value: function auto_adjust() {
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			window.State.save();

			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.get_adjust_data(img);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'get_adjust_data',
		value: function get_adjust_data(data) {
			//settings
			var white = 240; //white color min
			var black = 30; //black color max
			var target_white = 1; //how much % white colors should take
			var target_black = 0.5; //how much % black colors should take
			var modify = 1.1; //color modify strength
			var cycles_count = 10; //how much iteration to change colors

			var imgData = data.data;
			var W = data.width;
			var H = data.height;

			var n = 0; //pixels count without transparent

			//make sure we have white
			var n_valid = 0;
			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent
				if ((imgData[i] + imgData[i + 1] + imgData[i + 2]) / 3 > white) n_valid++;
				n++;
			}
			var target = target_white;
			var n_fix_white = 0;
			var done = false;
			for (var j = 0; j < cycles_count; j++) {
				if (n_valid * 100 / n >= target) done = true;
				if (done == true) break;
				n_fix_white++;

				//adjust
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent
					for (var c = 0; c < 3; c++) {
						var x = i + c;
						if (imgData[x] < 10) continue;
						//increase white
						imgData[x] *= modify;
						imgData[x] = Math.round(imgData[x]);
						if (imgData[x] > 255) imgData[x] = 255;
					}
				}

				//recheck
				n_valid = 0;
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent
					if ((imgData[i] + imgData[i + 1] + imgData[i + 2]) / 3 > white) n_valid++;
				}
			}

			//make sure we have black
			n_valid = 0;
			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent
				if ((imgData[i] + imgData[i + 1] + imgData[i + 2]) / 3 < black) n_valid++;
			}
			target = target_black;
			var n_fix_black = 0;
			var done = false;
			for (var j = 0; j < cycles_count; j++) {
				if (n_valid * 100 / n >= target) done = true;
				if (done == true) break;
				n_fix_black++;

				//adjust
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent
					for (var c = 0; c < 3; c++) {
						var x = i + c;
						if (imgData[x] > 240) continue;
						//increase black
						imgData[x] -= (255 - imgData[x]) * modify - (255 - imgData[x]);
						imgData[x] = Math.round(imgData[x]);
					}
				}

				//recheck
				n_valid = 0;
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent
					if ((imgData[i] + imgData[i + 1] + imgData[i + 2]) / 3 < black) n_valid++;
				}
			}
			//log('Iterations: brighten='+n_fix_white+", darken="+n_fix_black);

			return data;
		}
	}]);

	return Image_autoAdjust_class;
}();

exports.default = Image_autoAdjust_class;

/***/ }),

/***/ "./src/js/modules/image/color_corrections.js":
/*!***************************************************!*\
  !*** ./src/js/modules/image/color_corrections.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_colorCorrections_class = function () {
	function Image_colorCorrections_class() {
		_classCallCheck(this, Image_colorCorrections_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
		this.ImageFilters = _imagefilters2.default;
	}

	_createClass(Image_colorCorrections_class, [{
		key: 'color_corrections',
		value: function color_corrections() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Color corrections',
				preview: true,
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.do_corrections(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				params: [{ name: "param1", title: "Brightness:", value: "0", range: [-100, 100] }, { name: "param2", title: "Contrast:", value: "0", range: [-100, 100] }, {}, { name: "param_red", title: "Red channel:", value: "0", range: [-255, 255] }, { name: "param_green", title: "Green channel:", value: "0", range: [-255, 255] }, { name: "param_blue", title: "Blue channel:", value: "0", range: [-255, 255] }, {}, { name: "param_h", title: "Hue:", value: "0", range: [-180, 180] }, { name: "param_s", title: "Saturation:", value: "0", range: [-100, 100] }, { name: "param_l", title: "Luminance:", value: "0", range: [-100, 100] }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save_alpha(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save_alpha',
		value: function save_alpha(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.do_corrections(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'do_corrections',
		value: function do_corrections(data, params) {
			var param1 = params.param1;
			var param2 = params.param2;
			var param_red = params.param_red;
			var param_green = params.param_green;
			var param_blue = params.param_blue;
			var param_h = params.param_h;
			var param_s = params.param_s;
			var param_l = params.param_l;

			//Brightness/Contrast
			var filtered = this.ImageFilters.BrightnessContrastPhotoshop(data, param1, param2);
			//RGB corrections
			var filtered = this.ImageFilters.ColorTransformFilter(filtered, 1, 1, 1, 1, param_red, param_green, param_blue, 1);
			//hue/saturation/luminance
			var filtered = this.ImageFilters.HSLAdjustment(filtered, param_h, param_s, param_l);

			return filtered;
		}
	}]);

	return Image_colorCorrections_class;
}();

exports.default = Image_colorCorrections_class;

/***/ }),

/***/ "./src/js/modules/image/decrease_colors.js":
/*!*************************************************!*\
  !*** ./src/js/modules/image/decrease_colors.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_decreaseColors_class = function () {
	function Image_decreaseColors_class() {
		_classCallCheck(this, Image_decreaseColors_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
		this.ImageFilters = _imagefilters2.default;
	}

	_createClass(Image_decreaseColors_class, [{
		key: 'decrease_colors',
		value: function decrease_colors() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Decrease color depth',
				preview: true,
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.get_decreased_data(img, params.colors, params.greyscale);
					canvas_preview.putImageData(data, 0, 0);
				},
				params: [{ name: "colors", title: "Colors:", value: 10, range: [1, 256] }, { name: "greyscale", title: "Greyscale:", value: false }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.execute(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'execute',
		value: function execute(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.get_decreased_data(img, params.colors, params.greyscale);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'get_decreased_data',
		value: function get_decreased_data(data, colors, greyscale) {
			var img = data.data;
			var imgData = data.data;
			var W = data.width;
			var H = data.height;
			var palette = [];
			var block_size = 10;

			//create tmp canvas
			var canvas = document.createElement('canvas');
			var ctx = canvas.getContext("2d");
			canvas.width = W;
			canvas.height = H;

			//collect top colors
			ctx.drawImage(_config2.default.layer.link, 0, 0, Math.ceil(W / block_size), Math.ceil(H / block_size));
			var img_p = ctx.getImageData(0, 0, Math.ceil(W / block_size), Math.ceil(H / block_size));
			var imgData_p = img_p.data;
			ctx.clearRect(0, 0, W, H);

			for (var i = 0; i < imgData_p.length; i += 4) {
				if (imgData_p[i + 3] == 0) continue; //transparent
				var grey = Math.round(0.2126 * imgData_p[i] + 0.7152 * imgData_p[i + 1] + 0.0722 * imgData_p[i + 2]);
				palette.push([imgData_p[i], imgData_p[i + 1], imgData_p[i + 2], grey]);
			}

			//calculate weights
			var grey_palette = [];
			for (var i = 0; i < 256; i++) {
				grey_palette[i] = 0;
			}for (var i = 0; i < palette.length; i++) {
				grey_palette[palette[i][3]]++;
			} //remove similar colors
			for (var max = 10 * 3; max < 100 * 3; max = max + 10 * 3) {
				if (palette.length <= colors) break;
				for (var i = 0; i < palette.length; i++) {
					if (palette.length <= colors) break;
					var valid = true;
					for (var j = 0; j < palette.length; j++) {
						if (palette.length <= colors) break;
						if (i == j) continue;
						if (Math.abs(palette[i][0] - palette[j][0]) + Math.abs(palette[i][1] - palette[j][1]) + Math.abs(palette[i][2] - palette[j][2]) < max) {
							if (grey_palette[palette[i][3]] > grey_palette[palette[j][3]]) {
								//remove color
								palette.splice(j, 1);
								j--;
							} else {
								valid = false;
								break;
							}
						}
					}
					//remove color
					if (valid == false) {
						palette.splice(i, 1);
						i--;
					}
				}
			}
			palette = palette.slice(0, colors);

			//change
			var p_n = palette.length;
			for (var j = 0; j < H; j++) {
				for (var i = 0; i < W; i++) {
					var k = j * (W * 4) + i * 4;
					if (imgData[k + 3] == 0) continue; //transparent

					//find closest color
					var index1 = 0;
					var min = 999999;
					var diff1;
					for (var m = 0; m < p_n; m++) {
						var diff = Math.abs(palette[m][0] - imgData[k]) + Math.abs(palette[m][1] - imgData[k + 1]) + Math.abs(palette[m][2] - imgData[k + 2]);
						if (diff < min) {
							min = diff;
							index1 = m;
							diff1 = diff;
						}
					}

					imgData[k] = palette[index1][0];
					imgData[k + 1] = palette[index1][1];
					imgData[k + 2] = palette[index1][2];

					if (greyscale == true) {
						var mid = Math.round(0.2126 * imgData[k] + 0.7152 * imgData[k + 1] + 0.0722 * imgData[k + 2]);
						imgData[k] = mid;
						imgData[k + 1] = mid;
						imgData[k + 2] = mid;
					}
				}
			}

			return data;
		}
	}]);

	return Image_decreaseColors_class;
}();

exports.default = Image_decreaseColors_class;

/***/ }),

/***/ "./src/js/modules/image/flip.js":
/*!**************************************!*\
  !*** ./src/js/modules/image/flip.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_flip_class = function () {
	function Image_flip_class() {
		_classCallCheck(this, Image_flip_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Image_flip_class, [{
		key: 'vertical',
		value: function vertical() {
			this.flip('vertical');
		}
	}, {
		key: 'horizontal',
		value: function horizontal() {
			this.flip('horizontal');
		}
	}, {
		key: 'flip',
		value: function flip(mode) {
			window.State.save();

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//create destination canvas
			var canvas2 = document.createElement('canvas');
			canvas2.width = canvas.width;
			canvas2.height = canvas.height;
			var ctx2 = canvas2.getContext("2d");
			canvas2.dataset.x = canvas.dataset.x;
			canvas2.dataset.y = canvas.dataset.y;

			//flip
			if (mode == 'vertical') {
				ctx2.scale(1, -1);
				ctx2.drawImage(canvas, 0, canvas2.height * -1);
			} else if (mode == 'horizontal') {
				ctx2.scale(-1, 1);
				ctx2.drawImage(canvas, canvas2.width * -1, 0);
			}

			//save
			this.Base_layers.update_layer_image(canvas2);
		}
	}]);

	return Image_flip_class;
}();

exports.default = Image_flip_class;

/***/ }),

/***/ "./src/js/modules/image/grid.js":
/*!**************************************!*\
  !*** ./src/js/modules/image/grid.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Image_grid_class = function () {
	function Image_grid_class() {
		_classCallCheck(this, Image_grid_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.POP = new _popup2.default();
		this.GUI = new _baseGui2.default();

		this.set_events();
	}

	_createClass(Image_grid_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 71 && event.ctrlKey != true && event.metaKey != true) {
					//G - grid
					_this.toggle_grid({ visible: !_this.GUI.grid });
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'grid',
		value: function grid() {
			var _this = this;

			var settings = {
				title: 'Grid',
				params: [{ name: "visible", title: "Visible:", value: this.GUI.grid }],
				on_finish: function on_finish(params) {
					_this.toggle_grid(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'toggle_grid',
		value: function toggle_grid(params) {
			if (params.visible == true) {
				this.GUI.grid = true;
			} else {
				this.GUI.grid = false;
			}
			_config2.default.need_render = true;
		}
	}]);

	return Image_grid_class;
}();

exports.default = Image_grid_class;

/***/ }),

/***/ "./src/js/modules/image/histogram.js":
/*!*******************************************!*\
  !*** ./src/js/modules/image/histogram.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Image_histogram_class = function () {
	function Image_histogram_class() {
		_classCallCheck(this, Image_histogram_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();

		this.set_events();
	}

	_createClass(Image_histogram_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 72) {
					//H - trim
					_this.histogram();
				}
			}, false);
		}
	}, {
		key: 'histogram',
		value: function histogram() {
			var _this = this;

			var settings = {
				title: 'Histogram',
				on_change: function on_change(params) {
					_this.histogram_onload(params);
				},
				params: [{ name: "channel", title: "Channel:", values: ["Gray", "Red", "Green", "Blue"] }, { title: 'Histogram:', function: function _function() {
						var html = '<canvas style="position:relative;" id="c_h" width="256" height="100"></canvas>';
						return html;
					} }, { title: "Total pixels:", value: "" }, { title: "Average:", value: "" }]
			};
			this.POP.show(settings);

			this.histogram_onload({});
		}
	}, {
		key: 'histogram_onload',
		value: function histogram_onload(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(_config2.default.layer.id);
			var ctx = canvas.getContext("2d");
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var imgData = img.data;

			var channel = 0;
			if (params.channel == 'Red') channel = 1;else if (params.channel == 'Green') channel = 2;else if (params.channel == 'Blue') channel = 3;

			var hist_data = [[], [], [], []]; //grey, red, green, blue
			var total = imgData.length / 4;
			var sum = 0;
			var grey;

			for (var i = 0; i < imgData.length; i += 4) {
				//collect grey
				grey = Math.round((imgData[i] + imgData[i + 1] + imgData[i + 2]) / 3);
				sum = sum + imgData[i] + imgData[i + 1] + imgData[i + 2];
				if (hist_data[0][grey] == undefined) hist_data[0][grey] = 1;else hist_data[0][grey]++;

				//collect colors
				for (var c = 0; c < 3; c++) {
					if (c + 1 != channel) continue;
					if (hist_data[c + 1][imgData[i + c]] == undefined) hist_data[c + 1][imgData[i + c]] = 1;else hist_data[c + 1][imgData[i + c]]++;
				}
			}

			var c = document.getElementById("c_h").getContext("2d");
			c.rect(0, 0, 256, 100);
			c.fillStyle = "#ffffff";
			c.fill();
			var opacity = 1;

			//draw histogram
			for (var h in hist_data) {
				for (var i = 0; i <= 255; i++) {
					if (h != channel) continue;
					if (hist_data[h][i] == 0) continue;
					c.beginPath();

					if (h == 0) c.strokeStyle = "rgba(64, 64, 64, " + opacity * 2 + ")";else if (h == 1) c.strokeStyle = "rgba(255, 0, 0, " + opacity + ")";else if (h == 2) c.strokeStyle = "rgba(0, 255, 0, " + opacity + ")";else if (h == 3) c.strokeStyle = "rgba(0, 0, 255, " + opacity + ")";

					c.lineWidth = 1;
					c.moveTo(i + 0.5, 100 + 0.5);
					c.lineTo(i + 0.5, 100 - Math.round(hist_data[h][i] * 255 * 100 / total / 6) + 0.5);
					c.stroke();
				}
			}

			document.getElementById("pop_data_totalpixel").innerHTML = this.Helper.number_format(total, 0);
			var average;
			if (total > 0) average = Math.round(sum * 10 / total / 3) / 10;else average = '-';
			document.getElementById("pop_data_average").innerHTML = average;

			canvas.width = 1;
			canvas.height = 1;
		}
	}]);

	return Image_histogram_class;
}();

exports.default = Image_histogram_class;

/***/ }),

/***/ "./src/js/modules/image/information.js":
/*!*********************************************!*\
  !*** ./src/js/modules/image/information.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_information_class = function () {
	function Image_information_class() {
		_classCallCheck(this, Image_information_class);

		this.Base_layers = new _baseLayers2.default();
		this.POP = new _popup2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(Image_information_class, [{
		key: 'information',
		value: function information() {
			var _this = this;
			var pixels = _config2.default.WIDTH * _config2.default.HEIGHT;
			pixels = this.Helper.number_format(pixels, 0);

			var settings = {
				title: 'Information',
				params: [{ title: "Width:", value: _config2.default.WIDTH }, { title: "Height:", value: _config2.default.HEIGHT }, { title: "Pixels:", value: pixels }, { title: "Layers:", value: _config2.default.layers.length }, { title: "Unique colors:", value: '...' }]
			};

			//exif data
			if (_config2.default.layer._exif != undefined) {
				//show exif and general data
				var exif_data = _config2.default.layer._exif;

				//show general data
				for (var i in exif_data.general) {
					settings.params.push({ title: i + ":", value: exif_data.general[i] });
				}

				//show exif data
				var n = 0;
				for (var i in exif_data.exif) {
					if (i == 'undefined') continue;
					if (n == 0) settings.params.push({ title: "==== EXIF ====", value: '' });
					settings.params.push({ title: i + ":", value: exif_data.exif[i] });
					n++;
				}
			}

			this.POP.show(settings);

			//calc colors
			setTimeout(function () {
				var colors = _this.unique_colors_count();
				colors = _this.Helper.number_format(colors, 0);
				document.getElementById('pop_data_uniquecolo').innerHTML = colors;
			}, 50);
		}
	}, {
		key: 'unique_colors_count',
		value: function unique_colors_count() {
			var method = 'v2'; //v1 or v2

			if (_config2.default.WIDTH * _config2.default.HEIGHT > 20 * 1000 * 1000) {
				return '-';
			}

			var canvas = this.Base_layers.convert_layer_to_canvas();
			var ctx = canvas.getContext("2d");
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var imgData = img.data;

			//v1 - simple, slow
			if (method == 'v1') {
				var colors = [];
				var n = 0;
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent
					var key = imgData[i] + "." + imgData[i + 1] + "." + imgData[i + 2];
					if (colors[key] == undefined) {
						colors[key] = 1;
						n++;
					}
				}
			}

			//v2 - 30% faster
			else if (method == 'v2') {
					var buffer32 = new Uint32Array(imgData.buffer);
					var len = buffer32.length;
					var stats = {};
					var n = 0;

					for (var i = 0; i < len; i++) {
						var key = "" + (buffer32[i] & 0xffffff);
						if (stats[key] == undefined) {
							stats[key] = 0;
							n++;
						}
					}
				}

			return n;
		}
	}]);

	return Image_information_class;
}();

exports.default = Image_information_class;

/***/ }),

/***/ "./src/js/modules/image/opacity.js":
/*!*****************************************!*\
  !*** ./src/js/modules/image/opacity.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_opacity_class = function () {
	function Image_opacity_class() {
		_classCallCheck(this, Image_opacity_class);

		this.POP = new _popup2.default();
	}

	_createClass(Image_opacity_class, [{
		key: 'opacity',
		value: function opacity() {
			var _this = this;
			var initial_opacity = _config2.default.layer.opacity;

			var settings = {
				title: 'Opacity',
				params: [{ name: "opacity", title: "Alpha:", value: _config2.default.layer.opacity, range: [0, 100] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					_this.opacity_handler(params);
				},
				on_finish: function on_finish(params) {
					_config2.default.layer.opacity = initial_opacity;
					window.State.save();
					_this.opacity_handler(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'opacity_handler',
		value: function opacity_handler(data) {
			var value = parseInt(data.opacity);
			if (value < 0) value = 0;
			if (value > 100) value = 100;
			_config2.default.layer.opacity = value;
			_config2.default.need_render = true;
		}
	}]);

	return Image_opacity_class;
}();

exports.default = Image_opacity_class;

/***/ }),

/***/ "./src/js/modules/image/palette.js":
/*!*****************************************!*\
  !*** ./src/js/modules/image/palette.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _colorThief = __webpack_require__(/*! ./../../libs/color-thief.js */ "./src/js/libs/color-thief.js");

var _colorThief2 = _interopRequireDefault(_colorThief);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_color_class = function () {
	function Image_color_class() {
		_classCallCheck(this, Image_color_class);

		this.Base_layers = new _baseLayers2.default();
		this.alertify = new _colorThief2.default();
		this.POP = new _popup2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(Image_color_class, [{
		key: 'palette',
		value: function palette() {
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			var palette = this.alertify.getPalette(_config2.default.layer.link);
			var dominant = this.alertify.getColor(_config2.default.layer.link);
			dominant = this.Helper.rgbToHex(dominant[0], dominant[1], dominant[2]);

			var settings = {
				title: 'Palette',
				params: [{ title: "Dominant color:", html: this.generate_color_box(dominant, 200) }]
			};
			for (var i in palette) {
				var rgb = this.Helper.rgbToHex(palette[i][0], palette[i][1], palette[i][2]);
				i = parseInt(i);
				settings.params.push({ title: "Color #" + (i + 1) + ":", html: this.generate_color_box(rgb, 100) });
			}
			this.POP.show(settings);
		}
	}, {
		key: 'generate_color_box',
		value: function generate_color_box(color, width) {
			var html = '';

			html += '<input style="width:100px;margin-right:10px;" type="text" value="' + color + '" />';
			html += '<span style="display:inline-block;width:' + width + 'px;height:21px;margin-bottom:-6px;border:1px solid black;background-color:' + color + '"></span>';

			return html;
		}
	}]);

	return Image_color_class;
}();

exports.default = Image_color_class;

/***/ }),

/***/ "./src/js/modules/image/resize.js":
/*!****************************************!*\
  !*** ./src/js/modules/image/resize.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _hermiteResize = __webpack_require__(/*! hermite-resize */ "./node_modules/hermite-resize/dist/hermite.npm.js");

var _hermiteResize2 = _interopRequireDefault(_hermiteResize);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _pica = __webpack_require__(/*! ./../../../../node_modules/pica/dist/pica.js */ "./node_modules/pica/dist/pica.js");

var _pica2 = _interopRequireDefault(_pica);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Image_resize_class = function () {
	function Image_resize_class() {
		_classCallCheck(this, Image_resize_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Base_layers = new _baseLayers2.default();
		this.Base_gui = new _baseGui2.default();
		this.POP = new _popup2.default();
		this.ImageFilters = _imagefilters2.default;
		this.Hermite = new _hermiteResize2.default();
		this.pica = (0, _pica2.default)();
		this.Helper = new _helpers2.default();

		this.set_events();
	}

	_createClass(Image_resize_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 82 && event.ctrlKey != true && event.metaKey != true) {
					//R - resize
					_this.resize();
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'resize',
		value: function resize() {
			var _this = this;

			var settings = {
				title: 'Resize',
				params: [{ name: "width", title: "Width:", value: '', placeholder: _config2.default.WIDTH }, { name: "height", title: "Height:", value: '', placeholder: _config2.default.HEIGHT }, { name: "width_percent", title: "Width (%):", value: '', placeholder: 100 }, { name: "height_percent", title: "Height (%):", value: '', placeholder: 100 }, { name: "mode", title: "Mode:", values: ["Lanczos", "Hermite", "Basic"] }, { name: "sharpen", title: "Sharpen:", value: false }, { name: "layers", title: "Layers:", values: ["Active", "All"], value: "Active" }],
				on_finish: function on_finish(params) {
					_this.do_resize(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'do_resize',
		value: function do_resize(params) {
			//validate
			if (isNaN(params.width) && isNaN(params.height) && isNaN(params.width_percent) && isNaN(params.height_percent)) {
				_alertifyMin2.default.error('Missing at least 1 size parameter.');
				return false;
			}
			if (params.width == _config2.default.WIDTH && params.height == _config2.default.HEIGHT) {
				return false;
			}

			window.State.save();

			if (params.layers == 'All') {
				//resize all layers
				var skips = 0;
				for (var i in _config2.default.layers) {
					var response = this.resize_layer(_config2.default.layers[i], params);
					if (response === false) {
						skips++;
					}
				}
				if (skips > 0) {
					_alertifyMin2.default.error(skips + ' layer(s) were skipped.');
				}
			} else {
				//only active
				this.resize_layer(_config2.default.layer, params);
			}
		}

		/**
   * it will try to resize layer (image, text, vector), returns false on failure.
   * 
   * @param {object} layer
   * @param {object} params
   * @returns {undefined|Boolean}
   */

	}, {
		key: 'resize_layer',
		value: function resize_layer(layer, params) {
			var mode = params.mode;
			var width = parseInt(params.width);
			var height = parseInt(params.height);
			var width_100 = parseInt(params.width_percent);
			var height_100 = parseInt(params.height_percent);
			var sharpen = params.sharpen;
			var _this = this;

			//if dimension with percent provided
			if (isNaN(width) && isNaN(height)) {
				if (isNaN(width_100) == false) {
					width = Math.round(layer.width * width_100 / 100);
				}
				if (isNaN(height_100) == false) {
					height = Math.round(layer.height * height_100 / 100);
				}
			}

			//if only 1 dimension was provided
			if (isNaN(width) || isNaN(height)) {
				var ratio = layer.width / layer.height;
				if (isNaN(width)) width = Math.round(height * ratio);
				if (isNaN(height)) height = Math.round(width / ratio);
			}

			//is text
			if (layer.type == 'text') {
				var ratio = width / layer.width;
				layer.width = width;
				layer.height = height;
				layer.params.size = Math.ceil(layer.params.size * ratio);
				this.resize_gui();
				_config2.default.need_render = true;
				return true;
			}

			//is vector
			if (layer.is_vector == true && layer.width != null && layer.height != null) {
				layer.width = width;
				layer.height = height;
				this.resize_gui();
				_config2.default.need_render = true;
				return true;
			}

			//only images supported at this point
			if (layer.type != 'image') {
				//error - no support
				_alertifyMin2.default.error('Layer must be vector or image (convert it to raster).');
				return false;
			}

			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(layer.id, true, false);
			var ctx = canvas.getContext("2d");

			//validate
			if (mode == "Hermite" && (width > canvas.width || height > canvas.height)) {
				_alertifyMin2.default.warning('Scaling up is not supported in Hermite, using Lanczos.');
				mode = "Lanczos";
			}

			//resize
			if (mode == "Lanczos") {
				//Pica resize with max quality

				var tmp_data = document.createElement("canvas");
				tmp_data.width = width;
				tmp_data.height = height;

				this.pica.resize(canvas, tmp_data, {
					alpha: true
				}).then(function (result) {
					ctx.clearRect(0, 0, canvas.width, canvas.height);
					canvas.width = width;
					canvas.height = height;

					ctx.drawImage(tmp_data, 0, 0, width, height);

					finish_resize();
				});
				return;
			} else if (mode == "Hermite") {
				//Hermite resample
				this.Hermite.resample_single(canvas, width, height, true);
			} else {
				//simple resize
				var tmp_data = document.createElement("canvas");
				tmp_data.width = canvas.width;
				tmp_data.height = canvas.height;
				tmp_data.getContext("2d").drawImage(canvas, 0, 0);

				ctx.clearRect(0, 0, canvas.width, canvas.height);
				canvas.width = width;
				canvas.height = height;

				ctx.drawImage(tmp_data, 0, 0, width, height);
			}

			finish_resize();

			//private finish action
			function finish_resize() {
				if (sharpen == true) {
					var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
					var filtered = _this.ImageFilters.Sharpen(imageData, 1); //add effect
					ctx.putImageData(filtered, 0, 0);
				}

				//save
				_this.Base_layers.update_layer_image(canvas, layer.id);
				layer.width = canvas.width;
				layer.height = canvas.height;
				layer.width_original = canvas.width;
				layer.height_original = canvas.height;
				_config2.default.need_render = true;

				_this.resize_gui();
			}
		}
	}, {
		key: 'resize_gui',
		value: function resize_gui() {
			var max_x = 0;
			var max_y = 0;

			for (var i = 0; i < _config2.default.layers.length; i++) {
				var layer = _config2.default.layers[i];

				if (layer.width == null || layer.height == null || layer.x == null || layer.y == null) {
					//layer without dimensions
					continue;
				}

				max_x = Math.max(max_x, layer.x + layer.width);
				max_y = Math.max(max_y, layer.y + layer.height);
			}

			_config2.default.WIDTH = parseInt(max_x);
			_config2.default.HEIGHT = parseInt(max_y);
			this.Base_gui.prepare_canvas();
			_config2.default.need_render = true;
		}
	}]);

	return Image_resize_class;
}();

exports.default = Image_resize_class;

/***/ }),

/***/ "./src/js/modules/image/rotate.js":
/*!****************************************!*\
  !*** ./src/js/modules/image/rotate.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Image_rotate_class = function () {
	function Image_rotate_class() {
		_classCallCheck(this, Image_rotate_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Base_layers = new _baseLayers2.default();
		this.Base_gui = new _baseGui2.default();
		this.Dialog = new _popup2.default();

		this.set_events();
	}

	_createClass(Image_rotate_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 76) {
					//L - rotate left
					_this.left();
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'rotate',
		value: function rotate() {
			var _this = this;

			if (_config2.default.layer.rotate === null) {
				_alertifyMin2.default.error('Rotate is not supported on this type of object. Convert to raster?');
				return;
			}

			var angles = ['Custom', '0', '90', '180', '270'];
			var initial_angle = _config2.default.layer.rotate;

			var settings = {
				title: 'Rotate',
				params: [{ name: "rotate", title: "Rotate:", value: _config2.default.layer.rotate, range: [0, 360] }, { name: "right_angle", title: "Right angle:", values: angles }],
				on_change: function on_change(params, canvas_preview, w, h) {
					_this.rotate_handler(params, false);
				},
				on_finish: function on_finish(params) {
					_config2.default.layer.rotate = initial_angle;
					window.State.save();
					_this.rotate_handler(params);
				}
			};
			this.Dialog.show(settings);
		}
	}, {
		key: 'rotate_handler',
		value: function rotate_handler(data) {
			var can_resize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

			var value = parseInt(data.rotate);
			if (data.right_angle != 'Custom') {
				value = parseInt(data.right_angle);
			}

			if (value < 0) value = 360 + value;
			if (value >= 360) value = value - 360;
			_config2.default.layer.rotate = value;

			if (can_resize == true) {
				this.check_sizes();
			}
			_config2.default.need_render = true;
		}
	}, {
		key: 'left',
		value: function left() {
			_config2.default.layer.rotate -= 90;
			if (_config2.default.layer.rotate < 0) _config2.default.layer.rotate = 360 + _config2.default.layer.rotate;

			this.check_sizes();
			_config2.default.need_render = true;
		}
	}, {
		key: 'right',
		value: function right() {
			_config2.default.layer.rotate += 90;
			if (_config2.default.layer.rotate >= 360) _config2.default.layer.rotate = _config2.default.layer.rotate - 360;

			this.check_sizes();
			_config2.default.need_render = true;
		}

		/**
   * makes sure image fits all after rotation
   */

	}, {
		key: 'check_sizes',
		value: function check_sizes() {
			var w = _config2.default.layer.width;
			var h = _config2.default.layer.height;

			var o = _config2.default.layer.rotate * Math.PI / 180;
			var new_x = w * Math.abs(Math.cos(o)) + h * Math.abs(Math.sin(o));
			var new_y = w * Math.abs(Math.sin(o)) + h * Math.abs(Math.cos(o));

			//round values
			new_x = Math.ceil(Math.round(new_x * 1000) / 1000);
			new_y = Math.ceil(Math.round(new_y * 1000) / 1000);

			if (new_x > _config2.default.WIDTH || new_y > _config2.default.HEIGHT) {
				var dx = 0;
				var dy = 0;
				if (new_x > _config2.default.WIDTH) {
					dx = Math.ceil(new_x - _config2.default.WIDTH) / 2;
					_config2.default.WIDTH = new_x;
				}
				if (new_y > _config2.default.HEIGHT) {
					dy = Math.ceil(new_y - _config2.default.HEIGHT) / 2;
					_config2.default.HEIGHT = new_y;
				}
				_config2.default.layer.x += dx;
				_config2.default.layer.y += dy;

				this.Base_gui.prepare_canvas();
				_config2.default.need_render = true;
			}
		}
	}]);

	return Image_rotate_class;
}();

exports.default = Image_rotate_class;

/***/ }),

/***/ "./src/js/modules/image/size.js":
/*!**************************************!*\
  !*** ./src/js/modules/image/size.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_size_class = function () {
	function Image_size_class() {
		_classCallCheck(this, Image_size_class);

		this.Base_gui = new _baseGui2.default();
		this.POP = new _popup2.default();
	}

	_createClass(Image_size_class, [{
		key: 'size',
		value: function size() {
			var _this = this;
			var common_dimensions = this.Base_gui.common_dimensions;

			var resolutions = ['Custom'];
			for (var i in common_dimensions) {
				var value = common_dimensions[i];
				resolutions.push(value[0] + 'x' + value[1] + ' - ' + value[2]);
			}

			var settings = {
				title: 'Size',
				params: [{ name: "w", title: "Width:", value: _config2.default.WIDTH, placeholder: _config2.default.WIDTH }, { name: "h", title: "Height:", value: _config2.default.HEIGHT, placeholder: _config2.default.HEIGHT }, { name: "resolution", title: "Resolution:", values: resolutions }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.size_handler(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'size_handler',
		value: function size_handler(data) {
			var width = parseInt(data.w);
			var height = parseInt(data.h);
			var ratio = _config2.default.WIDTH / _config2.default.HEIGHT;

			if (width < 1) {
				width = 1;
			}
			if (height < 1) {
				height = 1;
			}

			//aspect ratio
			if (isNaN(width) && isNaN(height)) {
				_alertifyMin2.default.error('Wrong dimensions');
				return;
			}
			if (isNaN(width)) {
				width = height * ratio;
			}
			if (isNaN(height)) {
				height = width / ratio;
			}

			if (data.resolution != 'Custom') {
				var dim = data.resolution.split(" ");
				dim = dim[0].split("x");
				width = dim[0];
				height = dim[1];
			}

			_config2.default.WIDTH = parseInt(width);
			_config2.default.HEIGHT = parseInt(height);
			this.Base_gui.prepare_canvas();
			_config2.default.need_render = true;
		}
	}]);

	return Image_size_class;
}();

exports.default = Image_size_class;

/***/ }),

/***/ "./src/js/modules/image/translate.js":
/*!*******************************************!*\
  !*** ./src/js/modules/image/translate.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_translate_class = function () {
	function Image_translate_class() {
		_classCallCheck(this, Image_translate_class);

		this.POP = new _popup2.default();
	}

	_createClass(Image_translate_class, [{
		key: 'translate',
		value: function translate() {
			var settings = {
				title: 'Translate',
				params: [{ name: "x", title: "X position:", value: _config2.default.layer.x }, { name: "y", title: "Y position:", value: _config2.default.layer.x }],
				on_finish: function on_finish(params) {
					window.State.save();
					_config2.default.layer.x = parseInt(params.x);
					_config2.default.layer.y = parseInt(params.y);
					_config2.default.need_render = true;
				}
			};
			this.POP.show(settings);
		}
	}]);

	return Image_translate_class;
}();

exports.default = Image_translate_class;

/***/ }),

/***/ "./src/js/modules/image/trim.js":
/*!**************************************!*\
  !*** ./src/js/modules/image/trim.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Image_trim_class = function () {
	function Image_trim_class() {
		_classCallCheck(this, Image_trim_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Base_layers = new _baseLayers2.default();
		this.Base_gui = new _baseGui2.default();
		this.Helper = new _helpers2.default();
		this.Dialog = new _popup2.default();

		this.set_events();
	}

	_createClass(Image_trim_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 84) {
					//trim
					_this.trim();
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'trim',
		value: function trim() {
			var _this = this;

			var removeWhiteColor = false;
			if (_config2.default.TRANSPARENCY == false) removeWhiteColor = true;

			var settings = {
				title: 'Trim',
				params: [{ name: "trim_layer", title: "Trim layer:", value: true }, { name: "trim_all", title: "Trim borders:", value: true }, {}, //gap
				{ name: "remove_white", title: "Trim white color?", value: removeWhiteColor }],
				on_finish: function on_finish(params) {
					window.State.save();
					if (params.trim_layer == true) _this.trim_layer(_config2.default.layer.id, params.remove_white);
					if (params.trim_all == true) _this.trim_all(params.remove_white);
				}
			};
			this.Dialog.show(settings);
		}
	}, {
		key: 'trim_layer',
		value: function trim_layer(layer_id) {
			var removeWhiteColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

			var layer = this.Base_layers.get_layer(layer_id);

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Skip - layer must be image.');
				return false;
			}

			var trim = this.get_trim_info(layer_id, removeWhiteColor);
			trim = trim.relative;

			if (layer.type == 'image') {
				//if image was stretched
				var width_ratio = layer.width / layer.width_original;
				var height_ratio = layer.height / layer.height_original;

				//create smaller canvas
				var canvas = document.createElement('canvas');
				var ctx = canvas.getContext("2d");
				canvas.width = trim.width / width_ratio;
				canvas.height = trim.height / height_ratio;

				//cut required part
				ctx.translate(-trim.left / width_ratio, -trim.top / height_ratio);
				canvas.getContext("2d").drawImage(layer.link, 0, 0);
				ctx.translate(0, 0);
				this.Base_layers.update_layer_image(canvas, layer.id);

				//update attributes
				layer.width = Math.ceil(canvas.width * width_ratio);
				layer.height = Math.ceil(canvas.height * height_ratio);
				layer.x += trim.left;
				layer.y += trim.top;
				layer.width_original = canvas.width;
				layer.height_original = canvas.height;
			}

			_config2.default.need_render = true;
		}
	}, {
		key: 'trim_all',
		value: function trim_all() {
			var removeWhiteColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

			var all_top = _config2.default.HEIGHT;
			var all_left = _config2.default.WIDTH;
			var all_bottom = _config2.default.HEIGHT;
			var all_right = _config2.default.WIDTH;

			if (removeWhiteColor == undefined) {
				removeWhiteColor = false;
				if (_config2.default.TRANSPARENCY == false) {
					removeWhiteColor = true;
				}
			}

			//collect info
			for (var i = 0; i < _config2.default.layers.length; i++) {
				var layer = _config2.default.layers[i];

				if (layer.width == null || layer.height == null || layer.x == null || layer.y == null) {
					//layer without dimensions
					var trim_info = this.get_trim_info(layer.id, removeWhiteColor);

					all_top = Math.min(all_top, trim_info.top);
					all_left = Math.min(all_left, trim_info.left);
					all_bottom = Math.min(all_bottom, trim_info.bottom);
					all_right = Math.min(all_right, trim_info.right);
				} else {
					all_top = Math.min(all_top, layer.y);
					all_left = Math.min(all_left, layer.x);
					all_bottom = Math.min(all_bottom, _config2.default.HEIGHT - layer.height - layer.y);
					all_right = Math.min(all_right, _config2.default.WIDTH - layer.width - layer.x);
				}
			}

			//move every layer
			for (var i = 0; i < _config2.default.layers.length; i++) {
				var layer = _config2.default.layers[i];
				if (layer.x == null || layer.y == null || layer.type == null) continue;

				layer.x = layer.x - all_left;
				layer.y = layer.y - all_top;
			}

			//resize
			_config2.default.WIDTH = _config2.default.WIDTH - all_left - all_right;
			_config2.default.HEIGHT = _config2.default.HEIGHT - all_top - all_bottom;
			if (_config2.default.WIDTH < 1) _config2.default.WIDTH = 1;
			if (_config2.default.HEIGHT < 1) _config2.default.HEIGHT = 1;

			this.Base_gui.prepare_canvas();
			_config2.default.need_render = true;
		}

		/**
   * get painted area coords
   * 
   * @param {int} layer_id
   * @param {boolean} trim_white
   * @returns {object} keys: top, left, bottom, right, width, height, relative
   */

	}, {
		key: 'get_trim_info',
		value: function get_trim_info(layer_id, trim_white) {
			if (trim_white == undefined) {
				trim_white = false;
				if (_config2.default.TRANSPARENCY == false) {
					trim_white = true;
				}
			}
			var layer = this.Base_layers.get_layer(layer_id);

			var canvas = this.Base_layers.convert_layer_to_canvas(layer_id, null, false);
			var ctx = canvas.getContext("2d");
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var imgData = img.data;

			var top = 0;
			var left = 0;
			var bottom = 0;
			var right = 0;
			if (trim_white == undefined) trim_white = true;
			//check top
			main1: for (var y = 0; y < img.height; y++) {
				for (var x = 0; x < img.width; x++) {
					var k = y * (img.width * 4) + x * 4;
					if (imgData[k + 3] == 0) continue; //transparent 
					if (trim_white == true && imgData[k] == 255 && imgData[k + 1] == 255 && imgData[k + 2] == 255) continue; //white
					break main1;
				}
				top++;
			}
			//check left
			main2: for (var x = 0; x < img.width; x++) {
				for (var y = 0; y < img.height; y++) {
					var k = y * (img.width * 4) + x * 4;
					if (imgData[k + 3] == 0) continue; //transparent 
					if (trim_white == true && imgData[k] == 255 && imgData[k + 1] == 255 && imgData[k + 2] == 255) continue; //white
					break main2;
				}
				left++;
			}
			//check bottom
			main3: for (var y = img.height - 1; y >= 0; y--) {
				for (var x = img.width - 1; x >= 0; x--) {
					var k = y * (img.width * 4) + x * 4;
					if (imgData[k + 3] == 0) continue; //transparent 
					if (trim_white == true && imgData[k] == 255 && imgData[k + 1] == 255 && imgData[k + 2] == 255) continue; //white
					break main3;
				}
				bottom++;
			}
			//check right
			main4: for (var x = img.width - 1; x >= 0; x--) {
				for (var y = img.height - 1; y >= 0; y--) {
					var k = y * (img.width * 4) + x * 4;
					if (imgData[k + 3] == 0) continue; //transparent 
					if (trim_white == true && imgData[k] == 255 && imgData[k + 1] == 255 && imgData[k + 2] == 255) continue; //white
					break main4;
				}
				right++;
			}

			var top_rel = top - layer.y;
			var left_rel = left - layer.x;
			var bottom_rel = bottom - (_config2.default.HEIGHT - layer.y - layer.height);
			var right_rel = right - (_config2.default.WIDTH - layer.x - layer.width);

			return {
				top: top,
				left: left,
				bottom: bottom,
				right: right,
				width: canvas.width - left - right,
				height: canvas.height - top - bottom,
				relative: {
					top: top_rel,
					left: left_rel,
					bottom: bottom_rel,
					right: right_rel,
					width: canvas.width - left - right,
					height: canvas.height - top - bottom
				}
			};
		}
	}]);

	return Image_trim_class;
}();

exports.default = Image_trim_class;

/***/ }),

/***/ "./src/js/modules/image/zoom.js":
/*!**************************************!*\
  !*** ./src/js/modules/image/zoom.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _guiPreview = __webpack_require__(/*! ./../../core/gui/gui-preview.js */ "./src/js/core/gui/gui-preview.js");

var _guiPreview2 = _interopRequireDefault(_guiPreview);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Image_translate_class = function () {
	function Image_translate_class() {
		_classCallCheck(this, Image_translate_class);

		this.GUI_preview = new _guiPreview2.default();
	}

	_createClass(Image_translate_class, [{
		key: 'in',
		value: function _in() {
			this.GUI_preview.zoom(1);
		}
	}, {
		key: 'out',
		value: function out() {
			this.GUI_preview.zoom(-1);
		}
	}, {
		key: 'original',
		value: function original() {
			this.GUI_preview.zoom(100);
		}
	}, {
		key: 'auto',
		value: function auto() {
			this.GUI_preview.zoom_auto();
		}
	}]);

	return Image_translate_class;
}();

exports.default = Image_translate_class;

/***/ }),

/***/ "./src/js/modules/layer/clear.js":
/*!***************************************!*\
  !*** ./src/js/modules/layer/clear.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_clear_class = function () {
	function Layer_clear_class() {
		_classCallCheck(this, Layer_clear_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_clear_class, [{
		key: 'clear',
		value: function clear() {
			window.State.save();

			if (_config2.default.layer.type == 'image') {
				//clean image
				_config2.default.layer.link = null;
			}

			for (var i in _config2.default.layer) {
				//remove private attributes
				if (i[0] == '_') delete _config2.default.layer[i];
			}

			_config2.default.layer.x = 0;
			_config2.default.layer.y = 0;
			_config2.default.layer.width = 0;
			_config2.default.layer.height = 0;
			_config2.default.layer.visible = true;
			_config2.default.layer.opacity = 100;
			_config2.default.layer.composition = null;
			_config2.default.layer.rotate = 0;
			_config2.default.layer.data = null;
			_config2.default.layer.params = {};
			_config2.default.layer.status = null;
			_config2.default.layer.render_function = null;
			_config2.default.layer.type = null;

			_config2.default.need_render = true;
		}
	}]);

	return Layer_clear_class;
}();

exports.default = Layer_clear_class;

/***/ }),

/***/ "./src/js/modules/layer/composition.js":
/*!*********************************************!*\
  !*** ./src/js/modules/layer/composition.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_composition_class = function () {
	function Layer_composition_class() {
		_classCallCheck(this, Layer_composition_class);

		this.POP = new _popup2.default();
	}

	_createClass(Layer_composition_class, [{
		key: 'composition',
		value: function composition() {
			var compositions = ["-- Default --", "color", "color-burn", "color-dodge", "copy", "darken", "darker", "destination-atop", "destination-in", "destination-out", "destination-over", "difference", "exclusion", "hard-light", "hue", "lighten", "lighter", "luminosity", "multiply", "overlay", "saturation", "screen", "soft-light", "source-atop", "source-in", "source-out", "source-over", "xor"];

			var initial_composition = _config2.default.layer.composition;

			var settings = {
				title: 'Composition',
				//preview: true,
				params: [{ name: "composition", title: "Composition:", value: _config2.default.layer.composition, values: compositions }],
				on_change: function on_change(params, canvas_preview, w, h) {
					//redraw preview
					if (params.composition == '-- Default --') {
						params.composition = 'source-over';
					}
					_config2.default.layer.composition = params.composition;
					_config2.default.need_render = true;
				},
				on_finish: function on_finish(params) {
					_config2.default.layer.composition = initial_composition;
					window.State.save();
					if (params.composition == '-- Default --') {
						params.composition = 'source-over';
					}
					_config2.default.layer.composition = params.composition;
					_config2.default.need_render = true;
				}
			};
			this.POP.show(settings);
		}
	}]);

	return Layer_composition_class;
}();

exports.default = Layer_composition_class;

/***/ }),

/***/ "./src/js/modules/layer/delete.js":
/*!****************************************!*\
  !*** ./src/js/modules/layer/delete.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_delete_class = function () {
	function Layer_delete_class() {
		_classCallCheck(this, Layer_delete_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_delete_class, [{
		key: 'delete',
		value: function _delete() {
			window.State.save();
			this.Base_layers.delete(_config2.default.layer.id);
		}
	}]);

	return Layer_delete_class;
}();

exports.default = Layer_delete_class;

/***/ }),

/***/ "./src/js/modules/layer/differences.js":
/*!*********************************************!*\
  !*** ./src/js/modules/layer/differences.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_differences_class = function () {
	function Layer_differences_class() {
		_classCallCheck(this, Layer_differences_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_differences_class, [{
		key: 'differences',
		value: function differences() {
			var _this = this;
			if (this.Base_layers.find_previous(_config2.default.layer.id) == null) {
				_alertifyMin2.default.error('There are no layers behind.');
				return false;
			}

			var settings = {
				title: 'Differences',
				preview: true,
				params: [{ name: "sensitivity", title: "Sensitivity:", value: "0", range: [0, 255] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					_this.calc_differences(params.sensitivity, canvas_preview, w, h);
				},
				on_finish: function on_finish(params) {
					_this.calc_differences(params.sensitivity);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'calc_differences',
		value: function calc_differences(sensitivity, canvas_preview, w, h) {
			//create tmp canvas
			var canvas = document.createElement('canvas');
			canvas.width = _config2.default.WIDTH;
			canvas.height = _config2.default.HEIGHT;
			var ctx = canvas.getContext("2d");

			//get source data
			this.Base_layers.render_object(ctx, _config2.default.layer);
			var imgData1 = ctx.getImageData(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT).data;

			ctx.clearRect(0, 0, canvas.width, canvas.height);

			//get target data
			var next_layer = this.Base_layers.find_previous(_config2.default.layer.id);
			this.Base_layers.render_object(ctx, next_layer);
			var imgData2 = ctx.getImageData(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT).data;

			//prepare background
			ctx.rect(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT);
			ctx.fillStyle = "#ffffff";
			ctx.fill();

			//generate diff
			var img3 = ctx.getImageData(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT);
			var imgData3 = img3.data;
			for (var xx = 0; xx < _config2.default.WIDTH; xx++) {
				for (var yy = 0; yy < _config2.default.HEIGHT; yy++) {
					var x = (xx + yy * _config2.default.WIDTH) * 4;

					if (Math.abs(imgData1[x] - imgData2[x]) > sensitivity || Math.abs(imgData1[x + 1] - imgData2[x + 1]) > sensitivity || Math.abs(imgData1[x + 2] - imgData2[x + 2]) > sensitivity || Math.abs(imgData1[x + 3] - imgData2[x + 3]) > sensitivity) {
						imgData3[x] = 255;
						imgData3[x + 1] = 0;
						imgData3[x + 2] = 0;
						imgData3[x + 3] = 255;
					}
				}
			}
			ctx.putImageData(img3, 0, 0);

			//show
			if (canvas_preview == undefined) {
				//main
				window.State.save();
				var params = [];
				params.type = 'image';
				params.name = 'Differences';
				params.data = canvas.toDataURL("image/png");
				this.Base_layers.insert(params);
			} else {
				//preview
				canvas_preview.save();
				canvas_preview.scale(w / _config2.default.WIDTH, h / _config2.default.HEIGHT);
				canvas_preview.drawImage(canvas, 0, 0);
				canvas_preview.restore();
			}

			canvas.width = 1;
			canvas.height = 1;
		}
	}]);

	return Layer_differences_class;
}();

exports.default = Layer_differences_class;

/***/ }),

/***/ "./src/js/modules/layer/duplicate.js":
/*!*******************************************!*\
  !*** ./src/js/modules/layer/duplicate.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var instance = null;

var Layer_duplicate_class = function () {
	function Layer_duplicate_class() {
		_classCallCheck(this, Layer_duplicate_class);

		//singleton
		if (instance) {
			return instance;
		}
		instance = this;

		this.Base_layers = new _baseLayers2.default();

		this.set_events();
	}

	_createClass(Layer_duplicate_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 68) {
					//D - duplicate
					_this.duplicate();
					event.preventDefault();
				}
			}, false);
		}
	}, {
		key: 'duplicate',
		value: function duplicate() {
			window.State.save();

			var params = JSON.parse(JSON.stringify(_config2.default.layer));
			delete params.id;
			delete params.order;
			params.name = "Copy: " + params.name;
			if (params.x != 0 || params.y != 0 || params.width != _config2.default.WIDTH || params.height != _config2.default.HEIGHT) {
				params.x += 10;
				params.y += 10;
			}

			for (var i in params) {
				//remove private attributes
				if (i[0] == '_') delete params[i];
			}

			if (params.type == 'image') {
				//image
				params.link = _config2.default.layer.link.cloneNode(true);
			}

			this.Base_layers.insert(params);
		}
	}]);

	return Layer_duplicate_class;
}();

exports.default = Layer_duplicate_class;

/***/ }),

/***/ "./src/js/modules/layer/flatten.js":
/*!*****************************************!*\
  !*** ./src/js/modules/layer/flatten.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_flatten_class = function () {
	function Layer_flatten_class() {
		_classCallCheck(this, Layer_flatten_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_flatten_class, [{
		key: 'flatten',
		value: function flatten() {
			if (_config2.default.layers.length == 1) {
				_alertifyMin2.default.error('Needs at least 2 layers.');
				return;
			}

			window.State.save();

			//create tmp canvas
			var canvas = document.createElement('canvas');
			canvas.width = _config2.default.WIDTH;
			canvas.height = _config2.default.HEIGHT;
			var ctx = canvas.getContext("2d");

			var layers_sorted = this.Base_layers.get_sorted_layers();

			//paint layers
			for (var i = layers_sorted.length - 1; i >= 0; i--) {
				var layer = layers_sorted[i];

				ctx.globalAlpha = layer.opacity / 100;
				ctx.globalCompositeOperation = layer.composition;

				this.Base_layers.render_object(ctx, layer);
			}

			//create requested layer
			var params = [];
			params.type = 'image';
			params.name = 'Merged';
			params.data = canvas.toDataURL("image/png");
			this.Base_layers.insert(params);

			//remove all layers
			for (var i = _config2.default.layers.length - 1; i >= 0; i--) {
				if (_config2.default.layers[i].id == _config2.default.layer.id) continue;

				this.Base_layers.delete(_config2.default.layers[i].id);
			}

			canvas.width = 1;
			canvas.height = 1;
		}
	}]);

	return Layer_flatten_class;
}();

exports.default = Layer_flatten_class;

/***/ }),

/***/ "./src/js/modules/layer/merge.js":
/*!***************************************!*\
  !*** ./src/js/modules/layer/merge.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_merge_class = function () {
	function Layer_merge_class() {
		_classCallCheck(this, Layer_merge_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_merge_class, [{
		key: 'merge',
		value: function merge() {
			if (this.Base_layers.find_previous(_config2.default.layer.id) == null) {
				_alertifyMin2.default.error('There are no layers behind.');
				return false;
			}

			window.State.save();

			//create tmp canvas
			var canvas = document.createElement('canvas');
			canvas.width = _config2.default.WIDTH;
			canvas.height = _config2.default.HEIGHT;
			var ctx = canvas.getContext("2d");

			//first layer
			var previous_layer = this.Base_layers.find_previous(_config2.default.layer.id);
			var previous_id = previous_layer.id;
			ctx.globalAlpha = previous_layer.opacity / 100;
			ctx.globalCompositeOperation = previous_layer.composition;
			this.Base_layers.render_object(ctx, previous_layer);

			//second layer
			var current_id = _config2.default.layer.id;
			var current_order = _config2.default.layer.order;
			ctx.globalAlpha = _config2.default.layer.opacity / 100;
			ctx.globalCompositeOperation = _config2.default.layer.composition;
			this.Base_layers.render_object(ctx, _config2.default.layer);

			//create requested layer
			var params = [];
			params.type = 'image';
			params.name = _config2.default.layer.name + ' + merged';
			params.order = current_order;
			params.data = canvas.toDataURL("image/png");
			this.Base_layers.insert(params);

			//remove old layer
			this.Base_layers.delete(current_id);
			this.Base_layers.delete(previous_id);

			canvas.width = 1;
			canvas.height = 1;
		}
	}]);

	return Layer_merge_class;
}();

exports.default = Layer_merge_class;

/***/ }),

/***/ "./src/js/modules/layer/move.js":
/*!**************************************!*\
  !*** ./src/js/modules/layer/move.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_move_class = function () {
	function Layer_move_class() {
		_classCallCheck(this, Layer_move_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_move_class, [{
		key: 'up',
		value: function up() {
			window.State.save();
			this.Base_layers.move(_config2.default.layer.id, 1);
		}
	}, {
		key: 'down',
		value: function down() {
			window.State.save();
			this.Base_layers.move(_config2.default.layer.id, -1);
		}
	}]);

	return Layer_move_class;
}();

exports.default = Layer_move_class;

/***/ }),

/***/ "./src/js/modules/layer/new.js":
/*!*************************************!*\
  !*** ./src/js/modules/layer/new.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _guiTools = __webpack_require__(/*! ./../../core/gui/gui-tools.js */ "./src/js/core/gui/gui-tools.js");

var _guiTools2 = _interopRequireDefault(_guiTools);

var _baseSelection = __webpack_require__(/*! ./../../core/base-selection.js */ "./src/js/core/base-selection.js");

var _baseSelection2 = _interopRequireDefault(_baseSelection);

var _selection = __webpack_require__(/*! ./../../tools/selection.js */ "./src/js/tools/selection.js");

var _selection2 = _interopRequireDefault(_selection);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_new_class = function () {
	function Layer_new_class() {
		_classCallCheck(this, Layer_new_class);

		this.Base_layers = new _baseLayers2.default();
		this.Selection = new _selection2.default();
		this.Base_selection = new _baseSelection2.default(this.Base_layers.ctx);
		this.GUI_tools = new _guiTools2.default();

		this.set_events();
	}

	_createClass(Layer_new_class, [{
		key: 'set_events',
		value: function set_events() {
			var _this = this;

			document.addEventListener('keydown', function (event) {
				var code = event.keyCode;
				if (event.target.type == 'text' || event.target.tagName == 'INPUT' || event.target.type == 'textarea') return;

				if (code == 78 && event.ctrlKey != true && event.metaKey != true) {
					//N
					_this.new();
				}
			}, false);
		}
	}, {
		key: 'new',
		value: function _new() {
			window.State.save();
			this.Base_layers.insert();
		}
	}, {
		key: 'new_selection',
		value: function new_selection() {
			var selection = this.Base_selection.get_selection();
			var layer = _config2.default.layer;

			if (selection.width === null || _config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Empty selection or type not image.');
				return;
			}
			if (_config2.default.TOOL.name != 'selection') {
				_alertifyMin2.default.error('Empty selection or type not image.');
				return;
			}

			window.State.save();

			//if image was stretched
			var width_ratio = layer.width / layer.width_original;
			var height_ratio = layer.height / layer.height_original;

			var left = selection.x - layer.x;
			var top = selection.y - layer.y;

			//adapt to origin size
			selection.width = selection.width / width_ratio;
			selection.height = selection.height / height_ratio;

			//create new layer
			var canvas = document.createElement('canvas');
			var ctx = canvas.getContext("2d");
			canvas.width = Math.round(selection.width);
			canvas.height = Math.round(selection.height);

			ctx.translate(-left / width_ratio, -top / height_ratio);
			ctx.drawImage(_config2.default.layer.link, 0, 0);
			ctx.translate(0, 0);

			//register it
			var params = {
				x: Math.round(selection.x),
				y: Math.round(selection.y),
				width: Math.round(selection.width * width_ratio),
				height: Math.round(selection.height * height_ratio),
				width_original: Math.round(selection.width),
				height_original: Math.round(selection.height),
				type: 'image',
				data: canvas.toDataURL("image/png")
			};
			this.Base_layers.insert(params, false);

			this.Selection.on_leave();
			this.GUI_tools.activate_tool('select');
		}
	}]);

	return Layer_new_class;
}();

exports.default = Layer_new_class;

/***/ }),

/***/ "./src/js/modules/layer/raster.js":
/*!****************************************!*\
  !*** ./src/js/modules/layer/raster.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_raster_class = function () {
	function Layer_raster_class() {
		_classCallCheck(this, Layer_raster_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_raster_class, [{
		key: 'raster',
		value: function raster() {
			var canvas = this.Base_layers.convert_layer_to_canvas();
			var current_layer = _config2.default.layer;
			var current_id = current_layer.id;

			window.State.save();

			//show
			var params = {
				type: 'image',
				name: _config2.default.layer.name + ' + raster',
				data: canvas.toDataURL("image/png"),
				x: parseInt(canvas.dataset.x),
				y: parseInt(canvas.dataset.y),
				width: canvas.width,
				height: canvas.height,
				opacity: current_layer.opacity
			};
			this.Base_layers.insert(params, false);

			this.Base_layers.delete(current_id);
		}
	}]);

	return Layer_raster_class;
}();

exports.default = Layer_raster_class;

/***/ }),

/***/ "./src/js/modules/layer/rename.js":
/*!****************************************!*\
  !*** ./src/js/modules/layer/rename.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_rename_class = function () {
	function Layer_rename_class() {
		_classCallCheck(this, Layer_rename_class);

		this.Base_layers = new _baseLayers2.default();
		this.POP = new _popup2.default();
	}

	_createClass(Layer_rename_class, [{
		key: 'rename',
		value: function rename() {
			var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

			var _this = this;

			var settings = {
				title: 'Rename',
				params: [{ name: "name", title: "Name:", value: _config2.default.layer.name }],
				on_load: function on_load() {
					document.querySelector('#pop_data_name').select();
				},
				on_finish: function on_finish(params) {
					window.State.save();
					if (id == null) var link = _config2.default.layer;else var link = _this.Base_layers.get_layer(id);
					link.name = params.name;
					_this.Base_layers.refresh_gui();
					_config2.default.need_render = true;
				}
			};
			this.POP.show(settings);
		}
	}]);

	return Layer_rename_class;
}();

exports.default = Layer_rename_class;

/***/ }),

/***/ "./src/js/modules/layer/visibility.js":
/*!********************************************!*\
  !*** ./src/js/modules/layer/visibility.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Layer_visibility_class = function () {
	function Layer_visibility_class() {
		_classCallCheck(this, Layer_visibility_class);

		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Layer_visibility_class, [{
		key: 'toggle',
		value: function toggle() {
			window.State.save();
			this.Base_layers.toggle_visibility(_config2.default.layer.id);
		}
	}]);

	return Layer_visibility_class;
}();

exports.default = Layer_visibility_class;

/***/ }),

/***/ "./src/js/modules/tools/borders.js":
/*!*****************************************!*\
  !*** ./src/js/modules/tools/borders.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_borders_class = function () {
	function Tools_borders_class() {
		_classCallCheck(this, Tools_borders_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Tools_borders_class, [{
		key: 'borders',
		value: function borders() {
			var _this = this;

			var settings = {
				title: 'Borders',
				preview: true,
				on_change: function on_change(params, canvas_preview, w, h) {
					var target = Math.min(w, h);
					params.size = Math.round(target / 100 * params.size);
					_this.preview_borders(params, canvas_preview, w, h);
				},
				params: [{ name: "color", title: "Color:", value: _config2.default.COLOR, type: 'color' }, { name: "shadow", title: "Shadow:", value: false }, { name: "size", title: "Size:", value: "5", range: [1, 100] }],
				on_finish: function on_finish(params) {
					var target = Math.min(_config2.default.WIDTH, _config2.default.HEIGHT);
					params.size = Math.round(target / 100 * params.size);
					_this.add_borders(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'preview_borders',
		value: function preview_borders(params, ctx, width, height) {
			var size = params.size;
			var color = params.color;
			var color = params.color;

			ctx.save();
			ctx.lineWidth = size;
			if (params.shadow === true) {
				//with shadow
				ctx.beginPath();
				ctx.shadowColor = color;
				ctx.shadowBlur = size;
				ctx.rect(-size / 2, -size / 2, width + size, height + size);
				ctx.stroke();
				ctx.stroke();
				ctx.stroke();
			} else {
				ctx.strokeStyle = color;
				ctx.rect(0, 0, width, height);
				ctx.stroke();
			}
			ctx.restore();
		}
	}, {
		key: 'add_borders',
		value: function add_borders(params) {
			window.State.save();

			//create borders layer
			this.layer = {
				name: 'Borders',
				type: 'borders',
				render_function: ['borders', 'render'],
				params: { size: params.size, shadow: params.shadow },
				color: params.color,
				x: null,
				y: null,
				width: null,
				height: null,
				is_vector: true
			};
			this.Base_layers.insert(this.layer);
		}
	}]);

	return Tools_borders_class;
}();

exports.default = Tools_borders_class;

/***/ }),

/***/ "./src/js/modules/tools/color_to_alpha.js":
/*!************************************************!*\
  !*** ./src/js/modules/tools/color_to_alpha.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_colorToAlpha_class = function () {
	function Tools_colorToAlpha_class() {
		_classCallCheck(this, Tools_colorToAlpha_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(Tools_colorToAlpha_class, [{
		key: 'color_to_alpha',
		value: function color_to_alpha() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Color to alpha',
				preview: true,
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params.color);
					canvas_preview.putImageData(data, 0, 0);
				},
				params: [{ name: "color", title: "Color:", value: _config2.default.COLOR, type: 'color' }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.apply_affect(params.color);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'apply_affect',
		value: function apply_affect(color) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, color);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, color) {
			var imgData = data.data;
			var back_color = this.Helper.hex2rgb(color);

			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent

				//calculate difference from requested color, and change alpha
				var diff = Math.abs(imgData[i] - back_color.r) + Math.abs(imgData[i + 1] - back_color.g) + Math.abs(imgData[i + 2] - back_color.b) / 3;
				imgData[i + 3] = Math.round(diff);

				//combining 2 layers in future will change colors, so make changes to get same colors in final image
				//color_result = color_1 * (alpha_1 / 255) * (1 - A2 / 255) + color_2 * (alpha_2 / 255)
				//color_2 = (color_result - color_1 * (alpha_1 / 255) * (1 - A2 / 255)) / (alpha_2 / 255)
				imgData[i] = Math.ceil((imgData[i] - back_color.r * (1 - imgData[i + 3] / 255)) / (imgData[i + 3] / 255));
				imgData[i + 1] = Math.ceil((imgData[i + 1] - back_color.g * (1 - imgData[i + 3] / 255)) / (imgData[i + 3] / 255));
				imgData[i + 2] = Math.ceil((imgData[i + 2] - back_color.b * (1 - imgData[i + 3] / 255)) / (imgData[i + 3] / 255));
			}
			return data;
		}
	}]);

	return Tools_colorToAlpha_class;
}();

exports.default = Tools_colorToAlpha_class;

/***/ }),

/***/ "./src/js/modules/tools/color_zoom.js":
/*!********************************************!*\
  !*** ./src/js/modules/tools/color_zoom.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_colorZoom_class = function () {
	function Tools_colorZoom_class() {
		_classCallCheck(this, Tools_colorZoom_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Tools_colorZoom_class, [{
		key: 'color_zoom',
		value: function color_zoom() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Color zoom',
				preview: true,
				params: [{ name: "zoom", title: "Zoom:", value: "2", range: [2, 20] }, { name: "center", title: "Center:", value: "128", range: [0, 255] }],
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.change(img, params.zoom, params.center);
					canvas_preview.putImageData(data, 0, 0);
				},
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save_zoom(params.zoom, params.center);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save_zoom',
		value: function save_zoom(zoom, center) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.change(img, zoom, center);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(data, zoom, center) {
			var imgData = data.data;
			var grey;
			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent

				grey = Math.round(0.2126 * imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);

				for (var j = 0; j < 3; j++) {
					var k = i + j;
					if (grey > center) imgData[k] += (imgData[k] - center) * zoom;else if (grey < center) imgData[k] -= (center - imgData[k]) * zoom;
					if (imgData[k] < 0) imgData[k] = 0;
					if (imgData[k] > 255) imgData[k] = 255;
				}
			}
			return data;
		}
	}]);

	return Tools_colorZoom_class;
}();

exports.default = Tools_colorZoom_class;

/***/ }),

/***/ "./src/js/modules/tools/content_fill.js":
/*!**********************************************!*\
  !*** ./src/js/modules/tools/content_fill.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _trim = __webpack_require__(/*! ./../image/trim.js */ "./src/js/modules/image/trim.js");

var _trim2 = _interopRequireDefault(_trim);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_contentFill_class = function () {
	function Tools_contentFill_class() {
		_classCallCheck(this, Tools_contentFill_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Image_trim = new _trim2.default();
	}

	_createClass(Tools_contentFill_class, [{
		key: 'content_fill',
		value: function content_fill() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Content fill',
				preview: true,
				on_change: function on_change(params, canvas_preview, w, h, canvasElement) {
					canvas_preview.clearRect(0, 0, w, h);

					//create tmp canvas
					var canvas = document.createElement('canvas');
					canvas.width = _config2.default.WIDTH;
					canvas.height = _config2.default.HEIGHT;

					//change data
					_this.change(canvas, params);

					//add to preview
					canvas_preview.drawImage(canvas, 0, 0, w, h);
				},
				params: [{ name: "mode", title: "Mode:", values: ['Expand edges', 'Cloned edges', 'Resized as background'] }, { name: "blur_power", title: "Blur power:", value: 5, range: [1, 20] }, { name: "blur_h", title: "Horizontal blur:", value: 5, range: [0, 30] }, { name: "blur_v", title: "Vertical blur:", value: 5, range: [0, 30] }, { name: "clone_count", title: "Clone count:", value: 15, range: [10, 50] }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.apply_affect(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'apply_affect',
		value: function apply_affect(params) {
			//create tmp canvas
			var canvas = document.createElement('canvas');
			canvas.width = _config2.default.WIDTH;
			canvas.height = _config2.default.HEIGHT;

			//change data
			this.change(canvas, params);

			//save
			_config2.default.layer.x = 0;
			_config2.default.layer.y = 0;
			_config2.default.layer.width = _config2.default.WIDTH;
			_config2.default.layer.height = _config2.default.HEIGHT;
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'change',
		value: function change(canvas, params) {
			var ctx = canvas.getContext("2d");
			var mode = params.mode;

			//generate background
			if (mode == 'Expand edges') this.add_edge_background(canvas, params);else if (mode == 'Resized as background') this.add_resized_background(canvas, params);else if (mode == 'Cloned edges') this.add_cloned_background(canvas, params);

			//draw original image
			this.Base_layers.render_object(ctx, _config2.default.layer);
		}
	}, {
		key: 'add_edge_background',
		value: function add_edge_background(canvas, params) {
			var ctx = canvas.getContext("2d");
			var trim_info = this.Image_trim.get_trim_info(_config2.default.layer.id);
			var original = this.Base_layers.convert_layer_to_canvas();

			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(original, trim_info.left, trim_info.top);

			//draw top
			ctx.drawImage(original, 0, 0, original.width, 1, //source
			trim_info.left, 0, original.width, trim_info.top); //target

			//bottom
			ctx.drawImage(original, 0, original.height - 1, original.width, 1, trim_info.left, trim_info.top + original.height, original.width, canvas.height);

			//left
			ctx.drawImage(original, 0, 0, 1, original.height, 0, trim_info.top, trim_info.left, original.height);

			//right
			ctx.drawImage(original, original.width - 1, 0, 1, original.height, trim_info.left + original.width, trim_info.top, canvas.width, original.height);

			//fill corners

			//left top
			ctx.drawImage(original, 0, 0, 1, 1, 0, 0, trim_info.left, trim_info.top);

			//right top
			ctx.drawImage(original, original.width - 1, 0, 1, 1, trim_info.left + original.width, 0, canvas.width, trim_info.top);

			//left bottom
			ctx.drawImage(original, 0, original.height - 1, 1, 1, 0, trim_info.top + original.height, trim_info.left, trim_info.bottom);

			//right bottom
			ctx.drawImage(original, original.width - 1, original.height - 1, 1, 1, trim_info.left + original.width, trim_info.top + original.height, trim_info.right, trim_info.bottom);

			//add blur
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var blurred = _imagefilters2.default.BoxBlur(img, params.blur_h, params.blur_v, params.blur_power);
			ctx.putImageData(blurred, 0, 0);
		}
	}, {
		key: 'add_resized_background',
		value: function add_resized_background(canvas, params) {
			var ctx = canvas.getContext("2d");

			//draw original resized
			var original = this.Base_layers.convert_layer_to_canvas();
			ctx.drawImage(original, 0, 0, canvas.width, canvas.height);

			//add blur
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var blurred = _imagefilters2.default.BoxBlur(img, params.blur_h, params.blur_v, params.blur_power);
			ctx.putImageData(blurred, 0, 0);
		}
	}, {
		key: 'add_cloned_background',
		value: function add_cloned_background(canvas, params) {
			var blocks = params.clone_count;
			var ctx = canvas.getContext("2d");
			var trim_info = this.Image_trim.get_trim_info(_config2.default.layer.id);
			var original = this.Base_layers.convert_layer_to_canvas();

			ctx.clearRect(0, 0, canvas.width, canvas.height);
			ctx.drawImage(original, trim_info.left, trim_info.top);

			//top
			var bsize = Math.ceil(original.width / blocks);
			for (var i = 0; i < original.width; i = i + bsize) {
				for (var j = 0; j < trim_info.top; j = j + bsize) {
					ctx.drawImage(original, i, 0, bsize, bsize, trim_info.left + i, 0 + j, bsize, bsize);
				}
			}

			//bottom
			var bsize = Math.ceil(original.width / blocks);
			for (var i = 0; i < original.width; i = i + bsize) {
				for (var j = 0; j < canvas.height; j = j + bsize) {
					ctx.drawImage(original, i, original.height - bsize, bsize, bsize, trim_info.left + i, trim_info.top + original.height + j, bsize, bsize);
				}
			}

			//left
			var bsize = Math.ceil(original.height / blocks);
			for (var i = 0; i < trim_info.left; i = i + bsize) {
				for (var j = trim_info.top; j < trim_info.top + original.height; j = j + bsize) {
					ctx.drawImage(original, 0, j - trim_info.top, bsize, bsize, i, j, bsize, bsize);
				}
			}

			//right
			var bsize = Math.ceil(original.height / blocks);
			for (var i = trim_info.left + original.width; i < canvas.width; i = i + bsize) {
				for (var j = trim_info.top; j < trim_info.top + original.height; j = j + bsize) {
					ctx.drawImage(original, original.width - bsize, j - trim_info.top, bsize, bsize, i, j, bsize, bsize);
				}
			}

			//corners
			var bsize = Math.ceil(Math.min(original.width, original.height) / blocks);

			//top left
			for (var i = 0; i < trim_info.left; i = i + bsize) {
				for (var j = 0; j < trim_info.top; j = j + bsize) {
					ctx.drawImage(original, 0, 0, bsize, bsize, i, j, bsize, bsize);
				}
			}

			//top right
			for (var i = trim_info.left + original.width; i < canvas.width; i = i + bsize) {
				for (var j = 0; j < trim_info.top; j = j + bsize) {
					ctx.drawImage(original, original.width - bsize, 0, bsize, bsize, i, j, bsize, bsize);
				}
			}

			//bottom left
			for (var i = 0; i < trim_info.left; i = i + bsize) {
				for (var j = trim_info.top + original.height; j < canvas.height; j = j + bsize) {
					ctx.drawImage(original, 0, original.height - bsize, bsize, bsize, i, j, bsize, bsize);
				}
			}

			//bottom right
			for (var i = trim_info.left + original.width; i < canvas.width; i = i + bsize) {
				for (var j = trim_info.top + original.height; j < canvas.height; j = j + bsize) {
					ctx.drawImage(original, original.width - bsize, original.height - bsize, bsize, bsize, i, j, bsize, bsize);
				}
			}

			//add blur
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var blurred = _imagefilters2.default.BoxBlur(img, params.blur_h, params.blur_v, params.blur_power);
			ctx.putImageData(blurred, 0, 0);
		}
	}]);

	return Tools_contentFill_class;
}();

exports.default = Tools_contentFill_class;

/***/ }),

/***/ "./src/js/modules/tools/keypoints.js":
/*!*******************************************!*\
  !*** ./src/js/modules/tools/keypoints.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _imagefilters = __webpack_require__(/*! ./../../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * SIFT: scale-invariant-feature-transform, keypoints
 * 
 * @author ViliusL
 */
var Tools_keypoints_class = function () {
	function Tools_keypoints_class() {
		_classCallCheck(this, Tools_keypoints_class);

		this.Helper = new _helpers2.default();
		this.Base_layers = new _baseLayers2.default();
		this.ImageFilters = _imagefilters2.default;

		//contrast check, smaller - more points, better accuracy, but slower
		this.avg_offset = 50;

		/**
   * how much pixels to check for each side to get average
   */
		this.avg_step = 4;
	}

	//generate key points for image


	_createClass(Tools_keypoints_class, [{
		key: 'keypoints',
		value: function keypoints(return_data) {
			window.State.save();

			var W = _config2.default.WIDTH;
			var H = _config2.default.HEIGHT;

			//get canvas from layer
			var clone = this.Base_layers.convert_layer_to_canvas();
			var ctx = clone.getContext("2d");

			//get source data
			this.Base_layers.render_object(ctx, _config2.default.layer);

			//greyscale
			var imageData = ctx.getImageData(0, 0, W, H);
			var data = this.convert_to_grayscale(imageData);
			ctx.putImageData(data, 0, 0);

			//make few copies and blur each
			var n = 5;
			var copies = [];
			for (var i = 0; i < n; i++) {
				var tmp_canvas = document.createElement('canvas');
				tmp_canvas.width = W;
				tmp_canvas.height = H;
				var ctx_i = tmp_canvas.getContext("2d");
				ctx_i.drawImage(clone, 0, 0);

				//Gausian blur
				var imageData = ctx_i.getImageData(0, 0, W, H);
				var filtered = this.ImageFilters.GaussianBlur(imageData, i + 0.5); //add effect
				ctx_i.putImageData(filtered, 0, 0);

				copies.push(tmp_canvas);
			}

			//find extreme points
			var points = [];
			var n0 = this.avg_step * 2 + 1;
			for (var c = 1; c < copies.length - 1; c++) {
				var imageData = copies[c].getContext("2d").getImageData(0, 0, W, H).data;
				var imageData0 = copies[c - 1].getContext("2d").getImageData(0, 0, W, H).data;
				var imageData2 = copies[c + 1].getContext("2d").getImageData(0, 0, W, H).data;
				for (var j = this.avg_step; j < H - this.avg_step; j++) {
					for (var i = this.avg_step; i < W - this.avg_step; i++) {
						var x = (i + j * W) * 4;
						if (imageData[x + 3] == 0) continue; //transparent
						if (imageData[x] < imageData[x - 4] || imageData[x] < imageData[x + 4] || imageData[x] > imageData[x - 4] || imageData[x] > imageData[x + 4]) {
							var x_pre = (i + (j - 1) * W) * 4;
							var x_post = (i + (j + 1) * W) * 4;
							//calc average
							var area_average = 0;
							for (var l = -this.avg_step; l <= this.avg_step; l++) {
								var avgi = (i + (j - l) * W) * 4;
								for (var a = -this.avg_step; a <= this.avg_step; a++) {
									area_average += imageData[avgi + 4 * a];
								}
							}
							area_average = area_average / (n0 * n0);
							//max
							if (imageData[x] + this.avg_offset < area_average) {
								var min = Math.min(imageData[x_pre - 4], imageData[x_pre], imageData[x_pre + 4], imageData[x - 4], imageData[x + 4], imageData[x_post - 4], imageData[x_post], imageData[x_post + 4]);
								if (imageData[x] <= min) {
									var min0 = Math.min(imageData0[x_pre - 4], imageData0[x_pre], imageData0[x_pre + 4], imageData0[x - 4], imageData0[x + 4], imageData0[x_post - 4], imageData0[x_post], imageData0[x_post + 4]);
									if (imageData[x] <= min0) {
										var min2 = Math.min(imageData2[x_pre - 4], imageData2[x_pre], imageData2[x_pre + 4], imageData2[x - 4], imageData2[x + 4], imageData2[x_post - 4], imageData2[x_post], imageData2[x_post + 4]);
										if (imageData[x] <= min2) points.push({
											x: i,
											y: j,
											w: Math.round(area_average - imageData[x] - this.avg_offset)
										});
									}
								}
								continue;
							}
							//min
							if (imageData[x] - this.avg_offset > area_average) {
								var max = Math.max(imageData[x_pre - 4], imageData[x_pre], imageData[x_pre + 4], imageData[x - 4], imageData[x + 4], imageData[x_post - 4], imageData[x_post], imageData[x_post + 4]);
								if (imageData[x] >= max) {
									var max0 = Math.max(imageData0[x_pre - 4], imageData0[x_pre], imageData0[x_pre + 4], imageData0[x - 4], imageData0[x + 4], imageData0[x_post - 4], imageData0[x_post], imageData0[x_post + 4]);
									if (imageData[x] >= max0) {
										var max2 = Math.max(imageData2[x_pre - 4], imageData2[x_pre], imageData2[x_pre + 4], imageData2[x - 4], imageData2[x + 4], imageData2[x_post - 4], imageData2[x_post], imageData2[x_post + 4]);
										if (imageData[x] >= max2) {
											points.push({
												x: i,
												y: j,
												w: Math.round(imageData[x] - area_average - this.avg_offset)
											});
										}
									}
								}
							}
						}
					}
				}
			}
			//make unique
			for (var i = 0; i < points.length; i++) {
				for (var j = 0; j < points.length; j++) {
					if (i != j && points[i].x == points[j].x && points[i].y == points[j].y) {
						points.splice(i, 1);
						i--;
						break;
					}
				}
			}

			//show points?
			if (return_data === undefined || return_data !== true) {
				_alertifyMin2.default.success('key points: ' + points.length);

				var size = 3;
				ctx.clearRect(0, 0, clone.width, clone.height);
				ctx.fillStyle = "#ff0000";
				for (var i in points) {
					var point = points[i];
					ctx.beginPath();
					ctx.rect(point.x - Math.floor(size / 2) + 1, point.y - Math.floor(size / 2) + 1, size, size);
					ctx.fill();
				}

				//show
				var params = [];
				params.type = 'image';
				params.name = _config2.default.layer.name + ' + key points';
				params.data = clone.toDataURL("image/png");
				params.x = parseInt(clone.dataset.x);
				params.y = parseInt(clone.dataset.y);
				params.width = clone.width;
				params.height = clone.height;
				this.Base_layers.insert(params);

				clone.width = 1;
				clone.height = 1;
			} else {
				//sort by weights 
				points.sort(function (a, b) {
					return parseFloat(b.w) - parseFloat(a.w);
				});

				clone.width = 1;
				clone.height = 1;

				return {
					points: points
				};
			}
		}

		//returns average value of requested area from greyscale image
		//area = {x, y, w, h}

	}, {
		key: 'get_area_average',
		value: function get_area_average(area, imageData, i, j, size) {
			var imgData = imageData.data;
			var sum = 0;
			var n = 0;
			size = size / 100; //prepare to use 1-100% values
			var stop_x = i + Math.round(size * area.x) + Math.round(size * area.w);
			var stop_y = j + Math.round(size * area.y) + Math.round(size * area.h);
			var img_width4 = imageData.width * 4;
			var k0, k;
			for (var y = j + Math.round(size * area.y); y < stop_y; y++) {
				k0 = y * img_width4;
				for (var x = i + Math.round(size * area.x); x < stop_x; x++) {
					k = k0 + x * 4;
					sum = sum + imgData[k];
					n++;
				}
			}
			return Math.round(sum / n);
		}
	}, {
		key: 'convert_to_grayscale',
		value: function convert_to_grayscale(data) {
			var imgData = data.data;
			var grey;

			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent
				grey = Math.round(0.2126 * imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);
				imgData[i] = grey;
				imgData[i + 1] = grey;
				imgData[i + 2] = grey;
			}
			return data;
		}
	}]);

	return Tools_keypoints_class;
}();

exports.default = Tools_keypoints_class;

/***/ }),

/***/ "./src/js/modules/tools/replace_color.js":
/*!***********************************************!*\
  !*** ./src/js/modules/tools/replace_color.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_replaceColor_class = function () {
	function Tools_replaceColor_class() {
		_classCallCheck(this, Tools_replaceColor_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(Tools_replaceColor_class, [{
		key: 'replace_color',
		value: function replace_color() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Replace color',
				preview: true,
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.do_replace(img, params);
					canvas_preview.putImageData(data, 0, 0);
				},
				params: [{ name: "target", title: "Target:", value: _config2.default.COLOR, type: 'color' }, { name: "replacement", title: "Replacement:", value: '#ff0000', type: 'color' }, { name: "power", title: "Power:", value: "20", range: [0, 255] }, { name: "alpha", title: "Alpha:", value: "255", range: [0, 255] }, { name: "mode", title: "Mode:", values: ['Advanced', 'Simple'] }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save_alpha(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save_alpha',
		value: function save_alpha(params) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.do_replace(img, params);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'do_replace',
		value: function do_replace(data, params) {
			var target = params.target;
			var replacement = params.replacement;
			var power = params.power;
			var alpha = params.alpha;
			var mode = params.mode;

			var imgData = data.data;
			var target_rgb = this.Helper.hex2rgb(target);
			var target_hsl = this.Helper.rgbToHsl(target_rgb.r, target_rgb.g, target_rgb.b);
			var target_normalized = this.Helper.hslToRgb(target_hsl.h, target_hsl.s, 0.5);

			var replacement_rgb = this.Helper.hex2rgb(replacement);
			var replacement_hsl = this.Helper.rgbToHsl(replacement_rgb.r, replacement_rgb.g, replacement_rgb.b);

			for (var i = 0; i < imgData.length; i += 4) {
				if (imgData[i + 3] == 0) continue; //transparent

				if (mode == 'Simple') {
					//simple replace

					//calculate difference from requested color, and change alpha
					var diff = (Math.abs(imgData[i] - target_rgb.r) + Math.abs(imgData[i + 1] - target_rgb.g) + Math.abs(imgData[i + 2] - target_rgb.b)) / 3;
					if (diff > power) continue;

					imgData[i] = replacement_rgb.r;
					imgData[i + 1] = replacement_rgb.g;
					imgData[i + 2] = replacement_rgb.b;
					if (alpha < 255) imgData[i + 3] = alpha;
				} else {
					//advanced replace using HSL

					var hsl = this.Helper.rgbToHsl(imgData[i], imgData[i + 1], imgData[i + 2]);
					var normalized = this.Helper.hslToRgb(hsl.h, hsl.s, 0.5);
					var diff = (Math.abs(normalized[0] - target_normalized[0]) + Math.abs(normalized[1] - target_normalized[1]) + Math.abs(normalized[2] - target_normalized[2])) / 3;
					if (diff > power) continue;

					//change to new color with existing luminance
					var normalized_final = this.Helper.hslToRgb(replacement_hsl.h, replacement_hsl.s, hsl.l * replacement_hsl.l);

					imgData[i] = normalized_final[0];
					imgData[i + 1] = normalized_final[1];
					imgData[i + 2] = normalized_final[2];
					if (alpha < 255) imgData[i + 3] = alpha;
				}
			}
			return data;
		}
	}]);

	return Tools_replaceColor_class;
}();

exports.default = Tools_replaceColor_class;

/***/ }),

/***/ "./src/js/modules/tools/restore_alpha.js":
/*!***********************************************!*\
  !*** ./src/js/modules/tools/restore_alpha.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_restoreAlpha_class = function () {
	function Tools_restoreAlpha_class() {
		_classCallCheck(this, Tools_restoreAlpha_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
	}

	_createClass(Tools_restoreAlpha_class, [{
		key: 'restore_alpha',
		value: function restore_alpha() {
			var _this = this;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			var settings = {
				title: 'Restore alpha',
				preview: true,
				on_change: function on_change(params, canvas_preview, w, h) {
					var img = canvas_preview.getImageData(0, 0, w, h);
					var data = _this.recover_alpha(img, params.level);
					canvas_preview.putImageData(data, 0, 0);
				},
				params: [{ name: "level", title: "Level:", value: "128", range: [0, 255] }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.save_alpha(params.level);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save_alpha',
		value: function save_alpha(level) {
			//get canvas from layer
			var canvas = this.Base_layers.convert_layer_to_canvas(null, true);
			var ctx = canvas.getContext("2d");

			//change data
			var img = ctx.getImageData(0, 0, canvas.width, canvas.height);
			var data = this.recover_alpha(img, level);
			ctx.putImageData(data, 0, 0);

			//save
			this.Base_layers.update_layer_image(canvas);
		}
	}, {
		key: 'recover_alpha',
		value: function recover_alpha(data, level) {
			var imgData = data.data;
			var tmp;
			level = parseInt(level);
			for (var i = 0; i < imgData.length; i += 4) {
				tmp = imgData[i + 3] + level;
				if (tmp > 255) {
					tmp = 255;
				}
				imgData[i + 3] = tmp;
			}
			return data;
		}
	}]);

	return Tools_restoreAlpha_class;
}();

exports.default = Tools_restoreAlpha_class;

/***/ }),

/***/ "./src/js/modules/tools/settings.js":
/*!******************************************!*\
  !*** ./src/js/modules/tools/settings.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _helpers = __webpack_require__(/*! ./../../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_settings_class = function () {
	function Tools_settings_class() {
		_classCallCheck(this, Tools_settings_class);

		this.Base_gui = new _baseGui2.default();
		this.POP = new _popup2.default();
		this.Helper = new _helpers2.default();
	}

	_createClass(Tools_settings_class, [{
		key: 'settings',
		value: function settings() {
			var _this = this;

			//transparency
			var transparency_cookie = this.Helper.getCookie('transparency');
			if (transparency_cookie === null) {
				//default
				transparency_cookie = false;
			}
			if (transparency_cookie) {
				var transparency = true;
			} else {
				var transparency = false;
			}

			//resolution
			var save_resolution_cookie = this.Helper.getCookie('save_resolution');
			if (save_resolution_cookie) {
				var save_resolution = true;
			} else {
				var save_resolution = false;
			}

			//theme
			var theme_cookie = this.Helper.getCookie('theme');
			if (theme_cookie) {
				var theme = theme_cookie;
			} else {
				var theme = _config2.default.themes[0];
			}

			var t_values = ['squares', 'green', 'grey'];

			var settings = {
				title: 'Settings',
				params: [{ name: "transparency", title: "Transparent:", value: transparency }, { name: "transparency_type", title: "Transparency background:",
					value: _config2.default.TRANSPARENCY_TYPE, values: t_values }, { name: "theme", title: "Theme", values: _config2.default.themes, value: theme }, { name: "save_resolution", title: "Save resolution:", value: save_resolution }],
				on_change: function on_change(params) {
					this.Base_gui.change_theme(params.theme);
				},
				on_cancel: function on_cancel(params) {
					this.Base_gui.change_theme(theme);
				},
				on_finish: function on_finish(params) {
					_this.save_values(params);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'save_values',
		value: function save_values(params) {
			var save_resolution = params.save_resolution;
			var transparency = params.transparency;
			var theme = params.theme;

			//save_resolution
			if (save_resolution) {
				this.Helper.setCookie('save_resolution', 1);
			} else {
				this.Helper.setCookie('save_resolution', 0);
			}

			//transparency
			if (transparency) {
				this.Helper.setCookie('transparency', 1);
				_config2.default.TRANSPARENCY = true;
			} else {
				this.Helper.setCookie('transparency', 0);
				_config2.default.TRANSPARENCY = false;
			}

			//save theme
			this.Helper.setCookie('theme', theme);
			this.Base_gui.change_theme(theme);

			//transparency_type
			_config2.default.TRANSPARENCY_TYPE = params.transparency_type;
			this.Helper.setCookie('transparency_type', _config2.default.TRANSPARENCY_TYPE);

			this.Base_gui.prepare_canvas();
			_config2.default.need_render = true;
		}
	}]);

	return Tools_settings_class;
}();

exports.default = Tools_settings_class;

/***/ }),

/***/ "./src/js/modules/tools/sprites.js":
/*!*****************************************!*\
  !*** ./src/js/modules/tools/sprites.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseLayers = __webpack_require__(/*! ./../../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _popup = __webpack_require__(/*! ./../../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

var _alertifyMin = __webpack_require__(/*! ./../../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _trim = __webpack_require__(/*! ./../image/trim.js */ "./src/js/modules/image/trim.js");

var _trim2 = _interopRequireDefault(_trim);

var _baseGui = __webpack_require__(/*! ./../../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tools_sprites_class = function () {
	function Tools_sprites_class() {
		_classCallCheck(this, Tools_sprites_class);

		this.POP = new _popup2.default();
		this.Base_layers = new _baseLayers2.default();
		this.Image_trim = new _trim2.default();
		this.Base_gui = new _baseGui2.default();
	}

	_createClass(Tools_sprites_class, [{
		key: 'sprites',
		value: function sprites() {
			var _this = this;

			var settings = {
				title: 'Sprites',
				params: [{ name: "gap", title: "Gap:", value: "50", values: ["0", "10", "50", "100"] }, { name: "width", title: "Width:", value: _config2.default.WIDTH }],
				on_finish: function on_finish(params) {
					window.State.save();
					_this.generate_sprites(params.gap, params.width);
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'generate_sprites',
		value: function generate_sprites(gap, sprite_width) {
			gap = parseInt(gap);
			sprite_width = parseInt(sprite_width);

			if (_config2.default.layers.length == 1) {
				_alertifyMin2.default.error('There is only 1 layer.');
				return false;
			}
			if (sprite_width < _config2.default.WIDTH) {
				_alertifyMin2.default.error('New width can not be smaller then current width');
				return false;
			}

			var xx = 0;
			var yy = 0;
			var max_height = 0;
			var W = sprite_width;
			var H = _config2.default.HEIGHT;

			//prepare width
			_config2.default.WIDTH = parseInt(sprite_width);
			this.Base_gui.prepare_canvas();

			//collect trim info
			var trim_details_array = [];
			for (var i = 0; i < _config2.default.layers.length; i++) {
				var layer = _config2.default.layers[i];
				if (layer.visible == false) continue;

				trim_details_array[layer.id] = this.Image_trim.get_trim_info(layer.id);
			}

			//move layers
			for (var i = 0; i < _config2.default.layers.length; i++) {
				var layer = _config2.default.layers[i];
				if (layer.visible == false) continue;

				var trim_details = trim_details_array[layer.id];
				if (_config2.default.WIDTH == trim_details.left) {
					//empty layer
					continue;
				}
				var width = W - trim_details.left - trim_details.right;
				var height = H - trim_details.top - trim_details.bottom;

				if (xx + width > sprite_width) {
					xx = 0;
					yy += max_height;
					max_height = 0;
				}
				if (yy % gap > 0 && gap > 0) {
					yy = yy - yy % gap + gap;
				}
				if (yy + height > _config2.default.HEIGHT) {
					_config2.default.HEIGHT = parseInt(yy + height);
					this.Base_gui.prepare_canvas();
				}

				layer.x = layer.x + xx - trim_details.left;
				layer.y = layer.y + yy - trim_details.top;

				xx += width;
				if (gap > 0) {
					xx = xx - xx % gap + gap;
				}

				if (height > max_height) {
					max_height = height;
				}
				if (xx > sprite_width) {
					xx = 0;
					yy += max_height;
					max_height = 0;
				}
			}

			_config2.default.need_render = true;
		}
	}]);

	return Tools_sprites_class;
}();

exports.default = Tools_sprites_class;

/***/ }),

/***/ "./src/js/tools sync recursive \\.js$":
/*!*********************************!*\
  !*** ./src/js/tools sync \.js$ ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./animation.js": "./src/js/tools/animation.js",
	"./blur.js": "./src/js/tools/blur.js",
	"./borders.js": "./src/js/tools/borders.js",
	"./brush.js": "./src/js/tools/brush.js",
	"./bulge_pinch.js": "./src/js/tools/bulge_pinch.js",
	"./circle.js": "./src/js/tools/circle.js",
	"./clone.js": "./src/js/tools/clone.js",
	"./crop.js": "./src/js/tools/crop.js",
	"./desaturate.js": "./src/js/tools/desaturate.js",
	"./erase.js": "./src/js/tools/erase.js",
	"./fill.js": "./src/js/tools/fill.js",
	"./gradient.js": "./src/js/tools/gradient.js",
	"./line.js": "./src/js/tools/line.js",
	"./magic_wand.js": "./src/js/tools/magic_wand.js",
	"./media.js": "./src/js/tools/media.js",
	"./pencil.js": "./src/js/tools/pencil.js",
	"./pick_color.js": "./src/js/tools/pick_color.js",
	"./rectangle.js": "./src/js/tools/rectangle.js",
	"./select.js": "./src/js/tools/select.js",
	"./selection.js": "./src/js/tools/selection.js",
	"./sharpen.js": "./src/js/tools/sharpen.js",
	"./text.js": "./src/js/tools/text.js"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./src/js/tools sync recursive \\.js$";

/***/ }),

/***/ "./src/js/tools/animation.js":
/*!***********************************!*\
  !*** ./src/js/tools/animation.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _guiTools = __webpack_require__(/*! ./../core/gui/gui-tools.js */ "./src/js/core/gui/gui-tools.js");

var _guiTools2 = _interopRequireDefault(_guiTools);

var _baseGui = __webpack_require__(/*! ./../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _baseSelection = __webpack_require__(/*! ./../core/base-selection.js */ "./src/js/core/base-selection.js");

var _baseSelection2 = _interopRequireDefault(_baseSelection);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var instance = null;

var Animation_class = function (_Base_tools_class) {
	_inherits(Animation_class, _Base_tools_class);

	function Animation_class(ctx) {
		_classCallCheck(this, Animation_class);

		var _this2 = _possibleConstructorReturn(this, (Animation_class.__proto__ || Object.getPrototypeOf(Animation_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.GUI_tools = new _guiTools2.default();
		_this2.Base_gui = new _baseGui2.default();
		_this2.name = 'animation';
		_this2.intervalID = null;
		_this2.index = 0;

		_this2.disable_selection(ctx);
		return _this2;
	}

	_createClass(Animation_class, [{
		key: 'load',
		value: function load() {
			//nothing
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {}
		//nothing


		/**
   * disable_selection
   */

	}, {
		key: 'disable_selection',
		value: function disable_selection(ctx) {
			var sel_config = {
				enable_background: false,
				enable_borders: false,
				enable_controls: false,
				data_function: function data_function() {
					return null;
				}
			};
			this.Base_selection = new _baseSelection2.default(ctx, sel_config, this.name);
		}
	}, {
		key: 'on_params_update',
		value: function on_params_update() {
			var params = this.getParams();
			if (_config2.default.layers.length == 1) {
				_alertifyMin2.default.error('Can not animate 1 layer.');
				return;
			}

			if (params.play == true) {
				this.start(params.delay);
			} else {
				this.stop();
			}
		}
	}, {
		key: 'on_leave',
		value: function on_leave() {
			this.stop();
		}
	}, {
		key: 'start',
		value: function start(delay) {
			var _this = this;
			delay = parseInt(delay);
			if (delay < 0) delay = 50;

			this.intervalID = window.setInterval(function () {
				_this.play(_this);
			}, delay);
		}
	}, {
		key: 'stop',
		value: function stop() {
			var params = this.getParams();
			if (this.intervalID == null) return;

			clearInterval(this.intervalID);
			params.play = false;
			this.index = 0;
			this.GUI_tools.show_action_attributes();

			//make all visible
			for (var i in _config2.default.layers) {
				_config2.default.layers[i].visible = true;
			}

			this.Base_gui.GUI_layers.render_layers();
			_config2.default.need_render = true;
		}
	}, {
		key: 'play',
		value: function play(_this) {

			for (var i in _config2.default.layers) {
				_config2.default.layers[i].visible = false;
			}

			//show 1
			if (_config2.default.layers[this.index] != undefined) {
				_this.Base_layers.toggle_visibility(_config2.default.layers[this.index].id);
			}

			//change index
			if (_config2.default.layers[this.index + 1] != undefined) {
				this.index++;
			} else {
				this.index = 0;
			}
		}
	}]);

	return Animation_class;
}(_baseTools2.default);

;
exports.default = Animation_class;

/***/ }),

/***/ "./src/js/tools/blur.js":
/*!******************************!*\
  !*** ./src/js/tools/blur.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _imagefilters = __webpack_require__(/*! ./../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Blur_class = function (_Base_tools_class) {
	_inherits(Blur_class, _Base_tools_class);

	function Blur_class(ctx) {
		_classCallCheck(this, Blur_class);

		var _this2 = _possibleConstructorReturn(this, (Blur_class.__proto__ || Object.getPrototypeOf(Blur_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Helper = new _helpers2.default();
		_this2.ctx = ctx;
		_this2.name = 'blur';
		_this2.tmpCanvas = null;
		_this2.tmpCanvasCtx = null;
		_this2.started = false;
		return _this2;
	}

	_createClass(Blur_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			_this.show_mouse_cursor(mouse.x, mouse.y, params.size, 'circle');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			this.started = false;
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}
			this.started = true;
			window.State.save();

			//get canvas from layer
			this.tmpCanvas = document.createElement('canvas');
			this.tmpCanvasCtx = this.tmpCanvas.getContext("2d");
			this.tmpCanvas.width = _config2.default.layer.width_original;
			this.tmpCanvas.height = _config2.default.layer.height_original;
			this.tmpCanvasCtx.drawImage(_config2.default.layer.link, 0, 0);

			//do blur
			this.blur_general('click', mouse, params.size, params.strength);

			//register tmp canvas for faster redraw
			_config2.default.layer.link_canvas = this.tmpCanvas;
			_config2.default.need_render = true;
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (this.started == false) {
				return;
			}

			//do blur
			this.blur_general('move', mouse, params.size, params.strength);

			//draw draft preview
			_config2.default.need_render = true;
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			if (this.started == false) {
				return;
			}
			delete _config2.default.layer.link_canvas;

			this.Base_layers.update_layer_image(this.tmpCanvas);

			//decrease memory
			this.tmpCanvas.width = 1;
			this.tmpCanvas.height = 1;
			this.tmpCanvas = null;
			this.tmpCanvasCtx = null;
		}
	}, {
		key: 'blur_general',
		value: function blur_general(type, mouse, size, strength) {
			var ctx = this.tmpCanvasCtx;
			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');
			var size_w = this.adaptSize(size, 'width');
			var size_h = this.adaptSize(size, 'height');

			//find center
			var center_x = mouse_x - Math.round(size_w / 2);
			var center_y = mouse_y - Math.round(size_h / 2);

			//convert float coords to integers
			center_x = Math.round(center_x);
			center_y = Math.round(center_y);
			mouse_x = Math.round(mouse_x);
			mouse_y = Math.round(mouse_y);

			if (type == 'move') {
				strength = strength / 2;
				if (strength < 1) strength = 1;
			}

			var imageData = ctx.getImageData(center_x, center_y, size_w, size_h);
			var filtered = _imagefilters2.default.StackBlur(imageData, strength); //add effect
			this.Helper.image_round(this.tmpCanvasCtx, mouse_x, mouse_y, size_w, size_h, filtered);
		}
	}]);

	return Blur_class;
}(_baseTools2.default);

exports.default = Blur_class;

/***/ }),

/***/ "./src/js/tools/borders.js":
/*!*********************************!*\
  !*** ./src/js/tools/borders.js ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Borders_class = function (_Base_tools_class) {
	_inherits(Borders_class, _Base_tools_class);

	function Borders_class(ctx) {
		_classCallCheck(this, Borders_class);

		var _this = _possibleConstructorReturn(this, (Borders_class.__proto__ || Object.getPrototypeOf(Borders_class)).call(this));

		_this.Base_layers = new _baseLayers2.default();
		_this.ctx = ctx;
		_this.name = 'borders';
		_this.layer = {};
		return _this;
	}

	_createClass(Borders_class, [{
		key: 'load',
		value: function load() {
			//nothing
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			var params = layer.params;
			var size = params.size;
			var width = parseInt(_config2.default.WIDTH);
			var height = parseInt(_config2.default.HEIGHT);

			ctx.save();

			//set styles
			ctx.strokeStyle = layer.color;
			ctx.lineWidth = size;

			if (params.shadow === true) {
				//with shadow
				ctx.beginPath();
				ctx.shadowColor = layer.color;
				ctx.shadowBlur = size * _config2.default.ZOOM;
				ctx.rect(-size / 2, -size / 2, width + size, height + size);
				ctx.stroke();
				ctx.stroke();
				ctx.stroke();
			} else {
				ctx.beginPath();
				ctx.rect(0, 0, width, height);
				ctx.stroke();
			}
			ctx.restore();
		}
	}]);

	return Borders_class;
}(_baseTools2.default);

;
exports.default = Borders_class;

/***/ }),

/***/ "./src/js/tools/brush.js":
/*!*******************************!*\
  !*** ./src/js/tools/brush.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Brush_class = function (_Base_tools_class) {
	_inherits(Brush_class, _Base_tools_class);

	function Brush_class(ctx) {
		_classCallCheck(this, Brush_class);

		var _this2 = _possibleConstructorReturn(this, (Brush_class.__proto__ || Object.getPrototypeOf(Brush_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.name = 'brush';
		_this2.layer = {};
		_this2.params_hash = false;
		return _this2;
	}

	_createClass(Brush_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			_this.show_mouse_cursor(mouse.x, mouse.y, params.size, 'circle');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) return;

			window.State.save();

			var params_hash = this.get_params_hash();

			if (_config2.default.layer.type != this.name || params_hash != this.params_hash) {
				//register new object - current layer is not ours or params changed
				this.layer = {
					type: this.name,
					data: [],
					params: this.clone(this.getParams()),
					status: 'draft',
					render_function: [this.name, 'render'],
					width: null,
					height: null,
					rotate: null,
					is_vector: true
				};
				this.Base_layers.insert(this.layer);
				this.params_hash = params_hash;
			} else {
				//continue adding layer data, just register break
				_config2.default.layer.data.push(null);
			}
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			var max_speed = 20;
			var power = 2; //how speed affects size
			var params = this.getParams();

			//detect line size
			var size = params.size;
			var new_size = size;
			if (params.smart_brush == true) {
				new_size = size + size / max_speed * mouse.speed_average * power;
				new_size = Math.max(new_size, size / 4);
				new_size = Math.round(new_size);
			}

			//more data
			_config2.default.layer.data.push([mouse.x - _config2.default.layer.x, mouse.y - _config2.default.layer.y, new_size]);
			this.Base_layers.render();
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) {
				_config2.default.layer.status = null;
				return;
			}

			//more data
			_config2.default.layer.data.push([mouse.x - _config2.default.layer.x, mouse.y - _config2.default.layer.y]);
			_config2.default.layer.status = null;
			this.Base_layers.render();
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			if (layer.data.length == 0) return;

			var params = layer.params;
			var size = params.size;

			//set styles
			ctx.fillStyle = layer.color;
			ctx.strokeStyle = layer.color;
			ctx.lineWidth = params.size;
			ctx.lineCap = 'round';

			ctx.translate(layer.x, layer.y);

			//draw
			var data = layer.data;
			var n = data.length;
			var size = params.size;
			ctx.beginPath();
			ctx.moveTo(data[0][0], data[0][1]);
			for (var i = 1; i < n; i++) {
				if (data[i] === null) {
					//break
					ctx.beginPath();
				} else {
					//line
					ctx.lineWidth = data[i][2];

					if (data[i - 1] == null) {
						//exception - point
						ctx.arc(data[i][0], data[i][1], size / 2, 0, 2 * Math.PI, false);
						ctx.fill();
					} else {
						//lines
						ctx.lineWidth = data[i][2];
						ctx.beginPath();
						ctx.moveTo(data[i - 1][0], data[i - 1][1]);
						ctx.lineTo(data[i][0], data[i][1]);
						ctx.stroke();
					}
				}
			}
			if (n == 1 || data[1] == null) {
				//point
				ctx.beginPath();
				ctx.arc(data[0][0], data[0][1], size / 2, 0, 2 * Math.PI, false);
				ctx.fill();
			}

			ctx.translate(-layer.x, -layer.y);
		}
	}]);

	return Brush_class;
}(_baseTools2.default);

;

exports.default = Brush_class;

/***/ }),

/***/ "./src/js/tools/bulge_pinch.js":
/*!*************************************!*\
  !*** ./src/js/tools/bulge_pinch.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _glfx = __webpack_require__(/*! ./../libs/glfx.js */ "./src/js/libs/glfx.js");

var _glfx2 = _interopRequireDefault(_glfx);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var BulgePinch_class = function (_Base_tools_class) {
	_inherits(BulgePinch_class, _Base_tools_class);

	function BulgePinch_class(ctx) {
		_classCallCheck(this, BulgePinch_class);

		var _this2 = _possibleConstructorReturn(this, (BulgePinch_class.__proto__ || Object.getPrototypeOf(BulgePinch_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.fx_filter = false;
		_this2.Helper = new _helpers2.default();
		_this2.ctx = ctx;
		_this2.name = 'bulge_pinch';
		_this2.tmpCanvas = null;
		_this2.tmpCanvasCtx = null;
		_this2.started = false;
		return _this2;
	}

	_createClass(BulgePinch_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			_this.show_mouse_cursor(mouse.x, mouse.y, params.radius, 'circle');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			this.started = false;
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			this.started = true;
			window.State.save();

			//get canvas from layer
			this.tmpCanvas = document.createElement('canvas');
			this.tmpCanvasCtx = this.tmpCanvas.getContext("2d");
			this.tmpCanvas.width = _config2.default.layer.width_original;
			this.tmpCanvas.height = _config2.default.layer.height_original;
			this.tmpCanvasCtx.drawImage(_config2.default.layer.link, 0, 0);

			//apply
			this.bulgePinch_general(mouse, params.power, params.radius, params.bulge);

			//register tmp canvas for faster redraw
			_config2.default.layer.link_canvas = this.tmpCanvas;
			_config2.default.need_render = true;
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			if (this.started == false) {
				return;
			}
			delete _config2.default.layer.link_canvas;

			this.Base_layers.update_layer_image(this.tmpCanvas);

			//decrease memory
			this.tmpCanvas.width = 1;
			this.tmpCanvas.height = 1;
			this.tmpCanvas = null;
			this.tmpCanvasCtx = null;
		}
	}, {
		key: 'bulgePinch_general',
		value: function bulgePinch_general(mouse, power, radius, bulge) {
			if (this.fx_filter == false) {
				//init glfx lib
				this.fx_filter = _glfx2.default.canvas();
			}

			var ctx = this.tmpCanvasCtx;
			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');

			//convert float coords to integers
			mouse_x = Math.round(mouse_x);
			mouse_y = Math.round(mouse_y);

			power = power / 100;
			if (power > 1) {
				//max 100%
				power = 1;
			}

			if (bulge == false) power = -1 * power;

			var texture = this.fx_filter.texture(this.tmpCanvas);
			this.fx_filter.draw(texture).bulgePinch(mouse_x, mouse_y, radius, power).update(); //effect
			this.tmpCanvasCtx.clearRect(0, 0, this.tmpCanvas.width, this.tmpCanvas.height);
			this.tmpCanvasCtx.drawImage(this.fx_filter, 0, 0);
		}
	}]);

	return BulgePinch_class;
}(_baseTools2.default);

exports.default = BulgePinch_class;

/***/ }),

/***/ "./src/js/tools/circle.js":
/*!********************************!*\
  !*** ./src/js/tools/circle.js ***!
  \********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Circle_class = function (_Base_tools_class) {
	_inherits(Circle_class, _Base_tools_class);

	function Circle_class(ctx) {
		_classCallCheck(this, Circle_class);

		var _this2 = _possibleConstructorReturn(this, (Circle_class.__proto__ || Object.getPrototypeOf(Circle_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.ctx = ctx;
		_this2.name = 'circle';
		_this2.layer = {};
		return _this2;
	}

	_createClass(Circle_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) return;

			window.State.save();

			//register new object - current layer is not ours or params changed
			this.layer = {
				type: this.name,
				params: this.clone(this.getParams()),
				render_function: [this.name, 'render'],
				status: 'draft',
				x: mouse.x,
				y: mouse.y,
				is_vector: true,
				data: {
					center_x: mouse.x,
					center_y: mouse.y
				}
			};
			if (params.circle == true) {
				//disable rotate
				this.layer.rotate = null;
			}
			this.Base_layers.insert(this.layer);
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();

			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;
			if (params.circle == true) {
				width = Math.round(Math.sqrt(width * width + height * height));
				height = width;
			}

			//more data
			_config2.default.layer.x = this.layer.data.center_x - width;
			_config2.default.layer.y = this.layer.data.center_y - height;
			_config2.default.layer.width = width * 2;
			_config2.default.layer.height = height * 2;
			this.Base_layers.render();
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();

			if (mouse.valid == false || mouse.click_valid == false) {
				_config2.default.layer.status = null;
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;
			if (params.circle == true) {
				width = Math.round(Math.sqrt(width * width + height * height));
				height = width;
			}

			if (width == 0 && height == 0) {
				//same coordinates - cancel
				this.Base_layers.delete(_config2.default.layer.id);
				return;
			}

			//more data
			_config2.default.layer.x = this.layer.data.center_x - width;
			_config2.default.layer.y = this.layer.data.center_y - height;
			_config2.default.layer.width = width * 2;
			_config2.default.layer.height = height * 2;
			_config2.default.layer.status = null;
			this.Base_layers.render();
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			var params = layer.params;
			var rotateSupport = true;

			ctx.save();

			//set styles
			ctx.fillStyle = layer.color;
			ctx.strokeStyle = layer.color;
			ctx.lineWidth = params.size;

			var dist_x = layer.width;
			var dist_y = layer.height;

			if (rotateSupport == false) {
				this.ellipse_by_center(ctx, layer.x + Math.round(layer.width / 2), layer.y + Math.round(layer.height / 2), dist_x, dist_y, params.fill);
			} else {
				ctx.translate(layer.x + layer.width / 2, layer.y + layer.height / 2);
				ctx.rotate(layer.rotate * Math.PI / 180);
				this.ellipse_by_center(ctx, -layer.width / 2 + Math.round(layer.width / 2), -layer.height / 2 + Math.round(layer.height / 2), dist_x, dist_y, params.fill);
			}

			ctx.restore();
		}
	}, {
		key: 'ellipse_by_center',
		value: function ellipse_by_center(ctx, cx, cy, w, h, fill) {
			this.ellipse(ctx, cx - w / 2.0, cy - h / 2.0, w, h, fill);
		}
	}, {
		key: 'ellipse',
		value: function ellipse(ctx, x, y, w, h, fill) {
			var kappa = .5522848,
			    ox = w / 2 * kappa,
			    // control point offset horizontal
			oy = h / 2 * kappa,
			    // control point offset vertical
			xe = x + w,
			    // x-end
			ye = y + h,
			    // y-end
			xm = x + w / 2,
			    // x-middle
			ym = y + h / 2; // y-middle

			ctx.beginPath();
			ctx.moveTo(x, ym);
			ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);
			ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);
			ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);
			ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);
			ctx.closePath();
			if (fill == undefined || fill == false) ctx.stroke();else ctx.fill();
		}
	}]);

	return Circle_class;
}(_baseTools2.default);

;
exports.default = Circle_class;

/***/ }),

/***/ "./src/js/tools/clone.js":
/*!*******************************!*\
  !*** ./src/js/tools/clone.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _raster = __webpack_require__(/*! ./../modules/layer/raster.js */ "./src/js/modules/layer/raster.js");

var _raster2 = _interopRequireDefault(_raster);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Clone_class = function (_Base_tools_class) {
	_inherits(Clone_class, _Base_tools_class);

	function Clone_class(ctx) {
		_classCallCheck(this, Clone_class);

		var _this2 = _possibleConstructorReturn(this, (Clone_class.__proto__ || Object.getPrototypeOf(Clone_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Layer_raster = new _raster2.default();
		_this2.ctx = ctx;
		_this2.name = 'clone';
		_this2.tmpCanvas = null;
		_this2.tmpCanvasCtx = null;
		_this2.started = false;
		_this2.clone_coords = null;
		return _this2;
	}

	_createClass(Clone_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			_this.show_mouse_cursor(mouse.x, mouse.y, params.size, 'circle');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});

			document.addEventListener('contextmenu', function (event) {
				_this.mouseRightClick(event);
			});
		}
	}, {
		key: 'on_params_update',
		value: function on_params_update() {
			var params = this.getParams();
			var strict_element = document.getElementById('strict');

			if (params.circle == false) {
				//hide strict controls
				strict_element.style.display = 'none';
			} else {
				//show strict controls
				strict_element.style.display = 'block';
			}
		}
	}, {
		key: 'mouseRightClick',
		value: function mouseRightClick(e) {
			if (_config2.default.TOOL.name != this.name) return;
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();

			if (mouse.valid == true) {
				e.preventDefault();
			}
			if (params.source_layer.value == 'Previous' && _config2.default.layer.type === null) {
				this.Layer_raster.raster();
			}
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}
			if (e.which == 3 && mouse.valid == true) {
				//right click - save coords

				var mouse_x = this.adaptSize(mouse.x, 'width');
				var mouse_y = this.adaptSize(mouse.y, 'height');

				this.clone_coords = {
					x: mouse_x,
					y: mouse_y
				};
			}
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			this.started = false;
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			var layer = _config2.default.layer;
			var previous_layer = this.Base_layers.find_previous(_config2.default.layer.id);

			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			if (params.source_layer.value == 'Previous' && _config2.default.layer.type === null) {
				this.Layer_raster.raster();
			}
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}
			if (this.clone_coords === null) {
				_alertifyMin2.default.error('Source is empty, right click on image to save source position.');
				return;
			}
			if (layer.width != layer.width_original || layer.height != layer.height_original) {
				_alertifyMin2.default.error('Clone tool disabled for resized image. Sorry.');
				return;
			}
			if (params.source_layer.value == 'Previous' && (previous_layer.width != previous_layer.width_original || previous_layer.height != previous_layer.height_original)) {
				_alertifyMin2.default.error('Clone tool disabled for resized image. Sorry.');
				return;
			}
			if (params.source_layer.value == 'Previous') {
				if (previous_layer == null) {
					_alertifyMin2.default.error('Can not find previous layer.');
					return;
				}
				if (previous_layer.type != 'image') {
					_alertifyMin2.default.error('Previous layer must be image, convert it to raster to apply this tool.');
					return;
				}
			}
			this.started = true;
			window.State.save();

			//get canvas from layer
			this.tmpCanvas = document.createElement('canvas');
			this.tmpCanvasCtx = this.tmpCanvas.getContext("2d");
			this.tmpCanvas.width = _config2.default.layer.width_original;
			this.tmpCanvas.height = _config2.default.layer.height_original;
			this.tmpCanvasCtx.drawImage(_config2.default.layer.link, 0, 0);

			//clone
			this.clone_general(this.tmpCanvas, this.tmpCanvas, 'click', mouse);

			//register tmp canvas for progress redraw
			_config2.default.layer.link_canvas = this.tmpCanvas;
			_config2.default.need_render = true;
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();

			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (this.started == false) {
				return;
			}

			//clone
			this.clone_general(this.tmpCanvas, this.tmpCanvas, 'move', mouse);

			//draw draft preview
			_config2.default.need_render = true;
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			if (this.started == false) {
				return;
			}
			delete _config2.default.layer.link_canvas;

			this.Base_layers.update_layer_image(this.tmpCanvas);

			//decrease memory
			this.tmpCanvas.width = 1;
			this.tmpCanvas.height = 1;
			this.tmpCanvas = null;
			this.tmpCanvasCtx = null;
		}
	}, {
		key: 'clone_general',
		value: function clone_general(canvas_from, canvas_to, type, mouse) {
			var params = this.getParams();

			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;
			var half = Math.round(params.size / 2);

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');

			//convert float coords to integers
			mouse_x = Math.round(mouse_x);
			mouse_y = Math.round(mouse_y);

			//create source canvas
			var canvas_source = document.createElement("canvas");
			var ctx_source = canvas_source.getContext("2d");
			var w = Math.ceil(params.size);
			var h = Math.ceil(params.size);
			canvas_source.width = w;
			canvas_source.height = h;

			//add data
			var x_from = Math.round(this.clone_coords.x - (mouse.click_x - mouse_x));
			var y_from = Math.round(this.clone_coords.y - (mouse.click_y - mouse_y));
			if (params.anti_aliasing == false) {
				ctx_source.arc(half, half, half, 0, Math.PI * 2, false);
				ctx_source.clip();
			}
			if (params.source_layer.value == 'Previous') {
				var previous_layer = this.Base_layers.find_previous(_config2.default.layer.id);

				x_from = Math.round(this.clone_coords.x - (mouse.click_x - mouse_x)) - previous_layer.x + _config2.default.layer.x;
				y_from = Math.round(this.clone_coords.y - (mouse.click_y - mouse_y)) - previous_layer.y + _config2.default.layer.y;

				ctx_source.drawImage(previous_layer.link, x_from - half, y_from - half, w, h, 0, 0, w, h);
			} else {
				ctx_source.drawImage(canvas_from, x_from - half, y_from - half, w, h, 0, 0, w, h);
			}

			//apply anti aliasing
			if (params.anti_aliasing == true) {
				var gradient = ctx_source.createRadialGradient(half, half, 0, half, half, half + 1);
				gradient.addColorStop(0, 'white');
				gradient.addColorStop(0.3, 'white');
				gradient.addColorStop(1, 'transparent');
				ctx_source.fillStyle = gradient;

				ctx_source.globalCompositeOperation = 'destination-in';
				ctx_source.fillRect(0, 0, params.size, params.size);
				ctx_source.globalCompositeOperation = 'source-over';
			}

			//finish
			canvas_to.getContext("2d").drawImage(canvas_source, mouse_x - half, mouse_y - half);
		}
	}]);

	return Clone_class;
}(_baseTools2.default);

exports.default = Clone_class;

/***/ }),

/***/ "./src/js/tools/crop.js":
/*!******************************!*\
  !*** ./src/js/tools/crop.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _guiTools = __webpack_require__(/*! ./../core/gui/gui-tools.js */ "./src/js/core/gui/gui-tools.js");

var _guiTools2 = _interopRequireDefault(_guiTools);

var _baseGui = __webpack_require__(/*! ./../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

var _baseSelection = __webpack_require__(/*! ./../core/base-selection.js */ "./src/js/core/base-selection.js");

var _baseSelection2 = _interopRequireDefault(_baseSelection);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Crop_class = function (_Base_tools_class) {
	_inherits(Crop_class, _Base_tools_class);

	function Crop_class(ctx) {
		_classCallCheck(this, Crop_class);

		var _this2 = _possibleConstructorReturn(this, (Crop_class.__proto__ || Object.getPrototypeOf(Crop_class)).call(this));

		var _this = _this2;
		_this2.Base_layers = new _baseLayers2.default();
		_this2.Base_gui = new _baseGui2.default();
		_this2.GUI_tools = new _guiTools2.default();
		_this2.ctx = ctx;
		_this2.name = 'crop';
		_this2.selection = {
			x: null,
			y: null,
			width: null,
			height: null
		};
		var sel_config = {
			enable_background: true,
			enable_borders: true,
			enable_controls: true,
			data_function: function data_function() {
				return _this.selection;
			}
		};
		_this2.Base_selection = new _baseSelection2.default(ctx, sel_config, _this2.name);
		return _this2;
	}

	_createClass(Crop_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) return;

			if (this.Base_selection.mouse_lock !== null) {
				return;
			}

			//create new selection
			this.Base_selection.set_selection(mouse.x, mouse.y, 0, 0);
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.is_drag == false) {
				return;
			}
			if (e.type == 'mousedown' && (mouse.valid == false || mouse.click_valid == false)) {
				return;
			}
			if (this.Base_selection.mouse_lock !== null) {
				return;
			}

			var width = mouse.x - mouse.click_x;
			var height = mouse.y - mouse.click_y;

			if (event.ctrlKey == true || event.metaKey) {
				//ctrl is pressed - crop will be calculated based on global width and height ratio
				var ratio = _config2.default.WIDTH / _config2.default.HEIGHT;
				var width_new = Math.round(height * ratio);
				var height_new = Math.round(width / ratio);

				if (Math.abs(width * 100 / width_new) > Math.abs(height * 100 / height_new)) {
					if (width * 100 / width_new > 0) height = height_new;else height = -height_new;
				} else {
					if (height * 100 / height_new > 0) width = width_new;else width = -width_new;
				}
			}

			this.Base_selection.set_selection(null, null, width, height);
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);

			if (e.type == 'mousedown' && mouse.click_valid == false) {
				return;
			}

			var width = mouse.x - this.selection.x;
			var height = mouse.y - this.selection.y;

			if (width == 0 || height == 0) {
				//cancel selection
				this.Base_selection.reset_selection();
				_config2.default.need_render = true;
				return;
			}

			if (this.selection.width != null) {
				//make sure coords not negative
				var details = this.selection;
				var x = details.x;
				var y = details.y;
				if (details.width < 0) {
					x = x + details.width;
				}
				if (details.height < 0) {
					y = y + details.height;
				}
				this.selection = {
					x: x,
					y: y,
					width: Math.abs(details.width),
					height: Math.abs(details.height)
				};
			}

			//controll boundaries
			if (this.selection.x < 0) {
				this.selection.width += this.selection.x;
				this.selection.x = 0;
			}
			if (this.selection.y < 0) {
				this.selection.height += this.selection.y;
				this.selection.y = 0;
			}
			if (this.selection.x + this.selection.width > _config2.default.WIDTH) {
				this.selection.width = _config2.default.WIDTH - this.selection.x;
			}
			if (this.selection.y + this.selection.height > _config2.default.HEIGHT) {
				this.selection.height = _config2.default.HEIGHT - this.selection.y;
			}

			_config2.default.need_render = true;
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {}
		//nothing


		/**
   * do actual crop
   */

	}, {
		key: 'on_params_update',
		value: function on_params_update() {
			var params = this.getParams();
			var selection = this.selection;
			params.crop = true;
			this.GUI_tools.show_action_attributes();

			if (selection.width == null || selection.width == 0 || selection.height == 0) {
				_alertifyMin2.default.error('Empty selection');
				return;
			}

			window.State.save();

			//controll boundaries
			selection.x = Math.max(selection.x, 0);
			selection.y = Math.max(selection.y, 0);
			selection.width = Math.min(selection.width, _config2.default.WIDTH);
			selection.height = Math.min(selection.height, _config2.default.HEIGHT);

			for (var i in _config2.default.layers) {
				var link = _config2.default.layers[i];
				if (link.type == null) continue;

				//move
				link.x -= parseInt(selection.x);
				link.y -= parseInt(selection.y);

				if (link.type == 'image') {
					//also remove unvisible data
					var left = 0;
					if (link.x < 0) left = -link.x;
					var top = 0;
					if (link.y < 0) top = -link.y;
					var right = 0;
					if (link.x + link.width > selection.width) right = link.x + link.width - selection.width;
					var bottom = 0;
					if (link.y + link.height > selection.height) bottom = link.y + link.height - selection.height;
					var width = link.width - left - right;
					var height = link.height - top - bottom;

					//if image was streched
					var width_ratio = link.width / link.width_original;
					var height_ratio = link.height / link.height_original;

					//create smaller canvas
					var canvas = document.createElement('canvas');
					var ctx = canvas.getContext("2d");
					canvas.width = width / width_ratio;
					canvas.height = height / height_ratio;

					//cut required part
					ctx.translate(-left / width_ratio, -top / height_ratio);
					canvas.getContext("2d").drawImage(link.link, 0, 0);
					ctx.translate(0, 0);
					this.Base_layers.update_layer_image(canvas, link.id);

					//update attributes
					link.width = Math.ceil(canvas.width * width_ratio);
					link.height = Math.ceil(canvas.height * height_ratio);
					link.x += left;
					link.y += top;
					link.width_original = canvas.width;
					link.height_original = canvas.height;
				}
			}

			_config2.default.WIDTH = parseInt(selection.width);
			_config2.default.HEIGHT = parseInt(selection.height);

			this.Base_gui.prepare_canvas();
			this.selection = {
				x: null,
				y: null,
				width: null,
				height: null
			};
			this.Base_selection.reset_selection();
		}
	}, {
		key: 'on_leave',
		value: function on_leave() {
			this.Base_selection.reset_selection();
		}
	}]);

	return Crop_class;
}(_baseTools2.default);

exports.default = Crop_class;

/***/ }),

/***/ "./src/js/tools/desaturate.js":
/*!************************************!*\
  !*** ./src/js/tools/desaturate.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _imagefilters = __webpack_require__(/*! ./../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Desaturate_class = function (_Base_tools_class) {
	_inherits(Desaturate_class, _Base_tools_class);

	function Desaturate_class(ctx) {
		_classCallCheck(this, Desaturate_class);

		var _this2 = _possibleConstructorReturn(this, (Desaturate_class.__proto__ || Object.getPrototypeOf(Desaturate_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Helper = new _helpers2.default();
		_this2.ctx = ctx;
		_this2.name = 'desaturate';
		_this2.tmpCanvas = null;
		_this2.tmpCanvasCtx = null;
		_this2.started = false;
		return _this2;
	}

	_createClass(Desaturate_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			_this.show_mouse_cursor(mouse.x, mouse.y, params.size, 'circle');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			this.started = false;
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}
			this.started = true;
			window.State.save();

			//get canvas from layer
			this.tmpCanvas = document.createElement('canvas');
			this.tmpCanvasCtx = this.tmpCanvas.getContext("2d");
			this.tmpCanvas.width = _config2.default.layer.width_original;
			this.tmpCanvas.height = _config2.default.layer.height_original;

			this.tmpCanvasCtx.drawImage(_config2.default.layer.link, 0, 0);

			//do desaturate
			this.desaturate_general('click', mouse, params.size, params.anti_aliasing);

			//register tmp canvas for faster redraw
			_config2.default.layer.link_canvas = this.tmpCanvas;
			_config2.default.need_render = true;
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (this.started == false) {
				return;
			}

			//do desaturate
			this.desaturate_general('move', mouse, params.size, params.anti_aliasing);

			//draw draft preview
			_config2.default.need_render = true;
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			if (this.started == false) {
				return;
			}
			delete _config2.default.layer.link_canvas;

			this.Base_layers.update_layer_image(this.tmpCanvas);

			//decrease memory
			this.tmpCanvas.width = 1;
			this.tmpCanvas.height = 1;
			this.tmpCanvas = null;
			this.tmpCanvasCtx = null;
		}
	}, {
		key: 'desaturate_general',
		value: function desaturate_general(type, mouse, size, anti_aliasing) {
			var ctx = this.tmpCanvasCtx;
			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');
			var size_w = this.adaptSize(size, 'width');
			var size_h = this.adaptSize(size, 'height');

			//find center
			var center_x = mouse_x - Math.round(size_w / 2);
			var center_y = mouse_y - Math.round(size_h / 2);

			//convert float coords to integers
			center_x = Math.round(center_x);
			center_y = Math.round(center_y);
			mouse_x = Math.round(mouse_x);
			mouse_y = Math.round(mouse_y);

			var imageData = ctx.getImageData(center_x, center_y, size_w, size_h);
			var filtered = _imagefilters2.default.GrayScale(imageData); //add effect
			this.Helper.image_round(this.tmpCanvasCtx, mouse_x, mouse_y, size_w, size_h, filtered, anti_aliasing);
		}
	}]);

	return Desaturate_class;
}(_baseTools2.default);

exports.default = Desaturate_class;

/***/ }),

/***/ "./src/js/tools/erase.js":
/*!*******************************!*\
  !*** ./src/js/tools/erase.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Erase_class = function (_Base_tools_class) {
	_inherits(Erase_class, _Base_tools_class);

	function Erase_class(ctx) {
		_classCallCheck(this, Erase_class);

		var _this2 = _possibleConstructorReturn(this, (Erase_class.__proto__ || Object.getPrototypeOf(Erase_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.ctx = ctx;
		_this2.name = 'erase';
		_this2.tmpCanvas = null;
		_this2.tmpCanvasCtx = null;
		_this2.started = false;
		return _this2;
	}

	_createClass(Erase_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			if (params.circle == true) _this.show_mouse_cursor(mouse.x, mouse.y, params.size, 'circle');else _this.show_mouse_cursor(mouse.x, mouse.y, params.size, 'rect');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'on_params_update',
		value: function on_params_update() {
			var params = this.getParams();
			var strict_element = document.querySelector('.attributes #strict');

			if (params.circle == false) {
				//hide strict controls
				strict_element.style.display = 'none';
			} else {
				//show strict controls
				strict_element.style.display = 'block';
			}
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			this.started = false;
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.is_vector == true) {
				_alertifyMin2.default.error('Layer is vector, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}
			this.started = true;
			window.State.save();

			//get canvas from layer
			this.tmpCanvas = document.createElement('canvas');
			this.tmpCanvasCtx = this.tmpCanvas.getContext("2d");
			this.tmpCanvas.width = _config2.default.layer.width_original;
			this.tmpCanvas.height = _config2.default.layer.height_original;
			this.tmpCanvasCtx.drawImage(_config2.default.layer.link, 0, 0);

			this.tmpCanvasCtx.scale(_config2.default.layer.width_original / _config2.default.layer.width, _config2.default.layer.height_original / _config2.default.layer.height);

			//do erase
			this.erase_general(this.tmpCanvasCtx, 'click', mouse, params.size, params.strict, params.circle);

			//register tmp canvas for faster redraw
			_config2.default.layer.link_canvas = this.tmpCanvas;
			_config2.default.need_render = true;
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (this.started == false) {
				return;
			}
			if (mouse.click_x == mouse.x && mouse.click_y == mouse.y) {
				//same coordinates
				return;
			}

			//do erase
			this.erase_general(this.tmpCanvasCtx, 'move', mouse, params.size, params.strict, params.circle);

			//draw draft preview
			_config2.default.need_render = true;
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			if (this.started == false) {
				return;
			}
			delete _config2.default.layer.link_canvas;

			this.Base_layers.update_layer_image(this.tmpCanvas);

			//decrease memory
			this.tmpCanvas.width = 1;
			this.tmpCanvas.height = 1;
			this.tmpCanvas = null;
			this.tmpCanvasCtx = null;
		}
	}, {
		key: 'erase_general',
		value: function erase_general(ctx, type, mouse, size, strict, is_circle) {
			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;
			var alpha = _config2.default.ALPHA;
			var mouse_last_x = parseInt(mouse.last_x) - _config2.default.layer.x;
			var mouse_last_y = parseInt(mouse.last_y) - _config2.default.layer.y;

			ctx.beginPath();
			ctx.lineWidth = size;
			ctx.lineCap = 'round';
			ctx.lineJoin = 'round';
			if (alpha < 255) ctx.strokeStyle = "rgba(255, 255, 255, " + alpha / 255 / 10 + ")";else ctx.strokeStyle = "rgba(255, 255, 255, 1)";

			if (is_circle == false) {
				//rectangle
				var size_half = Math.ceil(size / 2);
				if (size == 1) {
					//single cell mode
					mouse_x = Math.floor(mouse.x) - _config2.default.layer.x;
					mouse_y = Math.floor(mouse.y) - _config2.default.layer.y;
					size_half = 0;
				}
				ctx.save();
				ctx.globalCompositeOperation = 'destination-out';
				ctx.fillStyle = "rgba(255, 255, 255, " + alpha / 255 + ")";
				ctx.fillRect(mouse_x - size_half, mouse_y - size_half, size, size);
				ctx.restore();
			} else {
				//circle
				ctx.save();

				if (strict == false) {
					var radgrad = ctx.createRadialGradient(mouse_x, mouse_y, size / 8, mouse_x, mouse_y, size / 2);
					if (type == 'click') radgrad.addColorStop(0, "rgba(255, 255, 255, " + alpha / 255 + ")");else if (type == 'move') radgrad.addColorStop(0, "rgba(255, 255, 255, " + alpha / 255 / 2 + ")");
					radgrad.addColorStop(1, "rgba(255, 255, 255, 0)");
				}

				//set Composite
				ctx.globalCompositeOperation = 'destination-out';
				if (strict == true) ctx.fillStyle = "rgba(255, 255, 255, " + alpha / 255 + ")";else ctx.fillStyle = radgrad;
				ctx.beginPath();
				ctx.arc(mouse_x, mouse_y, size / 2, 0, Math.PI * 2, true);
				ctx.fill();
				ctx.restore();
			}

			//extra work if mouse moving fast
			if (type == 'move' && is_circle == true && mouse_last_x != false && mouse_last_y != false) {
				if (strict == false && is_circle == true) {
					var radgrad = ctx.createRadialGradient(mouse_x, mouse_y, size / 10, mouse_x, mouse_y, size / 2);
					if (alpha < 255) radgrad.addColorStop(0, "rgba(255, 255, 255, " + alpha / 255 / 10 + ")");else radgrad.addColorStop(0, "rgba(255, 255, 255, 1)");
					radgrad.addColorStop(1, "rgba(255, 255, 255, 0)");
					ctx.strokeStyle = radgrad;
				}

				ctx.save();
				ctx.globalCompositeOperation = 'destination-out';

				ctx.beginPath();
				ctx.moveTo(mouse_last_x, mouse_last_y);
				ctx.lineTo(mouse_x, mouse_y);
				ctx.stroke();

				ctx.restore();
			}
		}
	}]);

	return Erase_class;
}(_baseTools2.default);

exports.default = Erase_class;

/***/ }),

/***/ "./src/js/tools/fill.js":
/*!******************************!*\
  !*** ./src/js/tools/fill.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Fill_class = function (_Base_tools_class) {
	_inherits(Fill_class, _Base_tools_class);

	function Fill_class(ctx) {
		_classCallCheck(this, Fill_class);

		var _this2 = _possibleConstructorReturn(this, (Fill_class.__proto__ || Object.getPrototypeOf(Fill_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Helper = new _helpers2.default();
		_this2.ctx = ctx;
		_this2.name = 'fill';
		return _this2;
	}

	_createClass(Fill_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}

			window.State.save();

			this.fill(mouse);
		}
	}, {
		key: 'fill',
		value: function fill(mouse) {
			var params = this.getParams();

			if (_config2.default.layer.type != 'image' && _config2.default.layer.type !== null) {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.is_vector == true) {
				_alertifyMin2.default.error('Layer is vector, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.ALPHA == 0) {
				_alertifyMin2.default.error('Color alpha value can not be zero.');
				return;
			}

			//get canvas from layer
			var canvas = document.createElement('canvas');
			var ctx = canvas.getContext("2d");
			if (_config2.default.layer.type !== null) {
				canvas.width = _config2.default.layer.width_original;
				canvas.height = _config2.default.layer.height_original;
				ctx.drawImage(_config2.default.layer.link, 0, 0);
			} else {
				canvas.width = _config2.default.WIDTH;
				canvas.height = _config2.default.HEIGHT;
			}

			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');

			//convert float coords to integers
			mouse_x = Math.round(mouse_x);
			mouse_y = Math.round(mouse_y);

			var color_to = this.Helper.hex2rgb(_config2.default.COLOR);
			color_to.a = _config2.default.ALPHA;

			//change
			this.fill_general(ctx, _config2.default.WIDTH, _config2.default.HEIGHT, mouse_x, mouse_y, color_to, params.power, params.anti_aliasing, params.contiguous);

			if (_config2.default.layer.type != null) {
				//update
				this.Base_layers.update_layer_image(canvas);
			} else {
				//create new
				var params = [];
				params.type = 'image';
				params.name = 'Fill';
				params.data = canvas.toDataURL("image/png");
				params.x = parseInt(canvas.dataset.x) || 0;
				params.y = parseInt(canvas.dataset.y) || 0;
				params.width = canvas.width;
				params.height = canvas.height;
				this.Base_layers.insert(params);
			}
		}
	}, {
		key: 'fill_general',
		value: function fill_general(context, W, H, x, y, color_to, sensitivity, anti_aliasing) {
			var contiguous = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : false;

			sensitivity = sensitivity * 255 / 100; //convert to 0-255 interval
			x = parseInt(x);
			y = parseInt(y);
			var canvasTemp = document.createElement('canvas');
			canvasTemp.width = W;
			canvasTemp.height = H;
			var ctxTemp = canvasTemp.getContext("2d");

			ctxTemp.rect(0, 0, W, H);
			ctxTemp.fillStyle = "rgba(255, 255, 255, 0)";
			ctxTemp.fill();

			var img_tmp = ctxTemp.getImageData(0, 0, W, H);
			var imgData_tmp = img_tmp.data;

			var img = context.getImageData(0, 0, W, H);
			var imgData = img.data;
			var k = y * (img.width * 4) + x * 4;
			var dx = [0, -1, +1, 0];
			var dy = [-1, 0, 0, +1];
			var color_from = {
				r: imgData[k + 0],
				g: imgData[k + 1],
				b: imgData[k + 2],
				a: imgData[k + 3]
			};
			if (color_from.r == color_to.r && color_from.g == color_to.g && color_from.b == color_to.b && color_from.a == color_to.a) {
				return false;
			}

			if (contiguous == false) {
				//check only nearest pixels
				var stack = [];
				stack.push([x, y]);
				while (stack.length > 0) {
					var curPoint = stack.pop();
					for (var i = 0; i < 4; i++) {
						var nextPointX = curPoint[0] + dx[i];
						var nextPointY = curPoint[1] + dy[i];
						if (nextPointX < 0 || nextPointY < 0 || nextPointX >= W || nextPointY >= H) continue;
						var k = (nextPointY * W + nextPointX) * 4;
						if (imgData_tmp[k + 3] != 0) continue; //already parsed

						//check
						if (Math.abs(imgData[k + 0] - color_from.r) <= sensitivity && Math.abs(imgData[k + 1] - color_from.g) <= sensitivity && Math.abs(imgData[k + 2] - color_from.b) <= sensitivity && Math.abs(imgData[k + 3] - color_from.a) <= sensitivity) {

							//fill pixel
							imgData_tmp[k] = color_to.r; //r
							imgData_tmp[k + 1] = color_to.g; //g
							imgData_tmp[k + 2] = color_to.b; //b
							imgData_tmp[k + 3] = color_to.a; //a

							stack.push([nextPointX, nextPointY]);
						}
					}
				}
			} else {
				//global mode - contiguous
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent

					//imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);

					for (var j = 0; j < 4; j++) {
						var k = i + j;

						if (Math.abs(imgData[k] - color_from.r) <= sensitivity && Math.abs(imgData[k + 1] - color_from.g) <= sensitivity && Math.abs(imgData[k + 2] - color_from.b) <= sensitivity && Math.abs(imgData[k + 3] - color_from.a) <= sensitivity) {
							imgData_tmp[k] = color_to.r; //r
							imgData_tmp[k + 1] = color_to.g; //g
							imgData_tmp[k + 2] = color_to.b; //b
							imgData_tmp[k + 3] = color_to.a; //a
						}
					}
				}
			}

			ctxTemp.putImageData(img_tmp, 0, 0);
			if (anti_aliasing == true) {
				context.filter = 'blur(1px)';
			}
			context.drawImage(canvasTemp, 0, 0);
		}
	}]);

	return Fill_class;
}(_baseTools2.default);

exports.default = Fill_class;

/***/ }),

/***/ "./src/js/tools/gradient.js":
/*!**********************************!*\
  !*** ./src/js/tools/gradient.js ***!
  \**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Gradient_class = function (_Base_tools_class) {
	_inherits(Gradient_class, _Base_tools_class);

	function Gradient_class(ctx) {
		_classCallCheck(this, Gradient_class);

		var _this2 = _possibleConstructorReturn(this, (Gradient_class.__proto__ || Object.getPrototypeOf(Gradient_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Helper = new _helpers2.default();
		_this2.ctx = ctx;
		_this2.name = 'gradient';
		_this2.layer = {};
		return _this2;
	}

	_createClass(Gradient_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) return;

			var name = this.name;
			var is_vector = false;
			if (params.radial == true) {
				name = 'Radial gradient';
				is_vector = true;
			}

			window.State.save();

			//register new object - current layer is not ours or params changed
			this.layer = {
				type: this.name,
				name: this.Helper.ucfirst(name) + ' #' + this.Base_layers.auto_increment,
				params: this.clone(this.getParams()),
				status: 'draft',
				render_function: [this.name, 'render'],
				x: mouse.x,
				y: mouse.y,
				rotate: null,
				is_vector: is_vector,
				color: params.color_1,
				data: {
					center_x: mouse.x,
					center_y: mouse.y
				}
			};
			this.Base_layers.insert(this.layer);
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;

			if (params.radial == true) {
				_config2.default.layer.x = this.layer.data.center_x - width;
				_config2.default.layer.y = this.layer.data.center_y - height;
				_config2.default.layer.width = width * 2;
				_config2.default.layer.height = height * 2;
			} else {
				_config2.default.layer.width = width;
				_config2.default.layer.height = height;
			}

			this.Base_layers.render();
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				_config2.default.layer.status = null;
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;

			if (width == 0 && height == 0) {
				//same coordinates - cancel
				this.Base_layers.delete(_config2.default.layer.id);
				return;
			}

			if (params.radial == true) {
				_config2.default.layer.x = this.layer.data.center_x - width;
				_config2.default.layer.y = this.layer.data.center_y - height;
				_config2.default.layer.width = width * 2;
				_config2.default.layer.height = height * 2;
			} else {
				_config2.default.layer.width = width;
				_config2.default.layer.height = height;
			}
			_config2.default.layer.status = null;

			this.Base_layers.render();
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			if (layer.width == 0 && layer.height == 0) return;

			var params = layer.params;
			var power = params.radial_power;
			var alpha = params.alpha / 100 * 255;
			var color1 = layer.color;
			var color2 = params.color_2;
			var radial = params.radial;

			var color2_rgb = this.Helper.hex2rgb(color2);

			var width = layer.x + layer.width - 1;
			var height = layer.y + layer.height - 1;

			if (radial == false) {
				//linear
				ctx.rect(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT);
				var grd = ctx.createLinearGradient(layer.x, layer.y, width, height);

				grd.addColorStop(0, color1);
				grd.addColorStop(1, "rgba(" + color2_rgb.r + ", " + color2_rgb.g + ", " + color2_rgb.b + ", " + alpha / 255 + ")");
				ctx.fillStyle = grd;
				ctx.fill();
			} else {
				//radial
				var dist_x = layer.width;
				var dist_y = layer.height;
				var center_x = layer.x + Math.round(layer.width / 2);
				var center_y = layer.y + Math.round(layer.height / 2);
				var distance = Math.sqrt(dist_x * dist_x + dist_y * dist_y);
				var radgrad = ctx.createRadialGradient(center_x, center_y, distance * power / 100, center_x, center_y, distance);

				radgrad.addColorStop(0, color1);
				radgrad.addColorStop(1, "rgba(" + color2_rgb.r + ", " + color2_rgb.g + ", " + color2_rgb.b + ", " + alpha / 255 + ")");
				ctx.fillStyle = radgrad;
				ctx.fillRect(0, 0, _config2.default.WIDTH, _config2.default.HEIGHT);
			}
		}
	}]);

	return Gradient_class;
}(_baseTools2.default);

exports.default = Gradient_class;

/***/ }),

/***/ "./src/js/tools/line.js":
/*!******************************!*\
  !*** ./src/js/tools/line.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Line_class = function (_Base_tools_class) {
	_inherits(Line_class, _Base_tools_class);

	function Line_class(ctx) {
		_classCallCheck(this, Line_class);

		var _this2 = _possibleConstructorReturn(this, (Line_class.__proto__ || Object.getPrototypeOf(Line_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.ctx = ctx;
		_this2.name = 'line';
		_this2.layer = {};
		return _this2;
	}

	_createClass(Line_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) return;

			window.State.save();

			//register new object - current layer is not ours or params changed
			this.layer = {
				type: this.name,
				params: this.clone(this.getParams()),
				status: 'draft',
				render_function: [this.name, 'render'],
				x: mouse.x,
				y: mouse.y,
				rotate: null,
				is_vector: true
			};
			this.Base_layers.insert(this.layer);
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;
			if (e.ctrlKey == true || e.metaKey) {
				//one direction only
				if (Math.abs(width) < Math.abs(height)) width = 1;else height = 1;
			}

			//more data
			_config2.default.layer.width = width;
			_config2.default.layer.height = height;
			this.Base_layers.render();
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) {
				_config2.default.layer.status = null;
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;

			if (width == 0 && height == 0) {
				//same coordinates - cancel
				this.Base_layers.delete(_config2.default.layer.id);
				return;
			}

			if (e.ctrlKey == true || e.metaKey) {
				//one direction only
				if (Math.abs(width) < Math.abs(height)) width = 1;else height = 1;
			}

			//more data
			_config2.default.layer.width = width;
			_config2.default.layer.height = height;
			_config2.default.layer.status = null;
			this.Base_layers.render();
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			if (layer.width == 0 && layer.height == 0) return;

			var params = layer.params;
			var type = params.type.value;

			//set styles
			ctx.fillStyle = layer.color;
			ctx.strokeStyle = layer.color;
			ctx.lineWidth = params.size;
			ctx.lineCap = 'round';

			var width = layer.x + layer.width - 1;
			var height = layer.y + layer.height - 1;

			if (type == 'Simple') {
				//draw line
				ctx.beginPath();
				ctx.moveTo(layer.x + 0.5, layer.y + 0.5);
				ctx.lineTo(width + 0.5, height + 0.5);
				ctx.stroke();
			} else if (type == 'Arrow') {
				var headlen = params.size * 5;
				if (headlen < 15) headlen = 15;
				this.arrow(ctx, layer.x + 0.5, layer.y + 0.5, width + 0.5, height + 0.5, headlen);
			} else if (type == 'Curve') {
				//not supported
			}
		}
	}, {
		key: 'arrow',
		value: function arrow(ctx, fromx, fromy, tox, toy, headlen) {
			if (headlen == undefined) headlen = 10; // length of head in pixels
			var dx = tox - fromx;
			var dy = toy - fromy;
			var angle = Math.atan2(dy, dx);
			ctx.beginPath();
			ctx.moveTo(fromx, fromy);
			ctx.lineTo(tox, toy);
			ctx.stroke();
			ctx.beginPath();
			ctx.moveTo(tox - headlen * Math.cos(angle - Math.PI / 6), toy - headlen * Math.sin(angle - Math.PI / 6));
			ctx.lineTo(tox, toy);
			ctx.lineTo(tox - headlen * Math.cos(angle + Math.PI / 6), toy - headlen * Math.sin(angle + Math.PI / 6));
			ctx.stroke();
		}
	}]);

	return Line_class;
}(_baseTools2.default);

exports.default = Line_class;

/***/ }),

/***/ "./src/js/tools/magic_wand.js":
/*!************************************!*\
  !*** ./src/js/tools/magic_wand.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Magic_wand_class = function (_Base_tools_class) {
	_inherits(Magic_wand_class, _Base_tools_class);

	function Magic_wand_class(ctx) {
		_classCallCheck(this, Magic_wand_class);

		var _this2 = _possibleConstructorReturn(this, (Magic_wand_class.__proto__ || Object.getPrototypeOf(Magic_wand_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.ctx = ctx;
		_this2.name = 'magic_wand';
		return _this2;
	}

	_createClass(Magic_wand_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}

			window.State.save();

			this.magic_wand(mouse);
		}
	}, {
		key: 'magic_wand',
		value: function magic_wand(mouse) {
			var params = this.getParams();

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.is_vector == true) {
				_alertifyMin2.default.error('Layer is vector, convert it to raster to apply this tool.');
				return;
			}

			//get canvas from layer
			var canvas = document.createElement('canvas');
			var ctx = canvas.getContext("2d");
			canvas.width = _config2.default.layer.width_original;
			canvas.height = _config2.default.layer.height_original;
			ctx.drawImage(_config2.default.layer.link, 0, 0);

			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');

			//convert float coords to integers
			mouse_x = Math.round(mouse_x);
			mouse_y = Math.round(mouse_y);

			//change
			this.magic_wand_general(ctx, _config2.default.WIDTH, _config2.default.HEIGHT, mouse_x, mouse_y, params.power, params.anti_aliasing, params.contiguous);

			this.Base_layers.update_layer_image(canvas);
		}

		/**
   * apply magic wand
   *
   * @param {ctx} context
   * @param {int} W
   * @param {int} H
   * @param {int} x
   * @param {int} y
   * @param {int} sensitivity max 100
   * @param {Boolean} anti_aliasing
   */

	}, {
		key: 'magic_wand_general',
		value: function magic_wand_general(context, W, H, x, y, sensitivity, anti_aliasing) {
			var contiguous = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;

			sensitivity = sensitivity * 255 / 100; //convert to 0-255 interval
			x = parseInt(x);
			y = parseInt(y);
			var canvasTemp = document.createElement('canvas');
			canvasTemp.width = W;
			canvasTemp.height = H;
			var ctxTemp = canvasTemp.getContext("2d");

			ctxTemp.rect(0, 0, W, H);
			ctxTemp.fillStyle = "rgba(255, 255, 255, 0)";
			ctxTemp.fill();

			var img_tmp = ctxTemp.getImageData(0, 0, W, H);
			var imgData_tmp = img_tmp.data;

			var img = context.getImageData(0, 0, W, H);
			var imgData = img.data;
			var k = y * (img.width * 4) + x * 4;
			var dx = [0, -1, +1, 0];
			var dy = [-1, 0, 0, +1];
			var color_to = {
				r: 255,
				g: 255,
				b: 255,
				a: 255
			};
			var color_from = {
				r: imgData[k + 0],
				g: imgData[k + 1],
				b: imgData[k + 2],
				a: imgData[k + 3]
			};
			if (color_from.r == color_to.r && color_from.g == color_to.g && color_from.b == color_to.b && color_from.a == 0) {
				return false;
			}
			if (contiguous == false) {
				//check only nearest pixels
				var stack = [];
				stack.push([x, y]);
				while (stack.length > 0) {
					var curPoint = stack.pop();
					for (var i = 0; i < 4; i++) {
						var nextPointX = curPoint[0] + dx[i];
						var nextPointY = curPoint[1] + dy[i];
						if (nextPointX < 0 || nextPointY < 0 || nextPointX >= W || nextPointY >= H) continue;
						var k = (nextPointY * W + nextPointX) * 4;
						if (imgData_tmp[k + 3] != 0) continue; //already parsed

						if (Math.abs(imgData[k] - color_from.r) <= sensitivity && Math.abs(imgData[k + 1] - color_from.g) <= sensitivity && Math.abs(imgData[k + 2] - color_from.b) <= sensitivity && Math.abs(imgData[k + 3] - color_from.a) <= sensitivity) {
							imgData_tmp[k] = color_to.r; //r
							imgData_tmp[k + 1] = color_to.g; //g
							imgData_tmp[k + 2] = color_to.b; //b
							imgData_tmp[k + 3] = color_to.a; //a

							stack.push([nextPointX, nextPointY]);
						}
					}
				}
			} else {
				//global mode - contiguous
				for (var i = 0; i < imgData.length; i += 4) {
					if (imgData[i + 3] == 0) continue; //transparent

					//imgData[i] + 0.7152 * imgData[i + 1] + 0.0722 * imgData[i + 2]);

					for (var j = 0; j < 4; j++) {
						var k = i + j;

						if (Math.abs(imgData[k] - color_from.r) <= sensitivity && Math.abs(imgData[k + 1] - color_from.g) <= sensitivity && Math.abs(imgData[k + 2] - color_from.b) <= sensitivity && Math.abs(imgData[k + 3] - color_from.a) <= sensitivity) {
							imgData_tmp[k] = color_to.r; //r
							imgData_tmp[k + 1] = color_to.g; //g
							imgData_tmp[k + 2] = color_to.b; //b
							imgData_tmp[k + 3] = color_to.a; //a
						}
					}
				}
			}

			//destination-out + blur = anti-aliasing
			ctxTemp.putImageData(img_tmp, 0, 0);
			context.globalCompositeOperation = "destination-out";
			if (anti_aliasing == true) {
				context.filter = 'blur(1px)';
			}
			context.drawImage(canvasTemp, 0, 0);
		}
	}]);

	return Magic_wand_class;
}(_baseTools2.default);

exports.default = Magic_wand_class;

/***/ }),

/***/ "./src/js/tools/media.js":
/*!*******************************!*\
  !*** ./src/js/tools/media.js ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _search = __webpack_require__(/*! ./../modules/file/search.js */ "./src/js/modules/file/search.js");

var _search2 = _interopRequireDefault(_search);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Media_class = function (_Base_tools_class) {
	_inherits(Media_class, _Base_tools_class);

	function Media_class(ctx) {
		_classCallCheck(this, Media_class);

		var _this = _possibleConstructorReturn(this, (Media_class.__proto__ || Object.getPrototypeOf(Media_class)).call(this));

		_this.Search = new _search2.default();
		_this.name = 'media';
		return _this;
	}

	_createClass(Media_class, [{
		key: 'load',
		value: function load() {
			//nothing
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			//nothing
		}
	}, {
		key: 'on_activate',
		value: function on_activate() {
			this.Search.search();
		}
	}]);

	return Media_class;
}(_baseTools2.default);

;
exports.default = Media_class;

/***/ }),

/***/ "./src/js/tools/pencil.js":
/*!********************************!*\
  !*** ./src/js/tools/pencil.js ***!
  \********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Pencil_class = function (_Base_tools_class) {
	_inherits(Pencil_class, _Base_tools_class);

	function Pencil_class(ctx) {
		_classCallCheck(this, Pencil_class);

		var _this2 = _possibleConstructorReturn(this, (Pencil_class.__proto__ || Object.getPrototypeOf(Pencil_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.name = 'pencil';
		_this2.layer = {};
		_this2.params_hash = false;
		return _this2;
	}

	_createClass(Pencil_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			if (params.antialiasing == true) _this.show_mouse_cursor(mouse.x, mouse.y, params.size || 1, 'circle');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) return;

			window.State.save();

			var params_hash = this.get_params_hash();
			var params = this.getParams();
			var opacity = 100;
			if (params.antialiasing == false) opacity = Math.round(_config2.default.ALPHA / 255 * 100);

			if (_config2.default.layer.type != this.name || params_hash != this.params_hash) {
				//register new object - current layer is not ours or params changed
				this.layer = {
					type: this.name,
					data: [],
					opacity: opacity,
					params: this.clone(this.getParams()),
					status: 'draft',
					render_function: [this.name, 'render'],
					width: null,
					height: null,
					rotate: null,
					is_vector: true
				};
				this.Base_layers.insert(this.layer);
				this.params_hash = params_hash;
			} else {
				//continue adding layer data, just register break
				_config2.default.layer.data.push(null);
			}
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			//more data
			if (params.antialiasing == false) _config2.default.layer.data.push([Math.ceil(mouse.x), Math.ceil(mouse.y)]);else _config2.default.layer.data.push([mouse.x - _config2.default.layer.x, mouse.y - _config2.default.layer.y]);
			this.Base_layers.render();
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				_config2.default.layer.status = null;
				return;
			}

			//more data
			if (params.antialiasing == false) _config2.default.layer.data.push([Math.ceil(mouse.x), Math.ceil(mouse.y)]);else _config2.default.layer.data.push([mouse.x - _config2.default.layer.x, mouse.y - _config2.default.layer.y]);
			_config2.default.layer.status = null;
			this.Base_layers.render();
		}
	}, {
		key: 'on_params_update',
		value: function on_params_update() {
			var params = this.getParams();
			var strict_element = document.querySelector('.block .item.size');

			if (params.antialiasing == false) {
				//hide strict controls
				strict_element.style.display = 'none';
			} else {
				//show strict controls
				strict_element.style.display = 'inline_block';
			}
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			var params = layer.params;

			if (params.antialiasing == true) this.render_antialiased(ctx, layer);else this.render_aliased(ctx, layer);
		}

		/**
   * draw with antialiasing, nice mode
   *
   * @param {ctx} ctx
   * @param {object} layer
   */

	}, {
		key: 'render_antialiased',
		value: function render_antialiased(ctx, layer) {
			if (layer.data.length == 0) return;

			var params = layer.params;
			var data = layer.data;
			var n = data.length;
			var size = params.size || 1;

			//set styles
			ctx.fillStyle = layer.color;
			ctx.strokeStyle = layer.color;
			ctx.lineWidth = size;
			ctx.lineCap = 'round';
			ctx.lineJoin = 'round';

			ctx.translate(layer.x, layer.y);

			//draw
			ctx.beginPath();
			ctx.moveTo(data[0][0], data[0][1]);
			for (var i = 1; i < n; i++) {
				if (data[i] === null) {
					//break
					ctx.beginPath();
				} else {
					//line
					if (data[i - 1] == null) {
						//exception - point
						ctx.arc(data[i][0], data[i][1], size / 2, 0, 2 * Math.PI, false);
						ctx.fill();
					} else {
						//lines
						ctx.beginPath();
						ctx.moveTo(data[i - 1][0], data[i - 1][1]);
						ctx.lineTo(data[i][0], data[i][1]);
						ctx.stroke();
					}
				}
			}
			if (n == 1 || data[1] == null) {
				//point
				ctx.beginPath();
				ctx.arc(data[0][0], data[0][1], size / 2, 0, 2 * Math.PI, false);
				ctx.fill();
			}

			ctx.translate(-layer.x, -layer.y);
		}

		/**
   * draw without antialiasing, sharp, ugly mode.
   *
   * @param {ctx} ctx
   * @param {object} layer
   */

	}, {
		key: 'render_aliased',
		value: function render_aliased(ctx, layer) {
			if (layer.data.length == 0) return;

			var params = layer.params;
			var data = layer.data;
			var n = data.length;

			//set styles
			ctx.fillStyle = layer.color;
			ctx.strokeStyle = layer.color;

			ctx.translate(layer.x, layer.y);

			//draw
			ctx.beginPath();
			ctx.moveTo(data[0][0], data[0][1]);
			for (var i = 1; i < n; i++) {
				if (data[i] === null) {
					//break
					ctx.beginPath();
				} else {
					//line
					if (data[i - 1] == null) {
						//exception - point
						ctx.fillRect(data[i][0] - 1, data[i][1] - 1, 1, 1);
					} else {
						//lines
						ctx.beginPath();
						this.draw_simple_line(ctx, data[i - 1][0], data[i - 1][1], data[i][0], data[i][1]);
					}
				}
			}
			if (n == 1 || data[1] == null) {
				//point
				ctx.beginPath();
				ctx.fillRect(data[0][0] - 1, data[0][1] - 1, 1, 1);
			}

			ctx.translate(-layer.x, -layer.y);
		}

		/**
   * draws line without aliasing
   *
   * @param {ctx} ctx
   * @param {int} from_x
   * @param {int} from_y
   * @param {int} to_x
   * @param {int} to_y
   */

	}, {
		key: 'draw_simple_line',
		value: function draw_simple_line(ctx, from_x, from_y, to_x, to_y) {
			var dist_x = from_x - to_x;
			var dist_y = from_y - to_y;
			var distance = Math.sqrt(dist_x * dist_x + dist_y * dist_y);
			var radiance = Math.atan2(dist_y, dist_x);
			for (var j = 0; j < distance; j++) {
				var x_tmp = Math.round(to_x - 1 + Math.cos(radiance) * j);
				var y_tmp = Math.round(to_y - 1 + Math.sin(radiance) * j);

				ctx.fillRect(x_tmp, y_tmp, 1, 1);
			}
		}
	}]);

	return Pencil_class;
}(_baseTools2.default);

;

exports.default = Pencil_class;

/***/ }),

/***/ "./src/js/tools/pick_color.js":
/*!************************************!*\
  !*** ./src/js/tools/pick_color.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _baseGui = __webpack_require__(/*! ./../core/base-gui.js */ "./src/js/core/base-gui.js");

var _baseGui2 = _interopRequireDefault(_baseGui);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Pick_color_class = function (_Base_tools_class) {
	_inherits(Pick_color_class, _Base_tools_class);

	function Pick_color_class(ctx) {
		_classCallCheck(this, Pick_color_class);

		var _this2 = _possibleConstructorReturn(this, (Pick_color_class.__proto__ || Object.getPrototypeOf(Pick_color_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Helper = new _helpers2.default();
		_this2.Base_gui = new _baseGui2.default();
		_this2.ctx = ctx;
		_this2.name = 'pick_color';
		return _this2;
	}

	_createClass(Pick_color_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			this.pick_color(mouse);
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.is_drag == false || mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			this.pick_color(mouse);
		}
	}, {
		key: 'pick_color',
		value: function pick_color(mouse) {
			var params = this.getParams();

			//get canvas from layer
			if (params.global == false) {
				//active layer
				var canvas = this.Base_layers.convert_layer_to_canvas(_config2.default.layer.id, null, false);
				var ctx = canvas.getContext("2d");
			} else {
				//global
				var canvas = document.createElement('canvas');
				var ctx = canvas.getContext("2d");
				canvas.width = _config2.default.WIDTH;
				canvas.height = _config2.default.HEIGHT;
				this.Base_layers.convert_layers_to_canvas(ctx);
			}
			//find color
			var c = ctx.getImageData(mouse.x, mouse.y, 1, 1).data;
			var hex = this.Helper.rgbToHex(c[0], c[1], c[2]);
			this.Base_gui.GUI_colors.change_color(hex);

			if (c[3] > 0) {
				//set alpha
				this.Base_gui.GUI_colors.change_alpha(c[3]);
			}

			this.Base_gui.GUI_colors.render_colors();
		}
	}]);

	return Pick_color_class;
}(_baseTools2.default);

;
exports.default = Pick_color_class;

/***/ }),

/***/ "./src/js/tools/rectangle.js":
/*!***********************************!*\
  !*** ./src/js/tools/rectangle.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Rectangle_class = function (_Base_tools_class) {
	_inherits(Rectangle_class, _Base_tools_class);

	function Rectangle_class(ctx) {
		_classCallCheck(this, Rectangle_class);

		var _this2 = _possibleConstructorReturn(this, (Rectangle_class.__proto__ || Object.getPrototypeOf(Rectangle_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.ctx = ctx;
		_this2.name = 'rectangle';
		_this2.layer = {};
		return _this2;
	}

	_createClass(Rectangle_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) return;

			window.State.save();

			//register new object - current layer is not ours or params changed
			this.layer = {
				type: this.name,
				params: this.clone(this.getParams()),
				status: 'draft',
				render_function: [this.name, 'render'],
				x: mouse.x,
				y: mouse.y,
				is_vector: true
			};
			this.Base_layers.insert(this.layer);
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();

			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;

			if (params.square == true) {
				if (Math.abs(width) < Math.abs(height)) {
					if (width > 0) width = Math.abs(height);else width = -Math.abs(height);
				} else {
					if (height > 0) height = Math.abs(width);else height = -Math.abs(width);
				}
			}

			//more data
			_config2.default.layer.width = width;
			_config2.default.layer.height = height;
			this.Base_layers.render();
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();

			if (mouse.valid == false || mouse.click_valid == false) {
				_config2.default.layer.status = null;
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;

			if (params.square == true) {
				if (Math.abs(width) < Math.abs(height)) {
					if (width > 0) width = Math.abs(height);else width = -Math.abs(height);
				} else {
					if (height > 0) height = Math.abs(width);else height = -Math.abs(width);
				}
			}

			if (width == 0 && height == 0) {
				//same coordinates - cancel
				this.Base_layers.delete(_config2.default.layer.id);
				return;
			}

			//more data
			_config2.default.layer.width = width;
			_config2.default.layer.height = height;
			_config2.default.layer.status = null;
			this.Base_layers.render();
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			var params = layer.params;
			var fill = params.fill;
			var rotateSupport = true;
			var radius = params.radius;
			if (radius == undefined) radius = 0;

			ctx.save();

			//set styles
			ctx.fillStyle = layer.color;
			ctx.strokeStyle = layer.color;
			ctx.lineWidth = params.size;

			if (rotateSupport == false) {
				this.roundRect(ctx, layer.x, layer.y, layer.width, layer.height, radius, fill);
			} else {
				//rotate
				ctx.translate(layer.x + layer.width / 2, layer.y + layer.height / 2);
				ctx.rotate(layer.rotate * Math.PI / 180);
				this.roundRect(ctx, -layer.width / 2, -layer.height / 2, layer.width, layer.height, radius, fill);
			}

			ctx.restore();
		}

		/**
   * draws rectangle
   * 
   * @param {CanvasRenderingContext2D} ctx
   * @param {Number} x
   * @param {Number} y
   * @param {Number} width
   * @param {Number} height
   * @param {Boolean} fill
   */

	}, {
		key: 'rectangle',
		value: function rectangle(ctx, x, y, width, height, fill) {
			x = x + 0.5;
			y = y + 0.5;
			width--;
			height--;
			if (typeof fill == "undefined") fill = false;

			ctx.beginPath();
			ctx.rect(x, y, width, height);

			if (fill) {
				ctx.fill();
			} else {
				ctx.stroke();
			}
		}

		/**
   * Draws a rounded rectangle on canvas.
   * 
   * @param {CanvasRenderingContext2D} ctx
   * @param {Number} x
   * @param {Number} y
   * @param {Number} width
   * @param {Number} height
   * @param {Number} radius
   * @param {Boolean} fill
   */

	}, {
		key: 'roundRect',
		value: function roundRect(ctx, x, y, width, height, radius, fill) {
			x = parseInt(x);
			y = parseInt(y);
			width = parseInt(width);
			height = parseInt(height);
			if (width < 0) {
				width = Math.abs(width);
				x = x - width;
			}
			if (height < 0) {
				height = Math.abs(height);
				y = y - height;
			}

			radius = parseInt(radius);
			if (typeof fill == 'undefined') {
				fill = false;
			}
			if (typeof radius === 'undefined') {
				radius = 0;
			}
			radius = Math.min(radius, width / 2, height / 2);
			radius = Math.floor(radius);

			//make it nicer
			x = x + 0.5;
			y = y + 0.5;
			width--;
			height--;

			radius = { tl: radius, tr: radius, br: radius, bl: radius };

			ctx.beginPath();
			ctx.moveTo(x + radius.tl, y);
			ctx.lineTo(x + width - radius.tr, y);
			ctx.quadraticCurveTo(x + width, y, x + width, y + radius.tr);
			ctx.lineTo(x + width, y + height - radius.br);
			ctx.quadraticCurveTo(x + width, y + height, x + width - radius.br, y + height);
			ctx.lineTo(x + radius.bl, y + height);
			ctx.quadraticCurveTo(x, y + height, x, y + height - radius.bl);
			ctx.lineTo(x, y + radius.tl);
			ctx.quadraticCurveTo(x, y, x + radius.tl, y);
			ctx.closePath();
			if (fill) {
				ctx.fill();
			} else {
				ctx.stroke();
			}
		}
	}]);

	return Rectangle_class;
}(_baseTools2.default);

exports.default = Rectangle_class;

/***/ }),

/***/ "./src/js/tools/select.js":
/*!********************************!*\
  !*** ./src/js/tools/select.js ***!
  \********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseSelection = __webpack_require__(/*! ./../core/base-selection.js */ "./src/js/core/base-selection.js");

var _baseSelection2 = _interopRequireDefault(_baseSelection);

var _popup = __webpack_require__(/*! ./../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Select_tool_class = function (_Base_tools_class) {
	_inherits(Select_tool_class, _Base_tools_class);

	function Select_tool_class(ctx) {
		_classCallCheck(this, Select_tool_class);

		var _this2 = _possibleConstructorReturn(this, (Select_tool_class.__proto__ || Object.getPrototypeOf(Select_tool_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.POP = new _popup2.default();
		_this2.ctx = ctx;
		_this2.name = 'select';
		_this2.saved = false;
		_this2.last_post = { x: null, y: null };

		var sel_config = {
			enable_background: false,
			enable_borders: true,
			enable_controls: true,
			keep_ratio: true,
			data_function: function data_function() {
				return _config2.default.layer;
			}
		};
		_this2.Base_selection = new _baseSelection2.default(ctx, sel_config, _this2.name);
		return _this2;
	}

	_createClass(Select_tool_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});

			//keyboard actions
			document.addEventListener('keydown', function (e) {
				if (_config2.default.TOOL.name != _this.name) return;
				if (_this.POP.active == true) return;
				if (e.target.type == 'text' || e.target.tagName == 'INPUT' || e.target.tagName == 'SELECT') return;
				var k = e.keyCode;

				//up
				if (k == 38) {
					_this.move(0, -1, e);
				}
				//down
				else if (k == 40) {
						_this.move(0, 1, e);
					}
					//right
					else if (k == 39) {
							_this.move(1, 0, e);
						}
						//left
						else if (k == 37) {
								_this.move(-1, 0, e);
							}
				if (k == 46) {
					//delete
					if (_config2.default.TOOL.name == _this.name) {
						_this.Base_layers.delete(_config2.default.layer.id);
					}
				}
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) return;
			if (this.Base_selection.mouse_lock != null) return;

			this.auto_select_object(e);
			this.saved = false;

			this.last_post = {
				x: _config2.default.layer.x,
				y: _config2.default.layer.y
			};
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (this.Base_selection.mouse_lock != null) return;

			if (this.saved == false) {
				window.State.save();
				this.saved = true;
			}

			//move object
			_config2.default.layer.x = Math.round(mouse.x - mouse.click_x + this.last_post.x);
			_config2.default.layer.y = Math.round(mouse.y - mouse.click_y + this.last_post.y);

			this.Base_layers.render();
		}
	}, {
		key: 'move',
		value: function move(direction_x, direction_y, event) {
			var power = 10;
			if (event.ctrlKey == true || event.metaKey) power = 50;
			if (event.shiftKey == true) power = 1;

			_config2.default.layer.x += direction_x * power;
			_config2.default.layer.y += direction_y * power;
			_config2.default.need_render = true;
		}
	}, {
		key: 'auto_select_object',
		value: function auto_select_object(e) {
			var params = this.getParams();
			if (params.auto_select == false) return;

			var layers_sorted = this.Base_layers.get_sorted_layers();

			//render main canvas
			for (var i = 0; i < layers_sorted.length; i++) {
				var value = layers_sorted[i];
				var canvas = this.Base_layers.convert_layer_to_canvas(value.id, null, false);

				if (this.check_hit_region(e, canvas.getContext("2d")) == true) {
					this.Base_layers.select(value.id);
					break;
				}
			}
		}
	}, {
		key: 'check_hit_region',
		value: function check_hit_region(e, ctx) {
			var mouse = this.get_mouse_info(e);
			var data = ctx.getImageData(mouse.x, mouse.y, 1, 1).data;

			var blank = [0, 0, 0, 0];
			if (_config2.default.TRANSPARENCY == false) {
				blank = [0, 0, 0, 0];
			}

			if (data[0] != blank[0] || data[1] != blank[1] || data[2] != blank[2] || data[3] != blank[3]) {
				//hit
				return true;
			}

			return false;
		}
	}]);

	return Select_tool_class;
}(_baseTools2.default);

;
exports.default = Select_tool_class;

/***/ }),

/***/ "./src/js/tools/selection.js":
/*!***********************************!*\
  !*** ./src/js/tools/selection.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _baseSelection = __webpack_require__(/*! ./../core/base-selection.js */ "./src/js/core/base-selection.js");

var _baseSelection2 = _interopRequireDefault(_baseSelection);

var _guiTools = __webpack_require__(/*! ./../core/gui/gui-tools.js */ "./src/js/core/gui/gui-tools.js");

var _guiTools2 = _interopRequireDefault(_guiTools);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var instance = null;

var Selection_class = function (_Base_tools_class) {
	_inherits(Selection_class, _Base_tools_class);

	function Selection_class(ctx) {
		_classCallCheck(this, Selection_class);

		//singleton
		var _this2 = _possibleConstructorReturn(this, (Selection_class.__proto__ || Object.getPrototypeOf(Selection_class)).call(this));

		if (instance) {
			var _ret;

			return _ret = instance, _possibleConstructorReturn(_this2, _ret);
		}
		instance = _this2;

		var _this = _this2;

		_this2.Base_layers = new _baseLayers2.default();
		_this2.ctx = ctx;
		_this2.name = 'selection';
		_this2.type = null;
		_this2.tmpCanvas = null;
		_this2.tmpCanvasCtx = null;
		_this2.selection_coords_from = null;
		_this2.selection = {
			x: null,
			y: null,
			width: null,
			height: null
		};

		var sel_config = {
			enable_background: true,
			enable_borders: true,
			enable_controls: false,
			data_function: function data_function() {
				return _this.selection;
			}
		};
		_this2.Base_selection = new _baseSelection2.default(ctx, sel_config, _this2.name);
		_this2.GUI_tools = new _guiTools2.default();
		return _this2;
	}

	_createClass(Selection_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});

			document.addEventListener('keydown', function (e) {
				var code = e.keyCode;
				if (e.target.type == 'text' || e.target.tagName == 'INPUT' || e.target.type == 'textarea') return;

				if (code == 27) {
					//escape
					_this.on_leave();
				}
				if (code == 46) {
					//delete
					if (_config2.default.TOOL.name == _this.name) {
						window.State.save();
						_this.delete_selection();
					}
				}
				if (code == 65 && (e.ctrlKey == true || e.metaKey)) {
					//A
					e.preventDefault();
					_this.select_all();
				}
			}, false);
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			var layer = _config2.default.layer;
			if (mouse.valid == false || mouse.click_valid == false) return;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			if (this.selection.width != null && this.selection.height != null && mouse.x > this.selection.x && mouse.x < this.selection.x + this.selection.width && mouse.y > this.selection.y && mouse.y < this.selection.y + this.selection.height && layer.width == layer.width_original && layer.height == layer.height_original) {
				//move
				this.type = 'move';

				if (this.tmpCanvas == null) {
					this.init_tmp_canvas();

					//register tmp canvas for faster redraw
					_config2.default.layer.link_canvas = this.tmpCanvas;
					_config2.default.need_render = true;
				}
			} else {
				//save last translation?
				if (this.selection.width != null && this.selection.height != null) {
					this.save_translate();
				}

				//create new selection
				this.selection = {
					x: mouse.x,
					y: mouse.y,
					width: 0,
					height: 0
				};
				this.type = 'create';
				this.selection_coords_from = { x: mouse.x, y: mouse.y };
			}
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.is_drag == false) return;
			if (e.type == 'mousedown' && (mouse.valid == false || mouse.click_valid == false) || _config2.default.layer.type != 'image') {
				return;
			}
			if (this.selection_coords_from === null) {
				return;
			}
			if (this.type == 'create') {
				//create new selection
				this.selection.width = mouse.x - mouse.click_x;
				this.selection.height = mouse.y - mouse.click_y;
				_config2.default.need_render = true;
			} else {
				//move selection
				var selection = this.selection;
				var layer = _config2.default.layer;
				var x = this.selection.x + (mouse.x - mouse.last_x);
				var y = this.selection.y + (mouse.y - mouse.last_y);
				var width = Math.ceil(selection.width);
				var height = Math.ceil(selection.height);
				var from_x = this.selection_coords_from.x;
				var from_y = this.selection_coords_from.y;

				this.Base_selection.set_selection(x, y, null, null);

				//move data
				this.tmpCanvasCtx.clearRect(0, 0, layer.width, layer.height);
				this.tmpCanvasCtx.drawImage(layer.link, 0, 0, layer.width, layer.height);
				this.tmpCanvasCtx.clearRect(from_x - layer.x, from_y - layer.y, selection.width, selection.height);
				this.tmpCanvasCtx.drawImage(layer.link, Math.round(from_x - layer.x), Math.round(from_y - layer.y), width, height, Math.round(selection.x - layer.x), Math.round(selection.y - layer.y), width, height);

				//draw draft preview
				_config2.default.need_render = true;
			}
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);

			if (e.type == 'mousedown' && mouse.click_valid == false || _config2.default.layer.type != 'image') {
				return;
			}

			var width = mouse.x - this.selection.x;
			var height = mouse.y - this.selection.y;

			if (width == 0 || height == 0) {
				//cancel selection
				this.on_leave();
				return;
			}

			if (this.selection.width != null && this.selection.height != null) {
				//make sure coords not negative
				var details = this.selection;
				var x = details.x;
				var y = details.y;
				if (details.width < 0) {
					x = x + details.width;
					this.selection_coords_from.x = x;
				}
				if (details.height < 0) {
					y = y + details.height;
					this.selection_coords_from.y = y;
				}
				this.selection = {
					x: x,
					y: y,
					width: Math.abs(details.width),
					height: Math.abs(details.height)
				};
				_config2.default.need_render = true;
			}
		}
	}, {
		key: 'select_all',
		value: function select_all() {
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.TOOL.name != 'selection') {
				this.GUI_tools.activate_tool(this.name);
			}

			this.selection = {
				x: 0,
				y: 0,
				width: _config2.default.WIDTH,
				height: _config2.default.HEIGHT
			};
			_config2.default.need_render = true;
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			//nothing
		}
	}, {
		key: 'save_translate',
		value: function save_translate() {
			if (this.tmpCanvas == null) return;

			delete _config2.default.layer.link_canvas;
			this.Base_layers.update_layer_image(this.tmpCanvas);

			this.reset_tmp_canvas();
			_config2.default.need_render = true;
		}
	}, {
		key: 'delete_selection',
		value: function delete_selection() {
			var selection = this.selection;
			var layer = _config2.default.layer;

			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}

			if (selection == null) {
				_alertifyMin2.default.error('Nothing is selected.');
				return;
			}

			this.init_tmp_canvas();

			var mouse_x = selection.x - layer.x;
			var mouse_y = selection.y - layer.y;

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');
			selection.width = this.adaptSize(selection.width, 'width');
			selection.height = this.adaptSize(selection.height, 'height');

			//do erase
			this.tmpCanvasCtx.clearRect(mouse_x, mouse_y, selection.width, selection.height);

			this.Base_layers.update_layer_image(this.tmpCanvas);
			this.selection = {
				x: null,
				y: null,
				width: null,
				height: null
			};
			this.Base_selection.reset_selection();
			this.reset_tmp_canvas();

			delete _config2.default.layer.link_canvas;
			this.reset_tmp_canvas();
		}
	}, {
		key: 'init_tmp_canvas',
		value: function init_tmp_canvas() {
			this.tmpCanvas = document.createElement('canvas');
			this.tmpCanvasCtx = this.tmpCanvas.getContext("2d");
			this.tmpCanvas.width = _config2.default.layer.width_original;
			this.tmpCanvas.height = _config2.default.layer.height_original;
			this.tmpCanvasCtx.drawImage(_config2.default.layer.link, 0, 0);
		}
	}, {
		key: 'on_leave',
		value: function on_leave() {
			this.selection = {
				x: null,
				y: null,
				width: null,
				height: null
			};
			this.Base_selection.reset_selection();
			delete _config2.default.layer.link_canvas;
			this.reset_tmp_canvas();
		}
	}, {
		key: 'clear_selection',
		value: function clear_selection() {
			this.on_leave();
		}
	}, {
		key: 'reset_tmp_canvas',
		value: function reset_tmp_canvas() {
			if (this.tmpCanvas == null) return;
			this.tmpCanvas.width = 1;
			this.tmpCanvas.height = 1;
			this.tmpCanvas = null;
			this.tmpCanvasCtx = null;
		}
	}]);

	return Selection_class;
}(_baseTools2.default);

;
exports.default = Selection_class;

/***/ }),

/***/ "./src/js/tools/sharpen.js":
/*!*********************************!*\
  !*** ./src/js/tools/sharpen.js ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _alertifyMin = __webpack_require__(/*! ./../../../node_modules/alertifyjs/build/alertify.min.js */ "./node_modules/alertifyjs/build/alertify.min.js");

var _alertifyMin2 = _interopRequireDefault(_alertifyMin);

var _imagefilters = __webpack_require__(/*! ./../libs/imagefilters.js */ "./src/js/libs/imagefilters.js");

var _imagefilters2 = _interopRequireDefault(_imagefilters);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Sharpen_class = function (_Base_tools_class) {
	_inherits(Sharpen_class, _Base_tools_class);

	function Sharpen_class(ctx) {
		_classCallCheck(this, Sharpen_class);

		var _this2 = _possibleConstructorReturn(this, (Sharpen_class.__proto__ || Object.getPrototypeOf(Sharpen_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Helper = new _helpers2.default();
		_this2.ctx = ctx;
		_this2.name = 'sharpen';
		_this2.tmpCanvas = null;
		_this2.tmpCanvasCtx = null;
		_this2.started = false;
		return _this2;
	}

	_createClass(Sharpen_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);

			//mouse cursor
			var mouse = _this.get_mouse_info(event);
			var params = _this.getParams();
			_this.show_mouse_cursor(mouse.x, mouse.y, params.size, 'circle');
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			this.started = false;
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (_config2.default.layer.type != 'image') {
				_alertifyMin2.default.error('Layer must be image, convert it to raster to apply this tool.');
				return;
			}
			if (_config2.default.layer.rotate || 0 > 0) {
				_alertifyMin2.default.error('Erase on rotate object is disabled. Sorry.');
				return;
			}
			this.started = true;
			window.State.save();

			//get canvas from layer
			this.tmpCanvas = document.createElement('canvas');
			this.tmpCanvasCtx = this.tmpCanvas.getContext("2d");
			this.tmpCanvas.width = _config2.default.layer.width_original;
			this.tmpCanvas.height = _config2.default.layer.height_original;
			this.tmpCanvasCtx.drawImage(_config2.default.layer.link, 0, 0);

			//do sharpen
			this.sharpen_general('click', mouse, params.size);

			//register tmp canvas for faster redraw
			_config2.default.layer.link_canvas = this.tmpCanvas;
			_config2.default.need_render = true;
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}
			if (this.started == false) {
				return;
			}

			//do sharpen
			this.sharpen_general('move', mouse, params.size);

			//draw draft preview
			_config2.default.need_render = true;
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			if (this.started == false) {
				return;
			}
			delete _config2.default.layer.link_canvas;

			this.Base_layers.update_layer_image(this.tmpCanvas);

			//decrease memory
			this.tmpCanvas.width = 1;
			this.tmpCanvas.height = 1;
			this.tmpCanvas = null;
			this.tmpCanvasCtx = null;
		}
	}, {
		key: 'sharpen_general',
		value: function sharpen_general(type, mouse, size) {
			var ctx = this.tmpCanvasCtx;
			var mouse_x = Math.round(mouse.x) - _config2.default.layer.x;
			var mouse_y = Math.round(mouse.y) - _config2.default.layer.y;

			//adapt to origin size
			mouse_x = this.adaptSize(mouse_x, 'width');
			mouse_y = this.adaptSize(mouse_y, 'height');
			var size_w = this.adaptSize(size, 'width');
			var size_h = this.adaptSize(size, 'height');

			//find center
			var center_x = mouse_x - Math.round(size_w / 2);
			var center_y = mouse_y - Math.round(size_h / 2);

			//convert float coords to integers
			mouse_x = Math.round(mouse_x);
			mouse_y = Math.round(mouse_y);
			center_x = Math.round(center_x);
			center_y = Math.round(center_y);

			var power = 0.5;
			if (type == 'move') {
				power = power / 10;
			}

			var imageData = ctx.getImageData(center_x, center_y, size_w, size_h);
			var filtered = _imagefilters2.default.Sharpen(imageData, power); //add effect
			this.Helper.image_round(this.tmpCanvasCtx, mouse_x, mouse_y, size_w, size_h, filtered);
		}
	}]);

	return Sharpen_class;
}(_baseTools2.default);

exports.default = Sharpen_class;

/***/ }),

/***/ "./src/js/tools/text.js":
/*!******************************!*\
  !*** ./src/js/tools/text.js ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
	value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _config = __webpack_require__(/*! ./../config.js */ "./src/js/config.js");

var _config2 = _interopRequireDefault(_config);

var _baseTools = __webpack_require__(/*! ./../core/base-tools.js */ "./src/js/core/base-tools.js");

var _baseTools2 = _interopRequireDefault(_baseTools);

var _baseLayers = __webpack_require__(/*! ./../core/base-layers.js */ "./src/js/core/base-layers.js");

var _baseLayers2 = _interopRequireDefault(_baseLayers);

var _helpers = __webpack_require__(/*! ./../libs/helpers.js */ "./src/js/libs/helpers.js");

var _helpers2 = _interopRequireDefault(_helpers);

var _popup = __webpack_require__(/*! ./../libs/popup.js */ "./src/js/libs/popup.js");

var _popup2 = _interopRequireDefault(_popup);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var Text_class = function (_Base_tools_class) {
	_inherits(Text_class, _Base_tools_class);

	function Text_class(ctx) {
		_classCallCheck(this, Text_class);

		var _this2 = _possibleConstructorReturn(this, (Text_class.__proto__ || Object.getPrototypeOf(Text_class)).call(this));

		_this2.Base_layers = new _baseLayers2.default();
		_this2.Helper = new _helpers2.default();
		_this2.POP = new _popup2.default();
		_this2.ctx = ctx;
		_this2.name = 'text';
		_this2.layer = {};
		_this2.is_fonts_loaded = false;
		return _this2;
	}

	_createClass(Text_class, [{
		key: 'dragStart',
		value: function dragStart(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousedown(event);
		}
	}, {
		key: 'dragMove',
		value: function dragMove(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mousemove(event);
		}
	}, {
		key: 'dragEnd',
		value: function dragEnd(event) {
			var _this = this;
			if (_config2.default.TOOL.name != _this.name) return;
			_this.mouseup(event);
		}
	}, {
		key: 'load',
		value: function load() {
			var _this = this;

			//mouse events
			document.addEventListener('mousedown', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('mousemove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('mouseup', function (event) {
				_this.dragEnd(event);
			});

			// collect touch events
			document.addEventListener('touchstart', function (event) {
				_this.dragStart(event);
			});
			document.addEventListener('touchmove', function (event) {
				_this.dragMove(event);
			});
			document.addEventListener('touchend', function (event) {
				_this.dragEnd(event);
			});
		}
	}, {
		key: 'mousedown',
		value: function mousedown(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.valid == false || mouse.click_valid == false) return;

			window.State.save();

			//register new object - current layer is not ours or params changed
			this.layer = {
				type: this.name,
				params: this.clone(this.getParams()),
				render_function: [this.name, 'render'],
				x: mouse.x,
				y: mouse.y,
				rotate: null,
				is_vector: true
			};
			this.Base_layers.insert(this.layer);
		}
	}, {
		key: 'mousemove',
		value: function mousemove(e) {
			var mouse = this.get_mouse_info(e);
			if (mouse.is_drag == false) return;
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;

			//more data
			_config2.default.layer.width = width;
			_config2.default.layer.height = height;
			this.Base_layers.render();
		}
	}, {
		key: 'mouseup',
		value: function mouseup(e) {
			var mouse = this.get_mouse_info(e);
			var params = this.getParams();
			if (mouse.valid == false || mouse.click_valid == false) {
				return;
			}

			var width = mouse.x - this.layer.x;
			var height = mouse.y - this.layer.y;

			if (width == 0 && height == 0) {
				//same coordinates - cancel
				width = _config2.default.WIDTH - this.layer.x - Math.round(_config2.default.WIDTH / 50);
				height = 100;
			}
			//more data
			_config2.default.layer.width = width;
			_config2.default.layer.height = height;
			this.Base_layers.render();

			//ask for text
			var settings = {
				title: 'Edit text',
				params: [{ name: "text", title: "Text:", value: "Text example", type: "textarea" }, { name: "size", title: "Size:", value: 40 }, { name: "family", title: "Custom font", value: "Verdana", values: this.get_fonts() }, { name: "bold", title: "Bold:", value: false }, { name: "italic", title: "Italic:", value: false }, { name: "align", title: "Align:", value: 'Left', values: ["Left", "Center", "Right"], type: 'select' }, { name: "stroke", title: "Stroke:", value: false }, { name: "stroke_size", title: "Stroke size:", value: 1 }],
				on_load: function on_load(params) {
					_config2.default.layer.params = params;
					_config2.default.need_render = true;
					//add preview
					var button = document.createElement('button');
					button.innerHTML = 'Preview';
					button.className = 'button trns';
					document.querySelector('#popup .buttons').appendChild(button);
					button.addEventListener('click', function (e) {
						_config2.default.need_render = true;
					});
				},
				on_change: function on_change(params) {
					_config2.default.layer.params = params;
					_config2.default.need_render = true;
				},
				on_finish: function on_finish(params) {
					_config2.default.layer.params = params;
					_config2.default.need_render = true;
				}
			};
			this.POP.show(settings);
		}
	}, {
		key: 'getLines',
		value: function getLines(ctx, text, maxWidth) {
			var words = text.split(" ");
			var lines = [];
			var currentLine = words[0];

			for (var i = 1; i < words.length; i++) {
				var word = words[i];
				var width = ctx.measureText(currentLine + " " + word).width;
				if (width < maxWidth) {
					currentLine += " " + word;
				} else {
					lines.push(currentLine);
					currentLine = word;
				}
			}
			lines.push(currentLine);

			return lines;
		}
	}, {
		key: 'render',
		value: function render(ctx, layer) {
			if (layer.width == 0 && layer.height == 0) return;
			var params = layer.params;

			var font = params.family;
			if ((typeof font === 'undefined' ? 'undefined' : _typeof(font)) == 'object') {
				font = font.value; //legacy
			}
			var text = params.text;
			var size = params.size;
			var line_height = size;

			if (text == undefined) {
				//not defined yet
				return;
			}

			this.load_fonts();

			//set styles
			if (params.bold && params.italic) ctx.font = "Bold Italic " + size + "px " + font;else if (params.bold) ctx.font = "Bold " + size + "px " + font;else if (params.italic) ctx.font = "Italic " + size + "px " + font;else ctx.font = "Normal " + size + "px " + font;
			ctx.fillStyle = layer.color;
			ctx.strokeStyle = layer.color;
			ctx.lineWidth = params.stroke_size;
			ctx.textBaseline = 'top';

			var paragraphs = text.split("\n");
			var offset_y = -line_height;
			for (var i in paragraphs) {
				var block_test = paragraphs[i];
				var lines = this.getLines(ctx, block_test, layer.width);
				for (var j in lines) {
					offset_y += line_height;
					this.render_text_line(ctx, layer, lines[j], offset_y);
				}
			}
		}
	}, {
		key: 'render_text_line',
		value: function render_text_line(ctx, layer, text, offset_y) {
			var params = layer.params;
			var stroke = params.stroke;
			var align = params.align;
			if ((typeof align === 'undefined' ? 'undefined' : _typeof(align)) == 'object') {
				align = align.value; //legacy
			}
			align = align.toLowerCase();
			var text_width = ctx.measureText(text).width;

			//tabs
			text = text.replace(/\t/g, '      ');

			var start_x = layer.x;
			if (align == 'right') {
				start_x = layer.x + layer.width - text_width;
			} else if (align == 'center') {
				start_x = layer.x + Math.round(layer.width / 2) - Math.round(text_width / 2);
			}

			if (stroke == false) ctx.fillText(text, start_x, layer.y + offset_y);else ctx.strokeText(text, start_x, layer.y + offset_y);
		}
	}, {
		key: 'load_fonts',
		value: function load_fonts() {
			if (this.is_fonts_loaded == true) {
				return;
			}

			var fonts = this.get_external_fonts();
			var head = document.getElementsByTagName('head')[0];
			for (var i in fonts) {
				var font_family = fonts[i].replace(/[^a-zA-Z0-9 ]/g, '').replace(/ +/g, '+');
				var font_url = 'https://fonts.googleapis.com/css?family=' + font_family;

				var link = document.createElement('link');
				link.rel = 'stylesheet';
				link.href = font_url;
				head.appendChild(link);
			}

			this.is_fonts_loaded = true;
		}
	}, {
		key: 'get_fonts',
		value: function get_fonts() {
			var default_fonts = ["Arial", "Courier", "Impact", "Helvetica", "Monospace", "Tahoma", "Times New Roman", "Verdana"];

			var external_fonts = this.get_external_fonts();

			//merge and sort
			var merged = default_fonts.concat(external_fonts);
			merged = merged.sort();

			return merged;
		}
	}, {
		key: 'get_external_fonts',
		value: function get_external_fonts() {
			var google_fonts = ["Amatic SC", "Arimo", "Codystar", "Creepster", "Indie Flower", "Lato", "Lora", "Merriweather", "Monoton", "Montserrat", "Mukta", "Muli", "Nosifer", "Nunito", "Oswald", "Orbitron", "Pacifico", "PT Sans", "PT Serif", "Playfair Display", "Poppins", "Raleway", "Roboto", "Rubik", "Special Elite", "Tangerine", "Titillium Web", "Ubuntu"];

			return google_fonts;
		}
	}]);

	return Text_class;
}(_baseTools2.default);

exports.default = Text_class;

/***/ }),

/***/ 0:
/*!*********************************************!*\
  !*** multi babel-polyfill ./src/js/main.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! babel-polyfill */"./node_modules/babel-polyfill/lib/index.js");
module.exports = __webpack_require__(/*! ./src/js/main.js */"./src/js/main.js");


/***/ })

/******/ });
//# sourceMappingURL=bundle.js.map