mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-16 02:18:22 +01:00
806 lines
460 KiB
JavaScript
806 lines
460 KiB
JavaScript
|
/*!
|
||
|
* tui-code-snippet.js
|
||
|
* @version 1.5.0
|
||
|
* @author NHNEnt FE Development Lab <dl_javascript@nhnent.com>
|
||
|
* @license MIT
|
||
|
*/
|
||
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.util=t():(e.tui=e.tui||{},e.tui.util=t())}(this,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="dist",n(0)}([function(e,t,n){"use strict";var o={},i=n(1),r=i.extend;r(o,i),r(o,n(3)),r(o,n(2)),r(o,n(4)),r(o,n(5)),r(o,n(6)),r(o,n(7)),r(o,n(8)),r(o,n(9)),o.browser=n(10),o.popup=n(11),o.formatDate=n(12),o.defineClass=n(13),o.defineModule=n(14),o.defineNamespace=n(15),o.CustomEvents=n(16),o.Enum=n(17),o.ExMap=n(18),o.HashMap=n(20),o.Map=n(19),e.exports=o},function(e,t,n){"use strict";var o=n(2),i=n(3),r=0;function s(e,t){var n,r=[],a=[];if(isNaN(e)&&isNaN(t)&&o.isNumber(e)&&o.isNumber(t))return!0;if(e===t)return!0;if(o.isFunction(e)&&o.isFunction(t)||e instanceof Date&&t instanceof Date||e instanceof RegExp&&t instanceof RegExp||e instanceof String&&t instanceof String||e instanceof Number&&t instanceof Number)return e.toString()===t.toString();if(!(e instanceof Object&&t instanceof Object))return!1;if(e.isPrototypeOf(t)||t.isPrototypeOf(e)||e.constructor!==t.constructor||e.prototype!==t.prototype)return!1;if(i.inArray(e,r)>-1||i.inArray(t,a)>-1)return!1;for(n in t){if(t.hasOwnProperty(n)!==e.hasOwnProperty(n))return!1;if(typeof t[n]!=typeof e[n])return!1}for(n in e){if(t.hasOwnProperty(n)!==e.hasOwnProperty(n))return!1;if(typeof t[n]!=typeof e[n])return!1;if("object"==typeof e[n]||"function"==typeof e[n]){if(r.push(e),a.push(t),!s(e[n],t[n]))return!1;r.pop(),a.pop()}else if(e[n]!==t[n])return!1}return!0}function a(e,t){for(var n=arguments,i=n[0],r=1,s=n.length;r<s;r+=1){if(o.isUndefined(i)||o.isNull(i))return;i=i[n[r]]}return i}e.exports={extend:function(e,t){var n,o,i,r,s=Object.prototype.hasOwnProperty;for(i=1,r=arguments.length;i<r;i+=1)for(o in n=arguments[i])s.call(n,o)&&(e[o]=n[o]);return e},stamp:function(e){return e.__fe_id||(r+=1,e.__fe_id=r),e.__fe_id},hasStamp:function(e){return o.isExisty(a(e,"__fe_id"))},resetLastId:function(){r=0},keys:Object.prototype.keys||function(e){var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push(t);return n},compareJSON:function(e){var t=arguments.length,n=1;if(t<1)return!0;for(;n<t;n+=1)if(!s(e,arguments[n]))return!1;return!0},pick:a}},function(e,t){"use strict";var n=Object.prototype.toString;function o(e){return!i(e)&&!r(e)}function i(e){return void 0===e}function r(e){return null===e}function s(e){return o(e)&&!1!==e}function a(e){return o(e)&&("[object Arguments]"===n.call(e)||!!e.callee)}function l(e){return e instanceof Array}function c(e){return e===Object(e)}function u(e){return e instanceof Function}function d(e){return"string"==typeof e||e instanceof String}function h(e){return!(o(e)&&!function(e){return d(e)&&""===e}(e))||(l(e)||a(e)?0===e.length:!(c(e)&&!u(e))||!function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!0;return!1}(e))}e.exports={isExisty:o,isUndefined:i,isNull:r,isTruthy:s,isFalsy:function(e){return!s(e)},isArguments:a,isArray:l,isArraySafe:function(e){return"[object Array]"===n.call(e)},isObject:c,isFunction:u,isFunctionSafe:function(e){return"[object Function]"===n.call(e)},isNumber:function(e){return"number"==typeof e||e instanceof Number},isNumberSafe:function(e){return"[object Number]"===n.call(e)},isDate:function(e){return e instanceof Date},isDateSafe:function(e){return"[object Date]"===n.call(e)},isString:d,isStringSafe:function(e){return"[object String]"===n.call(e)},isBoolean:function(e){return"boolean"==typeof e||e instanceof Boolean},isBooleanSafe:function(e){return"[object Boolean]"===n.call(e)},isHTMLNode:function(e){return"object"==typeof HTMLElement?e&&(e instanceof HTMLElement||!!e.nodeType):!(!e||!e.nodeType)},isHTMLTag:function(e){return"object"==typeof HTMLElement?e&&e instanceof HTMLElement:!(!e||!e.nodeType||1!==e.nodeType)},isEmpty:h,isNotEmpty:function(e){return!h(e)}}},function(e,t,n){"use strict";var o,i=n(4
|
||
|
/*!
|
||
|
* TOAST UI Color Picker
|
||
|
* @version 2.2.6
|
||
|
* @author NHN FE Development Team <dl_javascript@nhn.com>
|
||
|
* @license MIT
|
||
|
*/
|
||
|
function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.colorPicker=t():(e.tui=e.tui||{},e.tui.colorPicker=t())}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="dist",n(n.s=33)}([function(e,t,n){"use strict";e.exports=function(e,t){var n,o,i,r,s=Object.prototype.hasOwnProperty;for(i=1,r=arguments.length;i<r;i+=1)for(o in n=arguments[i])s.call(n,o)&&(e[o]=n[o]);return e}},function(e,t,n){"use strict";e.exports=function(e){return e instanceof Array}},function(e,t,n){"use strict";var o=n(1),i=n(6),r=n(7);e.exports=function(e,t,n){o(e)?i(e,t,n):r(e,t,n)}},function(e,t,n){"use strict";e.exports=function(e){return void 0===e}},function(e,t,n){"use strict";var o=n(22),i=n(2),r=n(6),s=n(7),a=n(37),l=0,c={getLength:function(e){var t=0;return s(e,(function(){t+=1})),t},map:function(e,t,n){var o=[];return i(e,(function(){o.push(t.apply(n||null,arguments))})),o},filter:function(e,t,n){var o=[];return r(e,(function(e){t.apply(n||null,arguments)&&o.push(e)})),o},generateId:function(){return l+=1},isOldBrowser:o.msie&&o.version<9,sendHostName:function(){a("color-picker","UA-129987462-1")}};e.exports=c},function(e,t,n){"use strict";var o=n(1);e.exports=function(e,t,n){var i,r;if(n=n||0,!o(t))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e,n);for(r=t.length,i=n;n>=0&&i<r;i+=1)if(t[i]===e)return i;return-1}},function(e,t,n){"use strict";e.exports=function(e,t,n){var o=0,i=e.length;for(n=n||null;o<i&&!1!==t.call(n,e[o],o,e);o+=1);}},function(e,t,n){"use strict";e.exports=function(e,t,n){var o;for(o in n=n||null,e)if(e.hasOwnProperty(o)&&!1===t.call(n,e[o],o,e))break}},function(e,t,n){"use strict";var o=n(39),i=n(13),r=n(41),s=n(3),a=n(9),l=n(19),c=n(4);function u(e,t){var n=c.generateId();e=e||{},s(t)&&(t=a.appendHTMLElement("div")),o(t,"tui-view-"+n),this.id=n,this.container=t,this.childs=new l((function(e){return e.id})),this.parent=null}u.prototype.addChild=function(e,t){t&&t.call(e,this),e.parent=this,this.childs.add(e)},u.prototype.removeChild=function(e,t){var n=r(e)?this.childs.items[e]:e;t&&t.call(n,this),this.childs.remove(n.id)},u.prototype.render=function(){this.childs.each((function(e){e.render()}))},u.prototype.recursive=function(e,t){i(e)&&(t||e(this),this.childs.each((function(t){t.recursive(e)})))},u.prototype.resize=function(){for(var e=Array.prototype.slice.call(arguments),t=this.parent;t;)i(t._onResize)&&t._onResize.apply(t,e),t=t.parent},u.prototype._beforeDestroy=function(){},u.prototype._destroy=function(){this._beforeDestroy(),this.container.innerHTML="",this.id=this.parent=this.childs=this.container=null},u.prototype.destroy=function(e){this.childs&&(this.childs.each((function(e){e.destroy(!0),e._destroy()})),this.childs.clear()),e||this._destroy()},u.prototype.getViewBound=function(){var e=this.container.getBoundingClientRect();return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}},e.exports=u},function(e,t,n){"use strict";var o={appendHTMLElement:function(e,t,n){var o=document.createElement(e);return o.className=n||"",t?t.appendChild(o):document.body.appendChild(o),o}};e.exports=o},function(e,t,n)
|
||
|
// @license RGB <-> HSV conversion utilities based off of http://www.cs.rit.edu/~ncs/color/t_convert.html
|
||
|
hexToRGB:function(e){return!!i.isValidRGB(e)&&(e=e.substring(1),[parseInt(e.substr(0,2),16),parseInt(e.substr(2,2),16),parseInt(e.substr(4,2),16)])},rgbToHEX:function(e,t,n){var o="#"+i.leadingZero(e.toString(16),2)+i.leadingZero(t.toString(16),2)+i.leadingZero(n.toString(16),2);return!!i.isValidRGB(o)&&o},rgbToHSV:function(e,t,n){var o,i,r,s,a,l;if(e/=255,t/=255,n/=255,a=o=Math.max(e,t,n),l=o-(i=Math.min(e,t,n)),s=0===o?0:l/o,o===i)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return[Math.round(360*r),Math.round(100*s),Math.round(100*a)]},hsvToRGB:function(e,t,n){var o,i,r,s,a,l,c,u;if(e=Math.max(0,Math.min(360,e)),t=Math.max(0,Math.min(100,t)),n=Math.max(0,Math.min(100,n)),n/=100,0===(t/=100))return o=i=r=n,[Math.round(255*o),Math.round(255*i),Math.round(255*r)];switch(l=n*(1-t),c=n*(1-t*(a=(e/=60)-(s=Math.floor(e)))),u=n*(1-t*(1-a)),s){case 0:o=n,i=u,r=l;break;case 1:o=c,i=n,r=l;break;case 2:o=l,i=n,r=u;break;case 3:o=l,i=c,r=n;break;case 4:o=u,i=l,r=n;break;default:o=n,i=l,r=c}return[Math.round(255*o),Math.round(255*i),Math.round(255*r)]}};e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return e instanceof Function}},function(e,t,n){"use strict";var o=n(11),i=n(2),r=n(26);function s(e,t,n,o){function s(t){n.call(o||e,t||window.event)}"addEventListener"in e?e.addEventListener(t,s):"attachEvent"in e&&e.attachEvent("on"+t,s),function(e,t,n,o){var s=r(e,t),a=!1;i(s,(function(e){return e.handler!==n||(a=!0,!1)})),a||s.push({handler:n,wrappedHandler:o})}(e,t,n,s)}e.exports=function(e,t,n,r){o(t)?i(t.split(/\s+/g),(function(t){s(e,t,n,r)})):i(t,(function(t,o){s(e,o,t,n)}))}},function(e,t,n){"use strict";e.exports=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}},function(e,t,n){"use strict";e.exports=function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}},function(e,t,n){"use strict";var o=n(11),i=n(2),r=n(26);function s(e,t,n){var o,s=r(e,t);n?(i(s,(function(i,r){return n!==i.handler||(a(e,t,i.wrappedHandler),o=r,!1)})),s.splice(o,1)):(i(s,(function(n){a(e,t,n.wrappedHandler)})),s.splice(0,s.length))}function a(e,t,n){"removeEventListener"in e?e.removeEventListener(t,n):"detachEvent"in e&&e.detachEvent("on"+t,n)}e.exports=function(e,t,n){o(t)?i(t.split(/\s+/g),(function(t){s(e,t,n)})):i(t,(function(t,n){s(e,n,t)}))}},function(e,t,n){"use strict";var o=n(50);e.exports=function(e,t){var n=o(t.prototype);n.constructor=e,e.prototype=n}},function(e,t,n){"use strict";var o=n(6),i=n(7),r=n(0),s=n(1),a=n(20),l=n(13),c=n(21),u=n(4),d=Array.prototype.slice;function h(e){this.items={},this.length=0,l(e)&&(this.getItemID=e)}h.and=function(e){var t;return e=d.call(arguments),t=e.length,function(n){for(var o=0;o<t;o+=1)if(!e[o].call(null,n))return!1;return!0}},h.or=function(e){var t;return e=d.call(arguments),t=e.length,function(n){for(var o=1,i=e[0].call(null,n);o<t;o+=1)i=i||e[o].call(null,n);return i}},h.merge=function(e){var t={},n=new h(e.getItemID);return o(arguments,(function(e){r(t,e.items)})),n.items=t,n.length=u.getLength(n.items),n},h.prototype.getItemID=function(e){return e._id+""},h.prototype.add=function(e){var t,n;arguments.length>1?o(d.call(arguments),(function(e){this.add(e)}),this):(t=this.getItemID(e),(n=this.items)[t]||(this.length+=1),n[t]=e)},h.prototype.remove=function(e){var t,n,o=[];return this.length?arguments.length>1?o=u.map(d.call(arguments),(function(e){return this.remove(e)}),this):(t=this.items,c(e)&&(e=this.getItemID(e)),t[e]?(this.length-=1,n=t[e],delete t[e],n):o):o},h.prototype.clear=function(){this.items={},this.length=0},h.prototype.has=function(e){var t,n;return!!this.length&&(t=l(e),n=!1,t?this.each((function(t){return!0!==e(t)||(n=!0,!1)})):(e=c(e)?this.getItemID(e):e,n=a(this.items[e])),n)},h.prototype.doWhenHas=function(e,t,n){var o=this.items[e];a(o)&&t.call(n||this,o)},h.prototype.find=function(e){var t=new h;return this.hasOwnProperty("getItemID")&&(t.getItemID=this.getItemID),this.each((function(n){!0===e(n)&&t.add(n)})),t},h.prototype.groupBy=function(e,t){var n,i,r={},a=l(e
|
||
|
/*!
|
||
|
* tui-image-editor.js
|
||
|
* @version 3.14.3
|
||
|
* @author NHN. FE Development Lab <dl_javascript@nhn.com>
|
||
|
* @license MIT
|
||
|
*/
|
||
|
function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fabric").fabric,require("tui-code-snippet"),require("tui-color-picker")):"function"==typeof define&&define.amd?define(["fabric","tui-code-snippet","tui-color-picker"],t):"object"==typeof exports?exports.ImageEditor=t(require("fabric").fabric,require("tui-code-snippet"),require("tui-color-picker")):(e.tui=e.tui||{},e.tui.ImageEditor=t(e.fabric,e.tui.util,e.tui.colorPicker))}(window,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s="./src/index.js")}({"./node_modules/core-js-pure/es/promise/index.js":
|
||
|
/*!*******************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/es/promise/index.js ***!
|
||
|
\*******************************************************/
|
||
|
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es.object.to-string */"./node_modules/core-js-pure/modules/es.object.to-string.js"),n(/*! ../../modules/es.string.iterator */"./node_modules/core-js-pure/modules/es.string.iterator.js"),n(/*! ../../modules/web.dom-collections.iterator */"./node_modules/core-js-pure/modules/web.dom-collections.iterator.js"),n(/*! ../../modules/es.promise */"./node_modules/core-js-pure/modules/es.promise.js"),n(/*! ../../modules/es.promise.all-settled */"./node_modules/core-js-pure/modules/es.promise.all-settled.js"),n(/*! ../../modules/es.promise.finally */"./node_modules/core-js-pure/modules/es.promise.finally.js");var o=n(/*! ../../internals/path */"./node_modules/core-js-pure/internals/path.js");e.exports=o.Promise},"./node_modules/core-js-pure/features/promise/index.js":
|
||
|
/*!*************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/features/promise/index.js ***!
|
||
|
\*************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../../es/promise */"./node_modules/core-js-pure/es/promise/index.js");n(/*! ../../modules/esnext.aggregate-error */"./node_modules/core-js-pure/modules/esnext.aggregate-error.js"),n(/*! ../../modules/esnext.promise.all-settled */"./node_modules/core-js-pure/modules/esnext.promise.all-settled.js"),n(/*! ../../modules/esnext.promise.try */"./node_modules/core-js-pure/modules/esnext.promise.try.js"),n(/*! ../../modules/esnext.promise.any */"./node_modules/core-js-pure/modules/esnext.promise.any.js"),e.exports=o},"./node_modules/core-js-pure/internals/a-function.js":
|
||
|
/*!***********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/a-function.js ***!
|
||
|
\***********************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"./node_modules/core-js-pure/internals/a-possible-prototype.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/a-possible-prototype.js ***!
|
||
|
\*********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/is-object */"./node_modules/core-js-pure/internals/is-object.js");e.exports=function(e){if(!o(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"./node_modules/core-js-pure/internals/add-to-unscopables.js":
|
||
|
/*!*******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/add-to-unscopables.js ***!
|
||
|
\*******************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(){}},"./node_modules/core-js-pure/internals/an-instance.js":
|
||
|
/*!************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/an-instance.js ***!
|
||
|
\************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},"./node_modules/core-js-pure/internals/an-object.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/an-object.js ***!
|
||
|
\**********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/is-object */"./node_modules/core-js-pure/internals/is-object.js");e.exports=function(e){if(!o(e))throw TypeError(String(e)+" is not an object");return e}},"./node_modules/core-js-pure/internals/array-includes.js":
|
||
|
/*!***************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/array-includes.js ***!
|
||
|
\***************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/to-indexed-object */"./node_modules/core-js-pure/internals/to-indexed-object.js"),i=n(/*! ../internals/to-length */"./node_modules/core-js-pure/internals/to-length.js"),r=n(/*! ../internals/to-absolute-index */"./node_modules/core-js-pure/internals/to-absolute-index.js"),s=function(e){return function(t,n,s){var a,l=o(t),c=i(l.length),u=r(s,c);if(e&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},"./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js":
|
||
|
/*!*********************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js ***!
|
||
|
\*********************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js");e.exports=function(e,t,n,i){try{return i?t(o(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&o(r.call(e)),t}}},"./node_modules/core-js-pure/internals/check-correctness-of-iteration.js":
|
||
|
/*!*******************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/check-correctness-of-iteration.js ***!
|
||
|
\*******************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js")("iterator"),i=!1;try{var r=0,s={next:function(){return{done:!!r++}},return:function(){i=!0}};s[o]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}},"./node_modules/core-js-pure/internals/classof-raw.js":
|
||
|
/*!************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/classof-raw.js ***!
|
||
|
\************************************************************/
|
||
|
/*! no static exports found */function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"./node_modules/core-js-pure/internals/classof.js":
|
||
|
/*!********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/classof.js ***!
|
||
|
\********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/to-string-tag-support */"./node_modules/core-js-pure/internals/to-string-tag-support.js"),i=n(/*! ../internals/classof-raw */"./node_modules/core-js-pure/internals/classof-raw.js"),r=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js")("toStringTag"),s="Arguments"==i(function(){return arguments}());e.exports=o?i:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:s?i(t):"Object"==(o=i(t))&&"function"==typeof t.callee?"Arguments":o}},"./node_modules/core-js-pure/internals/correct-prototype-getter.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/correct-prototype-getter.js ***!
|
||
|
\*************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js");e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"./node_modules/core-js-pure/internals/create-iterator-constructor.js":
|
||
|
/*!****************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/create-iterator-constructor.js ***!
|
||
|
\****************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/iterators-core */"./node_modules/core-js-pure/internals/iterators-core.js").IteratorPrototype,i=n(/*! ../internals/object-create */"./node_modules/core-js-pure/internals/object-create.js"),r=n(/*! ../internals/create-property-descriptor */"./node_modules/core-js-pure/internals/create-property-descriptor.js"),s=n(/*! ../internals/set-to-string-tag */"./node_modules/core-js-pure/internals/set-to-string-tag.js"),a=n(/*! ../internals/iterators */"./node_modules/core-js-pure/internals/iterators.js"),l=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(o,{next:r(1,n)}),s(e,c,!1,!0),a[c]=l,e}},"./node_modules/core-js-pure/internals/create-non-enumerable-property.js":
|
||
|
/*!*******************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/create-non-enumerable-property.js ***!
|
||
|
\*******************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/descriptors */"./node_modules/core-js-pure/internals/descriptors.js"),i=n(/*! ../internals/object-define-property */"./node_modules/core-js-pure/internals/object-define-property.js"),r=n(/*! ../internals/create-property-descriptor */"./node_modules/core-js-pure/internals/create-property-descriptor.js");e.exports=o?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},"./node_modules/core-js-pure/internals/create-property-descriptor.js":
|
||
|
/*!***************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/create-property-descriptor.js ***!
|
||
|
\***************************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"./node_modules/core-js-pure/internals/define-iterator.js":
|
||
|
/*!****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/define-iterator.js ***!
|
||
|
\****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/export */"./node_modules/core-js-pure/internals/export.js"),i=n(/*! ../internals/create-iterator-constructor */"./node_modules/core-js-pure/internals/create-iterator-constructor.js"),r=n(/*! ../internals/object-get-prototype-of */"./node_modules/core-js-pure/internals/object-get-prototype-of.js"),s=n(/*! ../internals/object-set-prototype-of */"./node_modules/core-js-pure/internals/object-set-prototype-of.js"),a=n(/*! ../internals/set-to-string-tag */"./node_modules/core-js-pure/internals/set-to-string-tag.js"),l=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),c=n(/*! ../internals/redefine */"./node_modules/core-js-pure/internals/redefine.js"),u=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js"),d=n(/*! ../internals/is-pure */"./node_modules/core-js-pure/internals/is-pure.js"),h=n(/*! ../internals/iterators */"./node_modules/core-js-pure/internals/iterators.js"),f=n(/*! ../internals/iterators-core */"./node_modules/core-js-pure/internals/iterators-core.js"),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,v=u("iterator"),g="keys",y="values",_="entries",b=function(){return this};e.exports=function(e,t,n,u,f,j,k){i(n,t,u);var E,x,w,O=function(e){if(e===f&&T)return T;if(!m&&e in S)return S[e];switch(e){case g:case y:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},M=t+" Iterator",C=!1,S=e.prototype,P=S[v]||S["@@iterator"]||f&&S[f],T=!m&&P||O(f),I="Array"==t&&S.entries||P;if(I&&(E=r(I.call(new e)),p!==Object.prototype&&E.next&&(d||r(E)===p||(s?s(E,p):"function"!=typeof E[v]&&l(E,v,b)),a(E,M,!0,!0),d&&(h[M]=b))),f==y&&P&&P.name!==y&&(C=!0,T=function(){return P.call(this)}),d&&!k||S[v]===T||l(S,v,T),h[t]=T,f)if(x={values:O(y),keys:j?T:O(g),entries:O(_)},k)for(w in x)(m||C||!(w in S))&&c(S,w,x[w]);else o({target:t,proto:!0,forced:m||C},x);return x}},"./node_modules/core-js-pure/internals/descriptors.js":
|
||
|
/*!************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/descriptors.js ***!
|
||
|
\************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js");e.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"./node_modules/core-js-pure/internals/document-create-element.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/document-create-element.js ***!
|
||
|
\************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),i=n(/*! ../internals/is-object */"./node_modules/core-js-pure/internals/is-object.js"),r=o.document,s=i(r)&&i(r.createElement);e.exports=function(e){return s?r.createElement(e):{}}},"./node_modules/core-js-pure/internals/dom-iterables.js":
|
||
|
/*!**************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/dom-iterables.js ***!
|
||
|
\**************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"./node_modules/core-js-pure/internals/engine-is-ios.js":
|
||
|
/*!**************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/engine-is-ios.js ***!
|
||
|
\**************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/engine-user-agent */"./node_modules/core-js-pure/internals/engine-user-agent.js");e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(o)},"./node_modules/core-js-pure/internals/engine-user-agent.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/engine-user-agent.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/get-built-in */"./node_modules/core-js-pure/internals/get-built-in.js");e.exports=o("navigator","userAgent")||""},"./node_modules/core-js-pure/internals/engine-v8-version.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/engine-v8-version.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o,i,r=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),s=n(/*! ../internals/engine-user-agent */"./node_modules/core-js-pure/internals/engine-user-agent.js"),a=r.process,l=a&&a.versions,c=l&&l.v8;c?i=(o=c.split("."))[0]+o[1]:s&&(!(o=s.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=s.match(/Chrome\/(\d+)/))&&(i=o[1]),e.exports=i&&+i},"./node_modules/core-js-pure/internals/enum-bug-keys.js":
|
||
|
/*!**************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/enum-bug-keys.js ***!
|
||
|
\**************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js-pure/internals/export.js":
|
||
|
/*!*******************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/export.js ***!
|
||
|
\*******************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),i=n(/*! ../internals/object-get-own-property-descriptor */"./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js").f,r=n(/*! ../internals/is-forced */"./node_modules/core-js-pure/internals/is-forced.js"),s=n(/*! ../internals/path */"./node_modules/core-js-pure/internals/path.js"),a=n(/*! ../internals/function-bind-context */"./node_modules/core-js-pure/internals/function-bind-context.js"),l=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),c=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),u=function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,d,h,f,p,m,v,g,y=e.target,_=e.global,b=e.stat,j=e.proto,k=_?o:b?o[y]:(o[y]||{}).prototype,E=_?s:s[y]||(s[y]={}),x=E.prototype;for(h in t)n=!r(_?h:y+(b?".":"#")+h,e.forced)&&k&&c(k,h),p=E[h],n&&(m=e.noTargetGet?(g=i(k,h))&&g.value:k[h]),f=n&&m?m:t[h],n&&typeof p==typeof f||(v=e.bind&&n?a(f,o):e.wrap&&n?u(f):j&&"function"==typeof f?a(Function.call,f):f,(e.sham||f&&f.sham||p&&p.sham)&&l(v,"sham",!0),E[h]=v,j&&(c(s,d=y+"Prototype")||l(s,d,{}),s[d][h]=f,e.real&&x&&!x[h]&&l(x,h,f)))}},"./node_modules/core-js-pure/internals/fails.js":
|
||
|
/*!******************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/fails.js ***!
|
||
|
\******************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"./node_modules/core-js-pure/internals/function-bind-context.js":
|
||
|
/*!**********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/function-bind-context.js ***!
|
||
|
\**********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/a-function */"./node_modules/core-js-pure/internals/a-function.js");e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,i){return e.call(t,n,o,i)}}return function(){return e.apply(t,arguments)}}},"./node_modules/core-js-pure/internals/get-built-in.js":
|
||
|
/*!*************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/get-built-in.js ***!
|
||
|
\*************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/path */"./node_modules/core-js-pure/internals/path.js"),i=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(o[e])||r(i[e]):o[e]&&o[e][t]||i[e]&&i[e][t]}},"./node_modules/core-js-pure/internals/get-iterator-method.js":
|
||
|
/*!********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/get-iterator-method.js ***!
|
||
|
\********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/classof */"./node_modules/core-js-pure/internals/classof.js"),i=n(/*! ../internals/iterators */"./node_modules/core-js-pure/internals/iterators.js"),r=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js")("iterator");e.exports=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[o(e)]}},"./node_modules/core-js-pure/internals/global.js":
|
||
|
/*!*******************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/global.js ***!
|
||
|
\*******************************************************/
|
||
|
/*! no static exports found */function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/core-js-pure/internals/has.js":
|
||
|
/*!****************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/has.js ***!
|
||
|
\****************************************************/
|
||
|
/*! no static exports found */function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"./node_modules/core-js-pure/internals/hidden-keys.js":
|
||
|
/*!************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/hidden-keys.js ***!
|
||
|
\************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports={}},"./node_modules/core-js-pure/internals/host-report-errors.js":
|
||
|
/*!*******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/host-report-errors.js ***!
|
||
|
\*******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js");e.exports=function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},"./node_modules/core-js-pure/internals/html.js":
|
||
|
/*!*****************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/html.js ***!
|
||
|
\*****************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/get-built-in */"./node_modules/core-js-pure/internals/get-built-in.js");e.exports=o("document","documentElement")},"./node_modules/core-js-pure/internals/ie8-dom-define.js":
|
||
|
/*!***************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/ie8-dom-define.js ***!
|
||
|
\***************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/descriptors */"./node_modules/core-js-pure/internals/descriptors.js"),i=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js"),r=n(/*! ../internals/document-create-element */"./node_modules/core-js-pure/internals/document-create-element.js");e.exports=!o&&!i((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},"./node_modules/core-js-pure/internals/indexed-object.js":
|
||
|
/*!***************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/indexed-object.js ***!
|
||
|
\***************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js"),i=n(/*! ../internals/classof-raw */"./node_modules/core-js-pure/internals/classof-raw.js"),r="".split;e.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?r.call(e,""):Object(e)}:Object},"./node_modules/core-js-pure/internals/inspect-source.js":
|
||
|
/*!***************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/inspect-source.js ***!
|
||
|
\***************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/shared-store */"./node_modules/core-js-pure/internals/shared-store.js"),i=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(e){return i.call(e)}),e.exports=o.inspectSource},"./node_modules/core-js-pure/internals/internal-state.js":
|
||
|
/*!***************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/internal-state.js ***!
|
||
|
\***************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o,i,r,s=n(/*! ../internals/native-weak-map */"./node_modules/core-js-pure/internals/native-weak-map.js"),a=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),l=n(/*! ../internals/is-object */"./node_modules/core-js-pure/internals/is-object.js"),c=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),u=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),d=n(/*! ../internals/shared-key */"./node_modules/core-js-pure/internals/shared-key.js"),h=n(/*! ../internals/hidden-keys */"./node_modules/core-js-pure/internals/hidden-keys.js"),f=a.WeakMap;if(s){var p=new f,m=p.get,v=p.has,g=p.set;o=function(e,t){return g.call(p,e,t),t},i=function(e){return m.call(p,e)||{}},r=function(e){return v.call(p,e)}}else{var y=d("state");h[y]=!0,o=function(e,t){return c(e,y,t),t},i=function(e){return u(e,y)?e[y]:{}},r=function(e){return u(e,y)}}e.exports={set:o,get:i,has:r,enforce:function(e){return r(e)?i(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},"./node_modules/core-js-pure/internals/is-array-iterator-method.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/is-array-iterator-method.js ***!
|
||
|
\*************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js"),i=n(/*! ../internals/iterators */"./node_modules/core-js-pure/internals/iterators.js"),r=o("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[r]===e)}},"./node_modules/core-js-pure/internals/is-forced.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/is-forced.js ***!
|
||
|
\**********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js"),i=/#|\.prototype\./,r=function(e,t){var n=a[s(e)];return n==c||n!=l&&("function"==typeof t?o(t):!!t)},s=r.normalize=function(e){return String(e).replace(i,".").toLowerCase()},a=r.data={},l=r.NATIVE="N",c=r.POLYFILL="P";e.exports=r},"./node_modules/core-js-pure/internals/is-object.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/is-object.js ***!
|
||
|
\**********************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"./node_modules/core-js-pure/internals/is-pure.js":
|
||
|
/*!********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/is-pure.js ***!
|
||
|
\********************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=!0},"./node_modules/core-js-pure/internals/iterate.js":
|
||
|
/*!********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/iterate.js ***!
|
||
|
\********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js"),i=n(/*! ../internals/is-array-iterator-method */"./node_modules/core-js-pure/internals/is-array-iterator-method.js"),r=n(/*! ../internals/to-length */"./node_modules/core-js-pure/internals/to-length.js"),s=n(/*! ../internals/function-bind-context */"./node_modules/core-js-pure/internals/function-bind-context.js"),a=n(/*! ../internals/get-iterator-method */"./node_modules/core-js-pure/internals/get-iterator-method.js"),l=n(/*! ../internals/call-with-safe-iteration-closing */"./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js"),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,u,d){var h,f,p,m,v,g,y,_=s(t,n,u?2:1);if(d)h=e;else{if("function"!=typeof(f=a(e)))throw TypeError("Target is not iterable");if(i(f)){for(p=0,m=r(e.length);m>p;p++)if((v=u?_(o(y=e[p])[0],y[1]):_(e[p]))&&v instanceof c)return v;return new c(!1)}h=f.call(e)}for(g=h.next;!(y=g.call(h)).done;)if("object"==typeof(v=l(h,_,y.value,u))&&v&&v instanceof c)return v;return new c(!1)}).stop=function(e){return new c(!0,e)}},"./node_modules/core-js-pure/internals/iterators-core.js":
|
||
|
/*!***************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/iterators-core.js ***!
|
||
|
\***************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o,i,r,s=n(/*! ../internals/object-get-prototype-of */"./node_modules/core-js-pure/internals/object-get-prototype-of.js"),a=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),l=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),c=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js"),u=n(/*! ../internals/is-pure */"./node_modules/core-js-pure/internals/is-pure.js"),d=c("iterator"),h=!1;[].keys&&("next"in(r=[].keys())?(i=s(s(r)))!==Object.prototype&&(o=i):h=!0),null==o&&(o={}),u||l(o,d)||a(o,d,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:h}},"./node_modules/core-js-pure/internals/iterators.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/iterators.js ***!
|
||
|
\**********************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports={}},"./node_modules/core-js-pure/internals/microtask.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/microtask.js ***!
|
||
|
\**********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o,i,r,s,a,l,c,u,d=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),h=n(/*! ../internals/object-get-own-property-descriptor */"./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js").f,f=n(/*! ../internals/classof-raw */"./node_modules/core-js-pure/internals/classof-raw.js"),p=n(/*! ../internals/task */"./node_modules/core-js-pure/internals/task.js").set,m=n(/*! ../internals/engine-is-ios */"./node_modules/core-js-pure/internals/engine-is-ios.js"),v=d.MutationObserver||d.WebKitMutationObserver,g=d.process,y=d.Promise,_="process"==f(g),b=h(d,"queueMicrotask"),j=b&&b.value;j||(o=function(){var e,t;for(_&&(e=g.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?s():r=void 0,e}}r=void 0,e&&e.enter()},_?s=function(){g.nextTick(o)}:v&&!m?(a=!0,l=document.createTextNode(""),new v(o).observe(l,{characterData:!0}),s=function(){l.data=a=!a}):y&&y.resolve?(c=y.resolve(void 0),u=c.then,s=function(){u.call(c,o)}):s=function(){p.call(d,o)}),e.exports=j||function(e){var t={fn:e,next:void 0};r&&(r.next=t),i||(i=t,s()),r=t}},"./node_modules/core-js-pure/internals/native-promise-constructor.js":
|
||
|
/*!***************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/native-promise-constructor.js ***!
|
||
|
\***************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js");e.exports=o.Promise},"./node_modules/core-js-pure/internals/native-symbol.js":
|
||
|
/*!**************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/native-symbol.js ***!
|
||
|
\**************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js");e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},"./node_modules/core-js-pure/internals/native-weak-map.js":
|
||
|
/*!****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/native-weak-map.js ***!
|
||
|
\****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),i=n(/*! ../internals/inspect-source */"./node_modules/core-js-pure/internals/inspect-source.js"),r=o.WeakMap;e.exports="function"==typeof r&&/native code/.test(i(r))},"./node_modules/core-js-pure/internals/new-promise-capability.js":
|
||
|
/*!***********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/new-promise-capability.js ***!
|
||
|
\***********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/a-function */"./node_modules/core-js-pure/internals/a-function.js"),i=function(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new i(e)}},"./node_modules/core-js-pure/internals/object-create.js":
|
||
|
/*!**************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-create.js ***!
|
||
|
\**************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o,i=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js"),r=n(/*! ../internals/object-define-properties */"./node_modules/core-js-pure/internals/object-define-properties.js"),s=n(/*! ../internals/enum-bug-keys */"./node_modules/core-js-pure/internals/enum-bug-keys.js"),a=n(/*! ../internals/hidden-keys */"./node_modules/core-js-pure/internals/hidden-keys.js"),l=n(/*! ../internals/html */"./node_modules/core-js-pure/internals/html.js"),c=n(/*! ../internals/document-create-element */"./node_modules/core-js-pure/internals/document-create-element.js"),u=n(/*! ../internals/shared-key */"./node_modules/core-js-pure/internals/shared-key.js"),d=u("IE_PROTO"),h=function(){},f=function(e){return"<script>"+e+"</"+"script>"},p=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=o?function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F);for(var n=s.length;n--;)delete p.prototype[s[n]];return p()};a[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=i(e),n=new h,h.prototype=null,n[d]=e):n=p(),void 0===t?n:r(n,t)}},"./node_modules/core-js-pure/internals/object-define-properties.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-define-properties.js ***!
|
||
|
\*************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/descriptors */"./node_modules/core-js-pure/internals/descriptors.js"),i=n(/*! ../internals/object-define-property */"./node_modules/core-js-pure/internals/object-define-property.js"),r=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js"),s=n(/*! ../internals/object-keys */"./node_modules/core-js-pure/internals/object-keys.js");e.exports=o?Object.defineProperties:function(e,t){r(e);for(var n,o=s(t),a=o.length,l=0;a>l;)i.f(e,n=o[l++],t[n]);return e}},"./node_modules/core-js-pure/internals/object-define-property.js":
|
||
|
/*!***********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-define-property.js ***!
|
||
|
\***********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/descriptors */"./node_modules/core-js-pure/internals/descriptors.js"),i=n(/*! ../internals/ie8-dom-define */"./node_modules/core-js-pure/internals/ie8-dom-define.js"),r=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js"),s=n(/*! ../internals/to-primitive */"./node_modules/core-js-pure/internals/to-primitive.js"),a=Object.defineProperty;t.f=o?a:function(e,t,n){if(r(e),t=s(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js":
|
||
|
/*!***********************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js ***!
|
||
|
\***********************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/descriptors */"./node_modules/core-js-pure/internals/descriptors.js"),i=n(/*! ../internals/object-property-is-enumerable */"./node_modules/core-js-pure/internals/object-property-is-enumerable.js"),r=n(/*! ../internals/create-property-descriptor */"./node_modules/core-js-pure/internals/create-property-descriptor.js"),s=n(/*! ../internals/to-indexed-object */"./node_modules/core-js-pure/internals/to-indexed-object.js"),a=n(/*! ../internals/to-primitive */"./node_modules/core-js-pure/internals/to-primitive.js"),l=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),c=n(/*! ../internals/ie8-dom-define */"./node_modules/core-js-pure/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=o?u:function(e,t){if(e=s(e),t=a(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return r(!i.f.call(e,t),e[t])}},"./node_modules/core-js-pure/internals/object-get-prototype-of.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-get-prototype-of.js ***!
|
||
|
\************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),i=n(/*! ../internals/to-object */"./node_modules/core-js-pure/internals/to-object.js"),r=n(/*! ../internals/shared-key */"./node_modules/core-js-pure/internals/shared-key.js"),s=n(/*! ../internals/correct-prototype-getter */"./node_modules/core-js-pure/internals/correct-prototype-getter.js"),a=r("IE_PROTO"),l=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=i(e),o(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},"./node_modules/core-js-pure/internals/object-keys-internal.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-keys-internal.js ***!
|
||
|
\*********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),i=n(/*! ../internals/to-indexed-object */"./node_modules/core-js-pure/internals/to-indexed-object.js"),r=n(/*! ../internals/array-includes */"./node_modules/core-js-pure/internals/array-includes.js").indexOf,s=n(/*! ../internals/hidden-keys */"./node_modules/core-js-pure/internals/hidden-keys.js");e.exports=function(e,t){var n,a=i(e),l=0,c=[];for(n in a)!o(s,n)&&o(a,n)&&c.push(n);for(;t.length>l;)o(a,n=t[l++])&&(~r(c,n)||c.push(n));return c}},"./node_modules/core-js-pure/internals/object-keys.js":
|
||
|
/*!************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-keys.js ***!
|
||
|
\************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/object-keys-internal */"./node_modules/core-js-pure/internals/object-keys-internal.js"),i=n(/*! ../internals/enum-bug-keys */"./node_modules/core-js-pure/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return o(e,i)}},"./node_modules/core-js-pure/internals/object-property-is-enumerable.js":
|
||
|
/*!******************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-property-is-enumerable.js ***!
|
||
|
\******************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!o.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:o},"./node_modules/core-js-pure/internals/object-set-prototype-of.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-set-prototype-of.js ***!
|
||
|
\************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js"),i=n(/*! ../internals/a-possible-prototype */"./node_modules/core-js-pure/internals/a-possible-prototype.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e.call(n,r):n.__proto__=r,n}}():void 0)},"./node_modules/core-js-pure/internals/object-to-string.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/object-to-string.js ***!
|
||
|
\*****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/to-string-tag-support */"./node_modules/core-js-pure/internals/to-string-tag-support.js"),i=n(/*! ../internals/classof */"./node_modules/core-js-pure/internals/classof.js");e.exports=o?{}.toString:function(){return"[object "+i(this)+"]"}},"./node_modules/core-js-pure/internals/path.js":
|
||
|
/*!*****************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/path.js ***!
|
||
|
\*****************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports={}},"./node_modules/core-js-pure/internals/perform.js":
|
||
|
/*!********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/perform.js ***!
|
||
|
\********************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},"./node_modules/core-js-pure/internals/promise-resolve.js":
|
||
|
/*!****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/promise-resolve.js ***!
|
||
|
\****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js"),i=n(/*! ../internals/is-object */"./node_modules/core-js-pure/internals/is-object.js"),r=n(/*! ../internals/new-promise-capability */"./node_modules/core-js-pure/internals/new-promise-capability.js");e.exports=function(e,t){if(o(e),i(t)&&t.constructor===e)return t;var n=r.f(e);return(0,n.resolve)(t),n.promise}},"./node_modules/core-js-pure/internals/redefine-all.js":
|
||
|
/*!*************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/redefine-all.js ***!
|
||
|
\*************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/redefine */"./node_modules/core-js-pure/internals/redefine.js");e.exports=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:o(e,i,t[i],n);return e}},"./node_modules/core-js-pure/internals/redefine.js":
|
||
|
/*!*********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/redefine.js ***!
|
||
|
\*********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js");e.exports=function(e,t,n,i){i&&i.enumerable?e[t]=n:o(e,t,n)}},"./node_modules/core-js-pure/internals/require-object-coercible.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/require-object-coercible.js ***!
|
||
|
\*************************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"./node_modules/core-js-pure/internals/set-global.js":
|
||
|
/*!***********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/set-global.js ***!
|
||
|
\***********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),i=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js");e.exports=function(e,t){try{i(o,e,t)}catch(n){o[e]=t}return t}},"./node_modules/core-js-pure/internals/set-species.js":
|
||
|
/*!************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/set-species.js ***!
|
||
|
\************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/get-built-in */"./node_modules/core-js-pure/internals/get-built-in.js"),i=n(/*! ../internals/object-define-property */"./node_modules/core-js-pure/internals/object-define-property.js"),r=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js"),s=n(/*! ../internals/descriptors */"./node_modules/core-js-pure/internals/descriptors.js"),a=r("species");e.exports=function(e){var t=o(e),n=i.f;s&&t&&!t[a]&&n(t,a,{configurable:!0,get:function(){return this}})}},"./node_modules/core-js-pure/internals/set-to-string-tag.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/set-to-string-tag.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/to-string-tag-support */"./node_modules/core-js-pure/internals/to-string-tag-support.js"),i=n(/*! ../internals/object-define-property */"./node_modules/core-js-pure/internals/object-define-property.js").f,r=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),s=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),a=n(/*! ../internals/object-to-string */"./node_modules/core-js-pure/internals/object-to-string.js"),l=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js")("toStringTag");e.exports=function(e,t,n,c){if(e){var u=n?e:e.prototype;s(u,l)||i(u,l,{configurable:!0,value:t}),c&&!o&&r(u,"toString",a)}}},"./node_modules/core-js-pure/internals/shared-key.js":
|
||
|
/*!***********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/shared-key.js ***!
|
||
|
\***********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/shared */"./node_modules/core-js-pure/internals/shared.js"),i=n(/*! ../internals/uid */"./node_modules/core-js-pure/internals/uid.js"),r=o("keys");e.exports=function(e){return r[e]||(r[e]=i(e))}},"./node_modules/core-js-pure/internals/shared-store.js":
|
||
|
/*!*************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/shared-store.js ***!
|
||
|
\*************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),i=n(/*! ../internals/set-global */"./node_modules/core-js-pure/internals/set-global.js"),r="__core-js_shared__",s=o[r]||i(r,{});e.exports=s},"./node_modules/core-js-pure/internals/shared.js":
|
||
|
/*!*******************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/shared.js ***!
|
||
|
\*******************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/is-pure */"./node_modules/core-js-pure/internals/is-pure.js"),i=n(/*! ../internals/shared-store */"./node_modules/core-js-pure/internals/shared-store.js");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:o?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js-pure/internals/species-constructor.js":
|
||
|
/*!********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/species-constructor.js ***!
|
||
|
\********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/an-object */"./node_modules/core-js-pure/internals/an-object.js"),i=n(/*! ../internals/a-function */"./node_modules/core-js-pure/internals/a-function.js"),r=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js")("species");e.exports=function(e,t){var n,s=o(e).constructor;return void 0===s||null==(n=o(s)[r])?t:i(n)}},"./node_modules/core-js-pure/internals/string-multibyte.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/string-multibyte.js ***!
|
||
|
\*****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/to-integer */"./node_modules/core-js-pure/internals/to-integer.js"),i=n(/*! ../internals/require-object-coercible */"./node_modules/core-js-pure/internals/require-object-coercible.js"),r=function(e){return function(t,n){var r,s,a=String(i(t)),l=o(n),c=a.length;return l<0||l>=c?e?"":void 0:(r=a.charCodeAt(l))<55296||r>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?e?a.charAt(l):r:e?a.slice(l,l+2):s-56320+(r-55296<<10)+65536}};e.exports={codeAt:r(!1),charAt:r(!0)}},"./node_modules/core-js-pure/internals/task.js":
|
||
|
/*!*****************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/task.js ***!
|
||
|
\*****************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o,i,r,s=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),a=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js"),l=n(/*! ../internals/classof-raw */"./node_modules/core-js-pure/internals/classof-raw.js"),c=n(/*! ../internals/function-bind-context */"./node_modules/core-js-pure/internals/function-bind-context.js"),u=n(/*! ../internals/html */"./node_modules/core-js-pure/internals/html.js"),d=n(/*! ../internals/document-create-element */"./node_modules/core-js-pure/internals/document-create-element.js"),h=n(/*! ../internals/engine-is-ios */"./node_modules/core-js-pure/internals/engine-is-ios.js"),f=s.location,p=s.setImmediate,m=s.clearImmediate,v=s.process,g=s.MessageChannel,y=s.Dispatch,_=0,b={},j="onreadystatechange",k=function(e){if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},E=function(e){return function(){k(e)}},x=function(e){k(e.data)},w=function(e){s.postMessage(e+"",f.protocol+"//"+f.host)};p&&m||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++_]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},o(_),_},m=function(e){delete b[e]},"process"==l(v)?o=function(e){v.nextTick(E(e))}:y&&y.now?o=function(e){y.now(E(e))}:g&&!h?(r=(i=new g).port2,i.port1.onmessage=x,o=c(r.postMessage,r,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||a(w)?o=j in d("script")?function(e){u.appendChild(d("script")).onreadystatechange=function(){u.removeChild(this),k(e)}}:function(e){setTimeout(E(e),0)}:(o=w,s.addEventListener("message",x,!1))),e.exports={set:p,clear:m}},"./node_modules/core-js-pure/internals/to-absolute-index.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/to-absolute-index.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/to-integer */"./node_modules/core-js-pure/internals/to-integer.js"),i=Math.max,r=Math.min;e.exports=function(e,t){var n=o(e);return n<0?i(n+t,0):r(n,t)}},"./node_modules/core-js-pure/internals/to-indexed-object.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/to-indexed-object.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/indexed-object */"./node_modules/core-js-pure/internals/indexed-object.js"),i=n(/*! ../internals/require-object-coercible */"./node_modules/core-js-pure/internals/require-object-coercible.js");e.exports=function(e){return o(i(e))}},"./node_modules/core-js-pure/internals/to-integer.js":
|
||
|
/*!***********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/to-integer.js ***!
|
||
|
\***********************************************************/
|
||
|
/*! no static exports found */function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},"./node_modules/core-js-pure/internals/to-length.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/to-length.js ***!
|
||
|
\**********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/to-integer */"./node_modules/core-js-pure/internals/to-integer.js"),i=Math.min;e.exports=function(e){return e>0?i(o(e),9007199254740991):0}},"./node_modules/core-js-pure/internals/to-object.js":
|
||
|
/*!**********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/to-object.js ***!
|
||
|
\**********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/require-object-coercible */"./node_modules/core-js-pure/internals/require-object-coercible.js");e.exports=function(e){return Object(o(e))}},"./node_modules/core-js-pure/internals/to-primitive.js":
|
||
|
/*!*************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/to-primitive.js ***!
|
||
|
\*************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/is-object */"./node_modules/core-js-pure/internals/is-object.js");e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js-pure/internals/to-string-tag-support.js":
|
||
|
/*!**********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/to-string-tag-support.js ***!
|
||
|
\**********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o={};o[n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js")("toStringTag")]="z",e.exports="[object z]"===String(o)},"./node_modules/core-js-pure/internals/uid.js":
|
||
|
/*!****************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/uid.js ***!
|
||
|
\****************************************************/
|
||
|
/*! no static exports found */function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+o).toString(36)}},"./node_modules/core-js-pure/internals/use-symbol-as-uid.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/use-symbol-as-uid.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/native-symbol */"./node_modules/core-js-pure/internals/native-symbol.js");e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"./node_modules/core-js-pure/internals/well-known-symbol.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/internals/well-known-symbol.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){var o=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),i=n(/*! ../internals/shared */"./node_modules/core-js-pure/internals/shared.js"),r=n(/*! ../internals/has */"./node_modules/core-js-pure/internals/has.js"),s=n(/*! ../internals/uid */"./node_modules/core-js-pure/internals/uid.js"),a=n(/*! ../internals/native-symbol */"./node_modules/core-js-pure/internals/native-symbol.js"),l=n(/*! ../internals/use-symbol-as-uid */"./node_modules/core-js-pure/internals/use-symbol-as-uid.js"),c=i("wks"),u=o.Symbol,d=l?u:u&&u.withoutSetter||s;e.exports=function(e){return r(c,e)||(a&&r(u,e)?c[e]=u[e]:c[e]=d("Symbol."+e)),c[e]}},"./node_modules/core-js-pure/modules/es.array.iterator.js":
|
||
|
/*!****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/es.array.iterator.js ***!
|
||
|
\****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/to-indexed-object */"./node_modules/core-js-pure/internals/to-indexed-object.js"),i=n(/*! ../internals/add-to-unscopables */"./node_modules/core-js-pure/internals/add-to-unscopables.js"),r=n(/*! ../internals/iterators */"./node_modules/core-js-pure/internals/iterators.js"),s=n(/*! ../internals/internal-state */"./node_modules/core-js-pure/internals/internal-state.js"),a=n(/*! ../internals/define-iterator */"./node_modules/core-js-pure/internals/define-iterator.js"),l="Array Iterator",c=s.set,u=s.getterFor(l);e.exports=a(Array,"Array",(function(e,t){c(this,{type:l,target:o(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},"./node_modules/core-js-pure/modules/es.object.to-string.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/es.object.to-string.js ***!
|
||
|
\******************************************************************/
|
||
|
/*! no static exports found */function(e,t){},"./node_modules/core-js-pure/modules/es.promise.all-settled.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/es.promise.all-settled.js ***!
|
||
|
\*********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/export */"./node_modules/core-js-pure/internals/export.js"),i=n(/*! ../internals/a-function */"./node_modules/core-js-pure/internals/a-function.js"),r=n(/*! ../internals/new-promise-capability */"./node_modules/core-js-pure/internals/new-promise-capability.js"),s=n(/*! ../internals/perform */"./node_modules/core-js-pure/internals/perform.js"),a=n(/*! ../internals/iterate */"./node_modules/core-js-pure/internals/iterate.js");o({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=r.f(t),o=n.resolve,l=n.reject,c=s((function(){var n=i(t.resolve),r=[],s=0,l=1;a(e,(function(e){var i=s++,a=!1;r.push(void 0),l++,n.call(t,e).then((function(e){a||(a=!0,r[i]={status:"fulfilled",value:e},--l||o(r))}),(function(e){a||(a=!0,r[i]={status:"rejected",reason:e},--l||o(r))}))})),--l||o(r)}));return c.error&&l(c.value),n.promise}})},"./node_modules/core-js-pure/modules/es.promise.finally.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/es.promise.finally.js ***!
|
||
|
\*****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/export */"./node_modules/core-js-pure/internals/export.js"),i=n(/*! ../internals/is-pure */"./node_modules/core-js-pure/internals/is-pure.js"),r=n(/*! ../internals/native-promise-constructor */"./node_modules/core-js-pure/internals/native-promise-constructor.js"),s=n(/*! ../internals/fails */"./node_modules/core-js-pure/internals/fails.js"),a=n(/*! ../internals/get-built-in */"./node_modules/core-js-pure/internals/get-built-in.js"),l=n(/*! ../internals/species-constructor */"./node_modules/core-js-pure/internals/species-constructor.js"),c=n(/*! ../internals/promise-resolve */"./node_modules/core-js-pure/internals/promise-resolve.js"),u=n(/*! ../internals/redefine */"./node_modules/core-js-pure/internals/redefine.js");o({target:"Promise",proto:!0,real:!0,forced:!!r&&s((function(){r.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof r||r.prototype.finally||u(r.prototype,"finally",a("Promise").prototype.finally)},"./node_modules/core-js-pure/modules/es.promise.js":
|
||
|
/*!*********************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/es.promise.js ***!
|
||
|
\*********************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o,i,r,s,a=n(/*! ../internals/export */"./node_modules/core-js-pure/internals/export.js"),l=n(/*! ../internals/is-pure */"./node_modules/core-js-pure/internals/is-pure.js"),c=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),u=n(/*! ../internals/get-built-in */"./node_modules/core-js-pure/internals/get-built-in.js"),d=n(/*! ../internals/native-promise-constructor */"./node_modules/core-js-pure/internals/native-promise-constructor.js"),h=n(/*! ../internals/redefine */"./node_modules/core-js-pure/internals/redefine.js"),f=n(/*! ../internals/redefine-all */"./node_modules/core-js-pure/internals/redefine-all.js"),p=n(/*! ../internals/set-to-string-tag */"./node_modules/core-js-pure/internals/set-to-string-tag.js"),m=n(/*! ../internals/set-species */"./node_modules/core-js-pure/internals/set-species.js"),v=n(/*! ../internals/is-object */"./node_modules/core-js-pure/internals/is-object.js"),g=n(/*! ../internals/a-function */"./node_modules/core-js-pure/internals/a-function.js"),y=n(/*! ../internals/an-instance */"./node_modules/core-js-pure/internals/an-instance.js"),_=n(/*! ../internals/classof-raw */"./node_modules/core-js-pure/internals/classof-raw.js"),b=n(/*! ../internals/inspect-source */"./node_modules/core-js-pure/internals/inspect-source.js"),j=n(/*! ../internals/iterate */"./node_modules/core-js-pure/internals/iterate.js"),k=n(/*! ../internals/check-correctness-of-iteration */"./node_modules/core-js-pure/internals/check-correctness-of-iteration.js"),E=n(/*! ../internals/species-constructor */"./node_modules/core-js-pure/internals/species-constructor.js"),x=n(/*! ../internals/task */"./node_modules/core-js-pure/internals/task.js").set,w=n(/*! ../internals/microtask */"./node_modules/core-js-pure/internals/microtask.js"),O=n(/*! ../internals/promise-resolve */"./node_modules/core-js-pure/internals/promise-resolve.js"),M=n(/*! ../internals/host-report-errors */"./node_modules/core-js-pure/internals/host-report-errors.js"),C=n(/*! ../internals/new-promise-capability */"./node_modules/core-js-pure/internals/new-promise-capability.js"),S=n(/*! ../internals/perform */"./node_modules/core-js-pure/internals/perform.js"),P=n(/*! ../internals/internal-state */"./node_modules/core-js-pure/internals/internal-state.js"),T=n(/*! ../internals/is-forced */"./node_modules/core-js-pure/internals/is-forced.js"),I=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js"),A=n(/*! ../internals/engine-v8-version */"./node_modules/core-js-pure/internals/engine-v8-version.js"),D=I("species"),L="Promise",N=P.get,H=P.set,R=P.getterFor(L),z=d,B=c.TypeError,F=c.document,U=c.process,V=u("fetch"),W=C.f,X=W,G="process"==_(U),Y=!!(F&&F.createEvent&&c.dispatchEvent),Z="unhandledrejection",q=T(L,(function(){if(!(b(z)!==String(z))){if(66===A)return!0;if(!G&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!z.prototype.finally)return!0;if(A>=51&&/native code/.test(z))return!1;var e=z.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[D]=t,!(e.then((function(){}))instanceof t)})),K=q||!k((function(e){z.all(e).catch((function(){}))})),J=function(e){var t;return!(!v(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,n){if(!t.notified){t.notified=!0;var o=t.reactions;w((function(){for(var i=t.value,r=1==t.state,s=0;o.length>s;){var a,l,c,u=o[s++],d=r?u.ok:u.fail,h=u.resolve,f=u.reject,p=u.domain;try{d?(r||(2===t.rejection&&ne(e,t),t.rejection=1),!0===d?a=i:(p&&p.enter(),a=d(i),p&&(p.exit(),c=!0)),a===u.promise?f(B("Promise-chain cycle")):(l=J(a))?l.call(a,h,f):h(a)):f(i)}catch(e){p&&!c&&p.exit(),f(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&ee(e,t)}))}},Q=function(e,t,n){var o,i;Y?((o=F.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),c.dispatchEvent(o)):o={promise:t,reason:n},(i=c["on"+e])?i(o):e===Z&&M("Unhandled promise rejection",n)},ee=function(e,t){x.call(c,(function(){var n,o=t.value;if(te(t)&&(n=S((function(){G?U.emit("unhandledRejection",o,e):Q(Z,e,o)})),
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/es.string.iterator.js ***!
|
||
|
\*****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/string-multibyte */"./node_modules/core-js-pure/internals/string-multibyte.js").charAt,i=n(/*! ../internals/internal-state */"./node_modules/core-js-pure/internals/internal-state.js"),r=n(/*! ../internals/define-iterator */"./node_modules/core-js-pure/internals/define-iterator.js"),s="String Iterator",a=i.set,l=i.getterFor(s);r(String,"String",(function(e){a(this,{type:s,string:String(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=o(n,i),t.index+=e.length,{value:e,done:!1})}))},"./node_modules/core-js-pure/modules/esnext.aggregate-error.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/esnext.aggregate-error.js ***!
|
||
|
\*********************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/export */"./node_modules/core-js-pure/internals/export.js"),i=n(/*! ../internals/descriptors */"./node_modules/core-js-pure/internals/descriptors.js"),r=n(/*! ../internals/object-get-prototype-of */"./node_modules/core-js-pure/internals/object-get-prototype-of.js"),s=n(/*! ../internals/object-set-prototype-of */"./node_modules/core-js-pure/internals/object-set-prototype-of.js"),a=n(/*! ../internals/object-create */"./node_modules/core-js-pure/internals/object-create.js"),l=n(/*! ../internals/object-define-property */"./node_modules/core-js-pure/internals/object-define-property.js"),c=n(/*! ../internals/create-property-descriptor */"./node_modules/core-js-pure/internals/create-property-descriptor.js"),u=n(/*! ../internals/iterate */"./node_modules/core-js-pure/internals/iterate.js"),d=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),h=n(/*! ../internals/internal-state */"./node_modules/core-js-pure/internals/internal-state.js"),f=h.set,p=h.getterFor("AggregateError"),m=function(e,t){var n=this;if(!(n instanceof m))return new m(e,t);s&&(n=s(new Error(t),r(n)));var o=[];return u(e,o.push,o),i?f(n,{errors:o,type:"AggregateError"}):n.errors=o,void 0!==t&&d(n,"message",String(t)),n};m.prototype=a(Error.prototype,{constructor:c(5,m),message:c(5,""),name:c(5,"AggregateError")}),i&&l.f(m.prototype,"errors",{get:function(){return p(this).errors},configurable:!0}),o({global:!0},{AggregateError:m})},"./node_modules/core-js-pure/modules/esnext.promise.all-settled.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/esnext.promise.all-settled.js ***!
|
||
|
\*************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){n(/*! ./es.promise.all-settled.js */"./node_modules/core-js-pure/modules/es.promise.all-settled.js")},"./node_modules/core-js-pure/modules/esnext.promise.any.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/esnext.promise.any.js ***!
|
||
|
\*****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/export */"./node_modules/core-js-pure/internals/export.js"),i=n(/*! ../internals/a-function */"./node_modules/core-js-pure/internals/a-function.js"),r=n(/*! ../internals/get-built-in */"./node_modules/core-js-pure/internals/get-built-in.js"),s=n(/*! ../internals/new-promise-capability */"./node_modules/core-js-pure/internals/new-promise-capability.js"),a=n(/*! ../internals/perform */"./node_modules/core-js-pure/internals/perform.js"),l=n(/*! ../internals/iterate */"./node_modules/core-js-pure/internals/iterate.js"),c="No one promise resolved";o({target:"Promise",stat:!0},{any:function(e){var t=this,n=s.f(t),o=n.resolve,u=n.reject,d=a((function(){var n=i(t.resolve),s=[],a=0,d=1,h=!1;l(e,(function(e){var i=a++,l=!1;s.push(void 0),d++,n.call(t,e).then((function(e){l||h||(h=!0,o(e))}),(function(e){l||h||(l=!0,s[i]=e,--d||u(new(r("AggregateError"))(s,c)))}))})),--d||u(new(r("AggregateError"))(s,c))}));return d.error&&u(d.value),n.promise}})},"./node_modules/core-js-pure/modules/esnext.promise.try.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/esnext.promise.try.js ***!
|
||
|
\*****************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o=n(/*! ../internals/export */"./node_modules/core-js-pure/internals/export.js"),i=n(/*! ../internals/new-promise-capability */"./node_modules/core-js-pure/internals/new-promise-capability.js"),r=n(/*! ../internals/perform */"./node_modules/core-js-pure/internals/perform.js");o({target:"Promise",stat:!0},{try:function(e){var t=i.f(this),n=r(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},"./node_modules/core-js-pure/modules/web.dom-collections.iterator.js":
|
||
|
/*!***************************************************************************!*\
|
||
|
!*** ./node_modules/core-js-pure/modules/web.dom-collections.iterator.js ***!
|
||
|
\***************************************************************************/
|
||
|
/*! no static exports found */function(e,t,n){n(/*! ./es.array.iterator */"./node_modules/core-js-pure/modules/es.array.iterator.js");var o=n(/*! ../internals/dom-iterables */"./node_modules/core-js-pure/internals/dom-iterables.js"),i=n(/*! ../internals/global */"./node_modules/core-js-pure/internals/global.js"),r=n(/*! ../internals/classof */"./node_modules/core-js-pure/internals/classof.js"),s=n(/*! ../internals/create-non-enumerable-property */"./node_modules/core-js-pure/internals/create-non-enumerable-property.js"),a=n(/*! ../internals/iterators */"./node_modules/core-js-pure/internals/iterators.js"),l=n(/*! ../internals/well-known-symbol */"./node_modules/core-js-pure/internals/well-known-symbol.js")("toStringTag");for(var c in o){var u=i[c],d=u&&u.prototype;d&&r(d)!==l&&s(d,l,c),a[c]=a.Array}},"./node_modules/webpack/buildin/global.js":
|
||
|
/*!***********************************!*\
|
||
|
!*** (webpack)/buildin/global.js ***!
|
||
|
\***********************************/
|
||
|
/*! no static exports found */function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./src/css/index.styl":
|
||
|
/*!****************************!*\
|
||
|
!*** ./src/css/index.styl ***!
|
||
|
\****************************/
|
||
|
/*! no static exports found */function(e,t,n){},"./src/index.js":
|
||
|
/*!**********************!*\
|
||
|
!*** ./src/index.js ***!
|
||
|
\**********************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";n(/*! @/polyfill */"./src/js/polyfill.js");var o,i=n(/*! @/imageEditor */"./src/js/imageEditor.js"),r=(o=i)&&o.__esModule?o:{default:o};n(/*! @css/index.styl */"./src/css/index.styl"),n(/*! @/command/addIcon */"./src/js/command/addIcon.js"),n(/*! @/command/addImageObject */"./src/js/command/addImageObject.js"),n(/*! @/command/addObject */"./src/js/command/addObject.js"),n(/*! @/command/addShape */"./src/js/command/addShape.js"),n(/*! @/command/addText */"./src/js/command/addText.js"),n(/*! @/command/applyFilter */"./src/js/command/applyFilter.js"),n(/*! @/command/changeIconColor */"./src/js/command/changeIconColor.js"),n(/*! @/command/changeShape */"./src/js/command/changeShape.js"),n(/*! @/command/changeText */"./src/js/command/changeText.js"),n(/*! @/command/changeTextStyle */"./src/js/command/changeTextStyle.js"),n(/*! @/command/clearObjects */"./src/js/command/clearObjects.js"),n(/*! @/command/flip */"./src/js/command/flip.js"),n(/*! @/command/loadImage */"./src/js/command/loadImage.js"),n(/*! @/command/removeFilter */"./src/js/command/removeFilter.js"),n(/*! @/command/removeObject */"./src/js/command/removeObject.js"),n(/*! @/command/resizeCanvasDimension */"./src/js/command/resizeCanvasDimension.js"),n(/*! @/command/rotate */"./src/js/command/rotate.js"),n(/*! @/command/setObjectProperties */"./src/js/command/setObjectProperties.js"),n(/*! @/command/setObjectPosition */"./src/js/command/setObjectPosition.js"),n(/*! @/command/changeSelection */"./src/js/command/changeSelection.js"),e.exports=r.default},"./src/js/action.js":
|
||
|
/*!**************************!*\
|
||
|
!*** ./src/js/action.js ***!
|
||
|
\**************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! tui-code-snippet */"tui-code-snippet"),r=n(/*! @/helper/imagetracer */"./src/js/helper/imagetracer.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/util */"./src/js/util.js"),l=n(/*! @/consts */"./src/js/consts.js");t.default={getActions:function(){return{main:this._mainAction(),shape:this._shapeAction(),crop:this._cropAction(),flip:this._flipAction(),rotate:this._rotateAction(),text:this._textAction(),mask:this._maskAction(),draw:this._drawAction(),icon:this._iconAction(),filter:this._filterAction(),history:this._historyAction()}},_mainAction:function(){var e=this,t=function(){"crop"===e.ui.submenu&&(e.stopDrawingMode(),e.ui.changeMenu("crop"))},n=function(t){var n,o;return n=t,"rotate"===e.ui.submenu&&e.ui.rotate.setRangeBarAngle("setAngle",n),o=t,"filter"===e.ui.submenu&&e.ui.filter.setFilterState(o),t},o=function(){e.ui.filter&&e.ui.filter.initFilterCheckBoxState()};return(0,i.extend)({initLoadImage:function(n,o){return e.loadImageFromURL(n,o).then((function(o){t(),e.ui.initializeImgUrl=n,e.ui.resizeEditor({imageSize:o}),e.clearUndoStack(),e._invoker.fire(l.eventNames.EXECUTE_COMMAND,l.historyNames.LOAD_IMAGE)}))},undo:function(){e.isEmptyUndoStack()||(t(),e.deactivateAll(),e.undo().then(n))},redo:function(){e.isEmptyRedoStack()||(t(),e.deactivateAll(),e.redo().then(n))},reset:function(){t(),e.loadImageFromURL(e.ui.initializeImgUrl,"resetImage").then((function(n){t(),o(),e.ui.resizeEditor({imageSize:n}),e.clearUndoStack(),e._initHistory()}))},delete:function(){e.ui.changeHelpButtonEnabled("delete",!1),t(),e.removeActiveObject(),e.activeObjectId=null},deleteAll:function(){t(),e.clearObjects(),e.ui.changeHelpButtonEnabled("delete",!1),e.ui.changeHelpButtonEnabled("deleteAll",!1)},load:function(n){(0,a.isSupportFileApi)()||alert("This browser does not support file-api"),e.ui.initializeImgUrl=URL.createObjectURL(n),e.loadImageFromFile(n).then((function(n){t(),o(),e.clearUndoStack(),e.ui.activeMenuEvent(),e.ui.resizeEditor({imageSize:n}),e._clearHistory(),e._invoker.fire(l.eventNames.EXECUTE_COMMAND,l.historyNames.LOAD_IMAGE)})).catch((function(e){return Promise.reject(e)}))},download:function(){var t=e.toDataURL(),n=e.getImageName(),o=void 0,i=void 0;(0,a.isSupportFileApi)()&&window.saveAs?(i=(o=(0,a.base64ToBlob)(t)).type.split("/")[1],n.split(".").pop()!==i&&(n+="."+i),saveAs(o,n)):window.open().document.body.innerHTML="<img src='"+t+"'>"},history:function(t){e.ui.toggleHistoryMenu(t)},zoomIn:function(){var t;e.ui.toggleZoomButtonStatus("zoomIn"),e.deactivateAll(),t=e._graphics.getZoomMode(),e.stopDrawingMode(),t!==l.zoomModes.ZOOM?(e.startDrawingMode(l.drawingModes.ZOOM),e._graphics.startZoomInMode()):e._graphics.endZoomInMode()},zoomOut:function(){e._graphics.zoomOut()},hand:function(){var t;e.ui.offZoomInButtonStatus(),e.ui.toggleZoomButtonStatus("hand"),e.deactivateAll(),t=e._graphics.getZoomMode(),e.stopDrawingMode(),t!==l.zoomModes.HAND?(e.startDrawingMode(l.drawingModes.ZOOM),e._graphics.startHandMode()):e._graphics.endHandMode()}},this._commonAction())},_iconAction:function(){var e=this;return(0,i.extend)({changeColor:function(t){e.activeObjectId&&e.changeIconColor(e.activeObjectId,t)},addIcon:function(t,n){e.startDrawingMode("ICON"),e.setDrawingIcon(t,n)},cancelAddIcon:function(){e.ui.icon.clearIconType(),e.changeSelectableAll(!0),e.changeCursor("default"),e.stopDrawingMode()},registerDefaultIcons:function(t,n){var o={};o[t]=n,e.registerIcons(o)},registerCustomIcon:function(t,n){(new s.default).imageToSVG(t,(function(t){var o=t.match(/path[^>]*d="([^"]*)"/)[1],i={};i[n.name]=o,e.registerIcons(i),e.addIcon(n.name,{left:100,top:100})}),s.default.tracerDefaultOption())}},this._commonAction())},_drawAction:function(){var e=this;return(0,i.extend)({setDrawMode:function(t,n){e.stopDrawingMode(),"free"===t?e.startDrawingMode("FREE_DRAWING",n):e.startDrawingMode("LINE_DRAWING",n)},setColor:function(t){e.setBrush({color:t})}},this._commonAction())},_maskAction:function(){var e=this;return(0,i.ext
|
||
|
/*!***********************************!*\
|
||
|
!*** ./src/js/command/addIcon.js ***!
|
||
|
\***********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");var l=a.componentNames.ICON,c={name:a.commandNames.ADD_ICON,execute:function(e,t,n){var o=this;return e.getComponent(l).add(t,n).then((function(t){return o.undoData.object=e.getObject(t.id),t}))},undo:function(e){return e.remove(this.undoData.object),s.Promise.resolve()}};r.default.register(c),t.default=c},"./src/js/command/addImageObject.js":
|
||
|
/*!******************************************!*\
|
||
|
!*** ./src/js/command/addImageObject.js ***!
|
||
|
\******************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js");var a={name:n(/*! @/consts */"./src/js/consts.js").commandNames.ADD_IMAGE_OBJECT,execute:function(e,t){var n=this;return e.addImageObject(t).then((function(t){return n.undoData.object=e.getObject(t.id),t}))},undo:function(e){return e.remove(this.undoData.object),s.Promise.resolve()}};r.default.register(a),t.default=a},"./src/js/command/addObject.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/command/addObject.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");var l={name:a.commandNames.ADD_OBJECT,execute:function(e,t){return new s.Promise((function(n,o){e.contains(t)?o(a.rejectMessages.addedObject):(e.add(t),n(t))}))},undo:function(e,t){return new s.Promise((function(n,o){e.contains(t)?(e.remove(t),n(t)):o(a.rejectMessages.noObject)}))}};r.default.register(l),t.default=l},"./src/js/command/addShape.js":
|
||
|
/*!************************************!*\
|
||
|
!*** ./src/js/command/addShape.js ***!
|
||
|
\************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");var l=a.componentNames.SHAPE,c={name:a.commandNames.ADD_SHAPE,execute:function(e,t,n){var o=this;return e.getComponent(l).add(t,n).then((function(t){var n=t.id;return o.undoData.object=e.getObject(n),t}))},undo:function(e){return e.remove(this.undoData.object),s.Promise.resolve()}};r.default.register(c),t.default=c},"./src/js/command/addText.js":
|
||
|
/*!***********************************!*\
|
||
|
!*** ./src/js/command/addText.js ***!
|
||
|
\***********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js"),l=n(/*! @/helper/selectionModifyHelper */"./src/js/helper/selectionModifyHelper.js");var c=a.componentNames.TEXT,u={name:a.commandNames.ADD_TEXT,execute:function(e,t,n){var o=this,i=e.getComponent(c);if(this.undoData.object){var r=this.undoData.object;return new s.Promise((function(t,n){e.contains(r)?n(a.rejectMessages.redo):(e.add(r),t(r))}))}return i.add(t,n).then((function(t){var n=t.id,i=e.getObject(n);return o.undoData.object=i,(0,l.setCachedUndoDataForDimension)((0,l.makeSelectionUndoData)(i,(function(){return(0,l.makeSelectionUndoDatum)(n,i,!1)}))),t}))},undo:function(e){return e.remove(this.undoData.object),s.Promise.resolve()}};r.default.register(u),t.default=u},"./src/js/command/applyFilter.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ./src/js/command/applyFilter.js ***!
|
||
|
\***************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s(n(/*! tui-code-snippet */"tui-code-snippet")),i=s(n(/*! @/factory/command */"./src/js/factory/command.js")),r=n(/*! @/consts */"./src/js/consts.js");function s(e){return e&&e.__esModule?e:{default:e}}var a=r.componentNames.FILTER,l=null;var c={name:r.commandNames.APPLY_FILTER,execute:function(e,t,n,i){var s=e.getComponent(a);if("mask"===t){var c=e.getObject(n.maskObjId);if(!c||!c.isType("image"))return Promise.reject(r.rejectMessages.invalidParameters);o.default.extend(n,{mask:c}),e.remove(n.mask)}if(!this.isRedo){var u=function(e,t,n){var o={};return"mask"===e&&(o.object=n.mask),o.options=t,o}(t,s.getOptions(t),n);l=this.setUndoData(u,l,i)}return s.add(t,n)},undo:function(e,t){var n=e.getComponent(a);if("mask"===t){var o=this.undoData.object;return e.add(o),e.setActiveObject(o),n.remove(t)}return this.undoData.options?n.add(t,this.undoData.options):n.remove(t)}};i.default.register(c),t.default=c},"./src/js/command/changeIconColor.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ./src/js/command/changeIconColor.js ***!
|
||
|
\*******************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");var l=a.componentNames.ICON,c={name:a.commandNames.CHANGE_ICON_COLOR,execute:function(e,t,n){var o=this;return new s.Promise((function(i,r){var s=e.getComponent(l),c=e.getObject(t);c||r(a.rejectMessages.noObject),o.undoData.object=c,o.undoData.color=s.getColor(c),s.setColor(n,c),i()}))},undo:function(e){var t=e.getComponent(l),n=this.undoData,o=n.object,i=n.color;return t.setColor(i,o),s.Promise.resolve()}};r.default.register(c),t.default=c},"./src/js/command/changeSelection.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ./src/js/command/changeSelection.js ***!
|
||
|
\*******************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js"),l=n(/*! @/helper/selectionModifyHelper */"./src/js/helper/selectionModifyHelper.js");var c={name:a.commandNames.CHANGE_SELECTION,execute:function(e,t){return this.isRedo?t.forEach((function(t){e.setObjectProperties(t.id,t)})):this.undoData=(0,l.getCachedUndoDataForDimension)(),s.Promise.resolve()},undo:function(e){return this.undoData.forEach((function(t){e.setObjectProperties(t.id,t)})),s.Promise.resolve()}};r.default.register(c),t.default=c},"./src/js/command/changeShape.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ./src/js/command/changeShape.js ***!
|
||
|
\***************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(/*! tui-code-snippet */"tui-code-snippet")),i=a(n(/*! @/factory/command */"./src/js/factory/command.js")),r=n(/*! @/util */"./src/js/util.js"),s=n(/*! @/consts */"./src/js/consts.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=s.componentNames.SHAPE,c=null;var u={name:s.commandNames.CHANGE_SHAPE,execute:function(e,t,n,i){var a=e.getComponent(l),u=e.getObject(t);if(!u)return r.Promise.reject(s.rejectMessages.noObject);if(!this.isRedo){var d=function(e,t){var n={object:t,options:{}};return o.default.forEachOwnProperties(e,(function(e,o){n.options[o]=t[o]})),n}(n,u);c=this.setUndoData(d,c,i)}return a.change(u,n)},undo:function(e){var t=e.getComponent(l),n=this.undoData,o=n.object,i=n.options;return t.change(o,i)}};i.default.register(u),t.default=u},"./src/js/command/changeText.js":
|
||
|
/*!**************************************!*\
|
||
|
!*** ./src/js/command/changeText.js ***!
|
||
|
\**************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");var l=a.componentNames.TEXT,c={name:a.commandNames.CHANGE_TEXT,execute:function(e,t,n){var o=e.getComponent(l),i=e.getObject(t);return i?(this.undoData.object=i,this.undoData.text=o.getText(i),o.change(i,n)):s.Promise.reject(a.rejectMessages.noObject)},undo:function(e){var t=e.getComponent(l),n=this.undoData,o=n.object,i=n.text;return t.change(o,i)}};r.default.register(c),t.default=c},"./src/js/command/changeTextStyle.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ./src/js/command/changeTextStyle.js ***!
|
||
|
\*******************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(/*! tui-code-snippet */"tui-code-snippet")),i=a(n(/*! @/factory/command */"./src/js/factory/command.js")),r=n(/*! @/util */"./src/js/util.js"),s=n(/*! @/consts */"./src/js/consts.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=s.componentNames.TEXT,c=null;var u={name:s.commandNames.CHANGE_TEXT_STYLE,execute:function(e,t,n,i){var a=e.getComponent(l),u=e.getObject(t);if(!u)return r.Promise.reject(s.rejectMessages.noObject);if(!this.isRedo){var d=function(e,t){var n={object:t,styles:{}};return o.default.forEachOwnProperties(e,(function(e,o){var i=t[o];n.styles[o]=i})),n}(n,u);c=this.setUndoData(d,c,i)}return a.setStyle(u,n)},undo:function(e){var t=e.getComponent(l),n=this.undoData,o=n.object,i=n.styles;return t.setStyle(o,i)}};i.default.register(u),t.default=u},"./src/js/command/clearObjects.js":
|
||
|
/*!****************************************!*\
|
||
|
!*** ./src/js/command/clearObjects.js ***!
|
||
|
\****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js");var a={name:n(/*! @/consts */"./src/js/consts.js").commandNames.CLEAR_OBJECTS,execute:function(e){var t=this;return new s.Promise((function(n){t.undoData.objects=e.removeAll(),n()}))},undo:function(e){return e.add(this.undoData.objects),s.Promise.resolve()}};r.default.register(a),t.default=a},"./src/js/command/flip.js":
|
||
|
/*!********************************!*\
|
||
|
!*** ./src/js/command/flip.js ***!
|
||
|
\********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/consts */"./src/js/consts.js");var a=s.componentNames.FLIP,l={name:s.commandNames.FLIP_IMAGE,execute:function(e,t){var n=e.getComponent(a);return this.undoData.setting=n.getCurrentSetting(),n[t]()},undo:function(e){return e.getComponent(a).set(this.undoData.setting)}};r.default.register(l),t.default=l},"./src/js/command/loadImage.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/command/loadImage.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/consts */"./src/js/consts.js");var a=s.componentNames.IMAGE_LOADER,l={name:s.commandNames.LOAD_IMAGE,execute:function(e,t,n){var o=e.getComponent(a),i=o.getCanvasImage(),r=i?i.width:0,s=i?i.height:0,l=e.removeAll(!0).filter((function(e){return"cropzone"!==e.type}));return l.forEach((function(e){e.evented=!0})),this.undoData={name:o.getImageName(),image:i,objects:l},o.load(t,n).then((function(e){return{oldWidth:r,oldHeight:s,newWidth:e.width,newHeight:e.height}}))},undo:function(e){var t=e.getComponent(a),n=this.undoData,o=n.objects,i=n.name,r=n.image;return e.removeAll(!0),e.add(o),t.load(i,r)}};r.default.register(l),t.default=l},"./src/js/command/removeFilter.js":
|
||
|
/*!****************************************!*\
|
||
|
!*** ./src/js/command/removeFilter.js ***!
|
||
|
\****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/consts */"./src/js/consts.js");var a=s.componentNames.FILTER,l={name:s.commandNames.REMOVE_FILTER,execute:function(e,t){var n=e.getComponent(a);return this.undoData.options=n.getOptions(t),n.remove(t)},undo:function(e,t){var n=e.getComponent(a),o=this.undoData.options;return n.add(t,o)}};r.default.register(l),t.default=l},"./src/js/command/removeObject.js":
|
||
|
/*!****************************************!*\
|
||
|
!*** ./src/js/command/removeObject.js ***!
|
||
|
\****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");var l={name:a.commandNames.REMOVE_OBJECT,execute:function(e,t){var n=this;return new s.Promise((function(o,i){n.undoData.objects=e.removeObjectById(t),n.undoData.objects.length?o():i(a.rejectMessages.noObject)}))},undo:function(e){return e.add(this.undoData.objects),s.Promise.resolve()}};r.default.register(l),t.default=l},"./src/js/command/resizeCanvasDimension.js":
|
||
|
/*!*************************************************!*\
|
||
|
!*** ./src/js/command/resizeCanvasDimension.js ***!
|
||
|
\*************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js");var a={name:n(/*! @/consts */"./src/js/consts.js").commandNames.RESIZE_CANVAS_DIMENSION,execute:function(e,t){var n=this;return new s.Promise((function(o){n.undoData.size={width:e.cssMaxWidth,height:e.cssMaxHeight},e.setCssMaxDimension(t),e.adjustCanvasDimension(),o()}))},undo:function(e){return e.setCssMaxDimension(this.undoData.size),e.adjustCanvasDimension(),s.Promise.resolve()}};r.default.register(a),t.default=a},"./src/js/command/rotate.js":
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/command/rotate.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/consts */"./src/js/consts.js");var a=s.componentNames.ROTATION,l=null;var c={name:s.commandNames.ROTATE_IMAGE,execute:function(e,t,n,o){var i=e.getComponent(a);if(!this.isRedo){var r=function(e){return{angle:e.getCurrentAngle()}}(i);l=this.setUndoData(r,l,o)}return i[t](n)},undo:function(e){var t=e.getComponent(a),n=this.args,o=n[1],i=n[2];return"setAngle"===o?t[o](this.undoData.angle):t.rotate(-i)}};r.default.register(c),t.default=c},"./src/js/command/setObjectPosition.js":
|
||
|
/*!*********************************************!*\
|
||
|
!*** ./src/js/command/setObjectPosition.js ***!
|
||
|
\*********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/factory/command */"./src/js/factory/command.js"),r=(o=i)&&o.__esModule?o:{default:o},s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");var l={name:a.commandNames.SET_OBJECT_POSITION,execute:function(e,t,n){return e.getObject(t)?(this.undoData.objectId=t,this.undoData.props=e.getObjectProperties(t,["left","top"]),e.setObjectPosition(t,n),e.renderAll(),s.Promise.resolve()):s.Promise.reject(a.rejectMessages.noObject)},undo:function(e){var t=this.undoData,n=t.objectId,o=t.props;return e.setObjectProperties(n,o),e.renderAll(),s.Promise.resolve()}};r.default.register(l),t.default=l},"./src/js/command/setObjectProperties.js":
|
||
|
/*!***********************************************!*\
|
||
|
!*** ./src/js/command/setObjectProperties.js ***!
|
||
|
\***********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(/*! tui-code-snippet */"tui-code-snippet")),i=a(n(/*! @/factory/command */"./src/js/factory/command.js")),r=n(/*! @/util */"./src/js/util.js"),s=n(/*! @/consts */"./src/js/consts.js");function a(e){return e&&e.__esModule?e:{default:e}}var l={name:s.commandNames.SET_OBJECT_PROPERTIES,execute:function(e,t,n){var i=this,a=e.getObject(t);return a?(this.undoData.props={},o.default.forEachOwnProperties(n,(function(e,t){i.undoData.props[t]=a[t]})),e.setObjectProperties(t,n),r.Promise.resolve()):r.Promise.reject(s.rejectMessages.noObject)},undo:function(e,t){var n=this.undoData.props;return e.setObjectProperties(t,n),r.Promise.resolve()}};i.default.register(l),t.default=l},"./src/js/component/cropper.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/component/cropper.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(/*! tui-code-snippet */"tui-code-snippet")),r=u(n(/*! fabric */"fabric")),s=u(n(/*! @/interface/component */"./src/js/interface/component.js")),a=u(n(/*! @/extension/cropzone */"./src/js/extension/cropzone.js")),l=n(/*! @/consts */"./src/js/consts.js"),c=n(/*! @/util */"./src/js/util.js");function u(e){return e&&e.__esModule?e:{default:e}}var d={presetRatio:null,top:-10,left:-10,height:1,width:1},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.componentNames.CROPPER,e));return n._cropzone=null,n._startX=null,n._startY=null,n._withShiftKey=!1,n._listeners={keydown:n._onKeyDown.bind(n),keyup:n._onKeyUp.bind(n),mousedown:n._onFabricMouseDown.bind(n),mousemove:n._onFabricMouseMove.bind(n),mouseup:n._onFabricMouseUp.bind(n)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"start",value:function(){if(!this._cropzone){var e=this.getCanvas();e.forEachObject((function(e){e.evented=!1})),this._cropzone=new a.default(e,i.default.extend({left:0,top:0,width:.5,height:.5,strokeWidth:0,cornerSize:10,cornerColor:"black",fill:"transparent"},l.CROPZONE_DEFAULT_OPTIONS,this.graphics.cropSelectionStyle)),e.discardActiveObject(),e.add(this._cropzone),e.on("mouse:down",this._listeners.mousedown),e.selection=!1,e.defaultCursor="crosshair",r.default.util.addListener(document,"keydown",this._listeners.keydown),r.default.util.addListener(document,"keyup",this._listeners.keyup)}}},{key:"end",value:function(){var e=this.getCanvas(),t=this._cropzone;t&&(e.remove(t),e.selection=!0,e.defaultCursor="default",e.off("mouse:down",this._listeners.mousedown),e.forEachObject((function(e){e.evented=!0})),this._cropzone=null,r.default.util.removeListener(document,"keydown",this._listeners.keydown),r.default.util.removeListener(document,"keyup",this._listeners.keyup))}},{key:"changeVisibility",value:function(e){this._cropzone&&this._cropzone.set({visible:e})}},{key:"_onFabricMouseDown",value:function(e){var t=this.getCanvas();if(!e.target){t.selection=!1;var n=t.getPointer(e.e);this._startX=n.x,this._startY=n.y,t.on({"mouse:move":this._listeners.mousemove,"mouse:up":this._listeners.mouseup})}}},{key:"_onFabricMouseMove",value:function(e){var t=this.getCanvas(),n=t.getPointer(e.e),o=n.x,i=n.y,r=this._cropzone;Math.abs(o-this._startX)+Math.abs(i-this._startY)>10&&(t.remove(r),r.set(this._calcRectDimensionFromPoint(o,i)),t.add(r),t.setActiveObject(r))}},{key:"_calcRectDimensionFromPoint",value:function(e,t){var n=this.getCanvas(),o=n.getWidth(),i=n.getHeight(),r=this._startX,s=this._startY,a=(0,c.clamp)(e,0,r),l=(0,c.clamp)(t,0,s),u=(0,c.clamp)(e,r,o)-a,d=(0,c.clamp)(t,s,i)-l;return this._withShiftKey&&(u>d?d=u:d>u&&(u=d),r>=e&&(a=r-u),s>=t&&(l=s-d)),{left:a,top:l,width:u,height:d}}},{key:"_onFabricMouseUp",value:function(){var e=this._cropzone,t=this._listeners,n=this.getCanvas();n.setActiveObject(e),n.off({"mouse:move":t.mousemove,"mouse:up":t.mouseup})}},{key:"getCroppedImageData",value:function(e){var t=this.getCanvas(),n=t.contains(this._cropzone);if(!e)return null;n&&t.remove(this._cropzone);var o={imageName:this.getImageName(),url:t.toDataURL(e)};return n&&t.add(this._cropzone),o}},{key:"getCropzoneRect",value:func
|
||
|
/*!************************************!*\
|
||
|
!*** ./src/js/component/filter.js ***!
|
||
|
\************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(/*! tui-code-snippet */"tui-code-snippet"),r=f(n(/*! fabric */"fabric")),s=f(n(/*! @/interface/component */"./src/js/interface/component.js")),a=n(/*! @/util */"./src/js/util.js"),l=n(/*! @/consts */"./src/js/consts.js"),c=f(n(/*! @/extension/mask */"./src/js/extension/mask.js")),u=f(n(/*! @/extension/sharpen */"./src/js/extension/sharpen.js")),d=f(n(/*! @/extension/emboss */"./src/js/extension/emboss.js")),h=f(n(/*! @/extension/colorFilter */"./src/js/extension/colorFilter.js"));function f(e){return e&&e.__esModule?e:{default:e}}var p=r.default.Image.filters;p.Mask=c.default,p.Sharpen=u.default,p.Emboss=d.default,p.ColorFilter=h.default;var m=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.componentNames.FILTER,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"add",value:function(e,t){var n=this;return new a.Promise((function(o,i){var r=n._getSourceImage(),s=n.getCanvas(),a=n._getFilter(r,e);a||(a=n._createFilter(r,e,t)),a||i(l.rejectMessages.invalidParameters),n._changeFilterValues(a,t),n._apply(r,(function(){s.renderAll(),o({type:e,action:"add",options:t})}))}))}},{key:"remove",value:function(e){var t=this;return new a.Promise((function(n,o){var i=t._getSourceImage(),r=t.getCanvas(),s=t.getOptions(e);i.filters.length||o(l.rejectMessages.unsupportedOperation),t._removeFilter(i,e),t._apply(i,(function(){r.renderAll(),n({type:e,action:"remove",options:s})}))}))}},{key:"hasFilter",value:function(e){return!!this._getFilter(this._getSourceImage(),e)}},{key:"getOptions",value:function(e){var t=this._getSourceImage(),n=this._getFilter(t,e);return n?(0,i.extend)({},n.options):null}},{key:"_changeFilterValues",value:function(e,t){(0,i.forEach)(t,(function(t,n){(0,i.isUndefined)(e[n])||(e[n]=t)})),(0,i.forEach)(e.options,(function(n,o){(0,i.isUndefined)(t[o])||(e.options[o]=t[o])}))}},{key:"_apply",value:function(e,t){e.filters.push(),e.applyFilters()&&t()}},{key:"_getSourceImage",value:function(){return this.getCanvasImage()}},{key:"_createFilter",value:function(e,t,n){var o=void 0,i=this._getFabricFilterType(t),s=r.default.Image.filters[i];return s&&((o=new s(n)).options=n,e.filters.push(o)),o}},{key:"_getFilter",value:function(e,t){var n=null;if(e){var o=this._getFabricFilterType(t),i=e.filters.length,r=void 0,s=void 0;for(s=0;s<i;s+=1)if((r=e.filters[s]).type===o){n=r;break}}return n}},{key:"_removeFilter",value:function(e,t){var n=this._getFabricFilterType(t);e.filters=(0,i.filter)(e.filters,(function(e){return e.type!==n}))}},{key:"_getFabricFilterType",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}}]),t}(s.default);t.default=m},"./src/js/component/flip.js":
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/component/flip.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(/*! tui-code-snippet */"tui-code-snippet")),r=l(n(/*! @/interface/component */"./src/js/interface/component.js")),s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.componentNames.FLIP,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"getCurrentSetting",value:function(){var e=this.getCanvasImage();return{flipX:e.flipX,flipY:e.flipY}}},{key:"set",value:function(e){var t=this.getCurrentSetting(),n=t.flipX!==e.flipX,o=t.flipY!==e.flipY;return n||o?(i.default.extend(t,e),this.setImageProperties(t,!0),this._invertAngle(n,o),this._flipObjects(n,o),s.Promise.resolve({flipX:t.flipX,flipY:t.flipY,angle:this.getCanvasImage().angle})):s.Promise.reject(a.rejectMessages.flip)}},{key:"_invertAngle",value:function(e,t){var n=this.getCanvasImage(),o=n.angle;e&&(o*=-1),t&&(o*=-1),n.rotate(parseFloat(o)).setCoords()}},{key:"_flipObjects",value:function(e,t){var n=this.getCanvas();e&&n.forEachObject((function(e){e.set({angle:parseFloat(-1*e.angle),flipX:!e.flipX,left:n.width-e.left}).setCoords()})),t&&n.forEachObject((function(e){e.set({angle:parseFloat(-1*e.angle),flipY:!e.flipY,top:n.height-e.top}).setCoords()})),n.renderAll()}},{key:"reset",value:function(){return this.set({flipX:!1,flipY:!1})}},{key:"flipX",value:function(){var e=this.getCurrentSetting();return this.set({flipX:!e.flipX,flipY:e.flipY})}},{key:"flipY",value:function(){var e=this.getCurrentSetting();return this.set({flipX:e.flipX,flipY:!e.flipY})}}]),t}(r.default);t.default=c},"./src/js/component/freeDrawing.js":
|
||
|
/*!*****************************************!*\
|
||
|
!*** ./src/js/component/freeDrawing.js ***!
|
||
|
\*****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=a(n(/*! fabric */"fabric")),r=a(n(/*! @/interface/component */"./src/js/interface/component.js")),s=n(/*! @/consts */"./src/js/consts.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,s.componentNames.FREE_DRAWING,e));return n.width=12,n.oColor=new i.default.Color("rgba(0, 0, 0, 0.5)"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"start",value:function(e){this.getCanvas().isDrawingMode=!0,this.setBrush(e)}},{key:"setBrush",value:function(e){var t=this.getCanvas().freeDrawingBrush;e=e||{},this.width=e.width||this.width,e.color&&(this.oColor=new i.default.Color(e.color)),t.width=this.width,t.color=this.oColor.toRgba()}},{key:"end",value:function(){this.getCanvas().isDrawingMode=!1}}]),t}(r.default);t.default=l},"./src/js/component/icon.js":
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/component/icon.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(/*! tui-code-snippet */"tui-code-snippet")),r=c(n(/*! fabric */"fabric")),s=c(n(/*! @/interface/component */"./src/js/interface/component.js")),a=n(/*! @/util */"./src/js/util.js"),l=n(/*! @/consts */"./src/js/consts.js");function c(e){return e&&e.__esModule?e:{default:e}}var u={arrow:"M 0 90 H 105 V 120 L 160 60 L 105 0 V 30 H 0 Z",cancel:"M 0 30 L 30 60 L 0 90 L 30 120 L 60 90 L 90 120 L 120 90 L 90 60 L 120 30 L 90 0 L 60 30 L 30 0 Z"},d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.componentNames.ICON,e));return n._oColor="#000000",n._pathMap=u,n._type=null,n._iconColor=null,n._handlers={mousedown:n._onFabricMouseDown.bind(n),mousemove:n._onFabricMouseMove.bind(n),mouseup:n._onFabricMouseUp.bind(n)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"setStates",value:function(e,t){this._type=e,this._iconColor=t}},{key:"start",value:function(){var e=this.getCanvas();e.selection=!1,e.on("mouse:down",this._handlers.mousedown)}},{key:"end",value:function(){var e=this.getCanvas();e.selection=!0,e.off({"mouse:down":this._handlers.mousedown})}},{key:"add",value:function(e,t){var n=this;return new a.Promise((function(o,r){var s=n.getCanvas(),a=n._pathMap[e],c=l.fObjectOptions.SELECTION_STYLE,u=a?n._createIcon(a):null;n._icon=u,u||r(l.rejectMessages.invalidParameters),u.set(i.default.extend({type:"icon",fill:n._oColor},c,t,n.graphics.controlStyle)),s.add(u).setActiveObject(u),o(n.graphics.createObjectProperties(u))}))}},{key:"registerPaths",value:function(e){var t=this;i.default.forEach(e,(function(e,n){t._pathMap[n]=e}),this)}},{key:"setColor",value:function(e,t){this._oColor=e,t&&"icon"===t.get("type")&&(t.set({fill:this._oColor}),this.getCanvas().renderAll())}},{key:"getColor",value:function(e){return e.fill}},{key:"_createIcon",value:function(e){return new r.default.Path(e)}},{key:"_onFabricMouseDown",value:function(e){var t=this,n=this.getCanvas();this._startPoint=n.getPointer(e.e);var o=this._startPoint,i=o.x,r=o.y;this.add(this._type,{left:i,top:r,fill:this._iconColor}).then((function(){t.fire(l.eventNames.ADD_OBJECT,t.graphics.createObjectProperties(t._icon)),n.on("mouse:move",t._handlers.mousemove),n.on("mouse:up",t._handlers.mouseup)}))}},{key:"_onFabricMouseMove",value:function(e){var t=this.getCanvas();if(this._icon){var n=t.getPointer(e.e),o=(n.x-this._startPoint.x)/this._icon.width,i=(n.y-this._startPoint.y)/this._icon.height;this._icon.set({scaleX:Math.abs(2*o),scaleY:Math.abs(2*i)}),this._icon.setCoords(),t.renderAll()}}},{key:"_onFabricMouseUp",value:function(){var e=this.getCanvas();this.fire(l.eventNames.OBJECT_ADDED,this.graphics.createObjectProperties(this._icon)),this._icon=null,e.off("mouse:down",this._handlers.mousedown),e.off("mouse:move",this._handlers.mousemove),e.off("mouse:up",this._handlers.mouseup)}}]),t}(s.default);t.default=d},"./src/js/component/imageLoader.js":
|
||
|
/*!*****************************************!*\
|
||
|
!*** ./src/js/component/imageLoader.js ***!
|
||
|
\*****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/component */"./src/js/interface/component.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/util */"./src/js/util.js"),l=n(/*! @/consts */"./src/js/consts.js");var c={padding:0,crossOrigin:"Anonymous"},u=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.componentNames.IMAGE_LOADER,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"load",value:function(e,t){var n=this,o=void 0;if(e||t)o=this._setBackgroundImage(t).then((function(t){return n.setCanvasImage(e,t),n.adjustCanvasDimension(),t}));else{var i=this.getCanvas();i.backgroundImage=null,i.renderAll(),o=new a.Promise((function(e){n.setCanvasImage("",null),e()}))}return o}},{key:"_setBackgroundImage",value:function(e){var t=this;return e?new a.Promise((function(n,o){var i=t.getCanvas();i.setBackgroundImage(e,(function(){var e=i.backgroundImage;e&&e.getElement()?n(e):o(l.rejectMessages.loadingImageFailed)}),c)})):a.Promise.reject(l.rejectMessages.loadImage)}}]),t}(s.default);t.default=u},"./src/js/component/line.js":
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/component/line.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(/*! tui-code-snippet */"tui-code-snippet")),r=c(n(/*! fabric */"fabric")),s=c(n(/*! @/interface/component */"./src/js/interface/component.js")),a=c(n(/*! @/extension/arrowLine */"./src/js/extension/arrowLine.js")),l=n(/*! @/consts */"./src/js/consts.js");function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.componentNames.LINE,e));return n._width=12,n._oColor=new r.default.Color("rgba(0, 0, 0, 0.5)"),n._listeners={mousedown:n._onFabricMouseDown.bind(n),mousemove:n._onFabricMouseMove.bind(n),mouseup:n._onFabricMouseUp.bind(n)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"setHeadOption",value:function(e){var t=e.arrowType,n=void 0===t?{head:null,tail:null}:t;this._arrowType=n}},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getCanvas();t.defaultCursor="crosshair",t.selection=!1,this.setHeadOption(e),this.setBrush(e),t.forEachObject((function(e){e.set({evented:!1})})),t.on({"mouse:down":this._listeners.mousedown})}},{key:"setBrush",value:function(e){var t=this.getCanvas().freeDrawingBrush;e=e||{},this._width=e.width||this._width,e.color&&(this._oColor=new r.default.Color(e.color)),t.width=this._width,t.color=this._oColor.toRgba()}},{key:"end",value:function(){var e=this.getCanvas();e.defaultCursor="default",e.selection=!0,e.forEachObject((function(e){e.set({evented:!0})})),e.off("mouse:down",this._listeners.mousedown)}},{key:"_onFabricMouseDown",value:function(e){var t=this.getCanvas(),n=t.getPointer(e.e),o=n.x,i=n.y,r=[o,i,o,i];this._line=new a.default(r,{stroke:this._oColor.toRgba(),strokeWidth:this._width,arrowType:this._arrowType,evented:!1}),this._line.set(l.fObjectOptions.SELECTION_STYLE),t.add(this._line),t.on({"mouse:move":this._listeners.mousemove,"mouse:up":this._listeners.mouseup}),this.fire(l.eventNames.ADD_OBJECT,this._createLineEventObjectProperties())}},{key:"_onFabricMouseMove",value:function(e){var t=this.getCanvas(),n=t.getPointer(e.e);this._line.set({x2:n.x,y2:n.y}),this._line.setCoords(),t.renderAll()}},{key:"_onFabricMouseUp",value:function(){var e=this.getCanvas();this.fire(l.eventNames.OBJECT_ADDED,this._createLineEventObjectProperties()),this._line=null,e.off({"mouse:move":this._listeners.mousemove,"mouse:up":this._listeners.mouseup})}},{key:"_createLineEventObjectProperties",value:function(){var e=this.graphics.createObjectProperties(this._line),t=this._line,n=t.x1,o=t.x2,r=t.y1,s=t.y2;return i.default.extend({},e,{startPosition:{x:n,y:r},endPosition:{x:o,y:s}})}}]),t}(s.default);t.default=u},"./src/js/component/rotation.js":
|
||
|
/*!**************************************!*\
|
||
|
!*** ./src/js/component/rotation.js ***!
|
||
|
\**************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(/*! fabric */"fabric")),r=l(n(/*! @/interface/component */"./src/js/interface/component.js")),s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.componentNames.ROTATION,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"getCurrentAngle",value:function(){return this.getCanvasImage().angle}},{key:"setAngle",value:function(e){var t=this.getCurrentAngle()%360;e%=360;var n=this.getCanvasImage(),o=n.getCenterPoint();n.set({angle:e}).setCoords(),this.adjustCanvasDimension();var i=n.getCenterPoint();return this._rotateForEachObject(o,i,e-t),s.Promise.resolve(e)}},{key:"_rotateForEachObject",value:function(e,t,n){var o=this.getCanvas(),r=e.x-t.x,s=e.y-t.y;o.forEachObject((function(t){var o=t.getCenterPoint(),a=i.default.util.degreesToRadians(n),l=i.default.util.rotatePoint(o,e,a);t.set({left:l.x-r,top:l.y-s,angle:(t.angle+n)%360}),t.setCoords()})),o.renderAll()}},{key:"rotate",value:function(e){var t=this.getCurrentAngle();return this.setAngle(t+e)}}]),t}(r.default);t.default=c},"./src/js/component/shape.js":
|
||
|
/*!***********************************!*\
|
||
|
!*** ./src/js/component/shape.js ***!
|
||
|
\***********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(/*! tui-code-snippet */"tui-code-snippet"),r=d(n(/*! fabric */"fabric")),s=d(n(/*! @/interface/component */"./src/js/interface/component.js")),a=d(n(/*! @/helper/shapeResizeHelper */"./src/js/helper/shapeResizeHelper.js")),l=n(/*! @/helper/shapeFilterFillHelper */"./src/js/helper/shapeFilterFillHelper.js"),c=n(/*! @/util */"./src/js/util.js"),u=n(/*! @/consts */"./src/js/consts.js");function d(e){return e&&e.__esModule?e:{default:e}}var h=(0,i.extend)({strokeWidth:1,stroke:"#000000",fill:"#ffffff",width:1,height:1,rx:0,ry:0},u.SHAPE_DEFAULT_OPTIONS);function f(e,t,n){var o=e.fill,r=(0,c.getFillTypeFromOption)(e.fill),s=o;o.color&&(s=o.color);var a=null;if("filter"===r){var u=n();a=(0,l.makeFillPatternForFilter)(t,o.filter,u)}else a={fill:s};return(0,i.extend)({},e,a)}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u.componentNames.SHAPE,e));return n._shapeObj=null,n._type="rect",n._options=(0,i.extend)({},h),n._isSelected=!1,n._startPoint={},n._withShiftKey=!1,n._handlers={mousedown:n._onFabricMouseDown.bind(n),mousemove:n._onFabricMouseMove.bind(n),mouseup:n._onFabricMouseUp.bind(n),keydown:n._onKeyDown.bind(n),keyup:n._onKeyUp.bind(n)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"start",value:function(){var e=this.getCanvas();this._isSelected=!1,e.defaultCursor="crosshair",e.selection=!1,e.uniformScaling=!0,e.on({"mouse:down":this._handlers.mousedown}),r.default.util.addListener(document,"keydown",this._handlers.keydown),r.default.util.addListener(document,"keyup",this._handlers.keyup)}},{key:"end",value:function(){var e=this.getCanvas();this._isSelected=!1,e.defaultCursor="default",e.selection=!0,e.uniformScaling=!1,e.off({"mouse:down":this._handlers.mousedown}),r.default.util.removeListener(document,"keydown",this._handlers.keydown),r.default.util.removeListener(document,"keyup",this._handlers.keyup)}},{key:"setStates",value:function(e,t){this._type=e,t&&(this._options=(0,i.extend)(this._options,t))}},{key:"add",value:function(e,t){var n=this;return new c.Promise((function(o){var i=n.getCanvas(),r=n._extendOptions(t),s=n._createInstance(e,r),a=n.graphics.createObjectProperties(s);n._bindEventOnShape(s),i.add(s).setActiveObject(s),n._resetPositionFillFilter(s),o(a)}))}},{key:"change",value:function(e,t){var n=this;return new c.Promise((function(o,i){(0,c.isShape)(e)||i(u.rejectMessages.unsupportedType);var r="filter"===(0,c.getFillTypeFromOption)(t.fill),s=n.graphics,a=s.canvasImage,l=s.createStaticCanvas;e.set(r?f(t,a,l):t),r&&n._resetPositionFillFilter(e),n.getCanvas().renderAll(),o()}))}},{key:"makeFillPropertyForUserEvent",value:function(e){var t=(0,c.getFillTypeFromObject)(e),n={};if(t===u.SHAPE_FILL_TYPE.FILTER){var o=(0,l.getFillImageFromShape)(e),i=(0,l.makeFilterOptionFromFabricImage)(o);n.type=t,n.filter=i}else n.type=u.SHAPE_FILL_TYPE.COLOR,n.color=e.fill||"transparent";return n}},{key:"processForCopiedObject",value:function(e,t){if(this._bindEventOnShape(e),"filter"===(0,c.getFillTypeFromObject)(e)){var n=(0,l.getFillImageFromShape)(t),o=(0,l.makeFilterOptionFromFabricImage)(n),i=this.graphics.createStaticCanvas();e.set((0,l.makeFillPatternForFilter)(this.grap
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/component/text.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(/*! tui-code-snippet */"tui-code-snippet")),r=c(n(/*! fabric */"fabric")),s=c(n(/*! @/interface/component */"./src/js/interface/component.js")),a=n(/*! @/util */"./src/js/util.js"),l=n(/*! @/consts */"./src/js/consts.js");function c(e){return e&&e.__esModule?e:{default:e}}var u={fill:"#000000",left:0,top:0},d={fill:"#000000",fontStyle:"normal",fontWeight:"normal",textAlign:"left",underline:!1},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.componentNames.TEXT,e));return n._defaultStyles=u,n._isSelected=!1,n._selectedObj={},n._editingObj={},n._listeners={mousedown:n._onFabricMouseDown.bind(n),select:n._onFabricSelect.bind(n),selectClear:n._onFabricSelectClear.bind(n),scaling:n._onFabricScaling.bind(n),textChanged:n._onFabricTextChanged.bind(n)},n._textarea=null,n._ratio=1,n._lastClickTime=(new Date).getTime(),n._editingObjInfos={},n.isPrevEditing=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"start",value:function(){var e=this,t=this.getCanvas();t.selection=!1,t.defaultCursor="text",t.on({"mouse:down":this._listeners.mousedown,"selection:created":this._listeners.select,"selection:updated":this._listeners.select,"before:selection:cleared":this._listeners.selectClear,"object:scaling":this._listeners.scaling,"text:changed":this._listeners.textChanged}),t.forEachObject((function(t){"i-text"===t.type&&e.adjustOriginPosition(t,"start")})),this.setCanvasRatio()}},{key:"end",value:function(){var e=this,t=this.getCanvas();t.selection=!0,t.defaultCursor="default",t.forEachObject((function(n){"i-text"===n.type&&(""===n.text?t.remove(n):e.adjustOriginPosition(n,"end"))})),t.off({"mouse:down":this._listeners.mousedown,"selection:created":this._listeners.select,"selection:updated":this._listeners.select,"before:selection:cleared":this._listeners.selectClear,"object:selected":this._listeners.select,"object:scaling":this._listeners.scaling,"text:changed":this._listeners.textChanged})}},{key:"adjustOriginPosition",value:function(e,t){var n="center",o="center";"start"===t&&(n="left",o="top");var i=e.getPointByOrigin(n,o),r=i.x,s=i.y;e.set({left:r,top:s,originX:n,originY:o}),e.setCoords()}},{key:"add",value:function(e,t){var n=this;return new a.Promise((function(o){var s=n.getCanvas(),a=null,c=l.fObjectOptions.SELECTION_STYLE,u=n._defaultStyles;n._setInitPos(t.position),t.styles&&(u=i.default.extend(u,t.styles)),i.default.isExisty(t.autofocus)||(t.autofocus=!0),a=new r.default.IText(e,u),c=i.default.extend({},c,{originX:"left",originY:"top"}),a.set(c),a.on({mouseup:n._onFabricMouseUp.bind(n)}),s.add(a),t.autofocus&&(a.enterEditing(),a.selectAll()),s.getActiveObject()||s.setActiveObject(a),n.isPrevEditing=!0,o(n.graphics.createObjectProperties(a))}))}},{key:"change",value:function(e,t){var n=this;return new a.Promise((function(o){e.set("text",t),n.getCanvas().renderAll(),o()}))}},{key:"setStyle",value:function(e,t){var n=this;return new a.Promise((function(o){i.default.forEach(t,(function(n,o){e[o]===n&&"fontSize"!==o&&(t[o]=d[o]||"")}),n),"textDecoration"in t&&i.default.extend(t,n._getTextDecorationAdaptObject(t.textDecoration)),e.set(t),n.getCanvas().renderAll(),o()}))}},{key:"getText",value
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/component/zoom.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(/*! fabric */"fabric")),r=l(n(/*! @/interface/component */"./src/js/interface/component.js")),s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");function l(e){return e&&e.__esModule?e:{default:e}}var c={left:0,top:0,width:0,height:0,stroke:"#000000",strokeWidth:0,fill:"#000000",opacity:.4,evented:!1,selectable:!1,hoverCursor:"auto"},u=.0045,d=.003,h=.003,f=.0066,p=.0044,m=.003,v=a.eventNames.ZOOM_CHANGED,g=a.eventNames.ADD_TEXT,y=a.eventNames.TEXT_EDITING,_=a.eventNames.OBJECT_MODIFIED,b=a.eventNames.KEY_DOWN,j=a.eventNames.KEY_UP,k=a.eventNames.HAND_STARTED,E=a.eventNames.HAND_STOPPED,x=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.componentNames.ZOOM,e));n.zoomArea=null,n._startPoint=null,n._centerPoints=[],n.zoomLevel=1,n.zoomMode=a.zoomModes.DEFAULT,n._listeners={startZoom:n._onMouseDownWithZoomMode.bind(n),moveZoom:n._onMouseMoveWithZoomMode.bind(n),stopZoom:n._onMouseUpWithZoomMode.bind(n),startHand:n._onMouseDownWithHandMode.bind(n),moveHand:n._onMouseMoveWithHandMode.bind(n),stopHand:n._onMouseUpWithHandMode.bind(n),zoomChanged:n._changeScrollState.bind(n),keydown:n._startHandModeWithSpaceBar.bind(n),keyup:n._endHandModeWithSpaceBar.bind(n)};var o=n.getCanvas();return n.aspectRatio=o.width/o.height,n._verticalScroll=new i.default.Rect(c),n._horizontalScroll=new i.default.Rect(c),o.on(v,n._listeners.zoomChanged),n.graphics.on(g,n._startTextEditingHandler.bind(n)),n.graphics.on(y,n._startTextEditingHandler.bind(n)),n.graphics.on(_,n._stopTextEditingHandler.bind(n)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"attachKeyboardZoomEvents",value:function(){i.default.util.addListener(document,b,this._listeners.keydown),i.default.util.addListener(document,j,this._listeners.keyup)}},{key:"detachKeyboardZoomEvents",value:function(){i.default.util.removeListener(document,b,this._listeners.keydown),i.default.util.removeListener(document,j,this._listeners.keyup)}},{key:"_startTextEditingHandler",value:function(){this.isTextEditing=!0}},{key:"_stopTextEditingHandler",value:function(){this.isTextEditing=!1}},{key:"_startHandModeWithSpaceBar",value:function(e){this.withSpace||this.isTextEditing||e.keyCode===a.keyCodes.SPACE&&(this.withSpace=!0,this.startHandMode())}},{key:"_endHandModeWithSpaceBar",value:function(e){e.keyCode===a.keyCodes.SPACE&&(this.withSpace=!1,this.endHandMode())}},{key:"startZoomInMode",value:function(){if(!this.zoomArea){this.endHandMode(),this.zoomMode=a.zoomModes.ZOOM;var e=this.getCanvas();this._changeObjectsEventedState(!1),this.zoomArea=new i.default.Rect({left:0,top:0,width:.5,height:.5,stroke:"black",strokeWidth:1,fill:"transparent",hoverCursor:"zoom-in"}),e.discardActiveObject(),e.add(this.zoomArea),e.on("mouse:down",this._listeners.startZoom),e.selection=!1,e.defaultCursor="zoom-in"}}},{key:"endZoomInMode",value:function(){this.zoomMode=a.zoomModes.DEFAULT;var e=this.getCanvas(),t=this._listeners,n=t.startZoom,o=t.moveZoom,i=t.stopZoom;e.selection=!0,e.defaultCursor="auto",e.off({"mouse:down":n,"mouse:move":o,"mouse:up":i}),this._changeObjectsEventedState(!0),e.remove(this.zoomArea),this.zoomArea=null}},{key:"start",value:fun
|
||
|
/*!**************************!*\
|
||
|
!*** ./src/js/consts.js ***!
|
||
|
\**************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.emptyCropRectValues=t.defaultFilterRangeValues=t.defaultTextRangeValues=t.defaultShapeStrokeValues=t.defaultDrawRangeValues=t.defaultRotateRangeValues=t.defaultIconPath=t.rejectMessages=t.fObjectOptions=t.keyCodes=t.zoomModes=t.drawingMenuNames=t.drawingModes=t.historyNames=t.selectorNames=t.eventNames=t.commandNames=t.CROPZONE_DEFAULT_OPTIONS=t.SHAPE_DEFAULT_OPTIONS=t.componentNames=t.filterType=t.OBJ_TYPE=t.SHAPE_TYPE=t.SHAPE_FILL_TYPE=t.HELP_MENUS=t.DELETE_HELP_MENUS=t.COMMAND_HELP_MENUS=t.ZOOM_HELP_MENUS=void 0;var o=n(/*! @/util */"./src/js/util.js"),i=t.ZOOM_HELP_MENUS=["zoomIn","zoomOut","hand"],r=t.COMMAND_HELP_MENUS=["history","undo","redo","reset"],s=t.DELETE_HELP_MENUS=["delete","deleteAll"];t.HELP_MENUS=[].concat(i,r,s),t.SHAPE_FILL_TYPE={FILTER:"filter",COLOR:"color"},t.SHAPE_TYPE=["rect","circle","triangle"],t.OBJ_TYPE={CROPZONE:"cropzone"},t.filterType={VINTAGE:"vintage",SEPIA2:"sepia2",REMOVE_COLOR:"removeColor",COLOR_FILTER:"colorFilter",REMOVE_WHITE:"removeWhite",BLEND_COLOR:"blendColor",BLEND:"blend"},t.componentNames=(0,o.keyMirror)("IMAGE_LOADER","CROPPER","FLIP","ROTATION","FREE_DRAWING","LINE","TEXT","ICON","FILTER","SHAPE","ZOOM"),t.SHAPE_DEFAULT_OPTIONS={lockSkewingX:!0,lockSkewingY:!0,bringForward:!0,isRegular:!1},t.CROPZONE_DEFAULT_OPTIONS={hasRotatingPoint:!1,hasBorders:!1,lockScalingFlip:!0,lockRotation:!0,lockSkewingX:!0,lockSkewingY:!0},t.commandNames={CLEAR_OBJECTS:"clearObjects",LOAD_IMAGE:"loadImage",FLIP_IMAGE:"flip",ROTATE_IMAGE:"rotate",ADD_OBJECT:"addObject",REMOVE_OBJECT:"removeObject",APPLY_FILTER:"applyFilter",REMOVE_FILTER:"removeFilter",ADD_ICON:"addIcon",CHANGE_ICON_COLOR:"changeIconColor",ADD_SHAPE:"addShape",CHANGE_SHAPE:"changeShape",ADD_TEXT:"addText",CHANGE_TEXT:"changeText",CHANGE_TEXT_STYLE:"changeTextStyle",ADD_IMAGE_OBJECT:"addImageObject",RESIZE_CANVAS_DIMENSION:"resizeCanvasDimension",SET_OBJECT_PROPERTIES:"setObjectProperties",SET_OBJECT_POSITION:"setObjectPosition",CHANGE_SELECTION:"changeSelection"},t.eventNames={OBJECT_ACTIVATED:"objectActivated",OBJECT_MOVED:"objectMoved",OBJECT_SCALED:"objectScaled",OBJECT_CREATED:"objectCreated",OBJECT_ROTATED:"objectRotated",OBJECT_ADDED:"objectAdded",OBJECT_MODIFIED:"objectModified",TEXT_EDITING:"textEditing",TEXT_CHANGED:"textChanged",ICON_CREATE_RESIZE:"iconCreateResize",ICON_CREATE_END:"iconCreateEnd",ADD_TEXT:"addText",ADD_OBJECT:"addObject",ADD_OBJECT_AFTER:"addObjectAfter",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_MOVE:"mousemove",REDO_STACK_CHANGED:"redoStackChanged",UNDO_STACK_CHANGED:"undoStackChanged",SELECTION_CLEARED:"selectionCleared",SELECTION_CREATED:"selectionCreated",EXECUTE_COMMAND:"executeCommand",AFTER_UNDO:"afterUndo",AFTER_REDO:"afterRedo",ZOOM_CHANGED:"zoomChanged",HAND_STARTED:"handStarted",HAND_STOPPED:"handStopped",KEY_DOWN:"keydown",KEY_UP:"keyup",INPUT_BOX_EDITING_STARTED:"inputBoxEditingStarted",INPUT_BOX_EDITING_STOPPED:"inputBoxEditingStopped",FOCUS:"focus",BLUR:"blur"},t.selectorNames={COLOR_PICKER_INPUT_BOX:".tui-colorpicker-palette-hex"},t.historyNames={LOAD_IMAGE:"Load",LOAD_MASK_IMAGE:"Mask",ADD_MASK_IMAGE:"Mask",ADD_IMAGE_OBJECT:"Mask",CROP:"Crop",APPLY_FILTER:"Filter",REMOVE_FILTER:"Filter",CHANGE_SHAPE:"Shape",CHANGE_ICON_COLOR:"Icon",ADD_TEXT:"Text",CHANGE_TEXT_STYLE:"Text",REMOVE_OBJECT:"Delete",CLEAR_OBJECTS:"Delete"},t.drawingModes=(0,o.keyMirror)("NORMAL","CROPPER","FREE_DRAWING","LINE_DRAWING","TEXT","SHAPE","ICON","ZOOM"),t.drawingMenuNames={TEXT:"text",CROP:"crop",SHAPE:"shape",ZOOM:"zoom"},t.zoomModes={DEFAULT:"normal",ZOOM:"zoom",HAND:"hand"},t.keyCodes={Z:90,Y:89,C:67,V:86,SHIFT:16,BACKSPACE:8,DEL:46,ARROW_DOWN:40,ARROW_UP:38,SPACE:32},t.fObjectOptions={SELECTION_STYLE:{borderColor:"red",cornerColor:"green",cornerSize:10,originX:"center",originY:"center",transparentCorners:!1}},t.rejectMessages={addedObject:"The object is already added.",flip:"The flipX and flipY setting values are not changed.",invalidDrawingMode:"This operation is not supported in the drawing
|
||
|
/*!***************************************!*\
|
||
|
!*** ./src/js/drawingMode/cropper.js ***!
|
||
|
\***************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/drawingMode */"./src/js/interface/drawingMode.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/consts */"./src/js/consts.js");var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.drawingModes.CROPPER))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(e){e.getComponent(a.componentNames.CROPPER).start()}},{key:"end",value:function(e){e.getComponent(a.componentNames.CROPPER).end()}}]),t}(s.default);t.default=l},"./src/js/drawingMode/freeDrawing.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ./src/js/drawingMode/freeDrawing.js ***!
|
||
|
\*******************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/drawingMode */"./src/js/interface/drawingMode.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/consts */"./src/js/consts.js");var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.drawingModes.FREE_DRAWING))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(e,t){e.getComponent(a.componentNames.FREE_DRAWING).start(t)}},{key:"end",value:function(e){e.getComponent(a.componentNames.FREE_DRAWING).end()}}]),t}(s.default);t.default=l},"./src/js/drawingMode/icon.js":
|
||
|
/*!************************************!*\
|
||
|
!*** ./src/js/drawingMode/icon.js ***!
|
||
|
\************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/drawingMode */"./src/js/interface/drawingMode.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/consts */"./src/js/consts.js");var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.drawingModes.ICON))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(e){e.getComponent(a.componentNames.ICON).start()}},{key:"end",value:function(e){e.getComponent(a.componentNames.ICON).end()}}]),t}(s.default);t.default=l},"./src/js/drawingMode/lineDrawing.js":
|
||
|
/*!*******************************************!*\
|
||
|
!*** ./src/js/drawingMode/lineDrawing.js ***!
|
||
|
\*******************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/drawingMode */"./src/js/interface/drawingMode.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/consts */"./src/js/consts.js");var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.drawingModes.LINE_DRAWING))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(e,t){e.getComponent(a.componentNames.LINE).start(t)}},{key:"end",value:function(e){e.getComponent(a.componentNames.LINE).end()}}]),t}(s.default);t.default=l},"./src/js/drawingMode/shape.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/drawingMode/shape.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/drawingMode */"./src/js/interface/drawingMode.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/consts */"./src/js/consts.js");var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.drawingModes.SHAPE))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(e){e.getComponent(a.componentNames.SHAPE).start()}},{key:"end",value:function(e){e.getComponent(a.componentNames.SHAPE).end()}}]),t}(s.default);t.default=l},"./src/js/drawingMode/text.js":
|
||
|
/*!************************************!*\
|
||
|
!*** ./src/js/drawingMode/text.js ***!
|
||
|
\************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/drawingMode */"./src/js/interface/drawingMode.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/consts */"./src/js/consts.js");var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.drawingModes.TEXT))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(e){e.getComponent(a.componentNames.TEXT).start()}},{key:"end",value:function(e){e.getComponent(a.componentNames.TEXT).end()}}]),t}(s.default);t.default=l},"./src/js/drawingMode/zoom.js":
|
||
|
/*!************************************!*\
|
||
|
!*** ./src/js/drawingMode/zoom.js ***!
|
||
|
\************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/interface/drawingMode */"./src/js/interface/drawingMode.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/consts */"./src/js/consts.js");var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a.drawingModes.ZOOM))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"start",value:function(e){e.getComponent(a.componentNames.ZOOM).start()}},{key:"end",value:function(e){e.getComponent(a.componentNames.ZOOM).end()}}]),t}(s.default);t.default=l},"./src/js/extension/arrowLine.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ./src/js/extension/arrowLine.js ***!
|
||
|
\***************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! fabric */"fabric"),r=(o=i)&&o.__esModule?o:{default:o};var s=r.default.util.createClass(r.default.Line,{type:"line",initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.callSuper("initialize",e,t),this.arrowType=t.arrowType},_render:function(e){var t=this.calcLinePoints(),n={fromX:t.x1,fromY:t.y1,toX:t.x2,toY:t.y2};this.ctx=e,e.lineWidth=this.strokeWidth,this._renderBasicLinePath(n),this._drawDecoratorPath(n),this._renderStroke(e)},_renderBasicLinePath:function(e){var t=e.fromX,n=e.fromY,o=e.toX,i=e.toY;this.ctx.beginPath(),this.ctx.moveTo(t,n),this.ctx.lineTo(o,i)},_drawDecoratorPath:function(e){this._drawDecoratorPathType("head",e),this._drawDecoratorPathType("tail",e)},_drawDecoratorPathType:function(e,t){switch(this.arrowType[e]){case"triangle":this._drawTrianglePath(e,t);break;case"chevron":this._drawChevronPath(e,t)}},_drawTrianglePath:function(e,t){var n=1.7*this.ctx.lineWidth;this._drawChevronPath(e,t,n),this.ctx.closePath()},_drawChevronPath:function(e,t,n){var o=this,i=t.fromX,r=t.fromY,s=t.toX,a=t.toY,l=this.ctx;n||(n=2.7*this.ctx.lineWidth);var c="head"===e?[i,r]:[s,a],u=c[0],d=c[1],h="head"===e?[s,a]:[i,r],f=h[0],p=h[1],m=180*Math.atan2(p-d,f-u)/Math.PI,v=function(e){return o.getRotatePosition(n,e,{x:u,y:d})};l.moveTo.apply(l,v(m+30)),l.lineTo(u,d),l.lineTo.apply(l,v(m-30))},getRotatePosition:function(e,t,n){var o=t*Math.PI/180,i=n.x,r=n.y;return[e*Math.cos(o)+i,e*Math.sin(o)+r]}});t.default=s},"./src/js/extension/colorFilter.js":
|
||
|
/*!*****************************************!*\
|
||
|
!*** ./src/js/extension/colorFilter.js ***!
|
||
|
\*****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! fabric */"fabric"),r=(o=i)&&o.__esModule?o:{default:o};var s=r.default.util.createClass(r.default.Image.filters.BaseFilter,{type:"ColorFilter",initialize:function(e){e||(e={}),this.color=e.color||"#FFFFFF",this.threshold=e.threshold||45,this.x=e.x||null,this.y=e.y||null},applyTo:function(e){var t,n=e.canvasEl,o=n.getContext("2d"),i=o.getImageData(0,0,n.width,n.height),s=i.data,a=this.threshold,l=r.default.Color.sourceFromHex(this.color),c=void 0;for(this.x&&this.y&&(l=this._getColor(i,this.x,this.y)),c=0,t=s.length;c<t;c+=4)this._isOutsideThreshold(s[c],l[0],a)||this._isOutsideThreshold(s[c+1],l[1],a)||this._isOutsideThreshold(s[c+2],l[2],a)||(s[c]=s[c+1]=s[c+2]=s[c+3]=0);o.putImageData(i,0,0)},_isOutsideThreshold:function(e,t,n){var o=e-t;return Math.abs(o)>n},_getColor:function(e,t,n){var o=[0,0,0,0],i=e.data,r=4*(e.width*n+t);return o[0]=i[r],o[1]=i[r+1],o[2]=i[r+2],o[3]=i[r+3],o}});t.default=s},"./src/js/extension/cropzone.js":
|
||
|
/*!**************************************!*\
|
||
|
!*** ./src/js/extension/cropzone.js ***!
|
||
|
\**************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(/*! tui-code-snippet */"tui-code-snippet")),i=a(n(/*! fabric */"fabric")),r=n(/*! @/util */"./src/js/util.js"),s=n(/*! @/consts */"./src/js/consts.js");function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=["tl","tr","mt","ml","mr","mb","bl","br"],u=function(){};function d(e,t){return e>t?"width":"height"}var h=i.default.util.createClass(i.default.Rect,{initialize:function(e,t,n){(t=o.default.extend(t,n)).type="cropzone",this.callSuper("initialize",t),this._addEventHandler(),this.canvas=e,this.options=t},canvasEventDelegation:function(e){var t="unregistered";return this.canvasEventTrigger[e]!==u?t="registered":[s.eventNames.OBJECT_MOVED,s.eventNames.OBJECT_SCALED].indexOf(e)<0&&(t="none"),t},canvasEventRegister:function(e,t){this.canvasEventTrigger[e]=t},_addEventHandler:function(){var e;this.canvasEventTrigger=(l(e={},s.eventNames.OBJECT_MOVED,u),l(e,s.eventNames.OBJECT_SCALED,u),e),this.on({moving:this._onMoving.bind(this),scaling:this._onScaling.bind(this)}),i.default.util.addListener(document,"keydown",this._onKeyDown.bind(this)),i.default.util.addListener(document,"keyup",this._onKeyUp.bind(this))},_renderCropzone:function(e){var t=this.flipX?-1:1,n=this.flipY?-1:1,o=t/this.scaleX,i=n/this.scaleY;e.scale(o,i),this._fillOuterRect(e,"rgba(0, 0, 0, 0.5)"),this.options.lineWidth?(this._fillInnerRect(e),this._strokeBorder(e,"rgb(255, 255, 255)",{lineWidth:this.options.lineWidth})):(this._strokeBorder(e,"rgb(0, 0, 0)",{lineDashWidth:7}),this._strokeBorder(e,"rgb(255, 255, 255)",{lineDashWidth:7,lineDashOffset:7})),e.scale(1/o,1/i)},_render:function(e){this.callSuper("_render",e),this._renderCropzone(e)},_fillOuterRect:function(e,t){var n=this._getCoordinates(),o=n.x,i=n.y;e.save(),e.fillStyle=t,e.beginPath(),e.moveTo(o[0]-1,i[0]-1),e.lineTo(o[3]+1,i[0]-1),e.lineTo(o[3]+1,i[3]+1),e.lineTo(o[0]-1,i[3]+1),e.lineTo(o[0]-1,i[0]-1),e.closePath(),e.moveTo(o[1],i[1]),e.lineTo(o[1],i[2]),e.lineTo(o[2],i[2]),e.lineTo(o[2],i[1]),e.lineTo(o[1],i[1]),e.closePath(),e.fill(),e.restore()},_fillInnerRect:function(e){var t=this._getCoordinates(),n=t.x,o=t.y,i=this._caculateInnerPosition(n,(n[2]-n[1])/3),r=this._caculateInnerPosition(o,(o[2]-o[1])/3);e.save(),e.strokeStyle="rgba(255, 255, 255, 0.7)",e.lineWidth=this.options.lineWidth,e.beginPath(),e.moveTo(i[0],r[1]),e.lineTo(i[3],r[1]),e.moveTo(i[0],r[2]),e.lineTo(i[3],r[2]),e.moveTo(i[1],r[0]),e.lineTo(i[1],r[3]),e.moveTo(i[2],r[0]),e.lineTo(i[2],r[3]),e.stroke(),e.closePath(),e.restore()},_caculateInnerPosition:function(e,t){var n=[];return n[0]=e[1],n[1]=e[1]+t,n[2]=e[1]+2*t,n[3]=e[2],n},_getCoordinates:function(){var e=this.canvas,t=this.width,n=this.height,i=this.left,r=this.top,s=t/2,a=n/2,l=e.getHeight(),c=e.getWidth();return{x:o.default.map([-(s+i),-s,s,s+(c-i-t)],Math.ceil),y:o.default.map([-(a+r),-a,a,a+(l-r-n)],Math.ceil)}},_strokeBorder:function(e,t,n){var o=n.lineDashWidth,i=n.lineDashOffset,r=n.lineWidth,s=this.width/2,a=this.height/2;e.save(),e.strokeStyle=t,e.setLineDash&&e.setLineDash([o,o]),i&&(e.lineDashOffset=i),r&&(e.lineWidth=r),e.beginPath(),e.moveTo(-s,-a),e.lineTo(s,-a),e.lineTo(s,a),e.lineTo(-s,a),e.lineTo(-s,-a),e.stroke(),e.restore()},_onMoving:function(){var e=this.height,t=this.width,n=this.left,o=this.top,i=this.canvas.getWidth()-t,a=this.canvas.getHeight()-e;this.left=(0,r.clamp)(n,0,i),this.top=(0,r.clamp)(o,0,a),this.canvasEventTrigger[s.eventNames.OBJECT_MOVED](this)},_onScaling:function(e){var t=e.transform.corner,n=this.canvas.getPointer(e.e),o=this._calcScalingSizeFromPointer(n,t);this.scale(1).set(o),this.canvasEventTrigger[s.eventNames.OBJECT_SCALED](this)},_calcScalingSizeFromPointer:function(e,t){return function(e){return c.indexOf(e)>=0}(t)&&this._resizeCropZone(e,t)},adjustRatioCropzoneSize:function(e){var t=e.width,n=e.height,o=e.leftMaker,i=e.topMaker,s=e.maxWidth,a=e.maxHeight,l=e.scaleTo;if(t=s?(0,r.clamp
|
||
|
/*!************************************!*\
|
||
|
!*** ./src/js/extension/emboss.js ***!
|
||
|
\************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! fabric */"fabric"),r=(o=i)&&o.__esModule?o:{default:o};var s=r.default.util.createClass(r.default.Image.filters.Convolute,{type:"Emboss",initialize:function(){this.matrix=[1,1,1,1,.7,-1,-1,-1,-1]}});t.default=s},"./src/js/extension/mask.js":
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/extension/mask.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! fabric */"fabric"),r=(o=i)&&o.__esModule?o:{default:o};var s=r.default.util.createClass(r.default.Image.filters.BlendImage,{applyTo:function(e){if(this.mask){var t=e.canvasEl,n=t.width,o=t.height,i=this._createCanvasOfMask(n,o),r=t.getContext("2d"),s=i.getContext("2d"),a=r.getImageData(0,0,n,o);this._drawMask(s,t,r),this._mapData(s,a,n,o),e.imageData=a}},_createCanvasOfMask:function(e,t){var n=r.default.util.createCanvasElement();return n.width=e,n.height=t,n},_drawMask:function(e){var t=this.mask,n=t.getElement(),o=t.angle,i=t.left,r=t.scaleX,s=t.scaleY,a=t.top;e.save(),e.translate(i,a),e.rotate(o*Math.PI/180),e.scale(r,s),e.drawImage(n,-n.width/2,-n.height/2),e.restore()},_mapData:function(e,t,n,o){for(var i=t.data,r=t.height,s=i,a=t.width*r*4,l=e.getImageData(0,0,n,o).data,c=0;c<a;c+=4)s[c+3]=l[c]}});t.default=s},"./src/js/extension/sharpen.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/extension/sharpen.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! fabric */"fabric"),r=(o=i)&&o.__esModule?o:{default:o};var s=r.default.util.createClass(r.default.Image.filters.Convolute,{type:"Sharpen",initialize:function(){this.matrix=[0,-1,0,-1,5,-1,0,-1,0]}});t.default=s},"./src/js/factory/command.js":
|
||
|
/*!***********************************!*\
|
||
|
!*** ./src/js/factory/command.js ***!
|
||
|
\***********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! @/interface/command */"./src/js/interface/command.js"),r=(o=i)&&o.__esModule?o:{default:o};var s={};t.default={create:function(e){var t=s[e];if(t){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new r.default(t,o)}return null},register:function(e){s[e.name]=e}}},"./src/js/factory/errorMessage.js":
|
||
|
/*!****************************************!*\
|
||
|
!*** ./src/js/factory/errorMessage.js ***!
|
||
|
\****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(/*! tui-code-snippet */"tui-code-snippet"),r=(o=i)&&o.__esModule?o:{default:o};var s=(0,n(/*! @/util */"./src/js/util.js").keyMirror)("UN_IMPLEMENTATION","NO_COMPONENT_NAME"),a="Should implement a method: ",l="Should set a component name",c={UN_IMPLEMENTATION:function(e){return a+e},NO_COMPONENT_NAME:function(){return l}};t.default={types:r.default.extend({},s),create:function(e){e=e.toLowerCase();for(var t=c[e],n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.apply(void 0,o)}}},"./src/js/graphics.js":
|
||
|
/*!****************************!*\
|
||
|
!*** ./src/js/graphics.js ***!
|
||
|
\****************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=M(n(/*! tui-code-snippet */"tui-code-snippet")),r=M(n(/*! fabric */"fabric")),s=M(n(/*! @/component/imageLoader */"./src/js/component/imageLoader.js")),a=M(n(/*! @/component/cropper */"./src/js/component/cropper.js")),l=M(n(/*! @/component/flip */"./src/js/component/flip.js")),c=M(n(/*! @/component/rotation */"./src/js/component/rotation.js")),u=M(n(/*! @/component/freeDrawing */"./src/js/component/freeDrawing.js")),d=M(n(/*! @/component/line */"./src/js/component/line.js")),h=M(n(/*! @/component/text */"./src/js/component/text.js")),f=M(n(/*! @/component/icon */"./src/js/component/icon.js")),p=M(n(/*! @/component/filter */"./src/js/component/filter.js")),m=M(n(/*! @/component/shape */"./src/js/component/shape.js")),v=M(n(/*! @/component/zoom */"./src/js/component/zoom.js")),g=M(n(/*! @/drawingMode/cropper */"./src/js/drawingMode/cropper.js")),y=M(n(/*! @/drawingMode/freeDrawing */"./src/js/drawingMode/freeDrawing.js")),_=M(n(/*! @/drawingMode/lineDrawing */"./src/js/drawingMode/lineDrawing.js")),b=M(n(/*! @/drawingMode/shape */"./src/js/drawingMode/shape.js")),j=M(n(/*! @/drawingMode/text */"./src/js/drawingMode/text.js")),k=M(n(/*! @/drawingMode/icon */"./src/js/drawingMode/icon.js")),E=M(n(/*! @/drawingMode/zoom */"./src/js/drawingMode/zoom.js")),x=n(/*! @/helper/selectionModifyHelper */"./src/js/helper/selectionModifyHelper.js"),w=n(/*! @/util */"./src/js/util.js"),O=n(/*! @/consts */"./src/js/consts.js");function M(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var S=i.default.extend,P=i.default.stamp,T=i.default.isArray,I=i.default.isString,A=i.default.forEachArray,D=i.default.forEachOwnProperties,L=i.default.CustomEvents,N={cssOnly:!0},H={backstoreOnly:!0},R=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.cssMaxWidth,i=n.cssMaxHeight;C(this,e),this.canvasImage=null,this.cssMaxWidth=o||1e3,this.cssMaxHeight=i||800,this.cropSelectionStyle={},this.targetObjectForCopyPaste=null,this.imageName="",this._objects={},this._canvas=null,this._drawingMode=O.drawingModes.NORMAL,this._drawingModeMap={},this._componentMap={},this._handler={onMouseDown:this._onMouseDown.bind(this),onObjectAdded:this._onObjectAdded.bind(this),onObjectRemoved:this._onObjectRemoved.bind(this),onObjectMoved:this._onObjectMoved.bind(this),onObjectScaled:this._onObjectScaled.bind(this),onObjectModified:this._onObjectModified.bind(this),onObjectRotated:this._onObjectRotated.bind(this),onObjectSelected:this._onObjectSelected.bind(this),onPathCreated:this._onPathCreated.bind(this),onSelectionCleared:this._onSelectionCleared.bind(this),onSelectionCreated:this._onSelectionCreated.bind(this)},this._setObjectCachingToFalse(),this._setCanvasElement(t),this._createDrawingModeInstances(),this._createComponents(),this._attachCanvasEvents(),this._attachZoomEvents()}return o(e,[{key:"destroy",value:function(){var e=this._canvas.wrapperEl;this._canvas.clear(),e.parentNode.removeChild(e),this._detachZoomEvents()}},{key:"_attachZoomEvents",value:function(){this.getComponent(O.componentNames.ZOOM).attachKeyboardZoomEvents()}},{key:"_detachZoomEvents",value:function(){this.getComponent(O.componentNames.ZOOM).detachKeyboardZoomEvents()}},{key:"deactivateAll",value:function(){return this._canvas.discardActiveObject(),this}},{key:"renderAll",value:function(){return this._canvas.renderAll(),this}},{key:"add",value:function(e){var t,n=[];T(e)?n=e:n.push(e),(t=this._canvas).add.apply(t,n)}},{key:"contains",value:function(e){return this._canvas.contains(e)}},{key:"getObjects",value:function(){return this._canvas.getObjects().slice()}},{key:"getObject",value:function(e){return this._objects[e]}}
|
||
|
/*!**************************************!*\
|
||
|
!*** ./src/js/helper/imagetracer.js ***!
|
||
|
\**************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.versionnumber="1.2.4",this.optionpresets={default:{corsenabled:!1,ltres:1,qtres:1,pathomit:8,rightangleenhance:!0,colorsampling:2,numberofcolors:16,mincolorratio:0,colorquantcycles:3,layering:0,strokewidth:1,linefilter:!1,scale:1,roundcoords:1,viewbox:!1,desc:!1,lcpr:0,qcpr:0,blurradius:0,blurdelta:20},posterized1:{colorsampling:0,numberofcolors:2},posterized2:{numberofcolors:4,blurradius:5},curvy:{ltres:.01,linefilter:!0,rightangleenhance:!1},sharp:{qtres:.01,linefilter:!1},detailed:{pathomit:0,roundcoords:2,ltres:.5,qtres:.5,numberofcolors:64},smoothed:{blurradius:5,blurdelta:64},grayscale:{colorsampling:0,colorquantcycles:1,numberofcolors:7},fixedpalette:{colorsampling:0,colorquantcycles:1,numberofcolors:27},randomsampling1:{colorsampling:1,numberofcolors:8},randomsampling2:{colorsampling:1,numberofcolors:64},artistic1:{colorsampling:0,colorquantcycles:1,pathomit:0,blurradius:5,blurdelta:64,ltres:.01,linefilter:!0,numberofcolors:16,strokewidth:2},artistic2:{qtres:.01,colorsampling:0,colorquantcycles:1,numberofcolors:4,strokewidth:0},artistic3:{qtres:10,ltres:10,numberofcolors:8},artistic4:{qtres:10,ltres:10,numberofcolors:64,blurradius:5,blurdelta:256,strokewidth:2},posterized3:{ltres:1,qtres:1,pathomit:20,rightangleenhance:!0,colorsampling:0,numberofcolors:3,mincolorratio:0,colorquantcycles:3,blurradius:3,blurdelta:20,strokewidth:0,linefilter:!1,roundcoords:1,pal:[{r:0,g:0,b:100,a:255},{r:255,g:255,b:255,a:255}]}},this.pathscan_combined_lookup=[[[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1]],[[0,1,0,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[0,2,-1,0]],[[-1,-1,-1,-1],[-1,-1,-1,-1],[0,1,0,-1],[0,0,1,0]],[[0,0,1,0],[-1,-1,-1,-1],[0,2,-1,0],[-1,-1,-1,-1]],[[-1,-1,-1,-1],[0,0,1,0],[0,3,0,1],[-1,-1,-1,-1]],[[13,3,0,1],[13,2,-1,0],[7,1,0,-1],[7,0,1,0]],[[-1,-1,-1,-1],[0,1,0,-1],[-1,-1,-1,-1],[0,3,0,1]],[[0,3,0,1],[0,2,-1,0],[-1,-1,-1,-1],[-1,-1,-1,-1]],[[0,3,0,1],[0,2,-1,0],[-1,-1,-1,-1],[-1,-1,-1,-1]],[[-1,-1,-1,-1],[0,1,0,-1],[-1,-1,-1,-1],[0,3,0,1]],[[11,1,0,-1],[14,0,1,0],[14,3,0,1],[11,2,-1,0]],[[-1,-1,-1,-1],[0,0,1,0],[0,3,0,1],[-1,-1,-1,-1]],[[0,0,1,0],[-1,-1,-1,-1],[0,2,-1,0],[-1,-1,-1,-1]],[[-1,-1,-1,-1],[-1,-1,-1,-1],[0,1,0,-1],[0,0,1,0]],[[0,1,0,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[0,2,-1,0]],[[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1]]],this.gks=[[.27901,.44198,.27901],[.135336,.228569,.272192,.228569,.135336],[.086776,.136394,.178908,.195843,.178908,.136394,.086776],[.063327,.093095,.122589,.144599,.152781,.144599,.122589,.093095,.063327],[.049692,.069304,.089767,.107988,.120651,.125194,.120651,.107988,.089767,.069304,.049692]],this.specpalette=[{r:0,g:0,b:0,a:255},{r:128,g:128,b:128,a:255},{r:0,g:0,b:128,a:255},{r:64,g:64,b:128,a:255},{r:192,g:192,b:192,a:255},{r:255,g:255,b:255,a:255},{r:128,g:128,b:192,a:255},{r:0,g:0,b:192,a:255},{r:128,g:0,b:0,a:255},{r:128,g:64,b:64,a:255},{r:128,g:0,b:128,a:255},{r:168,g:168,b:168,a:255},{r:192,g:128,b:128,a:255},{r:192,g:0,b:0,a:255},{r:255,g:255,b:255,a:255},{r:0,g:128,b:0,a:255}]}return o(e,null,[{key:"tracerDefaultOption",value:function(){return{pathomit:100,ltres:.1,qtres:1,scale:1,strokewidth:5,viewbox:!1,linefilter:!0,desc:!1,rightangleenhance:!1,pal:[{r:0,g:0,b:0,a:255},{r:255,g:255,b:255,a:255}]}}}]),o(e,[{key:"imageToSVG",value:function(e,t,n){var o=this;n=this.checkoptions(n),this.loadImage(e,(function(e){t(o.imagedataToSVG(o.getImgdata(e),n))}),n)}},{key:"imagedataToSVG",value:function(e,t){t=this.checkoptions(t);var n=this.imagedataToTracedata(e,t);return this.getsvgstring(n,t)}},{key:"imageToTracedata",value:function(e,t,n){var o=this;n=this.checkoptions(n),this
|
||
|
/*!************************************************!*\
|
||
|
!*** ./src/js/helper/selectionModifyHelper.js ***!
|
||
|
\************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCachedUndoDataForDimension=function(e){i=e},t.getCachedUndoDataForDimension=function(){return i},t.makeSelectionUndoData=function(e,t){var n=void 0;n="activeSelection"===e.type?e.getObjects().map((function(n){var o=n.angle,i=n.left,r=n.top,s=n.scaleX,a=n.scaleY,l=n.width,c=n.height;e.realizeTransform(n);var u=t(n);return n.set({angle:o,left:i,top:r,width:l,height:c,scaleX:s,scaleY:a}),u})):[t(e)];return n},t.makeSelectionUndoDatum=function(e,t,n){return n?{id:e,width:t.width,height:t.height,top:t.top,left:t.left,angle:t.angle,scaleX:t.scaleX,scaleY:t.scaleY}:(0,o.extend)({id:e},t)};var o=n(/*! tui-code-snippet */"tui-code-snippet"),i=null},"./src/js/helper/shapeFilterFillHelper.js":
|
||
|
/*!************************************************!*\
|
||
|
!*** ./src/js/helper/shapeFilterFillHelper.js ***!
|
||
|
\************************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFillImageFromShape=f,t.rePositionFilterTypeFillImage=function(e){var t=e.angle,n=e.flipX,o=e.flipY,r=f(e),s=function(e){var t=v(e),n=t[0],o=n.x,i=n.y,r=t[1],s=r.x,a=r.y,l=t[2],c=l.x,u=l.y,d=t[3],h=d.x,f=d.y,p=Math.min(o,s,c,h),m=Math.min(i,a,u,f),g=Math.max(o,s,c,h),y=Math.max(i,a,u,f);return{left:p,top:m,right:g,bottom:y,width:g-p,height:y-m}}(e),l=s.right,c=s.bottom,d=s.width,p=s.height,m=(d-e.width)/2,g=(p-e.height)/2,y=e.left-e.width/2-m,_=e.top-e.height/2-g,b=d/2-m,j=p/2-g,k=Math.max(d,p)+Math.max(m,g),E=function(e){var t=e.shapeObj,n=e.left,o=e.top,r=e.width,s=e.height,a=e.cropX,l=e.cropY,c=e.flipX,d=e.flipY,f=e.right,p=e.bottom,m=function(e,n,o,r){return function(e){var t=e.type,n=e.shapeObj,o=e.outDistance,r=e.left,s=e.top,a=e.flipX,l=e.flipY,c=v(n),u=function(e,t,n){var o=0,r=0;(0,i.forEach)(t,(function(t,n){t[e]<o&&(o=t[e],r=n)}));var s=n[r],a=s[0],l=s[1];return{startPointIndex:r,endPointIndex1:a,endPointIndex2:l}}(t,c,[[1,2],[0,3],[0,3],[1,2]]),d=function(e,t,n){var o=n.startPointIndex,r=n.endPointIndex1,s=n.endPointIndex2,a="x"===e?180:270;return(0,i.map)([r,s],(function(e){var n=t[o],i=t[e],r=n.y-i.y,s=n.x-i.x;return 180*Math.atan2(r,s)/Math.PI-a}))}(t,c,u),h=u.startPointIndex,f=function(e){var t=e.outDistance,n=e.startPointIndex,o=e.flipX,i=e.flipY,r=e.reatAngles,s=t*Math.cos(r[0]*Math.PI/180),a=t*Math.cos(r[1]*Math.PI/180),l=2===n||3===n,c={top:l?s:a,left:l?a:s};(function(e,t,n){return(!t&&n||!t&&!n)&&0===e||(t&&n||t&&!n)&&1===e||(!t&&!n||!t&&n)&&2===e||(t&&!n||t&&n)&&3===e})(n,o,i)&&(c.left=-1*c.left);(function(e,t,n){return(t&&!n||!t&&!n)&&0===e||(!t&&!n||t&&!n)&&1===e||(t&&n||!t&&n)&&2===e||(!t&&n||t&&n)&&3===e})(n,o,i)&&(c.top=-1*c.top);return c}({outDistance:o,startPointIndex:h,flipX:a,flipY:l,reatAngles:d});return[r+f.left,s+f.top]}({type:e,outDistance:n,shapeObj:t,flipX:c,flipY:d,left:o,top:r})},g=r,y=s,_=function(e,t){var n=t.left,o=t.top,r=t.width,s=t.height,a=t.cropX,l=t.cropY,c={width:r,height:s};return(0,i.forEach)(["x","y"],(function(t){var i="x"===t?a:l,r=c[u[t]],s=h[u[t]];if(r>s){var d=(r-s)/2;c[u[t]]=s;var f=e(t,d,n,o);n=f[0],o=f[1]}if(i<0){var p=e(t,i,n,o);n=p[0],o=p[1]}})),[n,o,c.width,c.height]}(m,{left:n,top:o,width:r,height:s,cropX:a,cropY:l});n=_[0],o=_[1],r=_[2],s=_[3];var b=function(e,t){var n=t.left,o=t.top,r=t.insideCanvasRealImageWidth,s=t.insideCanvasRealImageHeight,a=t.right,l=t.bottom,c=t.cropX,u=t.cropY,d=t.originalWidth,f=t.originalHeight,p=r,m=s,v=h,g=v.width,y=v.height;a>g&&c>0&&(p=d-Math.abs(a-g));l>y&&u>0&&(m=f-Math.abs(l-y));var _={x:(r-p)/2,y:(s-m)/2};return(0,i.forEach)(["x","y"],(function(t){var i=_[t];if(i>0){var r=e(t,i,n,o);n=r[0],o=r[1]}})),[n,o,p,m]}(m,{left:n,top:o,insideCanvasRealImageWidth:r,insideCanvasRealImageHeight:s,right:f,bottom:p,cropX:a,cropY:l,originalWidth:g,originalHeight:y});return n=b[0],o=b[1],r=b[2],s=b[3],[n,o,r,s]}({shapeObj:e,left:b,top:j,width:d,height:p,cropX:y,cropY:_,flipX:n,flipY:o,right:l,bottom:c});b=E[0],j=E[1],d=E[2],p=E[3],r.set({angle:n===o?-t:t,left:b,top:j,width:d,height:p,cropX:y,cropY:_,flipX:n,flipY:o}),(0,a.setCustomProperty)(r,{fillImageMaxSize:k})},t.makeFilterOptionFromFabricImage=p,t.makeFillPatternForFilter=function(e,t,n){var o=g(m(e),e.angle,t);n.add(o);var i={fill:new fabric.Pattern({source:n.getElement(),repeat:"no-repeat"})};return(0,a.setCustomProperty)(i,{patternSourceCanvas:n}),i},t.resetFillPatternCanvas=function(e){var t=e.getObjects()[0],n=(0,a.getCustomProperty)(t,"fillImageMaxSize").fillImageMaxSize;n=Math.max(1,n),e.setDimensions({width:n,height:n}),e.renderAll()},t.reMakePatternImageSource=function(e,t){var n=(0,a.getCustomProperty)(e,"patternSourceCanvas").patternSourceCanvas,o=n.getObjects()[0],i=p(o);n.remove(o);var r=g(m(t,!0),t.angle,i);n.add(r)},t.getCachedCanvasImageElement=m;var o,i=n(/*! tui-code-snippet */"tui-code-snippet"),r=n(/*! @/helper/shapeResizeHelper */"./src/js/helper/shapeResizeHelper.js"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/util */"./src/js/util.js");function l
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/js/helper/shapeResizeHelper.js ***!
|
||
|
\********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";var o={rect:1,circle:2,triangle:1},i={rect:{w:"width",h:"height"},circle:{w:"rx",h:"ry"},triangle:{w:"width",h:"height"}};function r(e,t,n){var o=e.x,i=e.y,r=t.x,s=t.y,a=n*Math.PI/180;return{originX:o>(r-o)*Math.cos(a)-(s-i)*Math.sin(a)+o?"right":"left",originY:i>(r-o)*Math.sin(a)+(s-i)*Math.cos(a)+i?"bottom":"top"}}e.exports={setOrigins:function(e){var t=e.getPointByOrigin("left","top"),n=e.getPointByOrigin("right","top"),o=e.getPointByOrigin("right","bottom"),i=e.getPointByOrigin("left","bottom");e.origins={lt:t,rt:n,rb:o,lb:i}},resize:function(e,t,n){(function(e){return"center"===e.originX&&"center"===e.originY})(e)&&(function(e,t){var n=t.getPointByOrigin("center","center"),o=r(n,e,-t.angle),i=o.originX,s=o.originY,a=t.getPointByOrigin(i,s),l=t.left-(n.x-a.x),c=t.top-(n.y-a.y);t.set({originX:i,originY:s,left:l,top:c}),t.setCoords()}(t,e),function(e){var t=e.originX,n=e.originY,o=t.substring(0,1)+n.substring(0,1);e.startPoint=e.origins[o]}(e)),n?function(e){var t=e.type,n=e.scaleX,o=e.scaleY,r=i[t],s=e[r.w]*n,a=e[r.h]*o;if(e.isRegular){var l=Math.max(n,o);s=e[r.w]*l,a=e[r.h]*l}var c={hasControls:!1,hasBorders:!1,scaleX:1,scaleY:1};c[r.w]=s,c[r.h]=a,e.set(c)}(e):function(e,t){var n=t.type,r=t.strokeWidth,s=t.startPoint,a=o[n],l=i[n],c=!("triangle"!==t.type),u={},d=Math.abs(s.x-e.x)/a,h=Math.abs(s.y-e.y)/a;d>r&&(d-=r/a),h>r&&(h-=r/a),t.isRegular&&(d=h=Math.max(d,h),c&&(h=Math.sqrt(3)/2*d)),u[l.w]=d,u[l.h]=h,t.set(u)}(t,e),function(e,t){var n=t.startPoint,o=r(n,e,-t.angle),i=o.originX,s=o.originY;t.setPositionByOrigin(n,i,s),t.setCoords()}(t,e)},adjustOriginToCenter:function(e){var t=e.getPointByOrigin("center","center"),n=e.originX,o=e.originY,i=e.getPointByOrigin(n,o),r=e.left+(t.x-i.x),s=e.top+(t.y-i.y);e.set({hasControls:!0,hasBorders:!0,originX:"center",originY:"center",left:r,top:s}),e.setCoords()}}},"./src/js/imageEditor.js":
|
||
|
/*!*******************************!*\
|
||
|
!*** ./src/js/imageEditor.js ***!
|
||
|
\*******************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=f(n(/*! tui-code-snippet */"tui-code-snippet")),r=f(n(/*! @/invoker */"./src/js/invoker.js")),s=f(n(/*! @/ui */"./src/js/ui.js")),a=f(n(/*! @/action */"./src/js/action.js")),l=f(n(/*! @/factory/command */"./src/js/factory/command.js")),c=f(n(/*! @/graphics */"./src/js/graphics.js")),u=n(/*! @/helper/selectionModifyHelper */"./src/js/helper/selectionModifyHelper.js"),d=n(/*! @/util */"./src/js/util.js"),h=n(/*! @/consts */"./src/js/consts.js");function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=i.default.isUndefined,v=i.default.forEach,g=i.default.CustomEvents,y=h.eventNames.MOUSE_DOWN,_=h.eventNames.OBJECT_MOVED,b=h.eventNames.OBJECT_SCALED,j=h.eventNames.OBJECT_ACTIVATED,k=h.eventNames.OBJECT_ROTATED,E=h.eventNames.OBJECT_ADDED,x=h.eventNames.OBJECT_MODIFIED,w=h.eventNames.ADD_TEXT,O=h.eventNames.ADD_OBJECT,M=h.eventNames.TEXT_EDITING,C=h.eventNames.TEXT_CHANGED,S=h.eventNames.ICON_CREATE_RESIZE,P=h.eventNames.ICON_CREATE_END,T=h.eventNames.SELECTION_CLEARED,I=h.eventNames.SELECTION_CREATED,A=h.eventNames.ADD_OBJECT_AFTER,D=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=i.default.extend({includeUI:!1,usageStatistics:!0},n),this.mode=null,this.activeObjectId=null,n.includeUI){var o=n.includeUI;o.usageStatistics=n.usageStatistics,this.ui=new s.default(t,o,this.getActions()),n=this.ui.setUiDefaultSelectionStyle(n)}this._invoker=new r.default,this._graphics=new c.default(this.ui?this.ui.getEditorArea():t,{cssMaxWidth:n.cssMaxWidth,cssMaxHeight:n.cssMaxHeight}),this._handlers={keydown:this._onKeyDown.bind(this),mousedown:this._onMouseDown.bind(this),objectActivated:this._onObjectActivated.bind(this),objectMoved:this._onObjectMoved.bind(this),objectScaled:this._onObjectScaled.bind(this),objectRotated:this._onObjectRotated.bind(this),objectAdded:this._onObjectAdded.bind(this),objectModified:this._onObjectModified.bind(this),createdPath:this._onCreatedPath,addText:this._onAddText.bind(this),addObject:this._onAddObject.bind(this),textEditing:this._onTextEditing.bind(this),textChanged:this._onTextChanged.bind(this),iconCreateResize:this._onIconCreateResize.bind(this),iconCreateEnd:this._onIconCreateEnd.bind(this),selectionCleared:this._selectionCleared.bind(this),selectionCreated:this._selectionCreated.bind(this)},this._attachInvokerEvents(),this._attachGraphicsEvents(),this._attachDomEvents(),this._setSelectionStyle(n.selectionStyle,{applyCropSelectionStyle:n.applyCropSelectionStyle,applyGroupSelectionStyle:n.applyGroupSelectionStyle}),n.usageStatistics&&(0,d.sendHostName)(),this.ui&&(this.ui.initCanvas(),this.setReAction(),this._attachColorPickerInputBoxEvents()),fabric.enableGLFiltering=!1}return o(e,[{key:"_attachColorPickerInputBoxEvents",value:function(){var e=this;this.ui.on(h.eventNames.INPUT_BOX_EDITING_STARTED,(function(){e.isColorPickerInputBoxEditing=!0})),this.ui.on(h.eventNames.INPUT_BOX_EDITING_STOPPED,(function(){e.isColorPickerInputBoxEditing=!1}))}},{key:"_detachColorPickerInputBoxEvents",value:function(){this.ui.off(h.eventNames.INPUT_BOX_EDITING_STARTED),this.ui.off(h.eventNames.INPUT_BOX_EDITING_STOPPED)}},{key:"_setSelectionStyle",value:function(e,t){var n=t.applyCropSelectionStyle,o=t.applyGroupSelectionStyle;e&&this._graphics.setSelectionStyle(e),n&&this._graphics.setCropSelectionStyle(e),o&&this.on("selectionCreated",(function(t){"activeSelection"===t.type&&t.set(e)}))}},{key:"_attachInvokerEvents",value:function(){var e=this,t=h.eventNames.UNDO_STACK_CHANGED,n=h.eventNames.REDO_STACK_CHANGED,o=h.eventNames.EXECUTE_COMMAND,i=h.eventNames.AFTER_U
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/interface/command.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=s(n(/*! tui-code-snippet */"tui-code-snippet")),r=s(n(/*! @/factory/errorMessage */"./src/js/factory/errorMessage.js"));function s(e){return e&&e.__esModule?e:{default:e}}var a=r.default.create,l=r.default.types,c=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.args=n,this.execute=t.execute,this.undo=t.undo,this.executeCallback=t.executeCallback||null,this.undoCallback=t.undoCallback||null,this.undoData={}}return o(e,[{key:"execute",value:function(){throw new Error(a(l.UN_IMPLEMENTATION,"execute"))}},{key:"undo",value:function(){throw new Error(a(l.UN_IMPLEMENTATION,"undo"))}},{key:"setUndoData",value:function(e,t,n){return t&&(e=t),n?t||(t=e):(i.default.extend(this.undoData,e),t=null),t}},{key:"setExecuteCallback",value:function(e){return this.executeCallback=e,this}},{key:"setUndoCallback",value:function(e){return this.undoCallback=e,this}},{key:"isRedo",get:function(){return Object.keys(this.undoData).length>0}}]),e}();t.default=c},"./src/js/interface/component.js":
|
||
|
/*!***************************************!*\
|
||
|
!*** ./src/js/interface/component.js ***!
|
||
|
\***************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.graphics=n}return o(e,[{key:"fire",value:function(){for(var e=this.graphics,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return this.graphics.fire.apply(e,n)}},{key:"setCanvasImage",value:function(e,t){this.graphics.setCanvasImage(e,t)}},{key:"getCanvasElement",value:function(){return this.graphics.getCanvasElement()}},{key:"getCanvas",value:function(){return this.graphics.getCanvas()}},{key:"getCanvasImage",value:function(){return this.graphics.getCanvasImage()}},{key:"getImageName",value:function(){return this.graphics.getImageName()}},{key:"getEditor",value:function(){return this.graphics.getEditor()}},{key:"getName",value:function(){return this.name}},{key:"setImageProperties",value:function(e,t){this.graphics.setImageProperties(e,t)}},{key:"setCanvasCssDimension",value:function(e){this.graphics.setCanvasCssDimension(e)}},{key:"setCanvasBackstoreDimension",value:function(e){this.graphics.setCanvasBackstoreDimension(e)}},{key:"adjustCanvasDimension",value:function(){this.graphics.adjustCanvasDimension()}}]),e}();t.default=i},"./src/js/interface/drawingMode.js":
|
||
|
/*!*****************************************!*\
|
||
|
!*** ./src/js/interface/drawingMode.js ***!
|
||
|
\*****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! @/factory/errorMessage */"./src/js/factory/errorMessage.js"),s=(o=r)&&o.__esModule?o:{default:o};var a=s.default.create,l=s.default.types,c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t}return i(e,[{key:"getName",value:function(){return this.name}},{key:"start",value:function(){throw new Error(a(l.UN_IMPLEMENTATION,"start"))}},{key:"end",value:function(){throw new Error(a(l.UN_IMPLEMENTATION,"stop"))}}]),e}();t.default=c},"./src/js/invoker.js":
|
||
|
/*!***************************!*\
|
||
|
!*** ./src/js/invoker.js ***!
|
||
|
\***************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(/*! tui-code-snippet */"tui-code-snippet")),r=l(n(/*! @/factory/command */"./src/js/factory/command.js")),s=n(/*! @/util */"./src/js/util.js"),a=n(/*! @/consts */"./src/js/consts.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=i.default.isFunction,u=i.default.isString,d=i.default.CustomEvents,h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._undoStack=[],this._redoStack=[],this._isLocked=!1,this._isSilent=!1}return o(e,[{key:"_invokeExecution",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.lock();var o=e.args;return o||(o=[]),e.execute.apply(e,o).then((function(o){return t._isSilent||(t.pushUndoStack(e),t.fire(n?a.eventNames.AFTER_REDO:a.eventNames.EXECUTE_COMMAND,e)),t.unlock(),c(e.executeCallback)&&e.executeCallback(o),o})).catch((function(e){return t.unlock(),s.Promise.reject(e)}))}},{key:"_invokeUndo",value:function(e){var t=this;this.lock();var n=e.args;return n||(n=[]),e.undo.apply(e,n).then((function(n){return t.pushRedoStack(e),t.fire(a.eventNames.AFTER_UNDO,e),t.unlock(),c(e.undoCallback)&&e.undoCallback(n),n})).catch((function(e){return t.unlock(),s.Promise.reject(e)}))}},{key:"_fireRedoStackChanged",value:function(){this.fire(a.eventNames.REDO_STACK_CHANGED,this._redoStack.length)}},{key:"_fireUndoStackChanged",value:function(){this.fire(a.eventNames.UNDO_STACK_CHANGED,this._undoStack.length)}},{key:"lock",value:function(){this._isLocked=!0}},{key:"unlock",value:function(){this._isLocked=!1}},{key:"executeSilent",value:function(){var e=this;this._isSilent=!0;for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return this.execute.apply(this,n.concat([this._isSilent])).then((function(){e._isSilent=!1}))}},{key:"execute",value:function(){var e=this;if(this._isLocked)return s.Promise.reject(a.rejectMessages.isLock);for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=n[0];return u(i)&&(i=r.default.create.apply(r.default,n)),this._invokeExecution(i).then((function(t){return e.clearRedoStack(),t}))}},{key:"undo",value:function(){var e=this._undoStack.pop(),t=void 0,n="";return e&&this._isLocked&&(this.pushUndoStack(e,!0),e=null),e?(this.isEmptyUndoStack()&&this._fireUndoStackChanged(),t=this._invokeUndo(e)):(n=a.rejectMessages.undo,this._isLocked&&(n=n+" Because "+a.rejectMessages.isLock),t=s.Promise.reject(n)),t}},{key:"redo",value:function(){var e=this._redoStack.pop(),t=void 0,n="";return e&&this._isLocked&&(this.pushRedoStack(e,!0),e=null),e?(this.isEmptyRedoStack()&&this._fireRedoStackChanged(),t=this._invokeExecution(e,!0)):(n=a.rejectMessages.redo,this._isLocked&&(n=n+" Because "+a.rejectMessages.isLock),t=s.Promise.reject(n)),t}},{key:"pushUndoStack",value:function(e,t){this._undoStack.push(e),t||this._fireUndoStackChanged()}},{key:"pushRedoStack",value:function(e,t){this._redoStack.push(e),t||this._fireRedoStackChanged()}},{key:"isEmptyRedoStack",value:function(){return 0===this._redoStack.length}},{key:"isEmptyUndoStack",value:function(){return 0===this._undoStack.length}},{key:"clearUndoStack",value:function(){this.isEmptyUndoStack()||(this._undoStack=[],this._fireUndoStackChanged())}},{key:"clearRedoStack",value:function(){this.isEmptyRedoStack()||(this._redoStack=[],this._fireRedoStackChanged())}}]),e}();d.mixin(h),t.default=h},"./src/js/polyfill.js":
|
||
|
/*!****************************!*\
|
||
|
!*** ./src/js/polyfill.js ***!
|
||
|
\****************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})
|
||
|
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */,"document"in window.self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(e){if("Element"in e){var t="classList",n=e.Element.prototype,o=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},r=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},s=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},a=function(e,t){if(""===t)throw new s("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new s("INVALID_CHARACTER_ERR","String contains an invalid character");return r.call(e,t)},l=function(e){for(var t=i.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},c=l.prototype=[],u=function(){return new l(this)};if(s.prototype=Error.prototype,c.item=function(e){return this[e]||null},c.contains=function(e){return-1!==a(this,e+="")},c.add=function(){var e,t=arguments,n=0,o=t.length,i=!1;do{e=t[n]+"",-1===a(this,e)&&(this.push(e),i=!0)}while(++n<o);i&&this._updateClassName()},c.remove=function(){var e,t,n=arguments,o=0,i=n.length,r=!1;do{for(e=n[o]+"",t=a(this,e);-1!==t;)this.splice(t,1),r=!0,t=a(this,e)}while(++o<i);r&&this._updateClassName()},c.toggle=function(e,t){e+="";var n=this.contains(e),o=n?!0!==t&&"remove":!1!==t&&"add";return o&&this[o](e),!0===t||!1===t?t:!n},c.toString=function(){return this.join(" ")},o.defineProperty){var d={get:u,enumerable:!0,configurable:!0};try{o.defineProperty(n,t,d)}catch(e){void 0!==e.number&&-2146823252!==e.number||(d.enumerable=!1,o.defineProperty(n,t,d))}}else o.prototype.__defineGetter__&&n.__defineGetter__(t,u)}}(window.self),function(){var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var n,o=arguments.length;for(n=0;n<o;n++)e=arguments[n],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}e=null}())
|
||
|
/*!
|
||
|
* @copyright Copyright (c) 2017 IcoMoon.io
|
||
|
* @license Licensed under MIT license
|
||
|
* See https://github.com/Keyamoon/svgxuse
|
||
|
* @version 1.2.6
|
||
|
*/,function(){if("undefined"!=typeof window&&window.addEventListener){var e,t,n,o=Object.create(null),i=function(){clearTimeout(t),t=setTimeout(e,100)},r=function(){},s=function(e){function t(e){var t;return void 0!==e.protocol?t=e:(t=document.createElement("a")).href=e,t.protocol.replace(/:/g,"")+t.host}var n,o,i;return window.XMLHttpRequest&&(n=new XMLHttpRequest,o=t(location),i=t(e),n=void 0===n.withCredentials&&""!==i&&i!==o?XDomainRequest||void 0:XMLHttpRequest),n},a="http://www.w3.org/1999/xlink";e=function(){var e,t,n,l,c,u,d,h,f,p,m=0;function v(){var e;0===(m-=1)&&(r(),window.addEventListener("resize",i,!1),window.addEventListener("orientationchange",i,!1),window.MutationObserver?((e=new MutationObserver(i)).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),r=function(){try{e.disconnect(),window.removeEventListener("resize",i,!1),window.removeEventListener("orientationchange",i,!1)}catch(e){}}):(document.documentElement.addEventListener("DOMSubtreeModified",i,!1),r=function(){document.documentElement.removeEventListener("DOMSubtreeModified",i,!1),window.removeEventListener("resize",i,!1),window.removeEventListener("orientationchange",i,!1)}))}function g(e){return function(){!0!==o[e.base]&&(e.useEl.setAttributeNS(a,"xlink:href","#"+e.hash),e.useEl.hasAttribute("href")&&e.useEl.setAttribute("href","#"+e.hash))}}function y(e){return function(){var t,n=document.body,o=document.createElement("x");e.onload=null,o.innerHTML=e.responseText,(t=o.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",n.insertBefore(t,n.firstChild)),v()}}function _(e){return function(){e.onerror=null,e.ontimeout=null,v()}}for(r(),f=document.getElementsByTagName("use"),c=0;c<f.length;c+=1){try{t=f[c].getBoundingClientRect()}catch(e){t=!1}e=(h=(l=f[c].getAttribute("href")||f[c].getAttributeNS(a,"href")||f[c].getAttribute("xlink:href"))&&l.split?l.split("#"):["",""])[0],n=h[1],u=t&&0===t.left&&0===t.right&&0===t.top&&0===t.bottom,t&&0===t.width&&0===t.height&&!u?(f[c].hasAttribute("href")&&f[c].setAttributeNS(a,"xlink:href",l),e.length&&(!0!==(p=o[e])&&setTimeout(g({useEl:f[c],base:e,hash:n}),0),void 0===p&&void 0!==(d=s(e))&&(p=new d,o[e]=p,p.onload=y(p),p.onerror=_(p),p.ontimeout=_(p),p.open("GET",e),p.send(),m+=1))):u?e.length&&o[e]&&setTimeout(g({useEl:f[c],base:e,hash:n}),0):void 0===o[e]?o[e]=!0:o[e].onload&&(o[e].abort(),delete o[e].onload,o[e]=!0)}f="",m+=1,v()},n=function(){window.removeEventListener("load",n,!1),t=setTimeout(e,0)},"complete"!==document.readyState?window.addEventListener("load",n,!1):n()}}()},"./src/js/ui.js":
|
||
|
/*!**********************!*\
|
||
|
!*** ./src/js/ui.js ***!
|
||
|
\**********************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=j(n(/*! tui-code-snippet */"tui-code-snippet")),r=n(/*! @/util */"./src/js/util.js"),s=n(/*! @/consts */"./src/js/consts.js"),a=j(n(/*! @/ui/template/mainContainer */"./src/js/ui/template/mainContainer.js")),l=j(n(/*! @/ui/template/controls */"./src/js/ui/template/controls.js")),c=j(n(/*! @/ui/theme/theme */"./src/js/ui/theme/theme.js")),u=j(n(/*! @/ui/shape */"./src/js/ui/shape.js")),d=j(n(/*! @/ui/crop */"./src/js/ui/crop.js")),h=j(n(/*! @/ui/flip */"./src/js/ui/flip.js")),f=j(n(/*! @/ui/rotate */"./src/js/ui/rotate.js")),p=j(n(/*! @/ui/text */"./src/js/ui/text.js")),m=j(n(/*! @/ui/mask */"./src/js/ui/mask.js")),v=j(n(/*! @/ui/icon */"./src/js/ui/icon.js")),g=j(n(/*! @/ui/draw */"./src/js/ui/draw.js")),y=j(n(/*! @/ui/filter */"./src/js/ui/filter.js")),_=j(n(/*! @/ui/history */"./src/js/ui/history.js")),b=j(n(/*! @/ui/locale/locale */"./src/js/ui/locale/locale.js"));function j(e){return e&&e.__esModule?e:{default:e}}var k={Shape:u.default,Crop:d.default,Flip:h.default,Rotate:f.default,Text:p.default,Mask:m.default,Icon:v.default,Draw:g.default,Filter:y.default},E=i.default.CustomEvents,x="1300",w="on",O="zoomIn",M="hand",C=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=this._initializeOption(n),this._actions=o,this.submenu=!1,this.imageSize={},this.uiSize={},this._locale=new b.default(this.options.locale),this.theme=new c.default(this.options.theme),this.eventHandler={},this._submenuChangeTransection=!1,this._selectedElement=null,this._mainElement=null,this._editorElementWrap=null,this._editorElement=null,this._menuBarElement=null,this._subMenuElement=null,this._makeUiElement(t),this._setUiSize(),this._initMenuEvent=!1,this._makeSubMenu(),this._attachHistoryEvent(),this._attachZoomEvent()}return o(e,[{key:"destroy",value:function(){this._removeUiEvent(),this._destroyAllMenu(),this._selectedElement.innerHTML="",(0,r.assignmentForDestroy)(this)}},{key:"setUiDefaultSelectionStyle",value:function(e){return i.default.extend({applyCropSelectionStyle:!0,applyGroupSelectionStyle:!0,selectionStyle:{cornerStyle:"circle",cornerSize:16,cornerColor:"#fff",cornerStrokeColor:"#fff",transparentCorners:!1,lineWidth:2,borderColor:"#fff"}},e)}},{key:"resizeEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.uiSize,n=e.imageSize,o=void 0===n?this.imageSize:n;o!==this.imageSize&&(this.imageSize=o),t&&this._setUiSize(t);var i=this._getCanvasMaxDimension(),r=i.width,s=i.height,a=this._editorElement.style,l=this.options.menuBarPosition;a.height=s+"px",a.width=r+"px",this._setEditorPosition(l),this._editorElementWrap.style.bottom="0px",this._editorElementWrap.style.top="0px",this._editorElementWrap.style.left="0px",this._editorElementWrap.style.width="100%";var c=this._selectedElement.classList;"top"===l&&this._selectedElement.offsetWidth<x?c.add("tui-image-editor-top-optimization"):c.remove("tui-image-editor-top-optimization")}},{key:"toggleZoomButtonStatus",value:function(e){this._buttonElements[e].classList.toggle(w),e===O?this._buttonElements[M].classList.remove(w):this._buttonElements[O].classList.remove(w)}},{key:"offZoomInButtonStatus",value:function(){this._buttonElements[O].classList.remove(w)}},{key:"changeHandButtonStatus",value:function(e){this._buttonElements[M].classList[e?"add":"remove"](w)}},{key:"changeHelpButtonEnabled",value:function(e,t){this._buttonElements[e].classList[t?"add":"remove"]("enabled")}},{key:"_initializeOption",value:function(e){return i.default.extend({loadImage:{path:"",name:""},locale:{},menuIconPath:"",menu:["crop","flip","rotate","draw","shape","icon","text","mask","filter"],initMenu:"",uiSize:{width:"100%",height:"1
|
||
|
/*!***************************!*\
|
||
|
!*** ./src/js/ui/crop.js ***!
|
||
|
\***************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(/*! tui-code-snippet */"tui-code-snippet")),r=l(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),s=l(n(/*! @/ui/template/submenu/crop */"./src/js/ui/template/submenu/crop.js")),a=n(/*! @/util */"./src/js/util.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){var o=n.locale,i=n.makeSvgIcon,r=n.menuBarPosition,a=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"crop",makeSvgIcon:i,menuBarPosition:r,templateHtml:s.default,usageStatistics:a}));return l.status="active",l._els={apply:l.selector(".tie-crop-button .apply"),cancel:l.selector(".tie-crop-button .cancel"),preset:l.selector(".tie-crop-preset-button")},l.defaultPresetButton=l._els.preset.querySelector(".preset-none"),l}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),(0,a.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){var t=this._applyEventHandler.bind(this),n=this._cancelEventHandler.bind(this),o=this._cropzonePresetEventHandler.bind(this);this.eventHandler={apply:t,cancel:n,cropzonePreset:o},this.actions=e,this._els.apply.addEventListener("click",t),this._els.cancel.addEventListener("click",n),this._els.preset.addEventListener("click",o)}},{key:"_removeEvent",value:function(){this._els.apply.removeEventListener("click",this.eventHandler.apply),this._els.cancel.removeEventListener("click",this.eventHandler.cancel),this._els.preset.removeEventListener("click",this.eventHandler.cropzonePreset)}},{key:"_applyEventHandler",value:function(){this.actions.crop(),this._els.apply.classList.remove("active")}},{key:"_cancelEventHandler",value:function(){this.actions.cancel(),this._els.apply.classList.remove("active")}},{key:"_cropzonePresetEventHandler",value:function(e){var t=e.target.closest(".tui-image-editor-button.preset");if(t){var n=t.className.match(/preset-[^\s]+/)[0];this._setPresetButtonActive(t),this.actions.preset(n)}}},{key:"changeStartMode",value:function(){this.actions.modeChange("crop")}},{key:"changeStandbyMode",value:function(){this.actions.stopDrawingMode(),this._setPresetButtonActive()}},{key:"changeApplyButtonStatus",value:function(e){e?this._els.apply.classList.add("active"):this._els.apply.classList.remove("active")}},{key:"_setPresetButtonActive",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultPresetButton;i.default.forEach([].slice.call(this._els.preset.querySelectorAll(".preset")),(function(e){e.classList.remove("active")})),e&&e.classList.add("active")}}]),t}(r.default);t.default=c},"./src/js/ui/draw.js":
|
||
|
/*!***************************!*\
|
||
|
!*** ./src/js/ui/draw.js ***!
|
||
|
\***************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(/*! @/ui/tools/colorpicker */"./src/js/ui/tools/colorpicker.js")),r=u(n(/*! @/ui/tools/range */"./src/js/ui/tools/range.js")),s=u(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),a=u(n(/*! @/ui/template/submenu/draw */"./src/js/ui/template/submenu/draw.js")),l=n(/*! @/util */"./src/js/util.js"),c=n(/*! @/consts */"./src/js/consts.js");function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e,n){var o=n.locale,s=n.makeSvgIcon,l=n.menuBarPosition,u=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"draw",makeSvgIcon:s,menuBarPosition:l,templateHtml:a.default,usageStatistics:u}));return d._els={lineSelectButton:d.selector(".tie-draw-line-select-button"),drawColorPicker:new i.default(d.selector(".tie-draw-color"),"#00a9ff",d.toggleDirection,d.usageStatistics),drawRange:new r.default({slider:d.selector(".tie-draw-range"),input:d.selector(".tie-draw-range-value")},c.defaultDrawRangeValues)},d.type=null,d.color=d._els.drawColorPicker.color,d.width=d._els.drawRange.value,d.colorPickerInputBox=d._els.drawColorPicker.colorpickerElement.querySelector(c.selectorNames.COLOR_PICKER_INPUT_BOX),d}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),this._els.drawColorPicker.destroy(),this._els.drawRange.destroy(),(0,l.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){this.eventHandler.changeDrawType=this._changeDrawType.bind(this),this.actions=e,this._els.lineSelectButton.addEventListener("click",this.eventHandler.changeDrawType),this._els.drawColorPicker.on("change",this._changeDrawColor.bind(this)),this._els.drawRange.on("change",this._changeDrawRange.bind(this)),this.colorPickerInputBox.addEventListener(c.eventNames.FOCUS,this._onStartEditingInputBox.bind(this)),this.colorPickerInputBox.addEventListener(c.eventNames.BLUR,this._onStopEditingInputBox.bind(this))}},{key:"_removeEvent",value:function(){this._els.lineSelectButton.removeEventListener("click",this.eventHandler.changeDrawType),this._els.drawColorPicker.off(),this._els.drawRange.off(),this.colorPickerInputBox.removeEventListener(c.eventNames.FOCUS,this._onStartEditingInputBox.bind(this)),this.colorPickerInputBox.removeEventListener(c.eventNames.BLUR,this._onStopEditingInputBox.bind(this))}},{key:"setDrawMode",value:function(){this.actions.setDrawMode(this.type,{width:this.width,color:(0,l.getRgb)(this.color,.7)})}},{key:"changeStandbyMode",value:function(){this.type=null,this.actions.stopDrawingMode(),this.actions.changeSelectableAll(!0),this._els.lineSelectButton.classList.remove("free"),this._els.lineSelectButton.classList.remove("line")}},{key:"changeStartMode",value:function(){this.type="free",this._els.lineSelectButton.classList.add("free"),this.setDrawMode()}},{key:"_changeDrawType",value:function(e){var t=e.target.closest(".tui-image-editor-button");if(t){var n=this.getButtonType(t,["free","line"]);if(this.actions.discardSelection(),this.type===n)return void this.changeStandbyMode();this.changeStandbyMode(),this.type=n,this._els.lineSelectButton.classList.add(n),this.setDrawMode()}}},{key:"_changeDrawColor",value:function(e){this.color=e||"
|
||
|
/*!*****************************!*\
|
||
|
!*** ./src/js/ui/filter.js ***!
|
||
|
\*****************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=d(n(/*! tui-code-snippet */"tui-code-snippet")),r=d(n(/*! @/ui/tools/colorpicker */"./src/js/ui/tools/colorpicker.js")),s=d(n(/*! @/ui/tools/range */"./src/js/ui/tools/range.js")),a=d(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),l=d(n(/*! @/ui/template/submenu/filter */"./src/js/ui/template/submenu/filter.js")),c=n(/*! @/util */"./src/js/util.js"),u=n(/*! @/consts */"./src/js/consts.js");function d(e){return e&&e.__esModule?e:{default:e}}var h="130px",f=["add","diff","subtract","multiply","screen","lighten","darken"],p=["grayscale","invert","sepia","vintage","blur","sharpen","emboss","remove-white","brightness","noise","pixelate","color-filter","tint","multiply","blend"],m={grayscale:"grayscale",invert:"invert",sepia:"sepia",blur:"blur",sharpen:"sharpen",emboss:"emboss",removeWhite:"removeColor",brightness:"brightness",contrast:"contrast",saturation:"saturation",vintage:"vintage",polaroid:"polaroid",noise:"noise",pixelate:"pixelate",colorFilter:"removeColor",tint:"blendColor",multiply:"blendColor",blend:"blendColor",hue:"hue",gamma:"gamma"},v=["removewhiteDistanceRange","colorfilterThresholdRange","pixelateRange","noiseRange","brightnessRange","tintOpacity"],g=["filterBlendColor","filterMultiplyColor","filterTintColor"],y=function(e){function t(e,n){var o=n.locale,i=n.menuBarPosition,r=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"filter",menuBarPosition:i,templateHtml:l.default,usageStatistics:r}));return s.selectBoxShow=!1,s.checkedMap={},s._makeControlElement(),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),this._destroyToolInstance(),(0,c.assignmentForDestroy)(this)}},{key:"_removeEvent",value:function(){var e=this;i.default.forEach(p,(function(t){var n=e.selector(".tie-"+t),o=(0,c.toCamelCase)(t);n.removeEventListener("change",e.eventHandler[o])})),i.default.forEach([].concat(v,g),(function(t){e._els[t].off()})),this._els.blendType.removeEventListener("change",this.eventHandler.changeBlendFilter),this._els.blendType.removeEventListener("click",this.eventHandler.changeBlendFilter),i.default.forEachArray(this.colorPickerInputBoxes,(function(t){t.removeEventListener(u.eventNames.FOCUS,e._onStartEditingInputBox.bind(e)),t.removeEventListener(u.eventNames.BLUR,e._onStopEditingInputBox.bind(e))}),this)}},{key:"_destroyToolInstance",value:function(){var e=this;i.default.forEach([].concat(v,g),(function(t){e._els[t].destroy()}))}},{key:"addEvent",value:function(e){var t=this,n=e.applyFilter,o=function(e){return t._changeFilterState.bind(t,n,e)},r=function(e){return function(o,i){return t._changeFilterState(n,e,i)}};this.eventHandler={changeBlendFilter:o("blend"),blandTypeClick:function(e){return e.stopPropagation()}},i.default.forEach(p,(function(e){var n=t.selector(".tie-"+e),i=(0,c.toCamelCase)(e);t.checkedMap[i]=n,t.eventHandler[i]=o(i),n.addEventListener("change",t.eventHandler[i])})),this._els.removewhiteDistanceRange.on("change",r("removeWhite")),this._els.colorfilterThresholdRange.on("change",r("colorFilter")),this._els.pixelateRange.on("change",r("pixelate")),this._els.noiseRange.on("change",r("noise")),this._el
|
||
|
/*!***************************!*\
|
||
|
!*** ./src/js/ui/flip.js ***!
|
||
|
\***************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=l(n(/*! tui-code-snippet */"tui-code-snippet")),r=l(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),s=l(n(/*! @/ui/template/submenu/flip */"./src/js/ui/template/submenu/flip.js")),a=n(/*! @/util */"./src/js/util.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){var o=n.locale,i=n.makeSvgIcon,r=n.menuBarPosition,a=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"flip",makeSvgIcon:i,menuBarPosition:r,templateHtml:s.default,usageStatistics:a}));return l.flipStatus=!1,l._els={flipButton:l.selector(".tie-flip-button")},l}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),(0,a.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){this.eventHandler.changeFlip=this._changeFlip.bind(this),this._actions=e,this._els.flipButton.addEventListener("click",this.eventHandler.changeFlip)}},{key:"_removeEvent",value:function(){this._els.flipButton.removeEventListener("click",this.eventHandler.changeFlip)}},{key:"_changeFlip",value:function(e){var t=this,n=e.target.closest(".tui-image-editor-button");if(n){var o=this.getButtonType(n,["flipX","flipY","resetFlip"]);if(!this.flipStatus&&"resetFlip"===o)return;this._actions.flip(o).then((function(e){var n=t._els.flipButton.classList;t.flipStatus=!1,n.remove("resetFlip"),i.default.forEach(["flipX","flipY"],(function(o){n.remove(o),e[o]&&(n.add(o),n.add("resetFlip"),t.flipStatus=!0)}))}))}}}]),t}(r.default);t.default=c},"./src/js/ui/history.js":
|
||
|
/*!******************************!*\
|
||
|
!*** ./src/js/ui/history.js ***!
|
||
|
\******************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=a(n(/*! @/ui/panelMenu */"./src/js/ui/panelMenu.js")),r=a(n(/*! @/ui/template/submenu/history */"./src/js/ui/template/submenu/history.js")),s=n(/*! @/util */"./src/js/util.js");function a(e){return e&&e.__esModule?e:{default:e}}var l="selected-item",c="disabled-item",u=function(e){function t(e,n){var o=n.locale,i=n.makeSvgIcon;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{name:"history"}));return e.classList.add("enabled"),r.locale=o,r.makeSvgIcon=i,r._eventHandler={},r._historyIndex=r.getListLength(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"add",value:function(e){var t=e.name,n=e.detail;this._hasDisabledItem()&&this.deleteListItemElement(this._historyIndex+1,this.getListLength());var o=(0,r.default)({locale:this.locale,makeSvgIcon:this.makeSvgIcon,name:t,detail:n}),i=this.makeListItemElement(o);this.pushListItemElement(i),this._historyIndex=this.getListLength()-1,this._selectItem(this._historyIndex)}},{key:"init",value:function(){this.deleteListItemElement(1,this.getListLength()),this._historyIndex=0,this._selectItem(this._historyIndex)}},{key:"clear",value:function(){this.deleteListItemElement(0,this.getListLength()),this._historyIndex=-1}},{key:"prev",value:function(){this._historyIndex-=1,this._selectItem(this._historyIndex)}},{key:"next",value:function(){this._historyIndex+=1,this._selectItem(this._historyIndex)}},{key:"_hasDisabledItem",value:function(){return this.getListLength()-1>this._historyIndex}},{key:"_addHistoryEventListener",value:function(){var e=this;this._eventHandler.history=function(t){return e._clickHistoryItem(t)},this.listElement.addEventListener("click",this._eventHandler.history)}},{key:"_removeHistoryEventListener",value:function(){this.listElement.removeEventListener("click",this._eventHandler.history)}},{key:"_clickHistoryItem",value:function(e){var t=e.target.closest(".history-item");if(t){var n=Number.parseInt(t.getAttribute("data-index"),10);if(n!==this._historyIndex){var o=Math.abs(n-this._historyIndex);n<this._historyIndex?this._actions.undo(o):this._actions.redo(o)}}}},{key:"_selectItem",value:function(e){for(var t=0;t<this.getListLength();t+=1)this.removeClass(t,l),this.removeClass(t,c),t>e&&this.addClass(t,c);this.addClass(e,l)}},{key:"destroy",value:function(){this.removeEvent(),(0,s.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){this._actions=e,this._addHistoryEventListener()}},{key:"removeEvent",value:function(){this._removeHistoryEventListener()}}]),t}(i.default);t.default=u},"./src/js/ui/icon.js":
|
||
|
/*!***************************!*\
|
||
|
!*** ./src/js/ui/icon.js ***!
|
||
|
\***************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(/*! tui-code-snippet */"tui-code-snippet")),r=u(n(/*! @/ui/tools/colorpicker */"./src/js/ui/tools/colorpicker.js")),s=u(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),a=u(n(/*! @/ui/template/submenu/icon */"./src/js/ui/template/submenu/icon.js")),l=n(/*! @/util */"./src/js/util.js"),c=n(/*! @/consts */"./src/js/consts.js");function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e,n){var o=n.locale,i=n.makeSvgIcon,s=n.menuBarPosition,l=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"icon",makeSvgIcon:i,menuBarPosition:s,templateHtml:a.default,usageStatistics:l}));return u.iconType=null,u._iconMap={},u._els={registerIconButton:u.selector(".tie-icon-image-file"),addIconButton:u.selector(".tie-icon-add-button"),iconColorpicker:new r.default(u.selector(".tie-icon-color"),"#ffbb3b",u.toggleDirection,u.usageStatistics)},u.colorPickerInputBox=u._els.iconColorpicker.colorpickerElement.querySelector(c.selectorNames.COLOR_PICKER_INPUT_BOX),u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),this._els.iconColorpicker.destroy(),(0,l.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){var t=this._registerIconHandler.bind(this),n=this._addIconHandler.bind(this);this.eventHandler={registerIcon:t,addIcon:n},this.actions=e,this._els.iconColorpicker.on("change",this._changeColorHandler.bind(this)),this._els.registerIconButton.addEventListener("change",t),this._els.addIconButton.addEventListener("click",n),this.colorPickerInputBox.addEventListener(c.eventNames.FOCUS,this._onStartEditingInputBox.bind(this)),this.colorPickerInputBox.addEventListener(c.eventNames.BLUR,this._onStopEditingInputBox.bind(this))}},{key:"_removeEvent",value:function(){this._els.iconColorpicker.off(),this._els.registerIconButton.removeEventListener("change",this.eventHandler.registerIcon),this._els.addIconButton.removeEventListener("click",this.eventHandler.addIcon),this.colorPickerInputBox.removeEventListener(c.eventNames.FOCUS,this._onStartEditingInputBox.bind(this)),this.colorPickerInputBox.removeEventListener(c.eventNames.BLUR,this._onStopEditingInputBox.bind(this))}},{key:"clearIconType",value:function(){this._els.addIconButton.classList.remove(this.iconType),this.iconType=null}},{key:"registerDefaultIcon",value:function(){var e=this;i.default.forEach(c.defaultIconPath,(function(t,n){e.actions.registerDefaultIcons(n,t)}))}},{key:"setIconPickerColor",value:function(e){this._els.iconColorpicker.color=e}},{key:"changeStandbyMode",value:function(){this.clearIconType(),this.actions.cancelAddIcon()}},{key:"_changeColorHandler",value:function(e){e=e||"transparent",this.actions.changeColor(e)}},{key:"_addIconHandler",value:function(e){var t=e.target.closest(".tui-image-editor-button");if(t){var n=t.getAttribute("data-icontype"),o=this._els.iconColorpicker.color;this.actions.discardSelection(),this.actions.changeSelectableAll(!1),this._els.addIconButton.classList.remove(this.iconType),this._els.addIconButton.classList.add(n),this.iconType===n?this.changeStandbyMode():(this.actions.addIcon(n,o),this.iconType=n)}}},{key:"_registerIconHand
|
||
|
/*!************************************!*\
|
||
|
!*** ./src/js/ui/locale/locale.js ***!
|
||
|
\************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._locale=t}return o(e,[{key:"localize",value:function(e){return this._locale[e]||e}}]),e}();t.default=i},"./src/js/ui/mask.js":
|
||
|
/*!***************************!*\
|
||
|
!*** ./src/js/ui/mask.js ***!
|
||
|
\***************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=a(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),r=a(n(/*! @/ui/template/submenu/mask */"./src/js/ui/template/submenu/mask.js")),s=n(/*! @/util */"./src/js/util.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,n){var o=n.locale,i=n.makeSvgIcon,s=n.menuBarPosition,a=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"mask",makeSvgIcon:i,menuBarPosition:s,templateHtml:r.default,usageStatistics:a}));return l._els={applyButton:l.selector(".tie-mask-apply"),maskImageButton:l.selector(".tie-mask-image-file")},l}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),(0,s.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){var t=this._loadMaskFile.bind(this),n=this._applyMask.bind(this);this.eventHandler={loadMaskFile:t,applyMask:n},this.actions=e,this._els.maskImageButton.addEventListener("change",t),this._els.applyButton.addEventListener("click",n)}},{key:"_removeEvent",value:function(){this._els.maskImageButton.removeEventListener("change",this.eventHandler.loadMaskFile),this._els.applyButton.removeEventListener("click",this.eventHandler.applyMask)}},{key:"_applyMask",value:function(){this.actions.applyFilter(),this._els.applyButton.classList.remove("active")}},{key:"_loadMaskFile",value:function(e){var t=void 0;(0,s.isSupportFileApi)()||alert("This browser does not support file-api");var n=e.target.files[0];n&&(t=URL.createObjectURL(n),this.actions.loadImageFromURL(t,n),this._els.applyButton.classList.add("active"))}}]),t}(i.default);t.default=l},"./src/js/ui/panelMenu.js":
|
||
|
/*!********************************!*\
|
||
|
!*** ./src/js/ui/panelMenu.js ***!
|
||
|
\********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i=function(){function e(t,n){var o=n.name;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=o,this.items=[],this.panelElement=this._makePanelElement(),this.listElement=this._makeListElement(),this.panelElement.appendChild(this.listElement),t.appendChild(this.panelElement)}return o(e,[{key:"_makePanelElement",value:function(){var e=document.createElement("div");return e.className="tie-panel-"+this.name,e}},{key:"_makeListElement",value:function(){var e=document.createElement("ol");return e.className=this.name+"-list",e}},{key:"makeListItemElement",value:function(e){var t=document.createElement("li");return t.innerHTML=e,t.className=this.name+"-item",t.setAttribute("data-index",this.items.length),t}},{key:"pushListItemElement",value:function(e){this.listElement.appendChild(e),this.listElement.scrollTop+=e.offsetHeight,this.items.push(e)}},{key:"deleteListItemElement",value:function(e,t){for(var n=this.items,o=e;o<t;o+=1)this.listElement.removeChild(n[o]);n.splice(e,t-e+1)}},{key:"getListLength",value:function(){return this.items.length}},{key:"addClass",value:function(e,t){this.items[e]&&this.items[e].classList.add(t)}},{key:"removeClass",value:function(e,t){this.items[e]&&this.items[e].classList.remove(t)}},{key:"toggleClass",value:function(e,t){this.items[e]&&this.items[e].classList.toggle(t)}}]),e}();t.default=i},"./src/js/ui/rotate.js":
|
||
|
/*!*****************************!*\
|
||
|
!*** ./src/js/ui/rotate.js ***!
|
||
|
\*****************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(/*! @/ui/tools/range */"./src/js/ui/tools/range.js")),r=c(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),s=c(n(/*! @/ui/template/submenu/rotate */"./src/js/ui/template/submenu/rotate.js")),a=n(/*! @/util */"./src/js/util.js"),l=n(/*! @/consts */"./src/js/consts.js");function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,n){var o=n.locale,r=n.makeSvgIcon,a=n.menuBarPosition,c=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"rotate",makeSvgIcon:r,menuBarPosition:a,templateHtml:s.default,usageStatistics:c}));return u._value=0,u._els={rotateButton:u.selector(".tie-rotate-button"),rotateRange:new i.default({slider:u.selector(".tie-rotate-range"),input:u.selector(".tie-rotate-range-value")},l.defaultRotateRangeValues)},u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),this._els.rotateRange.destroy(),(0,a.assignmentForDestroy)(this)}},{key:"setRangeBarAngle",value:function(e,t){var n=t;"rotate"===e&&(n=parseInt(this._els.rotateRange.value,10)+t),this._setRangeBarRatio(n)}},{key:"_setRangeBarRatio",value:function(e){this._els.rotateRange.value=e}},{key:"addEvent",value:function(e){this.eventHandler.rotationAngleChanged=this._changeRotateForButton.bind(this),this.actions=e,this._els.rotateButton.addEventListener("click",this.eventHandler.rotationAngleChanged),this._els.rotateRange.on("change",this._changeRotateForRange.bind(this))}},{key:"_removeEvent",value:function(){this._els.rotateButton.removeEventListener("click",this.eventHandler.rotationAngleChanged),this._els.rotateRange.off()}},{key:"_changeRotateForRange",value:function(e,t){var n=(0,a.toInteger)(e);this.actions.setAngle(n,!t),this._value=n}},{key:"_changeRotateForButton",value:function(e){var t=e.target.closest(".tui-image-editor-button"),n=this._els.rotateRange.value;if(t){var o={clockwise:30,counterclockwise:-30}[this.getButtonType(t,["counterclockwise","clockwise"])],i=parseInt(n,10)+o;i>=-360&&i<=360&&this.actions.rotate(o)}}}]),t}(r.default);t.default=u},"./src/js/ui/shape.js":
|
||
|
/*!****************************!*\
|
||
|
!*** ./src/js/ui/shape.js ***!
|
||
|
\****************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=d(n(/*! tui-code-snippet */"tui-code-snippet")),r=d(n(/*! @/ui/tools/colorpicker */"./src/js/ui/tools/colorpicker.js")),s=d(n(/*! @/ui/tools/range */"./src/js/ui/tools/range.js")),a=d(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),l=d(n(/*! @/ui/template/submenu/shape */"./src/js/ui/template/submenu/shape.js")),c=n(/*! @/util */"./src/js/util.js"),u=n(/*! @/consts */"./src/js/consts.js");function d(e){return e&&e.__esModule?e:{default:e}}var h={stroke:"#ffbb3b",fill:"",strokeWidth:3},f=function(e){function t(e,n){var o=n.locale,i=n.makeSvgIcon,a=n.menuBarPosition,c=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"shape",makeSvgIcon:i,menuBarPosition:a,templateHtml:l.default,usageStatistics:c}));return d.type=null,d.options=h,d._els={shapeSelectButton:d.selector(".tie-shape-button"),shapeColorButton:d.selector(".tie-shape-color-button"),strokeRange:new s.default({slider:d.selector(".tie-stroke-range"),input:d.selector(".tie-stroke-range-value")},u.defaultShapeStrokeValues),fillColorpicker:new r.default(d.selector(".tie-color-fill"),"",d.toggleDirection,d.usageStatistics),strokeColorpicker:new r.default(d.selector(".tie-color-stroke"),"#ffbb3b",d.toggleDirection,d.usageStatistics)},d.colorPickerControls.push(d._els.fillColorpicker),d.colorPickerControls.push(d._els.strokeColorpicker),d.colorPickerInputBoxes=[],d.colorPickerInputBoxes.push(d._els.fillColorpicker.colorpickerElement.querySelector(u.selectorNames.COLOR_PICKER_INPUT_BOX)),d.colorPickerInputBoxes.push(d._els.strokeColorpicker.colorpickerElement.querySelector(u.selectorNames.COLOR_PICKER_INPUT_BOX)),d}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),this._els.strokeRange.destroy(),this._els.fillColorpicker.destroy(),this._els.strokeColorpicker.destroy(),(0,c.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){var t=this;this.eventHandler.shapeTypeSelected=this._changeShapeHandler.bind(this),this.actions=e,this._els.shapeSelectButton.addEventListener("click",this.eventHandler.shapeTypeSelected),this._els.strokeRange.on("change",this._changeStrokeRangeHandler.bind(this)),this._els.fillColorpicker.on("change",this._changeFillColorHandler.bind(this)),this._els.strokeColorpicker.on("change",this._changeStrokeColorHandler.bind(this)),this._els.fillColorpicker.on("changeShow",this.colorPickerChangeShow.bind(this)),this._els.strokeColorpicker.on("changeShow",this.colorPickerChangeShow.bind(this)),i.default.forEachArray(this.colorPickerInputBoxes,(function(e){e.addEventListener(u.eventNames.FOCUS,t._onStartEditingInputBox.bind(t)),e.addEventListener(u.eventNames.BLUR,t._onStopEditingInputBox.bind(t))}),this)}},{key:"_removeEvent",value:function(){var e=this;this._els.shapeSelectButton.removeEventListener("click",this.eventHandler.shapeTypeSelected),this._els.strokeRange.off(),this._els.fillColorpicker.off(),this._els.strokeColorpicker.off(),i.default.forEachArray(this.colorPickerInputBoxes,(function(t){t.removeEventListener(u.eventNames.FOCUS,e._onStartEditingInputBox.bind(e)),t.removeEventListener(u.eventNames.BLUR,e._onStopEditingInputBox.bind(e))}),this)}},{key:
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/ui/submenuBase.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(/*! tui-code-snippet */"tui-code-snippet"),r=n(/*! @/consts */"./src/js/consts.js");var s=function(){function e(t,n){var o=n.locale,i=n.name,r=n.makeSvgIcon,s=n.menuBarPosition,a=n.templateHtml,l=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.subMenuElement=t,this.menuBarPosition=s,this.toggleDirection="top"===s?"down":"up",this.colorPickerControls=[],this.usageStatistics=l,this.eventHandler={},this._makeSubMenuElement({locale:o,name:i,makeSvgIcon:r,templateHtml:a})}return o(e,[{key:"selector",value:function(e){return this.subMenuElement.querySelector(e)}},{key:"colorPickerChangeShow",value:function(e){this.colorPickerControls.forEach((function(t){e!==t&&t.hide()}))}},{key:"getButtonType",value:function(e,t){return e.className.match(RegExp("("+t.join("|")+")"))[0]}},{key:"changeClass",value:function(e,t,n){e.classList.remove(t),e.classList.add(n)}},{key:"changeStandbyMode",value:function(){}},{key:"changeStartMode",value:function(){}},{key:"_makeSubMenuElement",value:function(e){var t=e.locale,n=e.name,o=e.iconStyle,i=e.makeSvgIcon,r=e.templateHtml,s=document.createElement("div");s.className="tui-image-editor-menu-"+n,s.innerHTML=r({locale:t,iconStyle:o,makeSvgIcon:i}),this.subMenuElement.appendChild(s)}},{key:"_onStartEditingInputBox",value:function(){this.fire(r.eventNames.INPUT_BOX_EDITING_STARTED)}},{key:"_onStopEditingInputBox",value:function(){this.fire(r.eventNames.INPUT_BOX_EDITING_STOPPED)}}]),e}();i.CustomEvents.mixin(s),t.default=s},"./src/js/ui/template/controls.js":
|
||
|
/*!****************************************!*\
|
||
|
!*** ./src/js/ui/template/controls.js ***!
|
||
|
\****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(/*! @/util */"./src/js/util.js");t.default=function(e){var t=e.locale,n=e.biImage,i=e.loadButtonStyle,r=e.downloadButtonStyle,s=e.menuBarPosition;return'\n <ul class="tui-image-editor-help-menu '+(0,o.getHelpMenuBarPosition)(s)+'"></ul>\n <div class="tui-image-editor-controls">\n <div class="tui-image-editor-controls-logo">\n <img src="'+n+'" />\n </div>\n <ul class="tui-image-editor-menu"></ul>\n\n <div class="tui-image-editor-controls-buttons">\n <div style="'+i+'">\n '+t.localize("Load")+'\n <input type="file" class="tui-image-editor-load-btn" />\n </div>\n <button class="tui-image-editor-download-btn" style="'+r+'">\n '+t.localize("Download")+"\n </button>\n </div>\n </div>\n"}},"./src/js/ui/template/mainContainer.js":
|
||
|
/*!*********************************************!*\
|
||
|
!*** ./src/js/ui/template/mainContainer.js ***!
|
||
|
\*********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=(e.biImage,e.commonStyle),o=e.headerStyle,i=e.loadButtonStyle,r=e.downloadButtonStyle,s=e.submenuStyle;return'\n <div class="tui-image-editor-main-container" style="'+n+'">\n <div class="tui-image-editor-header" style="'+o+'">\n <div class="tui-image-editor-header-logo">\n</div>\n <div class="tui-image-editor-header-buttons">\n <div style="'+i+'">\n '+t.localize("Load")+'\n <input type="file" class="tui-image-editor-load-btn" />\n </div>\n <button class="tui-image-editor-download-btn" style="'+r+'">\n '+t.localize("Download")+'\n </button>\n </div>\n </div>\n <div class="tui-image-editor-main">\n <div class="tui-image-editor-submenu">\n <div class="tui-image-editor-submenu-style" style="'+s+'"></div>\n </div>\n <div class="tui-image-editor-wrap">\n <div class="tui-image-editor-size-wrap">\n <div class="tui-image-editor-align-wrap">\n <div class="tui-image-editor"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n'}},"./src/js/ui/template/style.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/ui/template/style.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.subMenuLabelActive,n=e.subMenuLabelNormal,o=e.subMenuRangeTitle,i=e.submenuPartitionVertical,r=e.submenuPartitionHorizontal,s=e.submenuCheckbox,a=e.submenuRangePointer,l=e.submenuRangeValue,c=e.submenuColorpickerTitle,u=e.submenuColorpickerButton,d=e.submenuRangeBar,h=e.submenuRangeSubbar,f=e.submenuDisabledRangePointer,p=e.submenuDisabledRangeBar,m=e.submenuDisabledRangeSubbar,v=e.submenuIconSize,g=e.menuIconSize,y=e.biSize,_=e.menuIconStyle,b=e.submenuIconStyle;return'\n .tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n .tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype="icon-heart"] label,\n .tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype="icon-location"] label,\n .tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype="icon-polygon"] label,\n .tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype="icon-star"] label,\n .tie-icon-add-button.icon-star-2 .tui-image-editor-button[data-icontype="icon-star-2"] label,\n .tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype="icon-arrow-3"] label,\n .tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype="icon-arrow-2"] label,\n .tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype="icon-arrow"] label,\n .tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype="icon-bubble"] label,\n .tie-draw-line-select-button.line .tui-image-editor-button.line label,\n .tie-draw-line-select-button.free .tui-image-editor-button.free label,\n .tie-flip-button.flipX .tui-image-editor-button.flipX label,\n .tie-flip-button.flipY .tui-image-editor-button.flipY label,\n .tie-flip-button.resetFlip .tui-image-editor-button.resetFlip label,\n .tie-crop-button .tui-image-editor-button.apply.active label,\n .tie-crop-preset-button .tui-image-editor-button.preset.active label,\n .tie-shape-button.rect .tui-image-editor-button.rect label,\n .tie-shape-button.circle .tui-image-editor-button.circle label,\n .tie-shape-button.triangle .tui-image-editor-button.triangle label,\n .tie-text-effect-button .tui-image-editor-button.active label,\n .tie-text-align-button.left .tui-image-editor-button.left label,\n .tie-text-align-button.center .tui-image-editor-button.center label,\n .tie-text-align-button.right .tui-image-editor-button.right label,\n .tie-mask-apply.apply.active .tui-image-editor-button.apply label,\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover > label,\n .tui-image-editor-container .tui-image-editor-checkbox label > span {\n '+t+"\n }\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button > label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label,\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label > span {\n "+n+"\n }\n .tui-image-editor-container .tui-image-editor-range-wrap label > span {\n "+o+"\n }\n .tui-image-editor-container .tui-image-editor-partition > div {\n "+i+"\n }\n .tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition > div,\n .tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition > div {\n "+r+"\n }\n .tui-image-editor-container .tui-image-editor-checkbox label > span:before {\n "+s+"\n }\n .tui-image-editor-container .tui-image-editor-checkbox label > input:checked + span:before {\n border: 0;\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-pointer {\n "+a+"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-bar {\n "+d+"\n }\n .tui-image-editor-container .tui-image-editor-virtual-range-subbar {\n
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/crop.js ***!
|
||
|
\********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-crop-preset-button">\n <div class="tui-image-editor-button preset preset-none active">\n <div>\n '+n(["normal","active"],"shape-rectangle",!0)+"\n </div>\n <label> "+t.localize("Custom")+' </label>\n </div>\n <div class="tui-image-editor-button preset preset-square">\n <div>\n '+n(["normal","active"],"crop",!0)+"\n </div>\n <label> "+t.localize("Square")+' </label>\n </div>\n <div class="tui-image-editor-button preset preset-3-2">\n <div>\n '+n(["normal","active"],"crop",!0)+"\n </div>\n <label> "+t.localize("3:2")+' </label>\n </div>\n <div class="tui-image-editor-button preset preset-4-3">\n <div>\n '+n(["normal","active"],"crop",!0)+"\n </div>\n <label> "+t.localize("4:3")+' </label>\n </div>\n <div class="tui-image-editor-button preset preset-5-4">\n <div>\n '+n(["normal","active"],"crop",!0)+"\n </div>\n <label> "+t.localize("5:4")+' </label>\n </div>\n <div class="tui-image-editor-button preset preset-7-5">\n <div>\n '+n(["normal","active"],"crop",!0)+"\n </div>\n <label> "+t.localize("7:5")+' </label>\n </div>\n <div class="tui-image-editor-button preset preset-16-9">\n <div>\n '+n(["normal","active"],"crop",!0)+"\n </div>\n <label> "+t.localize("16:9")+' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition tui-image-editor-newline">\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tie-crop-button action">\n <div class="tui-image-editor-button apply">\n '+n(["normal","active"],"apply")+"\n <label>\n "+t.localize("Apply")+'\n </label>\n </div>\n <div class="tui-image-editor-button cancel">\n '+n(["normal","active"],"cancel")+"\n <label>\n "+t.localize("Cancel")+"\n </label>\n </div>\n </li>\n </ul>\n"}},"./src/js/ui/template/submenu/draw.js":
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/draw.js ***!
|
||
|
\********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-draw-line-select-button">\n <div class="tui-image-editor-button free">\n <div>\n '+n(["normal","active"],"draw-free",!0)+"\n </div>\n <label>\n "+t.localize("Free")+'\n </label>\n </div>\n <div class="tui-image-editor-button line">\n <div>\n '+n(["normal","active"],"draw-line",!0)+"\n </div>\n <label>\n "+t.localize("Straight")+'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tie-draw-color" title="'+t.localize("Color")+'"></div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">'+t.localize("Range")+'</label>\n <div class="tie-draw-range"></div>\n <input class="tie-draw-range-value tui-image-editor-range-value" value="0" />\n </li>\n </ul>\n'}},"./src/js/ui/template/submenu/filter.js":
|
||
|
/*!**********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/filter.js ***!
|
||
|
\**********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale;return'\n <ul class="tui-image-editor-submenu-item">\n <li class="tui-image-editor-submenu-align">\n <div class="tui-image-editor-checkbox-wrap fixed-width">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-grayscale">\n <span>'+t.localize("Grayscale")+'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-invert">\n <span>'+t.localize("Invert")+'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-sepia">\n <span>'+t.localize("Sepia")+'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-vintage">\n <span>'+t.localize("Sepia2")+'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-blur">\n <span>'+t.localize("Blur")+'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-sharpen">\n <span>'+t.localize("Sharpen")+'</span>\n </label>\n </div>\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-emboss">\n <span>'+t.localize("Emboss")+'</span>\n </label>\n </div>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tui-image-editor-submenu-align">\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled" style="margin-bottom: 7px;">\n <div class="tui-image-editor-checkbox-wrap">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-remove-white">\n <span>'+t.localize("Remove White")+'</span>\n </label>\n </div>\n </div>\n <div class="tui-image-editor-newline tui-image-editor-range-wrap short">\n <label>'+t.localize("Distance")+'</label>\n <div class="tie-removewhite-distance-range"></div>\n </div>\n </div>\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-brightness">\n <span>'+t.localize("Brightness")+'</span>\n </label>\n </div>\n <div class="tui-image-editor-range-wrap short">\n <div class="tie-brightness-range"></div>\n </div>\n </div>\n <div class="tui-image-editor-checkbox-group tui-image-editor-disabled">\n <div class="tui-image-editor-checkbox">\n <label>\n <input type="checkbox" class="tie-noise">\n <span>'+t.localize("Noise")+'</span>\n </label>\n </div>\n <div class="t
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/flip.js ***!
|
||
|
\********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tie-flip-button tui-image-editor-submenu-item">\n <li>\n <div class="tui-image-editor-button flipX">\n <div>\n '+n(["normal","active"],"flip-x",!0)+"\n </div>\n <label>\n "+t.localize("Flip X")+'\n </label>\n </div>\n <div class="tui-image-editor-button flipY">\n <div>\n '+n(["normal","active"],"flip-y",!0)+"\n </div>\n <label>\n "+t.localize("Flip Y")+'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tui-image-editor-button resetFlip">\n <div>\n '+n(["normal","active"],"flip-reset",!0)+"\n </div>\n <label>\n "+t.localize("Reset")+"\n </label>\n </div>\n </li>\n </ul>\n"}},"./src/js/ui/template/submenu/history.js":
|
||
|
/*!***********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/history.js ***!
|
||
|
\***********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon,o=e.name,i=e.detail;return'\n <div class="tui-image-editor-history-item history">\n <div class="history-item-icon">\n '+n(["normal","active"],"history-"+o.toLowerCase(),!0)+"\n </div>\n <span>\n "+t.localize(o)+"\n "+(i?"("+t.localize(i)+")":"")+'\n </span>\n <div class="history-item-checkbox">\n '+n(["normal"],"history-check",!0)+"\n </div>\n </div>\n"}},"./src/js/ui/template/submenu/icon.js":
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/icon.js ***!
|
||
|
\********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-icon-add-button">\n <div class="tui-image-editor-button" data-icontype="icon-arrow">\n <div>\n '+n(["normal","active"],"icon-arrow",!0)+"\n </div>\n <label>\n "+t.localize("Arrow")+'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-arrow-2">\n <div>\n '+n(["normal","active"],"icon-arrow-2",!0)+"\n </div>\n <label>\n "+t.localize("Arrow-2")+'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-arrow-3">\n <div>\n '+n(["normal","active"],"icon-arrow-3",!0)+"\n </div>\n <label>\n "+t.localize("Arrow-3")+'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-star">\n <div>\n '+n(["normal","active"],"icon-star",!0)+"\n </div>\n <label>\n "+t.localize("Star-1")+'\n </label>\n </div>\n <div class="tui-image-editor-button" data-icontype="icon-star-2">\n <div>\n '+n(["normal","active"],"icon-star-2",!0)+"\n </div>\n <label>\n "+t.localize("Star-2")+'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-polygon">\n <div>\n '+n(["normal","active"],"icon-polygon",!0)+"\n </div>\n <label>\n "+t.localize("Polygon")+'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-location">\n <div>\n '+n(["normal","active"],"icon-location",!0)+"\n </div>\n <label>\n "+t.localize("Location")+'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-heart">\n <div>\n '+n(["normal","active"],"icon-heart",!0)+"\n </div>\n <label>\n "+t.localize("Heart")+'\n </label>\n </div>\n\n <div class="tui-image-editor-button" data-icontype="icon-bubble">\n <div>\n '+n(["normal","active"],"icon-bubble",!0)+"\n </div>\n <label>\n "+t.localize("Bubble")+'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tie-icon-add-button">\n <div class="tui-image-editor-button" style="margin:0">\n <div>\n <input type="file" accept="image/*" class="tie-icon-image-file">\n '+n(["normal","active"],"icon-load",!0)+"\n </div>\n <label>\n "+t.localize("Custom icon")+'\n </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tie-icon-color" title="'+t.localize("Color")+'"></div>\n </li>\n </ul>\n'}},"./src/js/ui/template/submenu/mask.js":
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/mask.js ***!
|
||
|
\********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tui-image-editor-submenu-item">\n <li>\n <div class="tui-image-editor-button">\n <div>\n <input type="file" accept="image/*" class="tie-mask-image-file">\n '+n(["normal","active"],"mask-load",!0)+"\n </div>\n <label> "+t.localize("Load Mask Image")+' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tie-mask-apply tui-image-editor-newline apply" style="margin-top: 22px;margin-bottom: 5px">\n <div class="tui-image-editor-button apply">\n '+n(["normal","active"],"apply")+"\n <label>\n "+t.localize("Apply")+"\n </label>\n </div>\n </li>\n </ul>\n"}},"./src/js/ui/template/submenu/rotate.js":
|
||
|
/*!**********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/rotate.js ***!
|
||
|
\**********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-rotate-button">\n <div class="tui-image-editor-button clockwise">\n <div>\n '+n(["normal","active"],"rotate-clockwise",!0)+'\n </div>\n <label> 30 </label>\n </div>\n <div class="tui-image-editor-button counterclockwise">\n <div>\n '+n(["normal","active"],"rotate-counterclockwise",!0)+'\n </div>\n <label> -30 </label>\n </div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">'+t.localize("Range")+'</label>\n <div class="tie-rotate-range"></div>\n <input class="tie-rotate-range-value tui-image-editor-range-value" value="0" />\n </li>\n </ul>\n'}},"./src/js/ui/template/submenu/shape.js":
|
||
|
/*!*********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/shape.js ***!
|
||
|
\*********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-shape-button">\n <div class="tui-image-editor-button rect">\n <div>\n '+n(["normal","active"],"shape-rectangle",!0)+"\n </div>\n <label> "+t.localize("Rectangle")+' </label>\n </div>\n <div class="tui-image-editor-button circle">\n <div>\n '+n(["normal","active"],"shape-circle",!0)+"\n </div>\n <label> "+t.localize("Circle")+' </label>\n </div>\n <div class="tui-image-editor-button triangle">\n <div>\n '+n(["normal","active"],"shape-triangle",!0)+"\n </div>\n <label> "+t.localize("Triangle")+' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tie-shape-color-button">\n <div class="tie-color-fill" title="'+t.localize("Fill")+'"></div>\n <div class="tie-color-stroke" title="'+t.localize("Stroke")+'"></div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">'+t.localize("Stroke")+'</label>\n <div class="tie-stroke-range"></div>\n <input class="tie-stroke-range-value tui-image-editor-range-value" value="0" />\n </li>\n </ul>\n'}},"./src/js/ui/template/submenu/text.js":
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/js/ui/template/submenu/text.js ***!
|
||
|
\********************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.locale,n=e.makeSvgIcon;return'\n <ul class="tui-image-editor-submenu-item">\n <li class="tie-text-effect-button">\n <div class="tui-image-editor-button bold">\n <div>\n '+n(["normal","active"],"text-bold",!0)+"\n </div>\n <label> "+t.localize("Bold")+' </label>\n </div>\n <div class="tui-image-editor-button italic">\n <div>\n '+n(["normal","active"],"text-italic",!0)+"\n </div>\n <label> "+t.localize("Italic")+' </label>\n </div>\n <div class="tui-image-editor-button underline">\n <div>\n '+n(["normal","active"],"text-underline",!0)+"\n </div>\n <label> "+t.localize("Underline")+' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li class="tie-text-align-button">\n <div class="tui-image-editor-button left">\n <div>\n '+n(["normal","active"],"text-align-left",!0)+"\n </div>\n <label> "+t.localize("Left")+' </label>\n </div>\n <div class="tui-image-editor-button center">\n <div>\n '+n(["normal","active"],"text-align-center",!0)+"\n </div>\n <label> "+t.localize("Center")+' </label>\n </div>\n <div class="tui-image-editor-button right">\n <div>\n '+n(["normal","active"],"text-align-right",!0)+"\n </div>\n <label> "+t.localize("Right")+' </label>\n </div>\n </li>\n <li class="tui-image-editor-partition">\n <div></div>\n </li>\n <li>\n <div class="tie-text-color" title="'+t.localize("Color")+'"></div>\n </li>\n <li class="tui-image-editor-partition only-left-right">\n <div></div>\n </li>\n <li class="tui-image-editor-newline tui-image-editor-range-wrap">\n <label class="range">'+t.localize("Text size")+'</label>\n <div class="tie-text-range"></div>\n <input class="tie-text-range-value tui-image-editor-range-value" value="0" />\n </li>\n </ul>\n'}},"./src/js/ui/text.js":
|
||
|
/*!***************************!*\
|
||
|
!*** ./src/js/ui/text.js ***!
|
||
|
\***************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(/*! @/ui/tools/range */"./src/js/ui/tools/range.js")),r=u(n(/*! @/ui/tools/colorpicker */"./src/js/ui/tools/colorpicker.js")),s=u(n(/*! @/ui/submenuBase */"./src/js/ui/submenuBase.js")),a=u(n(/*! @/ui/template/submenu/text */"./src/js/ui/template/submenu/text.js")),l=n(/*! @/util */"./src/js/util.js"),c=n(/*! @/consts */"./src/js/consts.js");function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e,n){var o=n.locale,s=n.makeSvgIcon,l=n.menuBarPosition,u=n.usageStatistics;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{locale:o,name:"text",makeSvgIcon:s,menuBarPosition:l,templateHtml:a.default,usageStatistics:u}));return d.effect={bold:!1,italic:!1,underline:!1},d.align="left",d._els={textEffectButton:d.selector(".tie-text-effect-button"),textAlignButton:d.selector(".tie-text-align-button"),textColorpicker:new r.default(d.selector(".tie-text-color"),"#ffbb3b",d.toggleDirection,d.usageStatistics),textRange:new i.default({slider:d.selector(".tie-text-range"),input:d.selector(".tie-text-range-value")},c.defaultTextRangeValues)},d.colorPickerInputBox=d._els.textColorpicker.colorpickerElement.querySelector(c.selectorNames.COLOR_PICKER_INPUT_BOX),d}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"destroy",value:function(){this._removeEvent(),this._els.textColorpicker.destroy(),this._els.textRange.destroy(),(0,l.assignmentForDestroy)(this)}},{key:"addEvent",value:function(e){var t=this._setTextEffectHandler.bind(this),n=this._setTextAlignHandler.bind(this);this.eventHandler={setTextEffect:t,setTextAlign:n},this.actions=e,this._els.textEffectButton.addEventListener("click",t),this._els.textAlignButton.addEventListener("click",n),this._els.textRange.on("change",this._changeTextRnageHandler.bind(this)),this._els.textColorpicker.on("change",this._changeColorHandler.bind(this)),this.colorPickerInputBox.addEventListener(c.eventNames.FOCUS,this._onStartEditingInputBox.bind(this)),this.colorPickerInputBox.addEventListener(c.eventNames.BLUR,this._onStopEditingInputBox.bind(this))}},{key:"_removeEvent",value:function(){var e=this.eventHandler,t=e.setTextEffect,n=e.setTextAlign;this._els.textEffectButton.removeEventListener("click",t),this._els.textAlignButton.removeEventListener("click",n),this._els.textRange.off(),this._els.textColorpicker.off(),this.colorPickerInputBox.removeEventListener(c.eventNames.FOCUS,this._onStartEditingInputBox.bind(this)),this.colorPickerInputBox.removeEventListener(c.eventNames.BLUR,this._onStopEditingInputBox.bind(this))}},{key:"changeStandbyMode",value:function(){this.actions.stopDrawingMode()}},{key:"changeStartMode",value:function(){this.actions.modeChange("text")}},{key:"setTextStyleStateOnAction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fill,n=e.fontSize,o=e.fontStyle,i=e.fontWeight,r=e.textDecoration,s=e.textAlign;this.textColor=t,this.fontSize=n,this.setEffectState("italic",o),this.setEffectState("bold",i),this.setEffectState("underline",r),this.setAlignState(s)}},{key:"setEffectState",value:function(e,t){var n="italic"===t||"bold"===t||"underline"===t,o=this._els.textEffectButton.querySelector(".tui-image-editor-button."
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/js/ui/theme/standard.js ***!
|
||
|
\*************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={"common.bi.image":"https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png","common.bisize.width":"251px","common.bisize.height":"21px","common.backgroundImage":"none","common.backgroundColor":"#1e1e1e","common.border":"0px","header.backgroundImage":"none","header.backgroundColor":"transparent","header.border":"0px","loadButton.backgroundColor":"#fff","loadButton.border":"1px solid #ddd","loadButton.color":"#222","loadButton.fontFamily":"'Noto Sans', sans-serif","loadButton.fontSize":"12px","downloadButton.backgroundColor":"#fdba3b","downloadButton.border":"1px solid #fdba3b","downloadButton.color":"#fff","downloadButton.fontFamily":"'Noto Sans', sans-serif","downloadButton.fontSize":"12px","menu.normalIcon.color":"#8a8a8a","menu.activeIcon.color":"#555555","menu.disabledIcon.color":"#434343","menu.hoverIcon.color":"#e9e9e9","submenu.normalIcon.color":"#8a8a8a","submenu.activeIcon.color":"#e9e9e9","menu.iconSize.width":"24px","menu.iconSize.height":"24px","submenu.iconSize.width":"32px","submenu.iconSize.height":"32px","submenu.backgroundColor":"#1e1e1e","submenu.partition.color":"#3c3c3c","submenu.normalLabel.color":"#8a8a8a","submenu.normalLabel.fontWeight":"lighter","submenu.activeLabel.color":"#fff","submenu.activeLabel.fontWeight":"lighter","checkbox.border":"0px","checkbox.backgroundColor":"#fff","range.pointer.color":"#fff","range.bar.color":"#666","range.subbar.color":"#d1d1d1","range.disabledPointer.color":"#414141","range.disabledBar.color":"#282828","range.disabledSubbar.color":"#414141","range.value.color":"#fff","range.value.fontWeight":"lighter","range.value.fontSize":"11px","range.value.border":"1px solid #353535","range.value.backgroundColor":"#151515","range.title.color":"#fff","range.title.fontWeight":"lighter","colorpicker.button.border":"1px solid #1e1e1e","colorpicker.title.color":"#fff"}},"./src/js/ui/theme/theme.js":
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/ui/theme/theme.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(/*! tui-code-snippet */"tui-code-snippet"),r=c(n(/*! @/ui/template/style */"./src/js/ui/template/style.js")),s=c(n(/*! @/ui/theme/standard */"./src/js/ui/theme/standard.js")),a=c(n(/*! @svg/default.svg */"./src/svg/default.svg")),l=n(/*! @/util */"./src/js/util.js");function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.styles=this._changeToObject((0,i.extend)({},s.default,t)),(0,l.styleLoad)(this._styleMaker()),this._loadDefaultSvgIcon()}return o(e,[{key:"getStyle",value:function(e){var t=null,n=e.replace(/\..+$/,""),o=this.styles[e];switch(e){case"common.bi":t=this.styles[e].image;break;case"menu.icon":t={active:this.styles[n+".activeIcon"],normal:this.styles[n+".normalIcon"],hover:this.styles[n+".hoverIcon"],disabled:this.styles[n+".disabledIcon"]};break;case"submenu.icon":t={active:this.styles[n+".activeIcon"],normal:this.styles[n+".normalIcon"]};break;case"submenu.label":t={active:this._makeCssText(this.styles[n+".activeLabel"]),normal:this._makeCssText(this.styles[n+".normalLabel"])};break;case"submenu.partition":t={vertical:this._makeCssText((0,i.extend)({},o,{borderLeft:"1px solid "+o.color})),horizontal:this._makeCssText((0,i.extend)({},o,{borderBottom:"1px solid "+o.color}))};break;case"range.disabledPointer":case"range.disabledBar":case"range.disabledSubbar":case"range.pointer":case"range.bar":case"range.subbar":o.backgroundColor=o.color,t=this._makeCssText(o);break;default:t=this._makeCssText(o)}return t}},{key:"_styleMaker",value:function(){var e=this.getStyle("submenu.label"),t=this.getStyle("submenu.partition");return(0,r.default)({subMenuLabelActive:e.active,subMenuLabelNormal:e.normal,submenuPartitionVertical:t.vertical,submenuPartitionHorizontal:t.horizontal,biSize:this.getStyle("common.bisize"),subMenuRangeTitle:this.getStyle("range.title"),submenuRangePointer:this.getStyle("range.pointer"),submenuRangeBar:this.getStyle("range.bar"),submenuRangeSubbar:this.getStyle("range.subbar"),submenuDisabledRangePointer:this.getStyle("range.disabledPointer"),submenuDisabledRangeBar:this.getStyle("range.disabledBar"),submenuDisabledRangeSubbar:this.getStyle("range.disabledSubbar"),submenuRangeValue:this.getStyle("range.value"),submenuColorpickerTitle:this.getStyle("colorpicker.title"),submenuColorpickerButton:this.getStyle("colorpicker.button"),submenuCheckbox:this.getStyle("checkbox"),menuIconSize:this.getStyle("menu.iconSize"),submenuIconSize:this.getStyle("submenu.iconSize"),menuIconStyle:this.getStyle("menu.icon"),submenuIconStyle:this.getStyle("submenu.icon")})}},{key:"_changeToObject",value:function(e){var t={};return(0,i.forEach)(e,(function(e,n){var o=n.match(/^(.+)\.([a-z]+)$/i),i=o[1],r=o[2];t[i]||(t[i]={}),t[i][r]=e})),t}},{key:"_makeCssText",value:function(e){var t=this,n=[];return(0,i.forEach)(e,(function(e,o){["backgroundImage"].indexOf(o)>-1&&"none"!==e&&(e="url("+e+")"),n.push(t._toUnderScore(o)+": "+e)})),n.join(";")}},{key:"_toUnderScore",value:function(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()}))}},{key:"_loadDefaultSvgIcon",value:function(){if(!document.getElementById("tui-image-editor-svg-default-icons")){var e=(new DOMParser).parseFromString(a.default,"text/xml");document.body.appendChild(e.documentElement)}}},{key:"_makeIconClassName",value:function(e,t){var n=(t?this.getStyle("submenu.icon"):this.getStyle("menu.icon"))[e],o=n.path,i=n.name;return o&&i?e:e+" use-default"}},{key:"_makeSvgIconPrefix",value:function(e,t){var n=(t?this.getStyle("submenu.icon"):this.getStyle("menu.icon"))[e],o=n.path,i=n.name;return o&&i?o+"#"+i+"-":"#"}},{key:"_makeSvgItem",value:function(e,t,n){v
|
||
|
/*!****************************************!*\
|
||
|
!*** ./src/js/ui/tools/colorpicker.js ***!
|
||
|
\****************************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=s(n(/*! tui-code-snippet */"tui-code-snippet")),r=s(n(/*! tui-color-picker */"tui-color-picker"));function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var l=["#000000","#2a2a2a","#545454","#7e7e7e","#a8a8a8","#d2d2d2","#ffffff","","#ff4040","#ff6518","#ffbb3b","#03bd9e","#00a9ff","#515ce6","#9e5fff","#ff5583"],c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#7e7e7e",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up",i=arguments[3];a(this,e),this.colorpickerElement=t,this.usageStatistics=i,this._show=!1,this._colorpickerElement=t,this._toggleDirection=o,this._makePickerButtonElement(n),this._makePickerLayerElement(t,t.getAttribute("title")),this._color=n,this.picker=r.default.create({container:this.pickerElement,preset:l,color:n,usageStatistics:this.usageStatistics}),this._addEvent()}return o(e,[{key:"destroy",value:function(){var e=this;this._removeEvent(),this.picker.destroy(),this.colorpickerElement.innerHTML="",i.default.forEach(this,(function(t,n){e[n]=null}))}},{key:"_changeColorElement",value:function(e){e?(this.colorElement.classList.remove("transparent"),this.colorElement.style.backgroundColor=e):(this.colorElement.style.backgroundColor="#fff",this.colorElement.classList.add("transparent"))}},{key:"_makePickerButtonElement",value:function(e){this.colorpickerElement.classList.add("tui-image-editor-button"),this.colorElement=document.createElement("div"),this.colorElement.className="color-picker-value",e?this.colorElement.style.backgroundColor=e:this.colorElement.classList.add("transparent")}},{key:"_makePickerLayerElement",value:function(e,t){var n=document.createElement("label"),o=document.createElement("div");this.pickerControl=document.createElement("div"),this.pickerControl.className="color-picker-control",this.pickerElement=document.createElement("div"),this.pickerElement.className="color-picker",n.innerHTML=t,o.className="triangle",this.pickerControl.appendChild(this.pickerElement),this.pickerControl.appendChild(o),e.appendChild(this.pickerControl),e.appendChild(this.colorElement),e.appendChild(n)}},{key:"_addEvent",value:function(){var e=this;this.picker.on("selectColor",(function(t){e._changeColorElement(t.color),e._color=t.color,e.fire("change",t.color)})),this.eventHandler={pickerToggle:this._pickerToggleEventHandler.bind(this),pickerHide:function(){return e.hide()}},this.colorpickerElement.addEventListener("click",this.eventHandler.pickerToggle),document.body.addEventListener("click",this.eventHandler.pickerHide)}},{key:"_removeEvent",value:function(){this.colorpickerElement.removeEventListener("click",this.eventHandler.pickerToggle),document.body.removeEventListener("click",this.eventHandler.pickerHide),this.picker.off()}},{key:"_pickerToggleEventHandler",value:function(e){var t=e.target,n=t&&this._isElementInColorPickerControl(t);(!n||n&&this._isPaletteButton(t))&&(this._show=!this._show,this.pickerControl.style.display=this._show?"block":"none",this._setPickerControlPosition(),this.fire("changeShow",this)),e.stopPropagation()}},{key:"_isPaletteButton",value:function(e){return"tui-colorpicker-palette-button"===e.className}},{key:"_isElementInColorPickerControl",value:function(e){for(var t=e;t!==document.body&&t;){if(t===this.pickerControl)return!0;t=t.parentNode}return!1}},{key:"hide",value:function(){this._show=!1,this.pickerControl.style.display="none"}},{key:"_setPickerControlPosition",value:function(){var e=this.pickerControl.style,t=this._colorpickerElement.clientWidth/2+2,n=this.pickerControl.offsetWidth/2-t,o=-1*(this.pickerControl.offsetHeight+10);"down"===this._toggleDirection&&(o=30),e.top=o+"px",
|
||
|
/*!**********************************!*\
|
||
|
!*** ./src/js/ui/tools/range.js ***!
|
||
|
\**********************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(/*! tui-code-snippet */"tui-code-snippet"),s=(o=r)&&o.__esModule?o:{default:o},a=n(/*! @/util */"./src/js/util.js"),l=n(/*! @/consts */"./src/js/consts.js");function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=/(-?)([0-9]*)[^0-9]*([0-9]*)/g,d=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,e),this._value=n.value||0,this.rangeElement=t.slider,this.rangeInputElement=t.input,this._drawRangeElement(),this.rangeWidth=this._getRangeWidth(),this._min=n.min||0,this._max=n.max||100,this._useDecimal=n.useDecimal,this._absMax=-1*this._min+this._max,this.realTimeEvent=n.realTimeEvent||!1,this.eventHandler={startChangingSlide:this._startChangingSlide.bind(this),stopChangingSlide:this._stopChangingSlide.bind(this),changeSlide:this._changeSlide.bind(this),changeSlideFinally:this._changeSlideFinally.bind(this),changeInput:this._changeValueWithInput.bind(this,!1),changeInputFinally:this._changeValueWithInput.bind(this,!0),changeInputWithArrow:this._changeValueWithInputKeyEvent.bind(this)},this._addClickEvent(),this._addDragEvent(),this._addInputEvent(),this.value=n.value,this.trigger("change")}return i(e,[{key:"destroy",value:function(){var e=this;this._removeClickEvent(),this._removeDragEvent(),this._removeInputEvent(),this.rangeElement.innerHTML="",s.default.forEach(this,(function(t,n){e[n]=null}))}},{key:"trigger",value:function(e){this.fire(e,this._value)}},{key:"_getRangeWidth",value:function(){var e=function(e){return(0,a.toInteger)(window.getComputedStyle(e,null).width)};return e(this.rangeElement)-e(this.pointer)}},{key:"_drawRangeElement",value:function(){this.rangeElement.classList.add("tui-image-editor-range"),this.bar=document.createElement("div"),this.bar.className="tui-image-editor-virtual-range-bar",this.subbar=document.createElement("div"),this.subbar.className="tui-image-editor-virtual-range-subbar",this.pointer=document.createElement("div"),this.pointer.className="tui-image-editor-virtual-range-pointer",this.bar.appendChild(this.subbar),this.bar.appendChild(this.pointer),this.rangeElement.appendChild(this.bar)}},{key:"_addInputEvent",value:function(){this.rangeInputElement&&(this.rangeInputElement.addEventListener("keydown",this.eventHandler.changeInputWithArrow),this.rangeInputElement.addEventListener("keyup",this.eventHandler.changeInput),this.rangeInputElement.addEventListener("blur",this.eventHandler.changeInputFinally))}},{key:"_removeInputEvent",value:function(){this.rangeInputElement&&(this.rangeInputElement.removeEventListener("keydown",this.eventHandler.changeInputWithArrow),this.rangeInputElement.removeEventListener("keyup",this.eventHandler.changeInput),this.rangeInputElement.removeEventListener("blur",this.eventHandler.changeInputFinally))}},{key:"_changeValueWithInputKeyEvent",value:function(e){var t=e.keyCode,n=e.target;if(!([l.keyCodes.ARROW_UP,l.keyCodes.ARROW_DOWN].indexOf(t)<0)){var o=Number(n.value);if(!((o=this._valueUpDownForKeyEvent(o,t))<this._min||o>this._max)){var i=(0,a.clamp)(o,this._min,this.max);this.value=i,this.fire("change",i,!1)}}}},{key:"_valueUpDownForKeyEvent",value:function(e,t){var n=this._useDecimal?.1:1;return t===l.keyCodes.ARROW_UP?e+=n:t===l.keyCodes.ARROW_DOWN&&(e-=n),e}},{key:"_changeValueWithInput",value:function(e,t){var n=t.keyCode,o=t.target;if(!([l.keyCodes.ARROW_UP,l.keyCodes.ARROW_DOWN].indexOf(n)>=0)){var i=this._filterForInputText(o.value),r=!i||isNaN(i);if(o.value=i,!r){var s=this._useDecimal?Number(i):(0,a.toInteger)(i);s=(0,a.clamp)(s,this._min,this.max),this.value=s,this.fire("change",s,e)}}}},{key:"_addClickEvent",value:function(){this.rangeElement.addEventListener("click",this.eventHandler.changeSlideFinally)}}
|
||
|
/*!************************!*\
|
||
|
!*** ./src/js/util.js ***!
|
||
|
\************************/
|
||
|
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Promise=void 0,t.clamp=function(e,t,n){if(t>n){var o=[n,t];t=o[0],n=o[1]}return u(t,c(e,n))},t.keyMirror=function(){for(var e={},t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return(0,i.forEach)(n,(function(t){e[t]=t})),e},t.makeStyleText=function(e){var t="";return(0,i.forEach)(e,(function(e,n){t+=n+": "+e+";"})),t},t.getProperties=function(e,t){var n={},o=t.length,i=0,r=void 0;for(i=0;i<o;i+=1)r=t[i],n[r]=e[r];return n},t.toInteger=function(e){return parseInt(e,10)},t.toCamelCase=function(e){return e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))},t.isSupportFileApi=function(){return!!(window.File&&window.FileList&&window.FileReader)},t.getRgb=function(e,t){4===e.length&&(e=""+e+e.slice(1,4));var n=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba("+n+", "+o+", "+i+", "+(t||1)+")"},t.sendHostName=function(){if(d)return;d=!0,(0,i.sendHostname)("image-editor","UA-129999381-1")},t.styleLoad=function(e,t){var n=document.getElementsByTagName("head")[0],o=document.createElement("link"),i=encodeURIComponent(e);t&&(o.id=t);o.setAttribute("rel","stylesheet"),o.setAttribute("type","text/css"),o.setAttribute("href","data:text/css;charset=UTF-8,"+i),n.appendChild(o)},t.getSelector=function(e){return function(t){return e.querySelector(t)}},t.base64ToBlob=function(e){var t="",n=void 0,o=void 0,i=void 0;n=e.replace(/data:(image\/.+);base64,/,(function(e,n){return t=n,""}));var r=(n=atob(n)).length;for(o=new Uint8Array(r),i=0;i<r;i+=1)o[i]=n.charCodeAt(i);return new Blob([o],{type:t})},t.fixFloatingPoint=function(e){return Number(e.toFixed(2))},t.assignmentForDestroy=function(e){(0,i.forEach)(e,(function(t,n){e[n]=null}))},t.cls=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("."===e.charAt(0))return"."+l+t+e.slice(1);return""+l+t+e},t.changeOrigin=function(e,t){var n=t.originX,o=t.originY,i=e.getPointByOrigin(n,o),r=i.x,s=i.y;e.set({left:r,top:s,originX:n,originY:o}),e.setCoords()},t.flipObject=function(e){var t={};return Object.keys(e).forEach((function(n){t[e[n]]=n})),t},t.setCustomProperty=function(e,t){e.customProps=e.customProps||{},(0,i.extend)(e.customProps,t)},t.getCustomProperty=function(e,t){var n={};(0,i.isString)(t)&&(t=[t]);return(0,i.forEach)(t,(function(t){n[t]=e.customProps[t]})),n},t.capitalizeString=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.includes=h,t.getFillTypeFromOption=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.pick)(e,"type")||a.SHAPE_FILL_TYPE.COLOR},t.getFillTypeFromObject=function(e){var t=e.fill;if((void 0===t?{}:t).source)return a.SHAPE_FILL_TYPE.FILTER;return a.SHAPE_FILL_TYPE.COLOR},t.isShape=function(e){return(0,i.inArray)(e.get("type"),a.SHAPE_TYPE)>=0},t.getObjectType=function(e){if(h(a.SHAPE_TYPE,e))return"Shape";switch(e){case"i-text":return"Text";case"path":case"line":return"Draw";case"activeSelection":return"Group";default:return p(e)}},t.isSilentCommand=function(e){var t=a.commandNames.LOAD_IMAGE;return"string"==typeof e?t===e:t===e.name},t.getHistoryTitle=function(e){var t=a.commandNames.FLIP_IMAGE,n=a.commandNames.ROTATE_IMAGE,o=a.commandNames.ADD_TEXT,i=a.commandNames.APPLY_FILTER,r=a.commandNames.REMOVE_FILTER,s=a.commandNames.CHANGE_SHAPE,l=a.commandNames.CHANGE_ICON_COLOR,c=a.commandNames.CHANGE_TEXT_STYLE,u=a.commandNames.CLEAR_OBJECTS,d=a.commandNames.ADD_IMAGE_OBJECT,h=a.commandNames.REMOVE_OBJECT,p=e.name,m=e.args,v=void 0;switch(p){case t:v={name:p,detail:"reset"===m[1]?m[1]:m[1].slice(4)};break;case n:v={name:p,detail:m[2]};break;case i:v={name:a.historyNames.APPLY_FILTER,detail:f(m[1],m[2])};break;case r:v={name:a.historyNames.REMOVE_FILTER,detail:"Remove"};break;case s:v={name:a.historyNames.CHANGE_SHAPE,detail:"Change"};break;case l:v={name:a.historyNames.CHANGE_ICON_COLOR,detail:"Change"};break;case c:v={name:a.historyNames.CHANGE_TEXT_STYLE,detail:"Ch
|
||
|
/*!*****************************!*\
|
||
|
!*** ./src/svg/default.svg ***!
|
||
|
\*****************************/
|
||
|
/*! no static exports found */function(e,t){e.exports='<svg display="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs id="tui-image-editor-svg-default-icons"><symbol id="ic-apply" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" stroke="none" fill="none"></path><path fill="none" stroke="inherit" d="M4 12.011l5 5L20.011 6"></path></symbol><symbol id="ic-cancel" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none" stroke="none"></path><path fill="none" stroke="inherit" d="M6 6l12 12M18 6L6 18"></path></symbol><symbol id="ic-crop" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" stroke="none" fill="none"></path><path stroke="none" fill="inherit" d="M4 0h1v20a1 1 0 0 1-1-1V0zM20 17h-1V5h1v12zm0 2v5h-1v-5h1z"></path><path stroke="none" fill="inherit" d="M5 19h19v1H5zM4.762 4v1H0V4h4.762zM7 4h12a1 1 0 0 1 1 1H7V4z"></path></symbol><symbol id="ic-delete-all" viewBox="0 0 24 24"><path stroke="none" fill="inherit" d="M5 23H3a1 1 0 0 1-1-1V6h1v16h2v1zm16-10h-1V6h1v7zM9 13H8v-3h1v3zm3 0h-1v-3h1v3zm3 0h-1v-3h1v3zM14.794 3.794L13 2h-3L8.206 3.794A.963.963 0 0 1 8 2.5l.703-1.055A1 1 0 0 1 9.535 1h3.93a1 1 0 0 1 .832.445L15 2.5a.965.965 0 0 1-.206 1.294zM14.197 4H8.803h5.394z"></path><path stroke="none" fill="inherit" d="M0 3h23v1H0zM11.286 21H8.714L8 23H7l1-2.8V20h.071L9.5 16h1l1.429 4H12v.2l1 2.8h-1l-.714-2zm-.357-1L10 17.4 9.071 20h1.858zM20 22h3v1h-4v-7h1v6zm-5 0h3v1h-4v-7h1v6z"></path></symbol><symbol id="ic-delete" viewBox="0 0 24 24"><path stroke="none" fill="inherit" d="M3 6v16h17V6h1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6h1zM14.794 3.794L13 2h-3L8.206 3.794A.963.963 0 0 1 8 2.5l.703-1.055A1 1 0 0 1 9.535 1h3.93a1 1 0 0 1 .832.445L15 2.5a.965.965 0 0 1-.206 1.294zM14.197 4H8.803h5.394z"></path><path stroke="none" fill="inherit" d="M0 3h23v1H0zM8 10h1v6H8v-6zm3 0h1v6h-1v-6zm3 0h1v6h-1v-6z"></path></symbol><symbol id="ic-draw-free" viewBox="0 0 32 32"><path fill="none" stroke="inherit" d="M2.5 20.929C2.594 10.976 4.323 6 7.686 6c5.872 0 2.524 19 7.697 19s1.89-14.929 6.414-14.929 1.357 10.858 5.13 10.858c1.802 0 2.657-2.262 2.566-6.786"></path></symbol><symbol id="ic-draw-line" viewBox="0 0 32 32"><path fill="none" stroke="inherit" d="M2 15.5h28"></path></symbol><symbol id="ic-draw" viewBox="0 0 24 24"><path fill="none" stroke="inherit" d="M2.5 21.5H5c.245 0 .48-.058.691-.168l.124-.065.14.01c.429.028.85-.127 1.16-.437L22.55 5.405a.5.5 0 0 0 0-.707l-3.246-3.245a.5.5 0 0 0-.707 0L3.162 16.888a1.495 1.495 0 0 0-.437 1.155l.01.14-.065.123c-.111.212-.17.448-.17.694v2.5z"></path><path stroke="none" fill="inherit" d="M16.414 3.707l3.89 3.89-.708.706-3.889-3.889z"></path></symbol><symbol id="ic-filter" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none" stroke="none"></path><path stroke="none" fill="inherit" d="M12 7v1H2V7h10zm6 0h4v1h-4V7zM12 16v1h10v-1H12zm-6 0H2v1h4v-1z"></path><path stroke="none" fill="inherit" d="M8.5 20a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM15.5 11a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z"></path></symbol><symbol id="ic-flip-reset" viewBox="0 0 31 32"><path fill="none" stroke="none" d="M31 0H0v32h31z"></path><path stroke="none" fill="inherit" d="M28 16a8 8 0 0 1-8 8H3v-1h1v-7H3a8 8 0 0 1 8-8h17v1h-1v7h1zM11 9a7 7 0 0 0-7 7v7h16a7 7 0 0 0 7-7V9H11z"></path><path fill="none" stroke="inherit" stroke-linecap="square" d="M24 5l3.5 3.5L24 12M7 20l-3.5 3.5L7 27"></path></symbol><symbol id="ic-flip-x" viewBox="0 0 32 32"><path fill="none" stroke="none" d="M32 32H0V0h32z"></path><path stroke="none" fill="inherit" d="M17 32h-1V0h1zM27.167 11l.5 3h-1.03l-.546-3h1.076zm-.5-3h-1.122L25 5h-5V4h5.153a1 1 0 0 1 .986.836L26.667 8zm1.5 9l.5 3h-.94l-.545-3h.985zm1 6l.639 3.836A1 1 0 0 1 28.819 28H26v-1h3l-.726-4h.894zM23 28h-3v-1h3v1zM13 4v1H7L3 27h10v1H3.18a1 1 0 0 1-.986-1.164l3.666-22A1 1 0 0 1 6.847 4H13z"></path></symbol><symbol id="ic-flip-y" viewBox="0 0 32 32"><path fill="none" stroke="none" d="M0 0v32h32V0z"></path><path stroke="none" fill="inherit" d="M0 16v1h32v-1zM11 27.167l3 .5v-1.03l-3-.546v1.076zm-3-.5v-1.122L
|
||
|
/*!****************************************************************************************************************!*\
|
||
|
!*** external {"commonjs":["fabric","fabric"],"commonjs2":["fabric","fabric"],"amd":"fabric","root":"fabric"} ***!
|
||
|
\****************************************************************************************************************/
|
||
|
/*! no static exports found */function(t,n){t.exports=e},"tui-code-snippet":
|
||
|
/*!******************************************************************************************************************************!*\
|
||
|
!*** external {"commonjs":"tui-code-snippet","commonjs2":"tui-code-snippet","amd":"tui-code-snippet","root":["tui","util"]} ***!
|
||
|
\******************************************************************************************************************************/
|
||
|
/*! no static exports found */function(e,n){e.exports=t},"tui-color-picker":
|
||
|
/*!*************************************************************************************************************************************!*\
|
||
|
!*** external {"commonjs":"tui-color-picker","commonjs2":"tui-color-picker","amd":"tui-color-picker","root":["tui","colorPicker"]} ***!
|
||
|
\*************************************************************************************************************************************/
|
||
|
/*! no static exports found */function(e,t){e.exports=n}})}));
|