diff --git a/dist/editor.js b/dist/editor.js index e044d771..20d20a5b 100644 --- a/dist/editor.js +++ b/dist/editor.js @@ -9,8 +9,20824 @@ * @uses html-janitor * @licence Apache-2.0 (https://github.com/guardian/html-janitor/blob/master/LICENSE) */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.EditorJS=e():t.EditorJS=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=162)}([function(t,e,n){var o=n(9),r=n(17),i=n(22),a=n(19),s=n(32),c=function(t,e,n){var l,u,f,d,p=t&c.F,h=t&c.G,v=t&c.S,g=t&c.P,y=t&c.B,b=h?o:v?o[e]||(o[e]={}):(o[e]||{}).prototype,k=h?r:r[e]||(r[e]={}),m=k.prototype||(k.prototype={});for(l in h&&(n=e),n)f=((u=!p&&b&&void 0!==b[l])?b:n)[l],d=y&&u?s(f,o):g&&"function"==typeof f?s(Function.call,f):f,b&&a(b,l,f,t&c.U),k[l]!=f&&i(k,l,d),g&&m[l]!=f&&(m[l]=f)};o.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=document.createElement(t);for(var a in Array.isArray(n)?(e=r.classList).add.apply(e,(0,i.default)(n)):n&&r.classList.add(n),o)o.hasOwnProperty(a)&&(r[a]=o[a]);return r}},{key:"text",value:function(t){return document.createTextNode(t)}},{key:"svg",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14,o=document.createElementNS("http://www.w3.org/2000/svg","svg");return o.classList.add("icon","icon--"+t),o.setAttribute("width",e+"px"),o.setAttribute("height",n+"px"),o.innerHTML=''),o}},{key:"append",value:function(t,e){Array.isArray(e)?e.forEach(function(e){return t.appendChild(e)}):t.appendChild(e)}},{key:"prepend",value:function(t,e){Array.isArray(e)?(e=e.reverse()).forEach(function(e){return t.prepend(e)}):t.prepend(e)}},{key:"swap",value:function(t,e){var n=document.createElement("div"),o=t.parentNode;o.insertBefore(n,t),o.insertBefore(t,e),o.insertBefore(e,n),o.removeChild(n)}},{key:"find",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelector(e)}},{key:"get",value:function(t){return document.getElementById(t)}},{key:"findAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelectorAll(e)}},{key:"getDeepestNode",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=n?"lastChild":"firstChild",r=n?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[o]){var i=e[o];if(t.isSingleTag(i)&&!t.isNativeInput(i)&&!t.isLineBreakTag(i))if(i[r])i=i[r];else{if(!i.parentNode[r])return i.parentNode;i=i.parentNode[r]}return this.getDeepestNode(i,n)}return e}},{key:"isElement",value:function(t){return t&&"object"===(0,r.default)(t)&&t.nodeType&&t.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(t){return t&&"object"===(0,r.default)(t)&&t.nodeType&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(t){return"true"===t.contentEditable}},{key:"isNativeInput",value:function(t){return!(!t||!t.tagName)&&["INPUT","TEXTAREA"].includes(t.tagName)}},{key:"canSetCaret",value:function(e){var n=!0;if(t.isNativeInput(e)){var o=e;switch(o.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}}else n=t.isContentEditable(e);return n}},{key:"isNodeEmpty",value:function(t){return!(this.isSingleTag(t)&&!this.isLineBreakTag(t))&&0===(this.isElement(t)&&this.isNativeInput(t)?t.value:t.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(t){return!!t&&0===t.childNodes.length}},{key:"isEmpty",value:function(t){var e=this,n=[],o=[];if(!t)return!0;if(!t.childNodes.length)return this.isNodeEmpty(t);for(n.push(t.firstChild);n.length>0;)if(t=n.shift()){for(this.isLeaf(t)?o.push(t):n.push(t.firstChild);t&&t.nextSibling;)(t=t.nextSibling)&&n.push(t);if(t&&!this.isNodeEmpty(t))return!1}return o.every(function(t){return e.isNodeEmpty(t)})}},{key:"isHTMLString",value:function(e){var n=t.make("div");return n.innerHTML=e,n.childElementCount>0}},{key:"getContentLength",value:function(e){return t.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}},{key:"containsOnlyInlineElements",value:function(e){var n;return"string"==typeof e?(n=document.createElement("div")).innerHTML=e:n=e,Array.from(n.children).every(function e(n){return!t.blockElements.includes(n.tagName.toLowerCase())&&Array.from(n.children).every(e)})}},{key:"getDeepestBlockElements",value:function(e){return t.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce(function(e,n){return[].concat((0,i.default)(e),(0,i.default)(t.getDeepestBlockElements(n)))},[])}},{key:"leafNodesAndReturnIndex",value:function(e,n,o,r){return-1===n?n="right"===o?-1:0:e[n].classList.remove(r),n="right"===o?(n+1)%e.length:(e.length+n-1)%e.length,t.isNativeInput(e[n])&&e[n].focus(),e[n].classList.add(r),n}},{key:"getHolder",value:function(t){return"string"==typeof t?document.getElementById(t):t}},{key:"blockElements",get:function(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tr","tfoot","ul","video"]}}]),t}();o.default=l,l.displayName="Dom",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(341),n(26),n(27),n(1),n(2),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c),l=u(l);var f=function(){function t(){(0,s.default)(this,t)}var e;return(0,c.default)(t,null,[{key:"log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"color: inherit";if("console"in window&&window.console[e]){var r="Editor.js ".concat("2.15.0"),i="line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;";try{["time","timeEnd"].includes(e)?console[e]("( ".concat(r," ) ").concat(t)):n?console[e]("%c".concat(r,"%c ").concat(t," %o"),i,o,n):console[e]("%c".concat(r,"%c ").concat(t),i,o)}catch(t){}}}},{key:"isPrintableKey",value:function(t){return t>47&&t<58||32===t||13===t||t>64&&t<91||t>95&&t<112||t>185&&t<193||t>218&&t<223}},{key:"sequence",value:(e=(0,a.default)(i.default.mark(function t(e){var n,o,r,s,c=arguments;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=function(){return(s=(0,a.default)(i.default.mark(function t(e,n,o){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.function(e.data);case 3:return t.next=5,n(void 0!==e.data?e.data:{});case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),o(void 0!==e.data?e.data:{});case 10:case"end":return t.stop()}},t,null,[[0,7]])}))).apply(this,arguments)},r=function(t,e,n){return s.apply(this,arguments)},n=c.length>1&&void 0!==c[1]?c[1]:function(){},o=c.length>2&&void 0!==c[2]?c[2]:function(){},t.next=6,e.reduce(function(){var t=(0,a.default)(i.default.mark(function t(e,a){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return t.abrupt("return",r(a,n,o));case 3:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}(),Promise.resolve());case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}},t)})),function(t){return e.apply(this,arguments)})},{key:"array",value:function(t){return Array.prototype.slice.call(t)}},{key:"isFunction",value:function(t){return"function"==typeof t}},{key:"isClass",value:function(t){return"function"==typeof t&&/^\s*class\s+/.test(t.toString())}},{key:"isEmpty",value:function(t){return!t||0===Object.keys(t).length&&t.constructor===Object}},{key:"isPromise",value:function(t){return Promise.resolve(t)===t}},{key:"delay",value:function(t,e){return function(){var n=this,o=arguments;window.setTimeout(function(){return t.apply(n,o)},e)}}},{key:"getFileExtension",value:function(t){return t.name.split(".").pop()}},{key:"isValidMimeType",value:function(t){return/^[-\w]+\/([-+\w]+|\*)$/.test(t)}},{key:"debounce",value:function(t,e,n){var o,r=this,i=arguments;return function(){var a=r,s=i,c=n&&!o;window.clearTimeout(o),o=window.setTimeout(function(){o=null,n||t.apply(a,s)},e),c&&t.apply(a,s)}}},{key:"copyTextToClipboard",value:function(t){var e=l.default.make("div","codex-editor-clipboard",{innerHTML:t});document.body.appendChild(e);var n=window.getSelection(),o=document.createRange();o.selectNode(e),window.getSelection().removeAllRanges(),n.addRange(o),document.execCommand("copy"),document.body.removeChild(e)}},{key:"getUserOS",value:function(){var t={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(t).find(function(t){return-1!==navigator.appVersion.toLowerCase().indexOf(t)});return e?(t[e]=!0,t):t}},{key:"capitalize",value:function(t){return t[0].toUpperCase()+t.slice(1)}},{key:"deepMerge",value:function(e){for(var n=function(e){return e&&"object"===t.typeof(e)},o=arguments.length,i=new Array(o>1?o-1:0),a=1;a0?r(o(t),9007199254740991):0}},function(t,e,n){var o=n(9),r=n(22),i=n(21),a=n(41)("src"),s=Function.toString,c=(""+s).split("toString");n(17).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(i(n,"name")||r(n,"name",e)),t[e]!==n&&(l&&(i(n,a)||r(n,a,t[e]?""+t[e]:c.join(String(e)))),t===o?t[e]=n:s?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,n){var o=n(0),r=n(8),i=n(35),a=/"/g,s=function(t,e,n,o){var r=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(o).replace(a,""")+'"'),s+">"+r+""};t.exports=function(t,e){var n={};n[t]=e(s),o(o.P+o.F*r(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(15),r=n(40);t.exports=n(16)?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(56),r=n(35);t.exports=function(t){return o(r(t))}},function(t,e,n){var o=n(35);t.exports=function(t){return Object(o(t))}},function(t,e,n){"use strict";var o=n(8);t.exports=function(t,e){return!!t&&o(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){t.exports=n(337)},function(t,e){function n(t,e,n,o,r,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(o,r)}t.exports=function(t){return function(){var e=this,o=arguments;return new Promise(function(r,i){var a=t.apply(e,o);function s(t){n(a,r,i,s,c,"next",t)}function c(t){n(a,r,i,s,c,"throw",t)}s(void 0)})}}},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(14),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a,s){"use strict";var c=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),a=c(a),s=c(s);var l=function(){function t(){(0,r.default)(this,t),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}return(0,i.default)(t,[{key:"removeFakeBackground",value:function(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}},{key:"setFakeBackground",value:function(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}},{key:"save",value:function(){this.savedSelectionRange=t.range}},{key:"restore",value:function(){if(this.savedSelectionRange){var t=window.getSelection();t.removeAllRanges(),t.addRange(this.savedSelectionRange)}}},{key:"clearSaved",value:function(){this.savedSelectionRange=null}},{key:"collapseToEnd",value:function(){var t=window.getSelection(),e=document.createRange();e.selectNodeContents(t.focusNode),e.collapse(!1),t.removeAllRanges(),t.addRange(e)}},{key:"findParentTag",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=window.getSelection(),r=null;if(!o||!o.anchorNode||!o.focusNode)return null;var i=[o.anchorNode,o.focusNode];return i.forEach(function(o){for(var i=n;i>0&&o.parentNode&&(o.tagName!==t||(r=o,e&&o.classList&&!o.classList.contains(e)&&(r=null),!r));)o=o.parentNode,i--}),r}},{key:"expandToTag",value:function(t){var e=window.getSelection();e.removeAllRanges();var n=document.createRange();n.selectNodeContents(t),e.addRange(n)}}],[{key:"almostAllSelected",value:function(e){var n=t.range;if(!n)return!1;var o=n.cloneContents(),r=e.length,i=o.textContent.length;return i/r>.85}},{key:"get",value:function(){return window.getSelection()}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var t=window.getSelection();return t?t.anchorNode:null}},{key:"anchorElement",get:function(){var t=window.getSelection();if(!t)return null;var e=t.anchorNode;return e?s.default.isElement(e)?e:e.parentElement:null}},{key:"anchorOffset",get:function(){var t=window.getSelection();return t?t.anchorOffset:null}},{key:"isCollapsed",get:function(){var t=window.getSelection();return t?t.isCollapsed:null}},{key:"isAtEditor",get:function(){var e=t.get(),n=e.anchorNode||e.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&(o=n.closest(".".concat(t.CSS.editorZone))),o&&o.nodeType===Node.ELEMENT_NODE}},{key:"range",get:function(){var t=window.getSelection();return t&&t.rangeCount?t.getRangeAt(0):null}},{key:"rect",get:function(){var t,e=document.selection,n={x:0,y:0,width:0,height:0};if(e&&"Control"!==e.type)return t=(e=e).createRange(),n.x=t.boundingLeft,n.y=t.boundingTop,n.width=t.boundingWidth,n.height=t.boundingHeight,n;if(!window.getSelection)return a.default.log("Method window.getSelection is not supported","warn"),n;if(null===(e=window.getSelection()).rangeCount||isNaN(e.rangeCount))return a.default.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if((t=e.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=t.getBoundingClientRect()),0===n.x&&0===n.y){var o=document.createElement("span");if(o.getBoundingClientRect){o.appendChild(document.createTextNode("​")),t.insertNode(o),n=o.getBoundingClientRect();var r=o.parentNode;r.removeChild(o),r.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}}]),t}();o.default=l,l.displayName="SelectionUtils",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o=n(57),r=n(40),i=n(23),a=n(38),s=n(21),c=n(99),l=Object.getOwnPropertyDescriptor;e.f=n(16)?l:function(t,e){if(t=i(t),e=a(e,!0),c)try{return l(t,e)}catch(t){}if(s(t,e))return r(!o.f.call(t,e),t[e])}},function(t,e,n){var o=n(0),r=n(17),i=n(8);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],a={};a[t]=e(n),o(o.S+o.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var o=n(32),r=n(56),i=n(24),a=n(18),s=n(257);t.exports=function(t,e){var n=1==t,c=2==t,l=3==t,u=4==t,f=6==t,d=5==t||f,p=e||s;return function(e,s,h){for(var v,g,y=i(e),b=r(y),k=o(s,h,3),m=a(b.length),x=0,S=n?p(e,m):c?p(e,0):void 0;m>x;x++)if((d||x in b)&&(g=k(v=b[x],x,y),t))if(n)S[x]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:S.push(v)}else if(u)return!1;return f?-1:l||u?u:S}}},function(t,e,n){var o=n(33);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,r){return t.call(e,n,o,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){"use strict";if(n(16)){var o=n(42),r=n(9),i=n(8),a=n(0),s=n(69),c=n(97),l=n(32),u=n(52),f=n(40),d=n(22),p=n(53),h=n(36),v=n(18),g=n(124),y=n(44),b=n(38),k=n(21),m=n(61),x=n(10),S=n(24),w=n(90),E=n(45),T=n(47),B=n(46).f,C=n(92),_=n(41),I=n(12),O=n(31),N=n(59),M=n(66),L=n(94),A=n(49),P=n(63),R=n(51),j=n(93),F=n(116),D=n(15),U=n(29),z=D.f,H=U.f,W=r.RangeError,X=r.TypeError,Y=r.Uint8Array,G=Array.prototype,V=c.ArrayBuffer,K=c.DataView,Z=O(0),q=O(2),J=O(3),$=O(4),Q=O(5),tt=O(6),et=N(!0),nt=N(!1),ot=L.values,rt=L.keys,it=L.entries,at=G.lastIndexOf,st=G.reduce,ct=G.reduceRight,lt=G.join,ut=G.sort,ft=G.slice,dt=G.toString,pt=G.toLocaleString,ht=I("iterator"),vt=I("toStringTag"),gt=_("typed_constructor"),yt=_("def_constructor"),bt=s.CONSTR,kt=s.TYPED,mt=s.VIEW,xt=O(1,function(t,e){return Bt(M(t,t[yt]),e)}),St=i(function(){return 1===new Y(new Uint16Array([1]).buffer)[0]}),wt=!!Y&&!!Y.prototype.set&&i(function(){new Y(1).set({})}),Et=function(t,e){var n=h(t);if(n<0||n%e)throw W("Wrong offset!");return n},Tt=function(t){if(x(t)&&kt in t)return t;throw X(t+" is not a typed array!")},Bt=function(t,e){if(!(x(t)&> in t))throw X("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return _t(M(t,t[yt]),e)},_t=function(t,e){for(var n=0,o=e.length,r=Bt(t,o);o>n;)r[n]=e[n++];return r},It=function(t,e,n){z(t,e,{get:function(){return this._d[n]}})},Ot=function(t){var e,n,o,r,i,a,s=S(t),c=arguments.length,u=c>1?arguments[1]:void 0,f=void 0!==u,d=C(s);if(null!=d&&!w(d)){for(a=d.call(s),o=[],e=0;!(i=a.next()).done;e++)o.push(i.value);s=o}for(f&&c>2&&(u=l(u,arguments[2],2)),e=0,n=v(s.length),r=Bt(this,n);n>e;e++)r[e]=f?u(s[e],e):s[e];return r},Nt=function(){for(var t=0,e=arguments.length,n=Bt(this,e);e>t;)n[t]=arguments[t++];return n},Mt=!!Y&&i(function(){pt.call(new Y(1))}),Lt=function(){return pt.apply(Mt?ft.call(Tt(this)):Tt(this),arguments)},At={copyWithin:function(t,e){return F.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return j.apply(Tt(this),arguments)},filter:function(t){return Ct(this,q(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return lt.apply(Tt(this),arguments)},lastIndexOf:function(t){return at.apply(Tt(this),arguments)},map:function(t){return xt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Tt(this),arguments)},reduceRight:function(t){return ct.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(this).length,n=Math.floor(e/2),o=0;o1?arguments[1]:void 0)},sort:function(t){return ut.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),o=n.length,r=y(t,o);return new(M(n,n[yt]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,v((void 0===e?o:y(e,o))-r))}},Pt=function(t,e){return Ct(this,ft.call(Tt(this),t,e))},Rt=function(t){Tt(this);var e=Et(arguments[1],1),n=this.length,o=S(t),r=v(o.length),i=0;if(r+e>n)throw W("Wrong length!");for(;i255?255:255&o),r.v[p](n*e+r.o,o,St)}(this,n,t)},enumerable:!0})};k?(h=n(function(t,n,o,r){u(t,h,l,"_d");var i,a,s,c,f=0,p=0;if(x(n)){if(!(n instanceof V||"ArrayBuffer"==(c=m(n))||"SharedArrayBuffer"==c))return kt in n?_t(h,n):Ot.call(h,n);i=n,p=Et(o,e);var y=n.byteLength;if(void 0===r){if(y%e)throw W("Wrong length!");if((a=y-p)<0)throw W("Wrong length!")}else if((a=v(r)*e)+p>y)throw W("Wrong length!");s=a/e}else s=g(n),i=new V(a=s*e);for(d(t,"_d",{b:i,o:p,l:a,e:s,v:new K(i)});fdocument.F=Object<\/script>"),t.close(),c=t.F;o--;)delete c.prototype[i[o]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=o(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:r(n,e)}},function(t,e,n){var o=n(101),r=n(77).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,r)}},function(t,e,n){var o=n(21),r=n(24),i=n(76)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),o(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var o=n(15).f,r=n(21),i=n(12)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&o(t,i,{configurable:!0,value:e})}},function(t,e){t.exports={}},function(t,e,n){var o=n(12)("unscopables"),r=Array.prototype;null==r[o]&&n(22)(r,o,{}),t.exports=function(t){r[o][t]=!0}},function(t,e,n){"use strict";var o=n(9),r=n(15),i=n(16),a=n(12)("species");t.exports=function(t){var e=o[t];i&&e&&!e[a]&&r.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,o){if(!(t instanceof e)||void 0!==o&&o in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var o=n(19);t.exports=function(t,e,n){for(var r in e)o(t,r,e[r],n);return t}},function(t,e,n){var o=n(10);t.exports=function(t,e){if(!o(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=o=function(t){return n(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(e)}t.exports=o},function(t,e,n){var o=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var o=n(330),r=n(331),i=n(332);t.exports=function(t,e){return o(t)||r(t,e)||i()}},function(t,e,n){var o=n(23),r=n(18),i=n(44);t.exports=function(t){return function(e,n,a){var s,c=o(e),l=r(c.length),u=i(a,l);if(t&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var o=n(34),r=n(12)("toStringTag"),i="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:i?o(e):"Object"==(a=o(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var o=n(0),r=n(35),i=n(8),a=n(81),s="["+a+"]",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),u=function(t,e,n){var r={},s=i(function(){return!!a[t]()||"​…"!="​…"[t]()}),c=r[t]=s?e(f):a[t];n&&(r[n]=c),o(o.P+o.F*s,"String",r)},f=u.trim=function(t,e){return t=String(r(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(l,"")),t};t.exports=u},function(t,e,n){var o=n(12)("iterator"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var i=[7],a=i[o]();a.next=function(){return{done:n=!0}},i[o]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var o=n(22),r=n(19),i=n(8),a=n(35),s=n(12);t.exports=function(t,e,n){var c=s(t),l=n(a,c,""[t]),u=l[0],f=l[1];i(function(){var e={};return e[c]=function(){return 7},7!=""[t](e)})&&(r(String.prototype,t,u),o(RegExp.prototype,c,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,n){var o=n(32),r=n(114),i=n(90),a=n(11),s=n(18),c=n(92),l={},u={};(e=t.exports=function(t,e,n,f,d){var p,h,v,g,y=d?function(){return t}:c(t),b=o(n,f,e?2:1),k=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(p=s(t.length);p>k;k++)if((g=e?b(a(h=t[k])[0],h[1]):b(t[k]))===l||g===u)return g}else for(v=y.call(t);!(h=v.next()).done;)if((g=r(v,b,h.value,e))===l||g===u)return g}).BREAK=l,e.RETURN=u},function(t,e,n){var o=n(11),r=n(33),i=n(12)("species");t.exports=function(t,e){var n,a=o(t).constructor;return void 0===a||null==(n=o(a)[i])?e:r(n)}},function(t,e,n){var o=n(9).navigator;t.exports=o&&o.userAgent||""},function(t,e,n){"use strict";var o=n(9),r=n(0),i=n(19),a=n(53),s=n(39),c=n(65),l=n(52),u=n(10),f=n(8),d=n(63),p=n(48),h=n(82);t.exports=function(t,e,n,v,g,y){var b=o[t],k=b,m=g?"set":"add",x=k&&k.prototype,S={},w=function(t){var e=x[t];i(x,t,"delete"==t?function(t){return!(y&&!u(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!u(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof k&&(y||x.forEach&&!f(function(){(new k).entries().next()}))){var E=new k,T=E[m](y?{}:-0,1)!=E,B=f(function(){E.has(1)}),C=d(function(t){new k(t)}),_=!y&&f(function(){for(var t=new k,e=5;e--;)t[m](e,e);return!t.has(-0)});C||((k=e(function(e,n){l(e,k,t);var o=h(new b,e,k);return null!=n&&c(n,g,o[m],o),o})).prototype=x,x.constructor=k),(B||_)&&(w("delete"),w("has"),g&&w("get")),(_||T)&&w(m),y&&x.clear&&delete x.clear}else k=v.getConstructor(e,t,g,m),a(k.prototype,n),s.NEED=!0;return p(k,t),S[t]=k,r(r.G+r.W+r.F*(k!=b),S),y||v.setStrong(k,t,g),k}},function(t,e,n){for(var o,r=n(9),i=n(22),a=n(41),s=a("typed_array"),c=a("view"),l=!(!r.ArrayBuffer||!r.DataView),u=l,f=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(o=r[d[f++]])?(i(o.prototype,s,!0),i(o.prototype,c,!0)):u=!1;t.exports={ABV:l,CONSTR:u,TYPED:s,VIEW:c}},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"methods",get:function(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods}}}]),e}((l=u(l)).default);o.default=f,f.displayName="API",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(98),n(26),n(27),n(1),n(2),n(13),n(14),n(345),n(346),n(347),n(28)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p,h){"use strict";var v=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=v(r),i=v(i),a=v(a),s=v(s),c=v(c),l=v(l),u=v(u),f=v(f),d=v(d),p=v(p),h=v(h);var g=function(){function t(e,n,o,r,i){var a=this;(0,s.default)(this,t),this.cachedInputs=[],this.inputIndex=0,this.didMutated=function(){a.cachedInputs=[],a.updateCurrentInput()},this.name=e,this.tool=n,this.class=o,this.settings=r,this.api=i,this.holder=this.compose(),this.mutationObserver=new MutationObserver(this.didMutated),this.tunes=this.makeTunes()}var e,n,o;return(0,c.default)(t,[{key:"call",value:function(t,e){this.tool[t]&&this.tool[t]instanceof Function&&this.tool[t].call(this.tool,e)}},{key:"mergeWith",value:(o=(0,a.default)(i.default.mark(function t(e){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tool.merge(e);case 2:case"end":return t.stop()}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"save",value:(n=(0,a.default)(i.default.mark(function t(){var e,n,o,r=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tool.save(this.pluginsContent);case 2:return e=t.sent,n=window.performance.now(),t.abrupt("return",Promise.resolve(e).then(function(t){return o=window.performance.now(),{tool:r.name,data:t,time:o-n}}).catch(function(t){u.default.log("Saving proccess for ".concat(r.name," tool failed due to the ").concat(t),"log","red")}));case 5:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"validate",value:(e=(0,a.default)(i.default.mark(function t(e){var n;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!0,!(this.tool.validate instanceof Function)){t.next=5;break}return t.next=4,this.tool.validate(e);case 4:n=t.sent;case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"makeTunes",value:function(){var t=this,e=[f.default,d.default,p.default];return e.map(function(e){return new e({api:t.api,settings:t.settings})})}},{key:"renderTunes",value:function(){var t=document.createDocumentFragment();return this.tunes.forEach(function(e){l.default.append(t,e.render())}),t}},{key:"updateCurrentInput",value:function(){this.currentInput=h.default.anchorNode}},{key:"willSelect",value:function(){this.mutationObserver.observe(this.holder,{childList:!0,subtree:!0})}},{key:"willUnselect",value:function(){this.mutationObserver.disconnect()}},{key:"compose",value:function(){var e=l.default.make("div",t.CSS.wrapper),n=l.default.make("div",t.CSS.content),o=this.tool.render();return n.appendChild(o),e.appendChild(n),e}},{key:"inputs",get:function(){if(0!==this.cachedInputs.length)return this.cachedInputs;var t=this.holder,e="[contenteditable], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(function(t){return'input[type="'.concat(t,'"]')}).join(", "),n=u.default.array(t.querySelectorAll(e));return n=n.reduce(function(t,e){return l.default.isNativeInput(e)||l.default.containsOnlyInlineElements(e)?[].concat((0,r.default)(t),[e]):[].concat((0,r.default)(t),(0,r.default)(l.default.getDeepestBlockElements(e)))},[]),this.inputIndex>n.length-1&&(this.inputIndex=n.length-1),this.cachedInputs=n,n}},{key:"currentInput",get:function(){return this.inputs[this.inputIndex]},set:function(t){var e=this.inputs.findIndex(function(e){return e===t||e.contains(t)});-1!==e&&(this.inputIndex=e)}},{key:"firstInput",get:function(){return this.inputs[0]}},{key:"lastInput",get:function(){var t=this.inputs;return t[t.length-1]}},{key:"nextInput",get:function(){return this.inputs[this.inputIndex+1]}},{key:"previousInput",get:function(){return this.inputs[this.inputIndex-1]}},{key:"pluginsContent",get:function(){var e=this.holder.querySelector(".".concat(t.CSS.content));return e&&e.childNodes.length?e.childNodes[0]:null}},{key:"data",get:function(){return this.save().then(function(t){return t&&!u.default.isEmpty(t.data)?t.data:{}})}},{key:"sanitize",get:function(){return this.tool.sanitize}},{key:"mergeable",get:function(){return"function"==typeof this.tool.merge}},{key:"isEmpty",get:function(){var t=l.default.isEmpty(this.pluginsContent),e=!this.hasMedia;return t&&e}},{key:"hasMedia",get:function(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}},{key:"focused",set:function(e){this.holder.classList.toggle(t.CSS.focused,e)}},{key:"selected",set:function(e){e?this.holder.classList.add(t.CSS.selected):this.holder.classList.remove(t.CSS.selected)},get:function(){return this.holder.classList.contains(t.CSS.selected)}},{key:"stretched",set:function(e){this.holder.classList.toggle(t.CSS.wrapperStretched,e)}},{key:"dropTarget",set:function(e){this.holder.classList.toggle(t.CSS.dropTarget,e)}}],[{key:"CSS",get:function(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",focused:"ce-block--focused",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}}]),t}();o.default=g,g.displayName="Block",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u){"use strict";var f=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),c=f(c),l=f(l),u=f(u);var d=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={wrapper:null,content:null,actions:null,plusButton:null,blockActionsButtons:null,settingsToggler:null},t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){var t=this;this.nodes.wrapper=u.default.make("div",this.CSS.toolbar),["content","actions"].forEach(function(e){t.nodes[e]=u.default.make("div",t.CSS[e]),u.default.append(t.nodes.wrapper,t.nodes[e])}),this.nodes.plusButton=u.default.make("div",this.CSS.plusButton),this.Editor.Listeners.on(this.nodes.plusButton,"mouseenter",function(){var e=t.Editor.Toolbox.nodes.tooltip,n=document.createDocumentFragment();n.appendChild(document.createTextNode("Add")),n.appendChild(u.default.make("div",t.Editor.Toolbox.CSS.tooltipShortcut,{textContent:"⇥ Tab"})),e.style.left="-17px",e.innerHTML="",e.appendChild(n),e.classList.add(t.Editor.Toolbox.CSS.tooltipShown)}),this.Editor.Listeners.on(this.nodes.plusButton,"mouseleave",function(){t.Editor.Toolbox.hideTooltip()}),u.default.append(this.nodes.plusButton,u.default.svg("plus",14,14)),u.default.append(this.nodes.content,this.nodes.plusButton),this.Editor.Listeners.on(this.nodes.plusButton,"click",function(){return t.plusButtonClicked()},!1),this.Editor.Toolbox.make(),this.nodes.blockActionsButtons=u.default.make("div",this.CSS.blockActionsButtons),this.nodes.settingsToggler=u.default.make("span",this.CSS.settingsToggler);var e=u.default.svg("dots",18,4);u.default.append(this.nodes.settingsToggler,e),u.default.append(this.nodes.blockActionsButtons,this.nodes.settingsToggler),u.default.append(this.nodes.actions,this.nodes.blockActionsButtons),this.Editor.BlockSettings.make(),u.default.append(this.nodes.actions,this.Editor.BlockSettings.nodes.wrapper),u.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.bindEvents()}},{key:"move",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&(this.Editor.Toolbox.close(),this.Editor.BlockSettings.close());var e=this.Editor.BlockManager.currentBlock.holder;if(e){var n=this.Editor.UI.isMobile,o=e.offsetHeight,r=e.offsetTop;if(n)r+=o;else{var i=Math.floor(o/2);this.nodes.plusButton.style.transform="translate3d(0, calc(".concat(i,"px - 50%), 0)"),this.Editor.Toolbox.nodes.toolbox.style.transform="translate3d(0, calc(".concat(i,"px - 50%), 0)")}this.nodes.wrapper.style.transform="translate3D(0, ".concat(Math.floor(r),"px, 0)")}}},{key:"open",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];setTimeout(function(){t.move(n),t.nodes.wrapper.classList.add(t.CSS.toolbarOpened),e?t.blockActions.show():t.blockActions.hide()},50)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),this.Editor.Toolbox.close(),this.Editor.BlockSettings.close()}},{key:"plusButtonClicked",value:function(){this.Editor.Toolbox.toggle()}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.nodes.settingsToggler,"click",function(){return t.settingsTogglerClicked()})}},{key:"settingsTogglerClicked",value:function(){this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open()}},{key:"CSS",get:function(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",plusButton:"ce-toolbar__plus",plusButtonHidden:"ce-toolbar__plus--hidden",blockActionsButtons:"ce-toolbar__actions-buttons",settingsToggler:"ce-toolbar__settings-btn"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}},{key:"plusButton",get:function(){var t=this;return{hide:function(){return t.nodes.plusButton.classList.add(t.CSS.plusButtonHidden)},show:function(){t.Editor.Toolbox.isEmpty||t.nodes.plusButton.classList.remove(t.CSS.plusButtonHidden)}}}},{key:"blockActions",get:function(){var t=this;return{hide:function(){t.nodes.actions.classList.remove(t.CSS.actionsOpened)},show:function(){t.nodes.actions.classList.add(t.CSS.actionsOpened)}}}}]),e}(l.default);o.default=d,d.displayName="Toolbar",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o=n(10),r=n(9).document,i=o(r)&&o(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e,n){var o=n(17),r=n(9),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n(42)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){e.f=n(12)},function(t,e,n){var o=n(74)("keys"),r=n(41);t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var o=n(34);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,n){var o=n(9).document;t.exports=o&&o.documentElement},function(t,e,n){var o=n(10),r=n(11),i=function(t,e){if(r(t),!o(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{(o=n(32)(Function.call,n(29).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:o(t,n),t}}({},!1):void 0),check:i}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var o=n(10),r=n(80).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&o(i)&&r&&r(t,i),t}},function(t,e,n){"use strict";var o=n(36),r=n(35);t.exports=function(t){var e=String(r(this)),n="",i=o(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var o=n(42),r=n(0),i=n(19),a=n(22),s=n(49),c=n(113),l=n(48),u=n(47),f=n(12)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,g,y){c(n,e,h);var b,k,m,x=function(t){if(!d&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",w="values"==v,E=!1,T=t.prototype,B=T[f]||T["@@iterator"]||v&&T[v],C=B||x(v),_=v?w?x("entries"):C:void 0,I="Array"==e&&T.entries||B;if(I&&(m=u(I.call(new t)))!==Object.prototype&&m.next&&(l(m,S,!0),o||"function"==typeof m[f]||a(m,f,p)),w&&B&&"values"!==B.name&&(E=!0,C=function(){return B.call(this)}),o&&!y||!d&&!E&&T[f]||a(T,f,C),s[e]=C,s[S]=p,v)if(b={values:w?C:x("values"),keys:g?C:x("keys"),entries:_},y)for(k in b)k in T||i(T,k,b[k]);else r(r.P+r.F*(d||E),e,b);return b}},function(t,e,n){var o=n(88),r=n(35);t.exports=function(t,e,n){if(o(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(t))}},function(t,e,n){var o=n(10),r=n(34),i=n(12)("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==r(t))}},function(t,e,n){var o=n(12)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[o]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var o=n(49),r=n(12)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||i[r]===t)}},function(t,e,n){"use strict";var o=n(15),r=n(40);t.exports=function(t,e,n){e in t?o.f(t,e,r(0,n)):t[e]=n}},function(t,e,n){var o=n(61),r=n(12)("iterator"),i=n(49);t.exports=n(17).getIteratorMethod=function(t){if(null!=t)return t[r]||t["@@iterator"]||i[o(t)]}},function(t,e,n){"use strict";var o=n(24),r=n(44),i=n(18);t.exports=function(t){for(var e=o(this),n=i(e.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,l=void 0===c?n:r(c,n);l>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var o=n(50),r=n(117),i=n(49),a=n(23);t.exports=n(86)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){"use strict";var o=n(11);t.exports=function(){var t=o(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var o,r,i,a=n(32),s=n(106),c=n(79),l=n(73),u=n(9),f=u.process,d=u.setImmediate,p=u.clearImmediate,h=u.MessageChannel,v=u.Dispatch,g=0,y={},b=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},k=function(t){b.call(t.data)};d&&p||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++g]=function(){s("function"==typeof t?t:Function(t),e)},o(g),g},p=function(t){delete y[t]},"process"==n(34)(f)?o=function(t){f.nextTick(a(b,t,1))}:v&&v.now?o=function(t){v.now(a(b,t,1))}:h?(i=(r=new h).port2,r.port1.onmessage=k,o=a(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(o=function(t){u.postMessage(t+"","*")},u.addEventListener("message",k,!1)):o="onreadystatechange"in l("script")?function(t){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:d,clear:p}},function(t,e,n){"use strict";var o=n(9),r=n(16),i=n(42),a=n(69),s=n(22),c=n(53),l=n(8),u=n(52),f=n(36),d=n(18),p=n(124),h=n(46).f,v=n(15).f,g=n(93),y=n(48),b="prototype",k="Wrong index!",m=o.ArrayBuffer,x=o.DataView,S=o.Math,w=o.RangeError,E=o.Infinity,T=m,B=S.abs,C=S.pow,_=S.floor,I=S.log,O=S.LN2,N=r?"_b":"buffer",M=r?"_l":"byteLength",L=r?"_o":"byteOffset";function A(t,e,n){var o,r,i,a=new Array(n),s=8*n-e-1,c=(1<>1,u=23===e?C(2,-24)-C(2,-77):0,f=0,d=t<0||0===t&&1/t<0?1:0;for((t=B(t))!=t||t===E?(r=t!=t?1:0,o=c):(o=_(I(t)/O),t*(i=C(2,-o))<1&&(o--,i*=2),(t+=o+l>=1?u/i:u*C(2,1-l))*i>=2&&(o++,i/=2),o+l>=c?(r=0,o=c):o+l>=1?(r=(t*i-1)*C(2,e),o+=l):(r=t*C(2,l-1)*C(2,e),o=0));e>=8;a[f++]=255&r,r/=256,e-=8);for(o=o<0;a[f++]=255&o,o/=256,s-=8);return a[--f]|=128*d,a}function P(t,e,n){var o,r=8*n-e-1,i=(1<>1,s=r-7,c=n-1,l=t[c--],u=127&l;for(l>>=7;s>0;u=256*u+t[c],c--,s-=8);for(o=u&(1<<-s)-1,u>>=-s,s+=e;s>0;o=256*o+t[c],c--,s-=8);if(0===u)u=1-a;else{if(u===i)return o?NaN:l?-E:E;o+=C(2,e),u-=a}return(l?-1:1)*o*C(2,u-e)}function R(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function j(t){return[255&t]}function F(t){return[255&t,t>>8&255]}function D(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function U(t){return A(t,52,8)}function z(t){return A(t,23,4)}function H(t,e,n){v(t[b],e,{get:function(){return this[n]}})}function W(t,e,n,o){var r=p(+n);if(r+e>t[M])throw w(k);var i=t[N]._b,a=r+t[L],s=i.slice(a,a+e);return o?s:s.reverse()}function X(t,e,n,o,r,i){var a=p(+n);if(a+e>t[M])throw w(k);for(var s=t[N]._b,c=a+t[L],l=o(+r),u=0;uK;)(Y=V[K++])in m||s(m,Y,T[Y]);i||(G.constructor=m)}var Z=new x(new m(2)),q=x[b].setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||c(x[b],{setInt8:function(t,e){q.call(this,t,e<<24>>24)},setUint8:function(t,e){q.call(this,t,e<<24>>24)}},!0)}else m=function(t){u(this,m,"ArrayBuffer");var e=p(t);this._b=g.call(new Array(e),0),this[M]=e},x=function(t,e,n){u(this,x,"DataView"),u(t,m,"DataView");var o=t[M],r=f(e);if(r<0||r>o)throw w("Wrong offset!");if(r+(n=void 0===n?o-r:d(n))>o)throw w("Wrong length!");this[N]=t,this[L]=r,this[M]=n},r&&(H(m,"byteLength","_l"),H(x,"buffer","_b"),H(x,"byteLength","_l"),H(x,"byteOffset","_o")),c(x[b],{getInt8:function(t){return W(this,1,t)[0]<<24>>24},getUint8:function(t){return W(this,1,t)[0]},getInt16:function(t){var e=W(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=W(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return R(W(this,4,t,arguments[1]))},getUint32:function(t){return R(W(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return P(W(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return P(W(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){X(this,1,t,j,e)},setUint8:function(t,e){X(this,1,t,j,e)},setInt16:function(t,e){X(this,2,t,F,e,arguments[2])},setUint16:function(t,e){X(this,2,t,F,e,arguments[2])},setInt32:function(t,e){X(this,4,t,D,e,arguments[2])},setUint32:function(t,e){X(this,4,t,D,e,arguments[2])},setFloat32:function(t,e){X(this,4,t,z,e,arguments[2])},setFloat64:function(t,e){X(this,8,t,U,e,arguments[2])}});y(m,"ArrayBuffer"),y(x,"DataView"),s(x[b],a.VIEW,!0),e.ArrayBuffer=m,e.DataView=x},function(t,e,n){var o=n(338),r=n(339),i=n(340);t.exports=function(t){return o(t)||r(t)||i()}},function(t,e,n){t.exports=!n(16)&&!n(8)(function(){return 7!=Object.defineProperty(n(73)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var o=n(9),r=n(17),i=n(42),a=n(75),s=n(15).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var o=n(21),r=n(23),i=n(59)(!1),a=n(76)("IE_PROTO");t.exports=function(t,e){var n,s=r(t),c=0,l=[];for(n in s)n!=a&&o(s,n)&&l.push(n);for(;e.length>c;)o(s,n=e[c++])&&(~i(l,n)||l.push(n));return l}},function(t,e,n){var o=n(15),r=n(11),i=n(43);t.exports=n(16)?Object.defineProperties:function(t,e){r(t);for(var n,a=i(e),s=a.length,c=0;s>c;)o.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var o=n(23),r=n(46).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return r(t)}catch(t){return a.slice()}}(t):r(o(t))}},function(t,e,n){"use strict";var o=n(43),r=n(60),i=n(57),a=n(24),s=n(56),c=Object.assign;t.exports=!c||n(8)(function(){var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=o})?function(t,e){for(var n=a(t),c=arguments.length,l=1,u=r.f,f=i.f;c>l;)for(var d,p=s(arguments[l++]),h=u?o(p).concat(u(p)):o(p),v=h.length,g=0;v>g;)f.call(p,d=h[g++])&&(n[d]=p[d]);return n}:c},function(t,e,n){"use strict";var o=n(33),r=n(10),i=n(106),a=[].slice,s={};t.exports=Function.bind||function(t){var e=o(this),n=a.call(arguments,1),c=function(){var o=n.concat(a.call(arguments));return this instanceof c?function(t,e,n){if(!(e in s)){for(var o=[],r=0;r>>0||(a.test(n)?16:10))}:o},function(t,e,n){var o=n(9).parseFloat,r=n(62).trim;t.exports=1/o(n(81)+"-0")!=-1/0?function(t){var e=r(String(t),3),n=o(e);return 0===n&&"-"==e.charAt(0)?-0:n}:o},function(t,e,n){var o=n(34);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=o(t))throw TypeError(e);return+t}},function(t,e,n){var o=n(10),r=Math.floor;t.exports=function(t){return!o(t)&&isFinite(t)&&r(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var o=n(36),r=n(35);t.exports=function(t){return function(e,n){var i,a,s=String(r(e)),c=o(n),l=s.length;return c<0||c>=l?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===l||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var o=n(45),r=n(40),i=n(48),a={};n(22)(a,n(12)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=o(a,{next:r(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var o=n(11);t.exports=function(t,e,n,r){try{return r?e(o(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&o(i.call(t)),e}}},function(t,e,n){var o=n(33),r=n(24),i=n(56),a=n(18);t.exports=function(t,e,n,s,c){o(e);var l=r(t),u=i(l),f=a(l.length),d=c?f-1:0,p=c?-1:1;if(n<2)for(;;){if(d in u){s=u[d],d+=p;break}if(d+=p,c?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;c?d>=0:f>d;d+=p)d in u&&(s=e(s,u[d],d,l));return s}},function(t,e,n){"use strict";var o=n(24),r=n(44),i=n(18);t.exports=[].copyWithin||function(t,e){var n=o(this),a=i(n.length),s=r(t,a),c=r(e,a),l=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===l?a:r(l,a))-c,a-s),f=1;for(c0;)c in n?n[s]=n[c]:delete n[s],s+=f,c+=f;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(16)&&"g"!=/./g.flags&&n(15).f(RegExp.prototype,"flags",{configurable:!0,get:n(95)})},function(t,e,n){"use strict";var o,r,i,a,s=n(42),c=n(9),l=n(32),u=n(61),f=n(0),d=n(10),p=n(33),h=n(52),v=n(65),g=n(66),y=n(96).set,b=n(278)(),k=n(120),m=n(279),x=n(67),S=n(121),w=c.TypeError,E=c.process,T=E&&E.versions,B=T&&T.v8||"",C=c.Promise,_="process"==u(E),I=function(){},O=r=k.f,N=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n(12)("species")]=function(t){t(I,I)};return(_||"function"==typeof PromiseRejectionEvent)&&t.then(I)instanceof e&&0!==B.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),M=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},L=function(t,e){if(!t._n){t._n=!0;var n=t._c;b(function(){for(var o=t._v,r=1==t._s,i=0,a=function(e){var n,i,a,s=r?e.ok:e.fail,c=e.resolve,l=e.reject,u=e.domain;try{s?(r||(2==t._h&&R(t),t._h=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),a=!0)),n===e.promise?l(w("Promise-chain cycle")):(i=M(n))?i.call(n,c,l):c(n)):l(o)}catch(t){u&&!a&&u.exit(),l(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&A(t)})}},A=function(t){y.call(c,function(){var e,n,o,r=t._v,i=P(t);if(i&&(e=m(function(){_?E.emit("unhandledRejection",r,t):(n=c.onunhandledrejection)?n({promise:t,reason:r}):(o=c.console)&&o.error&&o.error("Unhandled promise rejection",r)}),t._h=_||P(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},P=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){y.call(c,function(){var e;_?E.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},j=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=M(t))?b(function(){var o={_w:n,_d:!1};try{e.call(t,l(F,o,1),l(j,o,1))}catch(t){j.call(o,t)}}):(n._v=t,n._s=1,L(n,!1))}catch(t){j.call({_w:n,_d:!1},t)}}};N||(C=function(t){h(this,C,"Promise","_h"),p(t),o.call(this);try{t(l(F,this,1),l(j,this,1))}catch(t){j.call(this,t)}},(o=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(53)(C.prototype,{then:function(t,e){var n=O(g(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=_?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new o;this.promise=t,this.resolve=l(F,t,1),this.reject=l(j,t,1)},k.f=O=function(t){return t===C||t===a?new i(t):r(t)}),f(f.G+f.W+f.F*!N,{Promise:C}),n(48)(C,"Promise"),n(51)("Promise"),a=n(17).Promise,f(f.S+f.F*!N,"Promise",{reject:function(t){var e=O(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(s||!N),"Promise",{resolve:function(t){return S(s&&this===a?C:this,t)}}),f(f.S+f.F*!(N&&n(63)(function(t){C.all(t).catch(I)})),"Promise",{all:function(t){var e=this,n=O(e),o=n.resolve,r=n.reject,i=m(function(){var n=[],i=0,a=1;v(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||o(n))},r)}),--a||o(n)});return i.e&&r(i.v),n.promise},race:function(t){var e=this,n=O(e),o=n.reject,r=m(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,o)})});return r.e&&o(r.v),n.promise}})},function(t,e,n){"use strict";var o=n(33);function r(t){var e,n;this.promise=new t(function(t,o){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=o}),this.resolve=o(e),this.reject=o(n)}t.exports.f=function(t){return new r(t)}},function(t,e,n){var o=n(11),r=n(10),i=n(120);t.exports=function(t,e){if(o(t),r(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var o=n(15).f,r=n(45),i=n(53),a=n(32),s=n(52),c=n(65),l=n(86),u=n(117),f=n(51),d=n(16),p=n(39).fastKey,h=n(54),v=d?"_s":"size",g=function(t,e){var n,o=p(e);if("F"!==o)return t._i[o];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,l){var u=t(function(t,o){s(t,u,e,"_i"),t._t=e,t._i=r(null),t._f=void 0,t._l=void 0,t[v]=0,null!=o&&c(o,n,t[l],t)});return i(u.prototype,{clear:function(){for(var t=h(this,e),n=t._i,o=t._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=h(this,e),o=g(n,t);if(o){var r=o.n,i=o.p;delete n._i[o.i],o.r=!0,i&&(i.n=r),r&&(r.p=i),n._f==o&&(n._f=r),n._l==o&&(n._l=i),n[v]--}return!!o},forEach:function(t){h(this,e);for(var n,o=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(h(this,e),t)}}),d&&o(u.prototype,"size",{get:function(){return h(this,e)[v]}}),u},def:function(t,e,n){var o,r,i=g(t,e);return i?i.v=n:(t._l=i={i:r=p(e,!0),k:e,v:n,p:o=t._l,n:void 0,r:!1},t._f||(t._f=i),o&&(o.n=i),t[v]++,"F"!==r&&(t._i[r]=i)),t},getEntry:g,setStrong:function(t,e,n){l(t,e,function(t,n){this._t=h(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?u(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,u(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var o=n(53),r=n(39).getWeak,i=n(11),a=n(10),s=n(52),c=n(65),l=n(31),u=n(21),f=n(54),d=l(5),p=l(6),h=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return d(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var l=t(function(t,o){s(t,l,e,"_i"),t._t=e,t._i=h++,t._l=void 0,null!=o&&c(o,n,t[i],t)});return o(l.prototype,{delete:function(t){if(!a(t))return!1;var n=r(t);return!0===n?v(f(this,e)).delete(t):n&&u(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=r(t);return!0===n?v(f(this,e)).has(t):n&&u(n,this._i)}}),l},def:function(t,e,n){var o=r(i(e),!0);return!0===o?v(t).set(e,n):o[t._i]=n,t},ufstore:v}},function(t,e,n){var o=n(36),r=n(18);t.exports=function(t){if(void 0===t)return 0;var e=o(t),n=r(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var o=n(46),r=n(60),i=n(11),a=n(9).Reflect;t.exports=a&&a.ownKeys||function(t){var e=o.f(i(t)),n=r.f;return n?e.concat(n(t)):e}},function(t,e,n){var o=n(18),r=n(83),i=n(35);t.exports=function(t,e,n,a){var s=String(i(t)),c=s.length,l=void 0===n?" ":String(n),u=o(e);if(u<=c||""==l)return s;var f=u-c,d=r.call(l,Math.ceil(f/l.length));return d.length>f&&(d=d.slice(0,f)),a?d+s:s+d}},function(t,e,n){var o=n(43),r=n(23),i=n(57).f;t.exports=function(t){return function(e){for(var n,a=r(e),s=o(a),c=s.length,l=0,u=[];c>l;)i.call(a,n=s[l++])&&u.push(t?[n,a[n]]:a[n]);return u}}},function(t,e){!function(e){"use strict";var n,o=Object.prototype,r=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",l="object"==typeof t,u=e.regeneratorRuntime;if(u)l&&(t.exports=u);else{(u=e.regeneratorRuntime=l?t.exports:{}).wrap=m;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={},g={};g[a]=function(){return this};var y=Object.getPrototypeOf,b=y&&y(y(N([])));b&&b!==o&&r.call(b,a)&&(g=b);var k=E.prototype=S.prototype=Object.create(g);w.prototype=k.constructor=E,E.constructor=w,E[c]=w.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(k),t},u.awrap=function(t){return{__await:t}},T(B.prototype),B.prototype[s]=function(){return this},u.AsyncIterator=B,u.async=function(t,e,n,o){var r=new B(m(t,e,n,o));return u.isGeneratorFunction(e)?r:r.next().then(function(t){return t.done?t.value:r.next()})},T(k),k[c]="Generator",k[a]=function(){return this},k.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},u.values=N,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(o,r){return s.type="throw",s.arg=t,e.next=o,r&&(e.method="next",e.arg=n),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var r=o.arg;I(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:N(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=n),v}}}function m(t,e,n,o){var r=e&&e.prototype instanceof S?e:S,i=Object.create(r.prototype),a=new O(o||[]);return i._invoke=function(t,e,n){var o=f;return function(r,i){if(o===p)throw new Error("Generator is already running");if(o===h){if("throw"===r)throw i;return M()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var c=x(t,e,n);if("normal"===c.type){if(o=n.done?h:d,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=h,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function S(){}function w(){}function E(){}function T(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function B(t){var e;this._invoke=function(n,o){function i(){return new Promise(function(e,i){!function e(n,o,i,a){var s=x(t[n],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(l).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,a)})}a(s.arg)}(n,o,e,i)})}return e=e?e.then(i,i):i()}}function C(t,e){var o=t.iterator[e.method];if(o===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,C(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var r=x(o,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,v;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o0&&void 0!==arguments[0]?arguments[0]:t.config.initialBlock,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;t.Editor.BlockManager.insert(e,n,o,r,i)},t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"getBlocksCount",value:function(){return this.Editor.BlockManager.blocks.length}},{key:"getCurrentBlockIndex",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:"getBlockByIndex",value:function(t){var e=this.Editor.BlockManager.getBlockByIndex(t);return e.holder}},{key:"swap",value:function(t,e){this.Editor.BlockManager.swap(t,e),this.Editor.Toolbar.move(!1)}},{key:"delete",value:function(t){this.Editor.BlockManager.removeBlock(t),0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),0===this.Editor.BlockManager.currentBlockIndex?this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock):this.Editor.Caret.navigatePrevious(!0),this.Editor.Toolbar.close()}},{key:"clear",value:function(){this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}},{key:"render",value:function(t){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(t.blocks)}},{key:"renderFromHTML",value:function(t){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(t,!0)}},{key:"stretchBlock",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.Editor.BlockManager.getBlockByIndex(t);n&&(n.stretched=e)}},{key:"insertNewBlock",value:function(){u.default.log("Method blocks.insertNewBlock() is deprecated and it will be removed in next major release. Use blocks.insert() instead.","warn"),this.insert()}},{key:"methods",get:function(){var t=this;return{clear:function(){return t.clear()},render:function(e){return t.render(e)},renderFromHTML:function(e){return t.renderFromHTML(e)},delete:function(){return t.delete()},swap:function(e,n){return t.swap(e,n)},getBlockByIndex:function(e){return t.getBlockByIndex(e)},getCurrentBlockIndex:function(){return t.getCurrentBlockIndex()},getBlocksCount:function(){return t.getBlocksCount()},stretchBlock:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.stretchBlock(e,n)},insertNewBlock:function(){return t.insertNewBlock()},insert:this.insert}}}]),e}(l.default);o.default=d,d.displayName="BlocksAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).setToFirstBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.firstBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.firstBlock,e,n),!0)},t.setToLastBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.lastBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.lastBlock,e,n),!0)},t.setToPreviousBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.previousBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.previousBlock,e,n),!0)},t.setToNextBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.nextBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.nextBlock,e,n),!0)},t.setToBlock=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.Editor.Caret.positions.DEFAULT,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return!!t.Editor.BlockManager.blocks[e]&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.blocks[e],n,o),!0)},t.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?t.setToLastBlock(t.Editor.Caret.positions.END):t.setToFirstBlock(t.Editor.Caret.positions.START)},t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"methods",get:function(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}]),e}((l=u(l)).default);o.default=f,f.displayName="CaretAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e){this.Editor.Events.on(t,e)}},{key:"emit",value:function(t,e){this.Editor.Events.emit(t,e)}},{key:"off",value:function(t,e){this.Editor.Events.off(t,e)}},{key:"methods",get:function(){var t=this;return{emit:function(e,n){return t.emit(e,n)},off:function(e,n){return t.off(e,n)},on:function(e,n){return t.on(e,n)}}}}]),e}((l=u(l)).default);o.default=f,f.displayName="EventsAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"open",value:function(){this.Editor.InlineToolbar.tryToShow()}},{key:"close",value:function(){this.Editor.InlineToolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((l=u(l)).default);o.default=f,f.displayName="InlineToolbarAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e,n,o){this.Editor.Listeners.on(t,e,n,o)}},{key:"off",value:function(t,e,n){this.Editor.Listeners.off(t,e,n)}},{key:"methods",get:function(){var t=this;return{on:function(e,n,o,r){return t.on(e,n,o,r)},off:function(e,n,o){return t.off(e,n,o)}}}}]),e}((l=u(l)).default);o.default=f,f.displayName="ListenersAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"show",value:function(t){return this.Editor.Notifier.show(t)}},{key:"methods",get:function(){var t=this;return{show:function(e){return t.show(e)}}}}]),e}((l=u(l)).default);o.default=f,f.displayName="NotifierAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"clean",value:function(t,e){return this.Editor.Sanitizer.clean(t,e)}},{key:"methods",get:function(){var t=this;return{clean:function(e,n){return t.clean(e,n)}}}}]),e}((l=u(l)).default);o.default=f,f.displayName="SanitizerAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"save",value:function(){return this.Editor.Saver.save()}},{key:"methods",get:function(){var t=this;return{save:function(){return t.save()}}}}]),e}((l=u(l)).default);o.default=f,f.displayName="SaverAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(28)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u){"use strict";var f=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),c=f(c),l=f(l),u=f(u);var d=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"findParentTag",value:function(t,e){return(new u.default).findParentTag(t,e)}},{key:"expandToTag",value:function(t){(new u.default).expandToTag(t)}},{key:"methods",get:function(){var t=this;return{findParentTag:function(e,n){return t.findParentTag(e,n)},expandToTag:function(e){return t.expandToTag(e)}}}}]),e}(l.default);o.default=d,d.displayName="SelectionAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"classes",get:function(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}}]),e}((l=u(l)).default);o.default=f,f.displayName="StylesAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"open",value:function(){this.Editor.Toolbar.open()}},{key:"close",value:function(){this.Editor.Toolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((l=u(l)).default);o.default=f,f.displayName="ToolbarAPI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(14),n(28)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f){"use strict";var d=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),a=d(a),s=d(s),c=d(c),l=d(l),u=d(u),f=d(f);var p=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"keydown",value:function(t){switch(this.beforeKeydownProcessing(t),t.keyCode){case u.default.keyCodes.BACKSPACE:this.backspace(t);break;case u.default.keyCodes.ENTER:this.enter(t);break;case u.default.keyCodes.DOWN:case u.default.keyCodes.RIGHT:this.arrowRightAndDown(t);break;case u.default.keyCodes.UP:case u.default.keyCodes.LEFT:this.arrowLeftAndUp(t);break;case u.default.keyCodes.TAB:this.tabPressed(t);break;case u.default.keyCodes.ESC:this.escapePressed(t);break;default:this.defaultHandler()}}},{key:"beforeKeydownProcessing",value:function(t){if(this.needToolbarClosing(t)&&u.default.isPrintableKey(t.keyCode)){this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close();var e=t.ctrlKey||t.metaKey||t.altKey||t.shiftKey;e||(this.Editor.BlockManager.clearFocused(),this.Editor.BlockSelection.clearSelection(t))}}},{key:"keyup",value:function(t){if(!t.shiftKey){var e=this.Editor,n=e.InlineToolbar,o=e.ConversionToolbar,r=e.UI,i=e.BlockManager,a=i.getBlock(t.target);f.default.almostAllSelected(a.pluginsContent.textContent)?(n.close(),o.tryToShow(a)):(o.close(),n.tryToShow(!0)),r.checkEmptiness()}}},{key:"mouseUp",value:function(t){var e=this.Editor,n=e.InlineToolbar,o=e.ConversionToolbar,r=e.BlockManager,i=e.BlockSelection,a=r.getBlock(t.target);u.default.delay(function(){f.default.almostAllSelected(a.pluginsContent.textContent)?(n.close(),o.tryToShow(a)):f.default.isCollapsed?(n.close(),1!==i.selectedBlocks.length&&o.close()):(n.tryToShow(),o.close())},30)()}},{key:"mouseDown",value:function(t){this.Editor.CrossBlockSelection.watchSelection(t)}},{key:"tabPressed",value:function(t){this.Editor.BlockSelection.clearSelection(t);var e=this.Editor,n=e.BlockManager,o=e.Tools,r=e.ConversionToolbar,i=e.InlineToolbar,a=n.currentBlock;if(a){t.preventDefault(),t.stopPropagation();var s=t.shiftKey,c=s?"left":"right",l=o.isInitial(a.tool)&&a.isEmpty,u=!a.isEmpty&&!f.default.isCollapsed&&i.opened,d=!a.isEmpty&&r.opened;l?this.leafToolboxTools(c):u?this.leafInlineToolbarTools(c):d?this.leafConversionToolbarTools(c):this.leafBlockSettingsTools(c)}}},{key:"escapePressed",value:function(t){this.Editor.BlockSelection.clearSelection(t),this.Editor.Toolbox.opened?this.Editor.Toolbox.close():this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.InlineToolbar.opened?this.Editor.InlineToolbar.close():this.Editor.Toolbar.close()}},{key:"dragOver",value:function(t){var e=this.Editor.BlockManager.getBlockByChildNode(t.target);e.dropTarget=!0}},{key:"dragLeave",value:function(t){var e=this.Editor.BlockManager.getBlockByChildNode(t.target);e.dropTarget=!1}},{key:"handleCommandC",value:function(t){var e=this.Editor.BlockSelection;e.anyBlockSelected&&(t.preventDefault(),e.copySelectedBlocks())}},{key:"handleCommandX",value:function(t){var e=this.Editor,n=e.BlockSelection,o=e.BlockManager,r=e.Caret;if(n.anyBlockSelected){t.preventDefault(),n.copySelectedBlocks();var i=o.removeSelectedBlocks();r.setToBlock(o.insertInitialBlockAtIndex(i,!0),r.positions.START),n.clearSelection(t)}}},{key:"enter",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.Toolbox,r=e.BlockSettings,i=e.InlineToolbar,a=e.ConversionToolbar,s=e.Tools,c=n.currentBlock,l=s.available[c.name];if(!l||!l[s.apiSettings.IS_ENABLED_LINE_BREAKS]||r.opened||i.opened||a.opened){if(o.opened&&o.getActiveTool)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),void o.toolButtonActivate(t,o.getActiveTool);if(i.opened&&i.focusedButton)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),void i.focusedButton.click();if(!t.shiftKey){var u=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertInitialBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):u=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(u),this.Editor.Tools.isInitial(u.tool)&&u.isEmpty&&(this.Editor.Toolbar.open(!1),this.Editor.Toolbar.plusButton.show()),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}}}},{key:"backspace",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.BlockSelection,r=e.Caret,i=n.currentBlock,a=this.Editor.Tools.available[i.name];if(i.selected||i.isEmpty&&i.currentInput===i.firstInput){t.preventDefault();var s=n.currentBlockIndex;return n.previousBlock&&0===n.previousBlock.inputs.length?n.removeBlock(s-1):n.removeBlock(),r.setToBlock(n.currentBlock,s?r.positions.END:r.positions.START),this.Editor.Toolbar.close(),void o.clearSelection(t)}if(!a||!a[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS]||r.isAtStart){var c=0===n.currentBlockIndex,l=r.isAtStart&&i.currentInput===i.firstInput&&!c;l&&(t.preventDefault(),this.mergeBlocks())}}},{key:"mergeBlocks",value:function(){var t=this.Editor,e=t.BlockManager,n=t.Caret,o=t.Toolbar,r=e.previousBlock,i=e.currentBlock;if(i.name!==r.name||!r.mergeable)return 0===r.inputs.length||r.isEmpty?(e.removeBlock(e.currentBlockIndex-1),n.setToBlock(e.currentBlock),void o.close()):void(n.navigatePrevious()&&o.close());n.createShadow(r.pluginsContent),e.mergeBlocks(r,i).then(function(){n.restoreCaret(r.pluginsContent),r.pluginsContent.normalize(),o.close()})}},{key:"arrowRightAndDown",value:function(t){var e=this,n=this.Editor.Caret.isAtEnd||this.Editor.BlockSelection.anyBlockSelected;t.shiftKey&&t.keyCode===u.default.keyCodes.DOWN&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState():(this.Editor.Caret.navigateNext()?t.preventDefault():u.default.delay(function(){e.Editor.BlockManager.currentBlock&&e.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(t))}},{key:"arrowLeftAndUp",value:function(t){var e=this,n=this.Editor.Caret.isAtStart||this.Editor.BlockSelection.anyBlockSelected;t.shiftKey&&t.keyCode===u.default.keyCodes.UP&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):(this.Editor.Caret.navigatePrevious()?t.preventDefault():u.default.delay(function(){e.Editor.BlockManager.currentBlock&&e.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(t))}},{key:"defaultHandler",value:function(){}},{key:"needToolbarClosing",value:function(t){var e=t.keyCode===u.default.keyCodes.ENTER&&this.Editor.Toolbox.opened,n=t.keyCode===u.default.keyCodes.ENTER&&this.Editor.BlockSettings.opened,o=t.keyCode===u.default.keyCodes.ENTER&&this.Editor.InlineToolbar.opened,r=t.keyCode===u.default.keyCodes.ENTER&&this.Editor.ConversionToolbar.opened,i=t.keyCode===u.default.keyCodes.TAB;return!(t.shiftKey||i||e||n||o||r)}},{key:"leafToolboxTools",value:function(t){this.Editor.Toolbar.opened?this.Editor.Toolbox.leaf(t):(this.Editor.Toolbar.open(!1,!1),this.Editor.Toolbar.plusButton.show()),this.Editor.Toolbox.open()}},{key:"leafInlineToolbarTools",value:function(t){this.Editor.InlineToolbar.opened&&this.Editor.InlineToolbar.leaf(t)}},{key:"leafConversionToolbarTools",value:function(t){this.Editor.ConversionToolbar.leaf(t)}},{key:"leafBlockSettingsTools",value:function(t){this.Editor.Toolbar.opened||(this.Editor.BlockManager.currentBlock.focused=!0,this.Editor.Toolbar.open(!0,!1),this.Editor.Toolbar.plusButton.hide()),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open(),this.Editor.BlockSettings.leaf(t)}}]),e}(l.default);o.default=p,p.displayName="BlockEvents",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(26),n(27),n(1),n(2),n(4),n(5),n(6),n(71),n(7),n(13),n(14),n(348)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p,h,v){"use strict";var g=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=g(r),i=g(i),a=g(a),s=g(s),c=g(c),l=g(l),u=g(u),f=g(f),d=g(d),p=g(p),h=g(h),v=g(v);var y=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,c.default)(this,(0,l.default)(e).apply(this,arguments)))._currentBlockIndex=-1,t._blocks=null,t}var n,o;return(0,u.default)(e,t),(0,s.default)(e,[{key:"prepare",value:(o=(0,i.default)(r.default.mark(function t(){var e,n,o,i;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=new v.default(this.Editor.UI.nodes.redactor),n=this.Editor,o=n.BlockEvents,i=n.Shortcuts,this._blocks=new Proxy(e,{set:v.default.set,get:v.default.get}),i.add({name:"CMD+C",handler:function(t){o.handleCommandC(t)}}),i.add({name:"CMD+X",handler:function(t){o.handleCommandX(t)}});case 5:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})},{key:"composeBlock",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.Editor.Tools.construct(t,e),r=this.Editor.Tools.available[t],i=new f.default(t,o,r,n,this.Editor.API.methods);return this.bindEvents(i),i}},{key:"insert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.initialBlock,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.currentBlockIndex+1,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=this.composeBlock(t,e,n);return this._blocks[o]=i,r&&(this.currentBlockIndex=o),i}},{key:"paste",value:function(t,e){var n,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n=o?this.replace(t):this.insert(t);try{n.call("onPaste",e)}catch(e){h.default.log("".concat(t,": onPaste callback call is failed"),"error",e)}return n}},{key:"insertInitialBlockAtIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.composeBlock(this.config.initialBlock,{},{});return this._blocks[t]=n,e?this.currentBlockIndex=t:t<=this.currentBlockIndex&&this.currentBlockIndex++,n}},{key:"insertAtEnd",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:"mergeBlocks",value:(n=(0,i.default)(r.default.mark(function t(e,n){var o,i;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this._blocks.indexOf(n),!n.isEmpty){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,n.data;case 5:if(i=t.sent,h.default.isEmpty(i)){t.next=9;break}return t.next=9,e.mergeWith(i);case 9:this.removeBlock(o),this.currentBlockIndex=this._blocks.indexOf(e);case 11:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"removeBlock",value:function(t){if(void 0===t&&(t=this.currentBlockIndex),this._blocks.remove(t),this.currentBlockIndex>=t&&this.currentBlockIndex--,!this.blocks.length)return this.currentBlockIndex=-1,void this.insert();0===t&&(this.currentBlockIndex=0)}},{key:"removeSelectedBlocks",value:function(){for(var t,e=this.blocks.length-1;e>=0;e--)this.blocks[e].selected&&(this.removeBlock(e),t=e);return t}},{key:"removeAllBlocks",value:function(){for(var t=this.blocks.length-1;t>=0;t--)this._blocks.remove(t);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:"split",value:function(){var t=this.Editor.Caret.extractFragmentFromCaretPosition(),e=p.default.make("div");e.appendChild(t);var n={text:p.default.isEmpty(e)?"":e.innerHTML};return this.insert(this.config.initialBlock,n)}},{key:"replace",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.initialBlock,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.composeBlock(t,e);return this._blocks.insert(this.currentBlockIndex,n,!0),n}},{key:"getBlockByIndex",value:function(t){return this._blocks[t]}},{key:"getBlock",value:function(t){p.default.isElement(t)||(t=t.parentNode);var e=this._blocks.nodes,n=t.closest(".".concat(f.default.CSS.wrapper)),o=e.indexOf(n);if(o>=0)return this._blocks[o]}},{key:"highlightCurrentNode",value:function(){this.clearFocused(),this.currentBlock.focused=!0}},{key:"clearFocused",value:function(){this.blocks.forEach(function(t){return t.focused=!1})}},{key:"setCurrentBlockByChildNode",value:function(t){p.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(f.default.CSS.wrapper));if(e)return this.currentBlockIndex=this._blocks.nodes.indexOf(e),this.currentBlock;throw new Error("Can not find a Block from this child Node")}},{key:"getBlockByChildNode",value:function(t){p.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(f.default.CSS.wrapper));return this.blocks.find(function(t){return t.holder===e})}},{key:"swap",value:function(t,e){this._blocks.swap(t,e),this.currentBlockIndex=e}},{key:"dropPointer",value:function(){this.currentBlockIndex=-1,this.clearFocused()}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),t&&this.insert(this.config.initialBlock),this.Editor.UI.checkEmptiness()}},{key:"bindEvents",value:function(t){var e=this.Editor,n=e.BlockEvents,o=e.Listeners;o.on(t.holder,"keydown",function(t){return n.keydown(t)},!0),o.on(t.holder,"mouseup",function(t){return n.mouseUp(t)}),o.on(t.holder,"mousedown",function(t){return n.mouseDown(t)}),o.on(t.holder,"keyup",function(t){return n.keyup(t)}),o.on(t.holder,"dragover",function(t){return n.dragOver(t)}),o.on(t.holder,"dragleave",function(t){return n.dragLeave(t)})}},{key:"currentBlockIndex",get:function(){return this._currentBlockIndex},set:function(t){this._blocks[this._currentBlockIndex]&&this._blocks[this._currentBlockIndex].willUnselect(),this._blocks[t]&&this._blocks[t].willSelect(),this._currentBlockIndex=t}},{key:"firstBlock",get:function(){return this._blocks[0]}},{key:"lastBlock",get:function(){return this._blocks[this._blocks.length-1]}},{key:"currentBlock",get:function(){return this._blocks[this.currentBlockIndex]}},{key:"nextBlock",get:function(){var t=this.currentBlockIndex===this._blocks.length-1;return t?null:this._blocks[this.currentBlockIndex+1]}},{key:"nextContentfulBlock",get:function(){var t=this.blocks.slice(this.currentBlockIndex+1);return t.find(function(t){return!!t.inputs.length})}},{key:"previousContentfulBlock",get:function(){var t=this.blocks.slice(0,this.currentBlockIndex).reverse();return t.find(function(t){return!!t.inputs.length})}},{key:"previousBlock",get:function(){var t=0===this.currentBlockIndex;return t?null:this._blocks[this.currentBlockIndex-1]}},{key:"blocks",get:function(){return this._blocks.array}},{key:"isEditorEmpty",get:function(){return this.blocks.every(function(t){return t.isEmpty})}}]),e}(d.default);o.default=y,y.displayName="BlockManager",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(14),n(13),n(28)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d){"use strict";var p=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=p(r),i=p(i),a=p(a),s=p(s),c=p(c),l=p(l),u=p(u),f=p(f),d=p(d);var h=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).needToSelectAll=!1,t.nativeInputSelected=!1,t.readyToBlockSelection=!1,t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"prepare",value:function(){var t=this,e=this.Editor.Shortcuts;e.add({name:"CMD+A",handler:function(e){var n=t.Editor.BlockManager;n.currentBlock&&t.handleCommandA(e)}}),this.selection=new d.default}},{key:"unSelectBlockByIndex",value:function(t){var e=this.Editor.BlockManager;(isNaN(t)?e.currentBlock:e.getBlockByIndex(t)).selected=!1}},{key:"clearSelection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.Editor,o=n.BlockManager,r=n.Caret,i=n.RectangleSelection;if(this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1,this.anyBlockSelected&&t&&t instanceof KeyboardEvent&&u.default.isPrintableKey(t.keyCode)){var a=o.removeSelectedBlocks();o.insertInitialBlockAtIndex(a,!0),r.setToBlock(o.currentBlock),u.default.delay(function(){r.insertContentAtCaretPosition(t.key)},20)()}this.Editor.CrossBlockSelection.clear(t),this.anyBlockSelected&&!i.isRectActivated()?(e&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}},{key:"copySelectedBlocks",value:function(){var t=this,e=f.default.make("div");this.selectedBlocks.forEach(function(n){var o=t.Editor.Sanitizer.clean(n.holder.innerHTML,t.sanitizerConfig),r=f.default.make("p");r.innerHTML=o,e.appendChild(r)}),u.default.copyTextToClipboard(e.innerHTML)}},{key:"selectBlockByIndex",value:function(t){var e,n=this.Editor.BlockManager;n.clearFocused(),e=isNaN(t)?n.currentBlock:n.getBlockByIndex(t),this.selection.save(),d.default.get().removeAllRanges(),e.selected=!0}},{key:"handleCommandA",value:function(t){if(this.Editor.RectangleSelection.clearSelection(),!f.default.isNativeInput(t.target)||this.nativeInputSelected){var e=this.Editor.BlockManager.getBlock(t.target),n=e.inputs;n.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:this.needToSelectAll?(t.preventDefault(),this.selection.save(),d.default.get().removeAllRanges(),this.selectAllBlocks(),this.needToSelectAll=!1,this.Editor.ConversionToolbar.close()):this.needToSelectAll=!0}else this.nativeInputSelected=!0}},{key:"selectAllBlocks",value:function(){this.allBlocksSelected=!0}},{key:"sanitizerConfig",get:function(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}},{key:"allBlocksSelected",get:function(){var t=this.Editor.BlockManager;return t.blocks.every(function(t){return!0===t.selected})},set:function(t){var e=this.Editor.BlockManager;e.blocks.forEach(function(e){return e.selected=t})}},{key:"anyBlockSelected",get:function(){var t=this.Editor.BlockManager;return t.blocks.some(function(t){return!0===t.selected})}},{key:"selectedBlocks",get:function(){return this.Editor.BlockManager.blocks.filter(function(t){return t.selected})}}]),e}(l.default);o.default=h,h.displayName="BlockSelection",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(28),n(7),n(13),n(14)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d){"use strict";var p=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=p(r),i=p(i),a=p(a),s=p(s),c=p(c),l=p(l),u=p(u),f=p(f),d=p(d);var h=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"setToBlock",value:function(t){var e,n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.Editor.BlockManager;switch(o){case this.positions.START:e=t.firstInput;break;case this.positions.END:e=t.lastInput;break;default:e=t.currentInput}if(e){var a=f.default.getDeepestNode(e,o===this.positions.END),s=f.default.getContentLength(a);switch(!0){case o===this.positions.START:r=0;break;case o===this.positions.END:case r>s:r=s}d.default.delay(function(){n.set(a,r)},20)(),i.setCurrentBlockByChildNode(t.holder),i.currentBlock.currentInput=e}}},{key:"setToInput",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.Editor.BlockManager.currentBlock,r=f.default.getDeepestNode(t);switch(e){case this.positions.START:this.set(r,0);break;case this.positions.END:var i=f.default.getContentLength(r);this.set(r,i);break;default:n&&this.set(r,n)}o.currentInput=t}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),o=l.default.get();if(f.default.isNativeInput(t)){if(!f.default.canSetCaret(t))return;return t.focus(),void(t.selectionStart=t.selectionEnd=e)}n.setStart(t,e),n.setEnd(t,e),o.removeAllRanges(),o.addRange(n);var r=t.nodeType===Node.ELEMENT_NODE?t.getBoundingClientRect():n.getBoundingClientRect(),i=r.top,a=r.bottom,s=window,c=s.innerHeight;i<0&&window.scrollBy(0,i),a>c&&window.scrollBy(0,a-c)}},{key:"setToTheLastBlock",value:function(){var t=this.Editor.BlockManager.lastBlock;if(t)if(this.Editor.Tools.isInitial(t.tool)&&t.isEmpty)this.setToBlock(t);else{var e=this.Editor.BlockManager.insertAtEnd();this.setToBlock(e)}}},{key:"extractFragmentFromCaretPosition",value:function(){var t=l.default.get();if(t.rangeCount){var e=t.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(e.deleteContents(),n){var o=e.cloneRange();return o.selectNodeContents(n),o.setStart(e.endContainer,e.endOffset),o.extractContents()}}}},{key:"navigateNext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor.BlockManager,n=e.currentBlock,o=e.nextContentfulBlock,r=n.nextInput;return!(!o&&!r||!t&&!this.isAtEnd||(r?this.setToInput(r,this.positions.START):this.setToBlock(o,this.positions.START),0))}},{key:"navigatePrevious",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor.BlockManager,n=e.currentBlock,o=e.previousContentfulBlock;if(!n)return!1;var r=n.previousInput;return!(!o&&!r||!t&&!this.isAtStart||(r?this.setToInput(r,this.positions.END):this.setToBlock(o,this.positions.END),0))}},{key:"createShadow",value:function(t){var n=document.createElement("span");n.classList.add(e.CSS.shadowCaret),t.insertAdjacentElement("beforeEnd",n)}},{key:"restoreCaret",value:function(t){var n=t.querySelector(".".concat(e.CSS.shadowCaret));if(n){var o=new l.default;o.expandToTag(n),setTimeout(function(){var t=document.createRange();t.selectNode(n),t.extractContents()},50)}}},{key:"insertContentAtCaretPosition",value:function(t){var e=document.createDocumentFragment(),n=document.createElement("div"),o=l.default.get(),r=l.default.range;n.innerHTML=t,Array.from(n.childNodes).forEach(function(t){return e.appendChild(t)});var i=e.lastChild;r.deleteContents(),r.insertNode(e);var a=document.createRange();a.setStart(i,i.textContent.length),o.removeAllRanges(),o.addRange(a)}},{key:"getHigherLevelSiblings",value:function(t,e){for(var n=t,o=[];n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;for(var r="left"===e?"previousSibling":"nextSibling";n[r];)n=n[r],o.push(n);return o}},{key:"positions",get:function(){return{START:"start",END:"end",DEFAULT:"default"}}},{key:"isAtStart",get:function(){var t=l.default.get(),e=f.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput),n=t.focusNode;if(f.default.isNativeInput(e))return 0===e.selectionEnd;if(!t.anchorNode)return!1;var o=n.textContent.search(/\S/);-1===o&&(o=0);var r=t.focusOffset;if(n.nodeType!==Node.TEXT_NODE&&n.childNodes.length&&(n.childNodes[r]?(n=n.childNodes[r],r=0):(n=n.childNodes[r-1],r=n.textContent.length)),f.default.isLineBreakTag(e)||f.default.isEmpty(e)){var i=this.getHigherLevelSiblings(n,"left"),a=i.every(function(t){var e=f.default.isLineBreakTag(t),n=1===t.children.length&&f.default.isLineBreakTag(t.children[0]),o=e||n;return f.default.isEmpty(t)&&!o});if(a&&r===o)return!0}return null===e||n===e&&r<=o}},{key:"isAtEnd",get:function(){var t=l.default.get(),e=t.focusNode,n=f.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(f.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(!t.focusNode)return!1;var o=t.focusOffset;if(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length&&(e.childNodes[o-1]?(e=e.childNodes[o-1],o=e.textContent.length):(e=e.childNodes[0],o=0)),f.default.isLineBreakTag(n)||f.default.isEmpty(n)){var r=this.getHigherLevelSiblings(e,"right"),i=r.every(function(t,e){var n=e===r.length-1&&f.default.isLineBreakTag(t);return n||f.default.isEmpty(t)&&!f.default.isLineBreakTag(t)});if(i&&o===e.textContent.length)return!0}var a=n.textContent.replace(/\s+$/,"");return e===n&&o>=a.length}}],[{key:"CSS",get:function(){return{shadowCaret:"cdx-shadow-caret"}}}]),e}(u.default);o.default=h,h.displayName="Caret",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(28),n(14)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f){"use strict";var d=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),a=d(a),s=d(s),c=d(c),l=d(l),u=d(u),f=d(f);var p=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).onMouseUp=function(){var e=t.Editor.Listeners;e.off(document,"mouseover",t.onMouseOver),e.off(document,"mouseup",t.onMouseUp)},t.onMouseOver=function(e){var n=t.Editor.BlockManager,o=n.getBlockByChildNode(e.relatedTarget)||t.lastSelectedBlock,r=n.getBlockByChildNode(e.target);if(o&&r&&r!==o){if(o===t.firstSelectedBlock)return u.default.get().removeAllRanges(),o.selected=!0,void(r.selected=!0);if(r===t.firstSelectedBlock)return o.selected=!1,void(r.selected=!1);t.toggleBlocksSelectedState(o,r),t.lastSelectedBlock=r}},t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"watchSelection",value:function(t){if(t.button===f.default.mouseButtons.LEFT){var e=this.Editor,n=e.BlockManager,o=(e.UI,e.Listeners);this.firstSelectedBlock=n.getBlock(t.target),this.lastSelectedBlock=this.firstSelectedBlock,o.on(document,"mouseover",this.onMouseOver),o.on(document,"mouseup",this.onMouseUp)}}},{key:"toggleBlockSelectedState",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.Editor.BlockManager;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=e.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,u.default.get().removeAllRanges());var n=e.blocks.indexOf(this.lastSelectedBlock)+(t?1:-1),o=e.blocks[n];o&&(this.lastSelectedBlock.selected!==o.selected?o.selected=!0:this.lastSelectedBlock.selected=!1,this.lastSelectedBlock=o)}},{key:"clear",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.BlockSelection,r=e.Caret,i=n.blocks.indexOf(this.firstSelectedBlock),a=n.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&i>-1&&a>-1)if(t&&t instanceof KeyboardEvent)switch(t.keyCode){case f.default.keyCodes.DOWN:case f.default.keyCodes.RIGHT:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);break;case f.default.keyCodes.UP:case f.default.keyCodes.LEFT:r.setToBlock(n.blocks[Math.min(i,a)],r.positions.START);break;default:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END)}else r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);this.firstSelectedBlock=this.lastSelectedBlock=null}},{key:"toggleBlocksSelectedState",value:function(t,e){for(var n=this.Editor.BlockManager,o=n.blocks.indexOf(t),r=n.blocks.indexOf(e),i=t.selected!==e.selected,a=Math.min(o,r);a<=Math.max(o,r);a++){var s=n.blocks[a];s!==this.firstSelectedBlock&&s!==(i?t:e)&&(n.blocks[a].selected=!n.blocks[a].selected)}}}]),e}(l.default);o.default=p,p.displayName="CrossBlockSelection",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(26),n(27),n(1),n(2),n(4),n(5),n(6),n(28),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d){"use strict";var p=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=p(r),i=p(i),a=p(a),s=p(s),c=p(c),l=p(l),u=p(u),f=p(f);var h=function(t){function e(){var t,n;return(0,a.default)(this,e),(t=(0,c.default)(this,(0,l.default)(e).apply(this,arguments))).isStartedAtEditor=!1,t.processDrop=(n=(0,i.default)(r.default.mark(function e(n){var o,i,a,s,c,l;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=t.Editor,i=o.BlockManager,a=o.Caret,s=o.Paste,n.preventDefault(),i.blocks.forEach(function(t){return t.dropTarget=!1}),f.default.isAtEditor&&!f.default.isCollapsed&&t.isStartedAtEditor&&document.execCommand("delete"),t.isStartedAtEditor=!1;try{c=i.setCurrentBlockByChildNode(n.target),t.Editor.Caret.setToBlock(c,a.positions.END)}catch(e){l=i.setCurrentBlockByChildNode(i.lastBlock.holder),t.Editor.Caret.setToBlock(l,a.positions.END)}s.processDataTransfer(n.dataTransfer,!0);case 7:case"end":return e.stop()}},e)})),function(t){return n.apply(this,arguments)}),t}return(0,u.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){this.bindEvents()}},{key:"bindEvents",value:function(){var t=this;this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"drop",this.processDrop,!0),this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"dragstart",function(e){f.default.isAtEditor&&!f.default.isCollapsed&&(t.isStartedAtEditor=!0),t.Editor.InlineToolbar.close()}),this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"dragover",function(t){return t.preventDefault()},!0)}}]),e}((d=p(d)).default);o.default=h,h.displayName="DragNDrop",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l){"use strict";var u=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),c=u(c);var f=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).subscribers={},t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"on",value:function(t,e){t in this.subscribers||(this.subscribers[t]=[]),this.subscribers[t].push(e)}},{key:"emit",value:function(t,e){this.subscribers[t]&&this.subscribers[t].reduce(function(t,e){var n=e(t);return n||t},e)}},{key:"off",value:function(t,e){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],r={element:t,eventType:e,handler:n,options:o},i=this.findOne(t,e,n);i||(this.allListeners.push(r),t.addEventListener(e,n,o))}},{key:"off",value:function(t,e,n,o){var r=this,i=this.findAll(t,e,n);i.forEach(function(t,e){var n=r.allListeners.indexOf(i[e]);n>0&&(r.allListeners.splice(n,1),t.element.removeEventListener(t.eventType,t.handler,t.options))})}},{key:"findOne",value:function(t,e,n){var o=this.findAll(t,e,n);return o.length>0?o[0]:null}},{key:"findAll",value:function(t,e,n){var o=t?this.findByEventTarget(t):[];return t&&e&&n?o.filter(function(t){return t.eventType===e&&t.handler===n}):t&&e?o.filter(function(t){return t.eventType===e}):o}},{key:"removeAll",value:function(){this.allListeners.map(function(t){t.element.removeEventListener(t.eventType,t.handler)}),this.allListeners=[]}},{key:"findByEventTarget",value:function(t){return this.allListeners.filter(function(e){if(e.element===t)return e})}},{key:"findByType",value:function(t){return this.allListeners.filter(function(e){if(e.eventType===t)return e})}},{key:"findByHandler",value:function(t){return this.allListeners.filter(function(e){if(e.handler===t)return e})}}]),e}((l=u(l)).default);o.default=f,f.displayName="Listeners",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(26),n(27),n(1),n(2),n(4),n(5),n(6),n(7),n(14),n(71)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p){"use strict";var h=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),a=h(a),s=h(s),c=h(c),l=h(l),u=h(u),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,c.default)(this,(0,l.default)(e).apply(this,arguments))).mutationDebouncer=d.default.debounce(function(){t.updateNativeInputs(),t.config.onChange()},e.DebounceTimer),t.nativeInputs=[],t}var n;return(0,u.default)(e,t),(0,s.default)(e,[{key:"destroy",value:function(){var t=this;this.mutationDebouncer=null,this.observer.disconnect(),this.observer=null,this.nativeInputs.forEach(function(e){return t.Editor.Listeners.off(e,"input",t.mutationDebouncer)})}},{key:"prepare",value:(n=(0,i.default)(r.default.mark(function t(){var e=this;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:window.setTimeout(function(){e.setObserver()},1e3);case 1:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"disable",value:function(){this.disabled=!0}},{key:"enable",value:function(){this.disabled=!1}},{key:"setObserver",value:function(){var t=this,e=this.Editor.UI;this.observer=new MutationObserver(function(e,n){t.mutationHandler(e,n)}),this.observer.observe(e.nodes.redactor,{childList:!0,attributes:!0,subtree:!0,characterData:!0,characterDataOldValue:!0})}},{key:"mutationHandler",value:function(t,e){if(!this.disabled){var n=!1;t.forEach(function(t){switch(t.type){case"childList":case"subtree":case"characterData":case"characterDataOldValue":n=!0;break;case"attributes":var e=t.target;if(!e.classList.contains(p.default.CSS.wrapper))return void(n=!0)}}),n&&this.mutationDebouncer()}}},{key:"updateNativeInputs",value:function(){var t=this;this.nativeInputs&&this.nativeInputs.forEach(function(e){t.Editor.Listeners.off(e,"input")}),this.nativeInputs=Array.from(this.Editor.UI.nodes.redactor.querySelectorAll("textarea, input, select")),this.nativeInputs.forEach(function(e){return t.Editor.Listeners.on(e,"input",t.mutationDebouncer)})}}]),e}(f.default);o.default=v,v.displayName="ModificationsObserver",v.DebounceTimer=450,t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(349)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u){"use strict";var f=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),c=f(c),l=f(l),u=f(u);var d=function(t){function e(){return(0,r.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,i.default)(e,[{key:"show",value:function(t){u.default.show(t)}}]),e}(l.default);o.default=d,d.displayName="Notifier",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(98),n(26),n(27),n(58),n(1),n(2),n(4),n(5),n(6),n(7),n(13),n(14)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p,h,v){"use strict";var g=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=g(r),i=g(i),a=g(a),s=g(s),c=g(c),l=g(l),u=g(u),f=g(f),d=g(d),p=g(p),h=g(h),v=g(v);var y=function(t){function e(){var t,n;return(0,c.default)(this,e),(t=(0,u.default)(this,(0,f.default)(e).apply(this,arguments))).toolsTags={},t.tagsByTool={},t.toolsPatterns=[],t.toolsFiles={},t.exceptionList=[],t.processTool=function(e){var n=(0,s.default)(e,2),o=n[0],r=n[1];try{var i=new t.Editor.Tools.blockTools[o]({api:t.Editor.API.methods,config:{},data:{}});if(!1===r.pasteConfig)return void t.exceptionList.push(o);if("function"!=typeof i.onPaste)return;var a=r.pasteConfig||{};t.getTagsConfig(o,a),t.getFilesConfig(o,a),t.getPatternsConfig(o,a)}catch(t){v.default.log("Paste handling for «".concat(o,"» Tool hasn't been set up because of the error"),"warn",t)}},t.handlePasteEvent=(n=(0,a.default)(i.default.mark(function e(n){var o,r,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.Editor,r=o.BlockManager,a=o.Toolbar,r.currentBlock&&(!t.isNativeBehaviour(n.target)||n.clipboardData.types.includes("Files"))){e.next=3;break}return e.abrupt("return");case 3:if(!r.currentBlock||!t.exceptionList.includes(r.currentBlock.name)){e.next=5;break}return e.abrupt("return");case 5:n.preventDefault(),t.processDataTransfer(n.clipboardData),r.clearFocused(),a.close();case 9:case"end":return e.stop()}},e)})),function(t){return n.apply(this,arguments)}),t}var n,o,p,g,y,b,k,m,x;return(0,d.default)(e,t),(0,l.default)(e,[{key:"prepare",value:(x=(0,a.default)(i.default.mark(function t(){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.setCallback(),this.processTools();case 2:case"end":return t.stop()}},t,this)})),function(){return x.apply(this,arguments)})},{key:"processDataTransfer",value:(m=(0,a.default)(i.default.mark(function t(e){var n,o,r,a,s,c,l,u,f=arguments;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=f.length>1&&void 0!==f[1]&&f[1],o=this.Editor.Sanitizer,!((r=e.types).includes?r.includes("Files"):r.contains("Files"))){t.next=8;break}return t.next=7,this.processFiles(e.files);case 7:return t.abrupt("return");case 8:if(a=e.getData("text/plain"),s=e.getData("text/html"),n&&a.trim()&&s.trim()&&(s="

"+(s.trim()?s:a)+"

"),c=Object.keys(this.toolsTags).reduce(function(t,e){return t[e.toLowerCase()]=!0,t},{}),l=Object.assign({},c,o.getAllInlineToolsConfig(),{br:{}}),(u=o.clean(s,l)).trim()&&u.trim()!==a&&h.default.isHTMLString(u)){t.next=19;break}return t.next=17,this.processText(a);case 17:t.next=21;break;case 19:return t.next=21,this.processText(u,!0);case 21:case"end":return t.stop()}},t,this)})),function(t){return m.apply(this,arguments)})},{key:"processText",value:(k=(0,a.default)(i.default.mark(function t(e){var n,o,r,s,c,l,u,f,d=this,p=arguments;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=p.length>1&&void 0!==p[1]&&p[1],o=this.Editor,r=o.Caret,s=o.BlockManager,c=o.Tools,(l=n?this.processHTML(e):this.processPlain(e)).length){t.next=5;break}return t.abrupt("return");case 5:if(1!==l.length){t.next=8;break}return l[0].isBlock?this.processSingleBlock(l.pop()):this.processInlinePaste(l.pop()),t.abrupt("return");case 8:return u=s.currentBlock&&c.isInitial(s.currentBlock.tool),f=u&&s.currentBlock.isEmpty,t.next=12,Promise.all(l.map(function(){var t=(0,a.default)(i.default.mark(function t(e,n){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.insertBlock(e,0===n&&f);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()));case 12:s.currentBlock&&r.setToBlock(s.currentBlock,r.positions.END);case 13:case"end":return t.stop()}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"setCallback",value:function(){var t=this.Editor.Listeners;t.on(document,"paste",this.handlePasteEvent)}},{key:"processTools",value:function(){var t=this.Editor.Tools.blockTools;Object.entries(t).forEach(this.processTool)}},{key:"getTagsConfig",value:function(t,e){var n=this,o=e.tags||[];o.forEach(function(e){n.toolsTags.hasOwnProperty(e)?v.default.log("Paste handler for «".concat(t,"» Tool on «").concat(e,"» tag is skipped ")+"because it is already used by «".concat(n.toolsTags[e].tool,"» Tool."),"warn"):n.toolsTags[e.toUpperCase()]={tool:t}}),this.tagsByTool[t]=o.map(function(t){return t.toUpperCase()})}},{key:"getFilesConfig",value:function(t,e){var n=e.files,o=void 0===n?{}:n,r=o.extensions,i=o.mimeTypes;(r||i)&&(r&&!Array.isArray(r)&&(v.default.log("«extensions» property of the onDrop config for «".concat(t,"» Tool should be an array")),r=[]),i&&!Array.isArray(i)&&(v.default.log("«mimeTypes» property of the onDrop config for «".concat(t,"» Tool should be an array")),i=[]),i&&(i=i.filter(function(e){return!!v.default.isValidMimeType(e)||(v.default.log("MIME type value «".concat(e,"» for the «").concat(t,"» Tool is not a valid MIME type"),"warn"),!1)})),this.toolsFiles[t]={extensions:r||[],mimeTypes:i||[]})}},{key:"getPatternsConfig",value:function(t,e){var n=this;e.patterns&&!v.default.isEmpty(e.patterns)&&Object.entries(e.patterns).forEach(function(e){var o=(0,s.default)(e,2),r=o[0],i=o[1];i instanceof RegExp||v.default.log("Pattern ".concat(i," for «").concat(t,"» Tool is skipped because it should be a Regexp instance."),"warn"),n.toolsPatterns.push({key:r,pattern:i,tool:t})})}},{key:"isNativeBehaviour",value:function(t){return h.default.isNativeInput(t)}},{key:"processFiles",value:(b=(0,a.default)(i.default.mark(function t(e){var n,o,r,a,s,c,l=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.Editor,o=n.BlockManager,r=n.Tools,t.next=3,Promise.all(Array.from(e).map(function(t){return l.processFile(t)}));case 3:a=(a=t.sent).filter(function(t){return!!t}),s=r.isInitial(o.currentBlock.tool),c=s&&o.currentBlock.isEmpty,a.forEach(function(t,e){o.paste(t.type,t.event,0===e&&c)});case 8:case"end":return t.stop()}},t,this)})),function(t){return b.apply(this,arguments)})},{key:"processFile",value:(y=(0,a.default)(i.default.mark(function t(e){var n,o,r,a,c;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=v.default.getFileExtension(e),o=Object.entries(this.toolsFiles).find(function(t){var o=(0,s.default)(t,2),r=(o[0],o[1]),i=r.mimeTypes,a=r.extensions,c=e.type.split("/"),l=(0,s.default)(c,2),u=l[0],f=l[1],d=a.find(function(t){return t.toLowerCase()===n.toLowerCase()}),p=i.find(function(t){var e=t.split("/"),n=(0,s.default)(e,2),o=n[0],r=n[1];return o===u&&(r===f||"*"===r)});return!!d||!!p})){t.next=4;break}return t.abrupt("return");case 4:return r=(0,s.default)(o,1),a=r[0],c=this.composePasteEvent("file",{file:e}),t.abrupt("return",{event:c,type:a});case 7:case"end":return t.stop()}},t,this)})),function(t){return y.apply(this,arguments)})},{key:"processHTML",value:function(t){var e=this,n=this.Editor,o=n.Tools,r=n.Sanitizer,i=this.config.initialBlock,a=h.default.make("DIV");a.innerHTML=t;var s=this.getNodes(a);return s.map(function(t){var n,a=i,s=!1;switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(n=h.default.make("div")).appendChild(t);break;case Node.ELEMENT_NODE:n=t,s=!0,e.toolsTags[n.tagName]&&(a=e.toolsTags[n.tagName].tool)}var c=o.blockTools[a].pasteConfig.tags,l=c.reduce(function(t,e){return t[e.toLowerCase()]={},t},{}),u=Object.assign({},l,r.getInlineToolsConfig(a));n.innerHTML=r.clean(n.innerHTML,u);var f=e.composePasteEvent("tag",{data:n});return{content:n,isBlock:s,tool:a,event:f}}).filter(function(t){return!h.default.isNodeEmpty(t.content)||h.default.isSingleTag(t.content)})}},{key:"processPlain",value:function(t){var e=this,n=this.config.initialBlock;if(this.Editor.Tools,!t)return[];var o=n;return t.split(/\r?\n/).filter(function(t){return t.trim()}).map(function(t){var n=h.default.make("div");n.innerHTML=t;var r=e.composePasteEvent("tag",{data:n});return{content:n,tool:o,isBlock:!1,event:r}})}},{key:"processSingleBlock",value:(g=(0,a.default)(i.default.mark(function t(e){var n,o,r,a,s;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.Editor,o=n.Caret,r=n.BlockManager,a=n.Tools,(s=r.currentBlock)&&e.tool===s.name&&h.default.containsOnlyInlineElements(e.content.innerHTML)){t.next=5;break}return this.insertBlock(e,s&&a.isInitial(s.tool)&&s.isEmpty),t.abrupt("return");case 5:o.insertContentAtCaretPosition(e.content.innerHTML);case 6:case"end":return t.stop()}},t,this)})),function(t){return g.apply(this,arguments)})},{key:"processInlinePaste",value:(p=(0,a.default)(i.default.mark(function t(n){var o,r,a,s,c,l,u,f,d,p;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.Editor,r=o.BlockManager,a=o.Caret,s=o.Sanitizer,c=o.Tools,l=n.content,n.tool,!(r.currentBlock&&c.isInitial(r.currentBlock.tool)&&l.textContent.length1&&void 0!==l[1]&&l[1],o=this.Editor,r=o.BlockManager,a=o.Caret,s=r.currentBlock,!(n&&s&&s.isEmpty)){t.next=7;break}return c=r.paste(e.tool,e.event,!0),a.setToBlock(c,a.positions.END),t.abrupt("return");case 7:c=r.paste(e.tool,e.event),a.setToBlock(c,a.positions.END);case 9:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"getNodes",value:function(t){var e=this,n=Array.from(t.childNodes),o=Object.keys(this.toolsTags);return n.reduce(function t(n,i){if(h.default.isEmpty(i)&&!h.default.isSingleTag(i))return n;var a=n[n.length-1],s=new DocumentFragment;switch(a&&h.default.isFragment(a)&&(s=n.pop()),i.nodeType){case Node.ELEMENT_NODE:var c=i;if("BR"===c.tagName)return[].concat((0,r.default)(n),[s,new DocumentFragment]);var l=e.toolsTags[c.tagName]||{},u=l.tool,f=void 0===u?"":u,d=e.tagsByTool[f]||[],p=o.includes(c.tagName),v=h.default.blockElements.includes(c.tagName.toLowerCase()),g=Array.from(c.children).some(function(t){var e=t.tagName;return o.includes(e)&&!d.includes(e)}),y=Array.from(c.children).some(function(t){var e=t.tagName;return h.default.blockElements.includes(e.toLowerCase())});if(!v&&!p&&!g)return s.appendChild(c),[].concat((0,r.default)(n),[s]);if(p&&!g||v&&!y&&!g)return[].concat((0,r.default)(n),[s,c]);break;case Node.TEXT_NODE:return s.appendChild(i),[].concat((0,r.default)(n),[s]);default:return[].concat((0,r.default)(n),[s])}return[].concat((0,r.default)(n),(0,r.default)(Array.from(i.childNodes).reduce(t,[])))},[])}},{key:"composePasteEvent",value:function(t,e){return new CustomEvent(t,{detail:e})}}]),e}(p.default);o.default=y,y.displayName="Paste",y.PATTERN_PROCESSING_MAX_LENGTH=450,t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(13),n(28),n(71)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d){"use strict";var p=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=p(r),i=p(i),a=p(a),s=p(s),c=p(c),l=p(l),u=p(u),f=p(f),d=p(d);var h=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).isRectSelectionActivated=!1,t.SCROLL_SPEED=3,t.HEIGHT_OF_SCROLL_ZONE=40,t.BOTTOM_SCROLL_ZONE=1,t.TOP_SCROLL_ZONE=2,t.MAIN_MOUSE_BUTTON=0,t.mousedown=!1,t.isScrolling=!1,t.inScrollZone=null,t.startX=0,t.startY=0,t.mouseX=0,t.mouseY=0,t.stackOfSelected=[],t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"prepare",value:function(){var t=this,e=this.Editor.Listeners,n=this.genHTML(),o=n.container;e.on(o,"mousedown",function(e){e.button===t.MAIN_MOUSE_BUTTON&&t.startSelection(e.pageX,e.pageY)},!1),e.on(document.body,"mousemove",function(e){t.changingRectangle(e),t.scrollByZones(e.clientY)},!1),e.on(document.body,"mouseleave",function(){t.clearSelection(),t.endSelection()}),e.on(window,"scroll",function(e){t.changingRectangle(e)},!1),e.on(document.body,"mouseup",function(){t.endSelection()},!1)}},{key:"startSelection",value:function(t,e){this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[];var n=document.elementFromPoint(t-window.pageXOffset,e-window.pageYOffset),o=[".".concat(d.default.CSS.content),".".concat(this.Editor.Toolbar.CSS.toolbar),".".concat(this.Editor.InlineToolbar.CSS.inlineToolbar)],r=n.closest("."+this.Editor.UI.CSS.editorWrapper),i=o.some(function(t){return!!n.closest(t)});r&&!i&&(this.mousedown=!0,this.startX=t,this.startY=e)}},{key:"endSelection",value:function(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none";var t=this.Editor.BlockSelection.selectedBlocks;1===t.length&&this.Editor.ConversionToolbar.tryToShow(t[0])}},{key:"isRectActivated",value:function(){return this.isRectSelectionActivated}},{key:"clearSelection",value:function(){this.isRectSelectionActivated=!1}},{key:"scrollByZones",value:function(t){this.inScrollZone=null,t<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-t<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),this.inScrollZone?this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0):this.isScrolling=!1}},{key:"genHTML",value:function(){var t=this.Editor.UI,n=t.nodes.holder.querySelector("."+t.CSS.editorWrapper),o=u.default.make("div",e.CSS.overlay,{}),r=u.default.make("div",e.CSS.overlayContainer,{}),i=u.default.make("div",e.CSS.rect,{});return r.appendChild(i),o.appendChild(r),n.appendChild(o),this.overlayRectangle=i,{container:n,overlay:o}}},{key:"scrollVertical",value:function(t){var e=this;if(this.inScrollZone&&this.mousedown){var n=window.pageYOffset;window.scrollBy(0,t),this.mouseY+=window.pageYOffset-n,setTimeout(function(){e.scrollVertical(t)},0)}}},{key:"changingRectangle",value:function(t){if(this.mousedown){void 0!==t.pageY&&(this.mouseX=t.pageX,this.mouseY=t.pageY);var e=this.genInfoForMouseSelection(),n=e.rightPos,o=e.leftPos,r=e.index,i=this.startX>n&&this.mouseX>n,a=this.startX=this.startY?(this.overlayRectangle.style.top="".concat(this.startY-window.pageYOffset,"px"),this.overlayRectangle.style.bottom="calc(100% - ".concat(this.mouseY-window.pageYOffset,"px")):(this.overlayRectangle.style.bottom="calc(100% - ".concat(this.startY-window.pageYOffset,"px"),this.overlayRectangle.style.top="".concat(this.mouseY-window.pageYOffset,"px")),this.mouseX>=this.startX?(this.overlayRectangle.style.left="".concat(this.startX-window.pageXOffset,"px"),this.overlayRectangle.style.right="calc(100% - ".concat(this.mouseX-window.pageXOffset,"px")):(this.overlayRectangle.style.right="calc(100% - ".concat(this.startX-window.pageXOffset,"px"),this.overlayRectangle.style.left="".concat(this.mouseX-window.pageXOffset,"px"))}},{key:"genInfoForMouseSelection",value:function(){var t,e=document.body.offsetWidth,n=e/2,o=this.mouseY-window.pageYOffset,r=document.elementFromPoint(n,o),i=this.Editor.BlockManager.getBlockByChildNode(r);void 0!==i&&(t=this.Editor.BlockManager.blocks.findIndex(function(t){return t.holder===i.holder}));var a=this.Editor.BlockManager.lastBlock.holder.querySelector("."+d.default.CSS.content),s=Number.parseInt(window.getComputedStyle(a).width,10)/2,c=n-s,l=n+s;return{index:t,leftPos:c,rightPos:l}}},{key:"addBlockInSelection",value:function(t){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(t),this.stackOfSelected.push(t)}},{key:"trySelectNextBlock",value:function(t){var e=this,n=this.stackOfSelected[this.stackOfSelected.length-1]===t,o=this.stackOfSelected.length;if(!n){var r=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0,i=o<=1?0:r?1:-1,a=t>this.stackOfSelected[o-1]&&1===i,s=tthis.stackOfSelected[o-1]||void 0===this.stackOfSelected[o-1])){if(!l&&t=t;u--)this.addBlockInSelection(u);else if(l){var f,d=o-1;for(f=t>this.stackOfSelected[o-1]?function(){return t>e.stackOfSelected[d]}:function(){return t1&&void 0!==arguments[1]?arguments[1]:{},n={tags:e},o=this.createHTMLJanitorInstance(n);return o.clean(t)}},{key:"composeToolConfig",value:function(t){if(this.configCache[t])return this.configCache[t];var e=this.Editor.Tools.apiSettings.SANITIZE_CONFIG,n=this.Editor.Tools.available[t],o=this.getInlineToolsConfig(t);if(!n.sanitize||n[e]&&d.default.isEmpty(n[e]))return o;var r=n.sanitize,a={};for(var s in r)if(r.hasOwnProperty(s)){var c=r[s];"object"===(0,i.default)(c)?a[s]=Object.assign({},o,c):a[s]=c}return this.configCache[t]=a,a}},{key:"getInlineToolsConfig",value:function(t){var e=this.Editor.Tools,n=e.getToolSettings(t),o=n.inlineToolbar||[],r={};return"boolean"==typeof o&&o?r=this.getAllInlineToolsConfig():o.map(function(t){r=Object.assign(r,e.inline[t][e.apiSettings.SANITIZE_CONFIG])}),r}},{key:"getAllInlineToolsConfig",value:function(){var t=this.Editor.Tools;if(this.inlineToolsConfigCache)return this.inlineToolsConfigCache;var e={};return Object.entries(t.inline).forEach(function(n){var o=(0,r.default)(n,2),i=(o[0],o[1]);Object.assign(e,i[t.apiSettings.SANITIZE_CONFIG])}),this.inlineToolsConfigCache=e,this.inlineToolsConfigCache}},{key:"cleanArray",value:function(t,e){var n=this;return t.map(function(t){return n.deepSanitize(t,e)})}},{key:"cleanObject",value:function(t,e){var n={};for(var o in t)if(t.hasOwnProperty(o)){var r=t[o],i=this.isRule(e[o])?e[o]:e;n[o]=this.deepSanitize(r,i)}return n}},{key:"cleanOneItem",value:function(t,e){return"object"===(0,i.default)(e)?this.clean(t,e):!1===e?this.clean(t,{}):t}},{key:"isRule",value:function(t){return"object"===(0,i.default)(t)||"boolean"==typeof t||"function"==typeof t} +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["EditorJS"] = factory(); + else + root["EditorJS"] = factory(); +})(window, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./dist/sprite.svg": +/*!*************************!*\ + !*** ./dist/sprite.svg ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n\n\n \n\n\n\n \n\n\n\n\n\n \n\n\n\n \n \n \n \n \n\n\n\n \n\n\n\n\n\n \n\n\n\n \n\n\n\n \n\n" + +/***/ }), + +/***/ "./node_modules/@babel/polyfill/lib/noConflict.js": +/*!********************************************************!*\ + !*** ./node_modules/@babel/polyfill/lib/noConflict.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +__webpack_require__(/*! core-js/es6 */ "./node_modules/core-js/es6/index.js"); + +__webpack_require__(/*! core-js/fn/array/includes */ "./node_modules/core-js/fn/array/includes.js"); + +__webpack_require__(/*! core-js/fn/string/pad-start */ "./node_modules/core-js/fn/string/pad-start.js"); + +__webpack_require__(/*! core-js/fn/string/pad-end */ "./node_modules/core-js/fn/string/pad-end.js"); + +__webpack_require__(/*! core-js/fn/symbol/async-iterator */ "./node_modules/core-js/fn/symbol/async-iterator.js"); + +__webpack_require__(/*! core-js/fn/object/get-own-property-descriptors */ "./node_modules/core-js/fn/object/get-own-property-descriptors.js"); + +__webpack_require__(/*! core-js/fn/object/values */ "./node_modules/core-js/fn/object/values.js"); + +__webpack_require__(/*! core-js/fn/object/entries */ "./node_modules/core-js/fn/object/entries.js"); + +__webpack_require__(/*! core-js/fn/promise/finally */ "./node_modules/core-js/fn/promise/finally.js"); + +__webpack_require__(/*! core-js/web */ "./node_modules/core-js/web/index.js"); + +__webpack_require__(/*! regenerator-runtime/runtime */ "./node_modules/regenerator-runtime/runtime.js"); + +/***/ }), + +/***/ "./node_modules/@babel/polyfill/noConflict.js": +/*!****************************************************!*\ + !*** ./node_modules/@babel/polyfill/noConflict.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./lib/noConflict */ "./node_modules/@babel/polyfill/lib/noConflict.js"); + + +/***/ }), + +/***/ "./node_modules/@babel/register/lib/browser.js": +/*!*****************************************************!*\ + !*** ./node_modules/@babel/register/lib/browser.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = register; +exports.revert = revert; + +function register() {} + +function revert() {} + +/***/ }), + +/***/ "./node_modules/@babel/register/lib/index.js": +/*!***************************************************!*\ + !*** ./node_modules/@babel/register/lib/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = function (...args) { + return register(...args); +}; + +exports.__esModule = true; + +const node = __webpack_require__(/*! ./node */ "./node_modules/@babel/register/lib/browser.js"); + +const register = node.default; +Object.assign(exports, node); + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +module.exports = _arrayWithHoles; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } +} + +module.exports = _arrayWithoutHoles; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +module.exports = _assertThisInitialized; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js": +/*!*****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} + +module.exports = _asyncToGenerator; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +module.exports = _classCallCheck; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/createClass.js": +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/createClass.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +module.exports = _createClass; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +module.exports = _defineProperty; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +module.exports = _getPrototypeOf; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/inherits.js": +/*!*********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/inherits.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); +} + +module.exports = _inherits; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} + +module.exports = _interopRequireDefault; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +module.exports = _iterableToArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +module.exports = _iterableToArrayLimit; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +module.exports = _nonIterableRest; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +module.exports = _nonIterableSpread; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": +/*!**************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var _typeof = __webpack_require__(/*! ../helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"); + +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"); + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } + + return assertThisInitialized(self); +} + +module.exports = _possibleConstructorReturn; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +module.exports = _setPrototypeOf; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js"); + +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); + +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js"); + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); + +var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/iterableToArray.js"); + +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js"); + +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); +} + +module.exports = _toConsumableArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/typeof.js": +/*!*******************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } + +function _typeof(obj) { + if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); + }; + } + + return _typeof(obj); +} + +module.exports = _typeof; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/regenerator/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/@babel/runtime/regenerator/index.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime-module.js"); + + +/***/ }), + +/***/ "./node_modules/@codexteam/shortcuts/dist/shortcuts.js": +/*!*************************************************************!*\ + !*** ./node_modules/@codexteam/shortcuts/dist/shortcuts.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/*! + * Library for handling keyboard shortcuts + * @copyright CodeX (https://codex.so) + * @license MIT + * @author CodeX (https://codex.so) + * @version 1.1.1 + */ +!function(e,t){ true?module.exports=t():undefined}(window,function(){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,n){"use strict";function r(e,t){for(var n=0;n=0&&d.splice(e,1)}function x(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),b(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function h(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var a=f++;n=s||(s=x(e)),o=_.bind(null,n,a,!1),r=_.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),b(t,e),e}(e),o=function(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=u(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),c=t.href;t.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}.bind(null,n,e),r=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=x(e),o=function(t,e){var n=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){m(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return l(n,e),function(t){for(var o=[],r=0;r 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_array-fill.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_array-fill.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_array-includes.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/_array-includes.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js"); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_array-methods.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_array-methods.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var asc = __webpack_require__(/*! ./_array-species-create */ "./node_modules/core-js/modules/_array-species-create.js"); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_array-reduce.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/_array-reduce.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_array-species-constructor.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/_array-species-constructor.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js"); +var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_array-species-create.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/_array-species-create.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(/*! ./_array-species-constructor */ "./node_modules/core-js/modules/_array-species-constructor.js"); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_bind.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/modules/_bind.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/modules/_invoke.js"); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_classof.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/modules/_classof.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js"); +var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_cof.js": +/*!**********************************************!*\ + !*** ./node_modules/core-js/modules/_cof.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_collection-strong.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/_collection-strong.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js"); +var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js"); +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); +var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js"); +var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js"); +var $iterDefine = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/modules/_iter-define.js"); +var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/modules/_iter-step.js"); +var setSpecies = __webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"); +var fastKey = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").fastKey; +var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js"); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_collection-weak.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/_collection-weak.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js"); +var getWeak = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").getWeak; +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js"); +var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js"); +var createArrayMethod = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js"); +var $has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js"); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_collection.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_collection.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js"); +var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js"); +var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js"); +var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var $iterDetect = __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js"); +var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "./node_modules/core-js/modules/_inherit-if-required.js"); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_core.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/modules/_core.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_create-property.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/_create-property.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js"); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_ctx.js": +/*!**********************************************!*\ + !*** ./node_modules/core-js/modules/_ctx.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_date-to-iso-string.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/_date-to-iso-string.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_date-to-primitive.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/_date-to-primitive.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_defined.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/modules/_defined.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_descriptors.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_descriptors.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_dom-create.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_dom-create.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_enum-bug-keys.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_enum-bug-keys.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_enum-keys.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_enum-keys.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js"); +var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js"); +var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js"); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_export.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/_export.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_fails-is-regexp.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/_fails-is-regexp.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var MATCH = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_fails.js": +/*!************************************************!*\ + !*** ./node_modules/core-js/modules/_fails.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_fix-re-wks.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_fix-re-wks.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); +var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js"); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + var fns = exec(defined, SYMBOL, ''[KEY]); + var strfn = fns[0]; + var rxfn = fns[1]; + if (fails(function () { + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + })) { + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_flags.js": +/*!************************************************!*\ + !*** ./node_modules/core-js/modules/_flags.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.2.5.3 get RegExp.prototype.flags +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_for-of.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/_for-of.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); +var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/modules/_iter-call.js"); +var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/modules/_is-array-iter.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/modules/core.get-iterator-method.js"); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_global.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/_global.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_has.js": +/*!**********************************************!*\ + !*** ./node_modules/core-js/modules/_has.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_hide.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/modules/_hide.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js"); +module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_html.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/modules/_html.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").document; +module.exports = document && document.documentElement; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_ie8-dom-define.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/_ie8-dom-define.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_inherit-if-required.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/_inherit-if-required.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var setPrototypeOf = __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js").set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_invoke.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/_invoke.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_iobject.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/modules/_iobject.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js"); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_is-array-iter.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_is-array-iter.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_is-array.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/modules/_is-array.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js"); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_is-integer.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_is-integer.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_is-object.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_is-object.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_is-regexp.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_is-regexp.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js"); +var MATCH = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_iter-call.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_iter-call.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_iter-create.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_iter-create.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js"); +var descriptor = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js"); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_iter-define.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_iter-define.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js"); +var $iterCreate = __webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/modules/_iter-create.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js"); +var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_iter-detect.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_iter-detect.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_iter-step.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_iter-step.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_iterators.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_iterators.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_library.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/modules/_library.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = false; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_math-expm1.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_math-expm1.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_math-fround.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_math-fround.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(/*! ./_math-sign */ "./node_modules/core-js/modules/_math-sign.js"); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_math-log1p.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_math-log1p.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_math-sign.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_math-sign.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_meta.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/modules/_meta.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js")('meta'); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var setDesc = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_microtask.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_microtask.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var macrotask = __webpack_require__(/*! ./_task */ "./node_modules/core-js/modules/_task.js").set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js")(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_new-promise-capability.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/_new-promise-capability.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-assign.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_object-assign.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js"); +var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js"); +var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js"); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-create.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_object-create.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var dPs = __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/modules/_object-dps.js"); +var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js"); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js")('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js").appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-dp.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_object-dp.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-dps.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_object-dps.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js"); + +module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-gopd.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_object-gopd.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/core-js/modules/_ie8-dom-define.js"); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-gopn-ext.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/_object-gopn-ext.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-gopn.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_object-gopn.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/modules/_object-keys-internal.js"); +var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js").concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-gops.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_object-gops.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-gpo.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_object-gpo.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-keys-internal.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/_object-keys-internal.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(false); +var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "./node_modules/core-js/modules/_shared-key.js")('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-keys.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_object-keys.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(/*! ./_object-keys-internal */ "./node_modules/core-js/modules/_object-keys-internal.js"); +var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "./node_modules/core-js/modules/_enum-bug-keys.js"); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-pie.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_object-pie.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-sap.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_object-sap.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_object-to-array.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/_object-to-array.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var isEnum = __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js").f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_own-keys.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/modules/_own-keys.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js"); +var gOPS = __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var Reflect = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_parse-float.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_parse-float.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").parseFloat; +var $trim = __webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js").trim; + +module.exports = 1 / $parseFloat(__webpack_require__(/*! ./_string-ws */ "./node_modules/core-js/modules/_string-ws.js") + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_parse-int.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_parse-int.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").parseInt; +var $trim = __webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js").trim; +var ws = __webpack_require__(/*! ./_string-ws */ "./node_modules/core-js/modules/_string-ws.js"); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_perform.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/modules/_perform.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_promise-resolve.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/_promise-resolve.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/modules/_new-promise-capability.js"); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_property-desc.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_property-desc.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_redefine-all.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/_redefine-all.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_redefine.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/modules/_redefine.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var SRC = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js")('src'); +var TO_STRING = 'toString'; +var $toString = Function[TO_STRING]; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js").inspectSource = function (it) { + return $toString.call(it); +}; + +(module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_same-value.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_same-value.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_set-proto.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_set-proto.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_set-species.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_set-species.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"); +var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_set-to-string-tag.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/_set-to-string-tag.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var TAG = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_shared-key.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_shared-key.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('keys'); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js"); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_shared.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/_shared.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js") ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_species-constructor.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/_species-constructor.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +var SPECIES = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_strict-method.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_strict-method.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_string-at.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_string-at.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_string-context.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/_string-context.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(/*! ./_is-regexp */ "./node_modules/core-js/modules/_is-regexp.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_string-html.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_string-html.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_string-pad.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_string-pad.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var repeat = __webpack_require__(/*! ./_string-repeat */ "./node_modules/core-js/modules/_string-repeat.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_string-repeat.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/_string-repeat.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_string-trim.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_string-trim.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var spaces = __webpack_require__(/*! ./_string-ws */ "./node_modules/core-js/modules/_string-ws.js"); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_string-ws.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_string-ws.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_task.js": +/*!***********************************************!*\ + !*** ./node_modules/core-js/modules/_task.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); +var invoke = __webpack_require__(/*! ./_invoke */ "./node_modules/core-js/modules/_invoke.js"); +var html = __webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js"); +var cel = __webpack_require__(/*! ./_dom-create */ "./node_modules/core-js/modules/_dom-create.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js")(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_to-absolute-index.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/_to-absolute-index.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_to-index.js": +/*!***************************************************!*\ + !*** ./node_modules/core-js/modules/_to-index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_to-integer.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_to-integer.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_to-iobject.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_to-iobject.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js"); +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_to-length.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_to-length.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_to-object.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_to-object.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(/*! ./_defined */ "./node_modules/core-js/modules/_defined.js"); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_to-primitive.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/_to-primitive.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_typed-array.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_typed-array.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js")) { + var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js"); + var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); + var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); + var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + var $typed = __webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js"); + var $buffer = __webpack_require__(/*! ./_typed-buffer */ "./node_modules/core-js/modules/_typed-buffer.js"); + var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); + var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js"); + var propertyDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js"); + var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); + var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js"); + var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); + var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); + var toIndex = __webpack_require__(/*! ./_to-index */ "./node_modules/core-js/modules/_to-index.js"); + var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js"); + var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); + var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); + var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js"); + var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); + var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); + var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/modules/_is-array-iter.js"); + var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js"); + var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js"); + var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f; + var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/modules/core.get-iterator-method.js"); + var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js"); + var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js"); + var createArrayMethod = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js"); + var createArrayIncludes = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js"); + var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js"); + var ArrayIterators = __webpack_require__(/*! ./es6.array.iterator */ "./node_modules/core-js/modules/es6.array.iterator.js"); + var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js"); + var $iterDetect = __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js"); + var setSpecies = __webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js"); + var arrayFill = __webpack_require__(/*! ./_array-fill */ "./node_modules/core-js/modules/_array-fill.js"); + var arrayCopyWithin = __webpack_require__(/*! ./_array-copy-within */ "./node_modules/core-js/modules/_array-copy-within.js"); + var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); + var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js"); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_typed-buffer.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/_typed-buffer.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"); +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js"); +var $typed = __webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); +var redefineAll = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js"); +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var toIndex = __webpack_require__(/*! ./_to-index */ "./node_modules/core-js/modules/_to-index.js"); +var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f; +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +var arrayFill = __webpack_require__(/*! ./_array-fill */ "./node_modules/core-js/modules/_array-fill.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js"); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_typed.js": +/*!************************************************!*\ + !*** ./node_modules/core-js/modules/_typed.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js"); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_uid.js": +/*!**********************************************!*\ + !*** ./node_modules/core-js/modules/_uid.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_user-agent.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_user-agent.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_validate-collection.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/_validate-collection.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_wks-define.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/_wks-define.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js"); +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js"); +var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/modules/_wks-ext.js"); +var defineProperty = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_wks-ext.js": +/*!**************************************************!*\ + !*** ./node_modules/core-js/modules/_wks-ext.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js"); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/_wks.js": +/*!**********************************************!*\ + !*** ./node_modules/core-js/modules/_wks.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js")('wks'); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js"); +var Symbol = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/core.get-iterator-method.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/modules/core.get-iterator-method.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('iterator'); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js"); +module.exports = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js").getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.copy-within.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.copy-within.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.P, 'Array', { copyWithin: __webpack_require__(/*! ./_array-copy-within */ "./node_modules/core-js/modules/_array-copy-within.js") }); + +__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('copyWithin'); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.every.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.every.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $every = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(4); + +$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.fill.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.fill.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.P, 'Array', { fill: __webpack_require__(/*! ./_array-fill */ "./node_modules/core-js/modules/_array-fill.js") }); + +__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('fill'); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.filter.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.filter.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $filter = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(2); + +$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.find-index.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.find-index.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $find = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")(KEY); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.find.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.find.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $find = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")(KEY); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.for-each.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.for-each.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $forEach = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(0); +var STRICT = __webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.from.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.from.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var call = __webpack_require__(/*! ./_iter-call */ "./node_modules/core-js/modules/_iter-call.js"); +var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "./node_modules/core-js/modules/_is-array-iter.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/modules/_create-property.js"); +var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "./node_modules/core-js/modules/core.get-iterator-method.js"); + +$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.index-of.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.index-of.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $indexOf = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.is-array.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.is-array.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Array', { isArray: __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.iterator.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.iterator.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js"); +var step = __webpack_require__(/*! ./_iter-step */ "./node_modules/core-js/modules/_iter-step.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.join.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.join.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.13 Array.prototype.join(separator) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (__webpack_require__(/*! ./_iobject */ "./node_modules/core-js/modules/_iobject.js") != Object || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.last-index-of.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.last-index-of.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.map.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.map.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $map = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(1); + +$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.of.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.of.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/modules/_create-property.js"); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.reduce-right.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.reduce-right.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $reduce = __webpack_require__(/*! ./_array-reduce */ "./node_modules/core-js/modules/_array-reduce.js"); + +$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.reduce.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.reduce.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $reduce = __webpack_require__(/*! ./_array-reduce */ "./node_modules/core-js/modules/_array-reduce.js"); + +$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.slice.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.slice.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var html = __webpack_require__(/*! ./_html */ "./node_modules/core-js/modules/_html.js"); +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js"); +var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.some.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.some.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $some = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(3); + +$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.sort.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.sort.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !__webpack_require__(/*! ./_strict-method */ "./node_modules/core-js/modules/_strict-method.js")($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.array.species.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.array.species.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")('Array'); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.date.now.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.date.now.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.date.to-iso-string.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.date.to-iso-string.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toISOString = __webpack_require__(/*! ./_date-to-iso-string */ "./node_modules/core-js/modules/_date-to-iso-string.js"); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.date.to-json.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.date.to-json.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); + +$export($export.P + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.date.to-primitive.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.date.to-primitive.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var TO_PRIMITIVE = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")(proto, TO_PRIMITIVE, __webpack_require__(/*! ./_date-to-primitive */ "./node_modules/core-js/modules/_date-to-primitive.js")); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.date.to-string.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.date.to-string.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.function.bind.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.function.bind.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.P, 'Function', { bind: __webpack_require__(/*! ./_bind */ "./node_modules/core-js/modules/_bind.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.function.has-instance.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.function.has-instance.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js"); +var HAS_INSTANCE = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.function.name.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.function.name.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.map.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/es6.map.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(/*! ./_collection-strong */ "./node_modules/core-js/modules/_collection-strong.js"); +var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js"); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.acosh.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.acosh.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var log1p = __webpack_require__(/*! ./_math-log1p */ "./node_modules/core-js/modules/_math-log1p.js"); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.asinh.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.asinh.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.5 Math.asinh(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.atanh.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.atanh.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.7 Math.atanh(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.cbrt.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.cbrt.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var sign = __webpack_require__(/*! ./_math-sign */ "./node_modules/core-js/modules/_math-sign.js"); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.clz32.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.clz32.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.11 Math.clz32(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.cosh.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.cosh.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.12 Math.cosh(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.expm1.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.expm1.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $expm1 = __webpack_require__(/*! ./_math-expm1 */ "./node_modules/core-js/modules/_math-expm1.js"); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.fround.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.fround.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Math', { fround: __webpack_require__(/*! ./_math-fround */ "./node_modules/core-js/modules/_math-fround.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.hypot.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.hypot.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.imul.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.imul.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.18 Math.imul(x, y) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.log10.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.log10.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.21 Math.log10(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.log1p.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.log1p.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Math', { log1p: __webpack_require__(/*! ./_math-log1p */ "./node_modules/core-js/modules/_math-log1p.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.log2.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.log2.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.22 Math.log2(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.sign.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.sign.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Math', { sign: __webpack_require__(/*! ./_math-sign */ "./node_modules/core-js/modules/_math-sign.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.sinh.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.sinh.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var expm1 = __webpack_require__(/*! ./_math-expm1 */ "./node_modules/core-js/modules/_math-expm1.js"); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.tanh.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.tanh.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var expm1 = __webpack_require__(/*! ./_math-expm1 */ "./node_modules/core-js/modules/_math-expm1.js"); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.math.trunc.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.math.trunc.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.34 Math.trunc(x) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.constructor.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.constructor.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var cof = __webpack_require__(/*! ./_cof */ "./node_modules/core-js/modules/_cof.js"); +var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "./node_modules/core-js/modules/_inherit-if-required.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f; +var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f; +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +var $trim = __webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js").trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(__webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js")(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(global, NUMBER, $Number); +} + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.epsilon.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.epsilon.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.1 Number.EPSILON +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.is-finite.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.is-finite.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.2 Number.isFinite(number) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var _isFinite = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.is-integer.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.is-integer.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Number', { isInteger: __webpack_require__(/*! ./_is-integer */ "./node_modules/core-js/modules/_is-integer.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.is-nan.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.is-nan.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.is-safe-integer.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.is-safe-integer.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var isInteger = __webpack_require__(/*! ./_is-integer */ "./node_modules/core-js/modules/_is-integer.js"); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.max-safe-integer.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.max-safe-integer.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.min-safe-integer.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.min-safe-integer.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.parse-float.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.parse-float.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $parseFloat = __webpack_require__(/*! ./_parse-float */ "./node_modules/core-js/modules/_parse-float.js"); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.parse-int.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.parse-int.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $parseInt = __webpack_require__(/*! ./_parse-int */ "./node_modules/core-js/modules/_parse-int.js"); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.to-fixed.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.to-fixed.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toInteger = __webpack_require__(/*! ./_to-integer */ "./node_modules/core-js/modules/_to-integer.js"); +var aNumberValue = __webpack_require__(/*! ./_a-number-value */ "./node_modules/core-js/modules/_a-number-value.js"); +var repeat = __webpack_require__(/*! ./_string-repeat */ "./node_modules/core-js/modules/_string-repeat.js"); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.number.to-precision.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.number.to-precision.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var aNumberValue = __webpack_require__(/*! ./_a-number-value */ "./node_modules/core-js/modules/_a-number-value.js"); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.assign.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.assign.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/modules/_object-assign.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.create.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.create.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.define-properties.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.define-properties.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"), 'Object', { defineProperties: __webpack_require__(/*! ./_object-dps */ "./node_modules/core-js/modules/_object-dps.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.define-property.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.define-property.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.freeze.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.freeze.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").onFreeze; + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js": +/*!********************************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var $getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f; + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.get-own-property-names.js": +/*!***************************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.get-own-property-names.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('getOwnPropertyNames', function () { + return __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/core-js/modules/_object-gopn-ext.js").f; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.get-prototype-of.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.get-prototype-of.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.is-extensible.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.is-extensible.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.is-frozen.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.is-frozen.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.is-sealed.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.is-sealed.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.is.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.is.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.10 Object.is(value1, value2) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +$export($export.S, 'Object', { is: __webpack_require__(/*! ./_same-value */ "./node_modules/core-js/modules/_same-value.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.keys.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.keys.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(/*! ./_to-object */ "./node_modules/core-js/modules/_to-object.js"); +var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js"); + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.prevent-extensions.js": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.prevent-extensions.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").onFreeze; + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.seal.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.seal.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").onFreeze; + +__webpack_require__(/*! ./_object-sap */ "./node_modules/core-js/modules/_object-sap.js")('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.set-prototype-of.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.set-prototype-of.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js").set }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.object.to-string.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.object.to-string.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js"); +var test = {}; +test[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.parse-float.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.parse-float.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $parseFloat = __webpack_require__(/*! ./_parse-float */ "./node_modules/core-js/modules/_parse-float.js"); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.parse-int.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.parse-int.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $parseInt = __webpack_require__(/*! ./_parse-int */ "./node_modules/core-js/modules/_parse-int.js"); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.promise.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/es6.promise.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var ctx = __webpack_require__(/*! ./_ctx */ "./node_modules/core-js/modules/_ctx.js"); +var classof = __webpack_require__(/*! ./_classof */ "./node_modules/core-js/modules/_classof.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +var anInstance = __webpack_require__(/*! ./_an-instance */ "./node_modules/core-js/modules/_an-instance.js"); +var forOf = __webpack_require__(/*! ./_for-of */ "./node_modules/core-js/modules/_for-of.js"); +var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js"); +var task = __webpack_require__(/*! ./_task */ "./node_modules/core-js/modules/_task.js").set; +var microtask = __webpack_require__(/*! ./_microtask */ "./node_modules/core-js/modules/_microtask.js")(); +var newPromiseCapabilityModule = __webpack_require__(/*! ./_new-promise-capability */ "./node_modules/core-js/modules/_new-promise-capability.js"); +var perform = __webpack_require__(/*! ./_perform */ "./node_modules/core-js/modules/_perform.js"); +var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js"); +var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/modules/_promise-resolve.js"); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(/*! ./_redefine-all */ "./node_modules/core-js/modules/_redefine-all.js")($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js")($Promise, PROMISE); +__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")(PROMISE); +Wrapper = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js")[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(/*! ./_iter-detect */ "./node_modules/core-js/modules/_iter-detect.js")(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.apply.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.apply.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var rApply = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.construct.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.construct.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js"); +var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/core-js/modules/_a-function.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var bind = __webpack_require__(/*! ./_bind */ "./node_modules/core-js/modules/_bind.js"); +var rConstruct = (__webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.define-property.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.define-property.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.delete-property.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.delete-property.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js").f; +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.enumerate.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.enumerate.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 26.1.5 Reflect.enumerate(target) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +__webpack_require__(/*! ./_iter-create */ "./node_modules/core-js/modules/_iter-create.js")(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.get-prototype-of.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.get-prototype-of.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var getProto = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.get.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.get.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js"); +var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.has.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.has.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.9 Reflect.has(target, propertyKey) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.is-extensible.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.is-extensible.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.10 Reflect.isExtensible(target) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.own-keys.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.own-keys.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__(/*! ./_own-keys */ "./node_modules/core-js/modules/_own-keys.js") }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.prevent-extensions.js": +/*!************************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.prevent-extensions.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.12 Reflect.preventExtensions(target) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.set-prototype-of.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.set-prototype-of.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var setProto = __webpack_require__(/*! ./_set-proto */ "./node_modules/core-js/modules/_set-proto.js"); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.reflect.set.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.reflect.set.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); +var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js"); +var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "./node_modules/core-js/modules/_object-gpo.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.regexp.constructor.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.regexp.constructor.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "./node_modules/core-js/modules/_inherit-if-required.js"); +var dP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f; +var gOPN = __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f; +var isRegExp = __webpack_require__(/*! ./_is-regexp */ "./node_modules/core-js/modules/_is-regexp.js"); +var $flags = __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js"); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var CORRECT_NEW = new $RegExp(re1) !== re1; + +if (__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && (!CORRECT_NEW || __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + re2[__webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js")('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key]; }, + set: function (it) { Base[key] = it; } + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(global, 'RegExp', $RegExp); +} + +__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")('RegExp'); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.regexp.flags.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.regexp.flags.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js") && /./g.flags != 'g') __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js").f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js") +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.regexp.match.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.regexp.match.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// @@match logic +__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('match', 1, function (defined, MATCH, $match) { + // 21.1.3.11 String.prototype.match(regexp) + return [function match(regexp) { + 'use strict'; + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.regexp.replace.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.regexp.replace.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// @@replace logic +__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('replace', 2, function (defined, REPLACE, $replace) { + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [function replace(searchValue, replaceValue) { + 'use strict'; + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.regexp.search.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.regexp.search.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// @@search logic +__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('search', 1, function (defined, SEARCH, $search) { + // 21.1.3.15 String.prototype.search(regexp) + return [function search(regexp) { + 'use strict'; + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.regexp.split.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.regexp.split.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// @@split logic +__webpack_require__(/*! ./_fix-re-wks */ "./node_modules/core-js/modules/_fix-re-wks.js")('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = __webpack_require__(/*! ./_is-regexp */ "./node_modules/core-js/modules/_is-regexp.js"); + var _split = $split; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX = 'lastIndex'; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return _split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while (match = separatorCopy.exec(string)) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + // eslint-disable-next-line no-loop-func + if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () { + for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined; + }); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + $split = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [function split(separator, limit) { + var O = defined(this); + var fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.regexp.to-string.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.regexp.to-string.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(/*! ./es6.regexp.flags */ "./node_modules/core-js/modules/es6.regexp.flags.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var $flags = __webpack_require__(/*! ./_flags */ "./node_modules/core-js/modules/_flags.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js")(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (__webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { + define(function toString() { + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.set.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/es6.set.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(/*! ./_collection-strong */ "./node_modules/core-js/modules/_collection-strong.js"); +var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js"); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.anchor.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.anchor.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.big.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.big.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.blink.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.blink.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.bold.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.bold.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.code-point-at.js": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.code-point-at.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/modules/_string-at.js")(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.ends-with.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.ends-with.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var context = __webpack_require__(/*! ./_string-context */ "./node_modules/core-js/modules/_string-context.js"); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "./node_modules/core-js/modules/_fails-is-regexp.js")(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.fixed.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.fixed.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.fontcolor.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.fontcolor.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.fontsize.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.fontsize.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.from-code-point.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.from-code-point.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js"); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.includes.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.includes.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.7 String.prototype.includes(searchString, position = 0) + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var context = __webpack_require__(/*! ./_string-context */ "./node_modules/core-js/modules/_string-context.js"); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "./node_modules/core-js/modules/_fails-is-regexp.js")(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.italics.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.italics.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.iterator.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.iterator.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(/*! ./_string-at */ "./node_modules/core-js/modules/_string-at.js")(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(/*! ./_iter-define */ "./node_modules/core-js/modules/_iter-define.js")(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.link.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.link.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.raw.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.raw.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.repeat.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.repeat.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(/*! ./_string-repeat */ "./node_modules/core-js/modules/_string-repeat.js") +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.small.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.small.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.starts-with.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.starts-with.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var context = __webpack_require__(/*! ./_string-context */ "./node_modules/core-js/modules/_string-context.js"); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "./node_modules/core-js/modules/_fails-is-regexp.js")(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.strike.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.strike.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.sub.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.sub.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.sup.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.sup.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(/*! ./_string-html */ "./node_modules/core-js/modules/_string-html.js")('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.string.trim.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es6.string.trim.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(/*! ./_string-trim */ "./node_modules/core-js/modules/_string-trim.js")('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.symbol.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/es6.symbol.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var has = __webpack_require__(/*! ./_has */ "./node_modules/core-js/modules/_has.js"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "./node_modules/core-js/modules/_descriptors.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +var META = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js").KEY; +var $fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var shared = __webpack_require__(/*! ./_shared */ "./node_modules/core-js/modules/_shared.js"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "./node_modules/core-js/modules/_set-to-string-tag.js"); +var uid = __webpack_require__(/*! ./_uid */ "./node_modules/core-js/modules/_uid.js"); +var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js"); +var wksExt = __webpack_require__(/*! ./_wks-ext */ "./node_modules/core-js/modules/_wks-ext.js"); +var wksDefine = __webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/modules/_wks-define.js"); +var enumKeys = __webpack_require__(/*! ./_enum-keys */ "./node_modules/core-js/modules/_enum-keys.js"); +var isArray = __webpack_require__(/*! ./_is-array */ "./node_modules/core-js/modules/_is-array.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "./node_modules/core-js/modules/_to-primitive.js"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/core-js/modules/_property-desc.js"); +var _create = __webpack_require__(/*! ./_object-create */ "./node_modules/core-js/modules/_object-create.js"); +var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "./node_modules/core-js/modules/_object-gopn-ext.js"); +var $GOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js"); +var $DP = __webpack_require__(/*! ./_object-dp */ "./node_modules/core-js/modules/_object-dp.js"); +var $keys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js"); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(/*! ./_object-gopn */ "./node_modules/core-js/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(/*! ./_object-pie */ "./node_modules/core-js/modules/_object-pie.js").f = $propertyIsEnumerable; + __webpack_require__(/*! ./_object-gops */ "./node_modules/core-js/modules/_object-gops.js").f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "./node_modules/core-js/modules/_library.js")) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.array-buffer.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.array-buffer.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $typed = __webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js"); +var buffer = __webpack_require__(/*! ./_typed-buffer */ "./node_modules/core-js/modules/_typed-buffer.js"); +var anObject = __webpack_require__(/*! ./_an-object */ "./node_modules/core-js/modules/_an-object.js"); +var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "./node_modules/core-js/modules/_to-absolute-index.js"); +var toLength = __webpack_require__(/*! ./_to-length */ "./node_modules/core-js/modules/_to-length.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var ArrayBuffer = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js").ArrayBuffer; +var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js"); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js")(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(/*! ./_set-species */ "./node_modules/core-js/modules/_set-species.js")(ARRAY_BUFFER); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.data-view.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.data-view.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +$export($export.G + $export.W + $export.F * !__webpack_require__(/*! ./_typed */ "./node_modules/core-js/modules/_typed.js").ABV, { + DataView: __webpack_require__(/*! ./_typed-buffer */ "./node_modules/core-js/modules/_typed-buffer.js").DataView +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.float32-array.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.float32-array.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.float64-array.js": +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.float64-array.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.int16-array.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.int16-array.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.int32-array.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.int32-array.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.int8-array.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.int8-array.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.uint16-array.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.uint16-array.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.uint32-array.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.uint32-array.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.uint8-array.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.uint8-array.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js": +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_typed-array */ "./node_modules/core-js/modules/_typed-array.js")('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.weak-map.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.weak-map.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var each = __webpack_require__(/*! ./_array-methods */ "./node_modules/core-js/modules/_array-methods.js")(0); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +var meta = __webpack_require__(/*! ./_meta */ "./node_modules/core-js/modules/_meta.js"); +var assign = __webpack_require__(/*! ./_object-assign */ "./node_modules/core-js/modules/_object-assign.js"); +var weak = __webpack_require__(/*! ./_collection-weak */ "./node_modules/core-js/modules/_collection-weak.js"); +var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/core-js/modules/_is-object.js"); +var fails = __webpack_require__(/*! ./_fails */ "./node_modules/core-js/modules/_fails.js"); +var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js"); +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var tmp = {}; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = __webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es6.weak-set.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es6.weak-set.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__(/*! ./_collection-weak */ "./node_modules/core-js/modules/_collection-weak.js"); +var validate = __webpack_require__(/*! ./_validate-collection */ "./node_modules/core-js/modules/_validate-collection.js"); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__(/*! ./_collection */ "./node_modules/core-js/modules/_collection.js")(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.array.includes.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es7.array.includes.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $includes = __webpack_require__(/*! ./_array-includes */ "./node_modules/core-js/modules/_array-includes.js")(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__(/*! ./_add-to-unscopables */ "./node_modules/core-js/modules/_add-to-unscopables.js")('includes'); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.object.entries.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es7.object.entries.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $entries = __webpack_require__(/*! ./_object-to-array */ "./node_modules/core-js/modules/_object-to-array.js")(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var ownKeys = __webpack_require__(/*! ./_own-keys */ "./node_modules/core-js/modules/_own-keys.js"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "./node_modules/core-js/modules/_to-iobject.js"); +var gOPD = __webpack_require__(/*! ./_object-gopd */ "./node_modules/core-js/modules/_object-gopd.js"); +var createProperty = __webpack_require__(/*! ./_create-property */ "./node_modules/core-js/modules/_create-property.js"); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.object.values.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es7.object.values.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $values = __webpack_require__(/*! ./_object-to-array */ "./node_modules/core-js/modules/_object-to-array.js")(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.promise.finally.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es7.promise.finally.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var core = __webpack_require__(/*! ./_core */ "./node_modules/core-js/modules/_core.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "./node_modules/core-js/modules/_species-constructor.js"); +var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "./node_modules/core-js/modules/_promise-resolve.js"); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.string.pad-end.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es7.string.pad-end.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $pad = __webpack_require__(/*! ./_string-pad */ "./node_modules/core-js/modules/_string-pad.js"); +var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js"); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.string.pad-start.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es7.string.pad-start.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $pad = __webpack_require__(/*! ./_string-pad */ "./node_modules/core-js/modules/_string-pad.js"); +var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js"); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/es7.symbol.async-iterator.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/es7.symbol.async-iterator.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ./_wks-define */ "./node_modules/core-js/modules/_wks-define.js")('asyncIterator'); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.dom.iterable.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/web.dom.iterable.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $iterators = __webpack_require__(/*! ./es6.array.iterator */ "./node_modules/core-js/modules/es6.array.iterator.js"); +var getKeys = __webpack_require__(/*! ./_object-keys */ "./node_modules/core-js/modules/_object-keys.js"); +var redefine = __webpack_require__(/*! ./_redefine */ "./node_modules/core-js/modules/_redefine.js"); +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var hide = __webpack_require__(/*! ./_hide */ "./node_modules/core-js/modules/_hide.js"); +var Iterators = __webpack_require__(/*! ./_iterators */ "./node_modules/core-js/modules/_iterators.js"); +var wks = __webpack_require__(/*! ./_wks */ "./node_modules/core-js/modules/_wks.js"); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.immediate.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/web.immediate.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var $task = __webpack_require__(/*! ./_task */ "./node_modules/core-js/modules/_task.js"); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.timers.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/web.timers.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// ie9- setTimeout & setInterval additional parameters fix +var global = __webpack_require__(/*! ./_global */ "./node_modules/core-js/modules/_global.js"); +var $export = __webpack_require__(/*! ./_export */ "./node_modules/core-js/modules/_export.js"); +var userAgent = __webpack_require__(/*! ./_user-agent */ "./node_modules/core-js/modules/_user-agent.js"); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + + +/***/ }), + +/***/ "./node_modules/core-js/web/index.js": +/*!*******************************************!*\ + !*** ./node_modules/core-js/web/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! ../modules/web.timers */ "./node_modules/core-js/modules/web.timers.js"); +__webpack_require__(/*! ../modules/web.immediate */ "./node_modules/core-js/modules/web.immediate.js"); +__webpack_require__(/*! ../modules/web.dom.iterable */ "./node_modules/core-js/modules/web.dom.iterable.js"); +module.exports = __webpack_require__(/*! ../modules/_core */ "./node_modules/core-js/modules/_core.js"); + + +/***/ }), + +/***/ "./node_modules/html-janitor/src/html-janitor.js": +/*!*******************************************************!*\ + !*** ./node_modules/html-janitor/src/html-janitor.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(this, function () { + + /** + * @param {Object} config.tags Dictionary of allowed tags. + * @param {boolean} config.keepNestedBlockElements Default false. + */ + function HTMLJanitor(config) { + + var tagDefinitions = config['tags']; + var tags = Object.keys(tagDefinitions); + + var validConfigValues = tags + .map(function(k) { return typeof tagDefinitions[k]; }) + .every(function(type) { return type === 'object' || type === 'boolean' || type === 'function'; }); + + if(!validConfigValues) { + throw new Error("The configuration was invalid"); + } + + this.config = config; + } + + // TODO: not exhaustive? + var blockElementNames = ['P', 'LI', 'TD', 'TH', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'PRE']; + function isBlockElement(node) { + return blockElementNames.indexOf(node.nodeName) !== -1; + } + + var inlineElementNames = ['A', 'B', 'STRONG', 'I', 'EM', 'SUB', 'SUP', 'U', 'STRIKE']; + function isInlineElement(node) { + return inlineElementNames.indexOf(node.nodeName) !== -1; + } + + HTMLJanitor.prototype.clean = function (html) { + const sandbox = document.implementation.createHTMLDocument(); + const root = sandbox.createElement("div"); + root.innerHTML = html; + + this._sanitize(sandbox, root); + + return root.innerHTML; + }; + + HTMLJanitor.prototype._sanitize = function (document, parentNode) { + var treeWalker = createTreeWalker(document, parentNode); + var node = treeWalker.firstChild(); + + if (!node) { return; } + + do { + if (node.nodeType === Node.TEXT_NODE) { + // If this text node is just whitespace and the previous or next element + // sibling is a block element, remove it + // N.B.: This heuristic could change. Very specific to a bug with + // `contenteditable` in Firefox: http://jsbin.com/EyuKase/1/edit?js,output + // FIXME: make this an option? + if (node.data.trim() === '' + && ((node.previousElementSibling && isBlockElement(node.previousElementSibling)) + || (node.nextElementSibling && isBlockElement(node.nextElementSibling)))) { + parentNode.removeChild(node); + this._sanitize(document, parentNode); + break; + } else { + continue; + } + } + + // Remove all comments + if (node.nodeType === Node.COMMENT_NODE) { + parentNode.removeChild(node); + this._sanitize(document, parentNode); + break; + } + + var isInline = isInlineElement(node); + var containsBlockElement; + if (isInline) { + containsBlockElement = Array.prototype.some.call(node.childNodes, isBlockElement); + } + + // Block elements should not be nested (e.g.
  • ...); if + // they are, we want to unwrap the inner block element. + var isNotTopContainer = !! parentNode.parentNode; + var isNestedBlockElement = + isBlockElement(parentNode) && + isBlockElement(node) && + isNotTopContainer; + + var nodeName = node.nodeName.toLowerCase(); + + var allowedAttrs = getAllowedAttrs(this.config, nodeName, node); + + var isInvalid = isInline && containsBlockElement; + + // Drop tag entirely according to the whitelist *and* if the markup + // is invalid. + if (isInvalid || shouldRejectNode(node, allowedAttrs) + || (!this.config.keepNestedBlockElements && isNestedBlockElement)) { + // Do not keep the inner text of SCRIPT/STYLE elements. + if (! (node.nodeName === 'SCRIPT' || node.nodeName === 'STYLE')) { + while (node.childNodes.length > 0) { + parentNode.insertBefore(node.childNodes[0], node); + } + } + parentNode.removeChild(node); + + this._sanitize(document, parentNode); + break; + } + + // Sanitize attributes + for (var a = 0; a < node.attributes.length; a += 1) { + var attr = node.attributes[a]; + + if (shouldRejectAttr(attr, allowedAttrs, node)) { + node.removeAttribute(attr.name); + // Shift the array to continue looping. + a = a - 1; + } + } + + // Sanitize children + this._sanitize(document, node); + + } while ((node = treeWalker.nextSibling())); + }; + + function createTreeWalker(document, node) { + return document.createTreeWalker(node, + NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT, + null, false); + } + + function getAllowedAttrs(config, nodeName, node){ + if (typeof config.tags[nodeName] === 'function') { + return config.tags[nodeName](node); + } else { + return config.tags[nodeName]; + } + } + + function shouldRejectNode(node, allowedAttrs){ + if (typeof allowedAttrs === 'undefined') { + return true; + } else if (typeof allowedAttrs === 'boolean') { + return !allowedAttrs; + } + + return false; + } + + function shouldRejectAttr(attr, allowedAttrs, node){ + var attrName = attr.name.toLowerCase(); + + if (allowedAttrs === true){ + return false; + } else if (typeof allowedAttrs[attrName] === 'function'){ + return !allowedAttrs[attrName](attr.value, node); + } else if (typeof allowedAttrs[attrName] === 'undefined'){ + return true; + } else if (allowedAttrs[attrName] === false) { + return true; + } else if (typeof allowedAttrs[attrName] === 'string') { + return (allowedAttrs[attrName] !== attr.value); + } + + return false; + } + + return HTMLJanitor; + +})); + + +/***/ }), + +/***/ "./node_modules/regenerator-runtime/runtime-module.js": +/*!************************************************************!*\ + !*** ./node_modules/regenerator-runtime/runtime-module.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { + return this || (typeof self === "object" && self); +})() || Function("return this")(); + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = __webpack_require__(/*! ./runtime */ "./node_modules/regenerator-runtime/runtime.js"); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + + +/***/ }), + +/***/ "./node_modules/regenerator-runtime/runtime.js": +/*!*****************************************************!*\ + !*** ./node_modules/regenerator-runtime/runtime.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. + result.value = unwrapped; + resolve(result); + }, function(error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { + return this || (typeof self === "object" && self); + })() || Function("return this")() +); + + +/***/ }), + +/***/ "./src/codex.ts": +/*!**********************!*\ + !*** ./src/codex.ts ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"), __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/register */ "./node_modules/@babel/register/lib/index.js"), __webpack_require__(/*! components/polyfills */ "./src/components/polyfills.ts"), __webpack_require__(/*! ./components/core */ "./src/components/core.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _slicedToArray2, _typeof2, _classCallCheck2, _createClass2, _register, _polyfills, _core) { + 'use strict'; + /** + * Apply polyfills + */ + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _slicedToArray2 = _interopRequireDefault(_slicedToArray2); + _typeof2 = _interopRequireDefault(_typeof2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _core = _interopRequireDefault(_core); + + /** + * Editor.js + * + * Short Description (눈_눈;) + * @version 2.0 + * + * @licence Apache-2.0 + * @author CodeX-Team + */ + var EditorJS = + /*#__PURE__*/ + function () { + (0, _createClass2.default)(EditorJS, null, [{ + key: "version", + + /** Editor version */ + get: function get() { + return "2.15.0"; + } + /** + * @constructor + * + * @param {EditorConfig|String|undefined} [configuration] - user configuration + */ + + }]); + + function EditorJS(configuration) { + var _this = this; + + (0, _classCallCheck2.default)(this, EditorJS); + + /** + * Set default onReady function + */ + var onReady = function onReady() {}; + /** + * If `onReady` was passed in `configuration` then redefine onReady function + */ + + + if ((0, _typeof2.default)(configuration) === 'object' && typeof configuration.onReady === 'function') { + onReady = configuration.onReady; + } + /** + * Create a Editor.js instance + */ + + + var editor = new _core.default(configuration); + /** + * We need to export isReady promise in the constructor + * as it can be used before other API methods are exported + * @type {Promise} + */ + + this.isReady = editor.isReady.then(function () { + _this.exportAPI(editor); + + onReady(); + }); + } + /** + * Export external API methods + * + * @param editor + */ + + + (0, _createClass2.default)(EditorJS, [{ + key: "exportAPI", + value: function exportAPI(editor) { + var _this2 = this; + + var fieldsToExport = ['configuration']; + + var destroy = function destroy() { + editor.moduleInstances.Listeners.removeAll(); + editor.moduleInstances.UI.destroy(); + editor.moduleInstances.ModificationsObserver.destroy(); + editor = null; + + for (var field in _this2) { + if (_this2.hasOwnProperty(field)) { + delete _this2[field]; + } + } + + Object.setPrototypeOf(_this2, null); + }; + + fieldsToExport.forEach(function (field) { + _this2[field] = editor[field]; + }); + this.destroy = destroy; + Object.setPrototypeOf(this, editor.moduleInstances.API.methods); + delete this.exportAPI; + var shorthands = { + blocks: { + clear: 'clear', + render: 'render' + }, + caret: { + focus: 'focus' + }, + events: { + on: 'on', + off: 'off', + emit: 'emit' + }, + saver: { + save: 'save' + } + }; + Object.entries(shorthands).forEach(function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + key = _ref2[0], + methods = _ref2[1]; + + Object.entries(methods).forEach(function (_ref3) { + var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), + name = _ref4[0], + alias = _ref4[1]; + + _this2[alias] = editor.moduleInstances.API.methods[key][name]; + }); + }); + } + }]); + return EditorJS; + }(); + + _exports.default = EditorJS; + EditorJS.displayName = "EditorJS"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/__module.ts": +/*!************************************!*\ + !*** ./src/components/__module.ts ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + + /** + * @abstract + * @class Module + * @classdesc All modules inherits from this class. + * + * @typedef {Module} Module + * @property {Object} config - Editor user settings + * @property {EditorModules} Editor - List of Editor modules + */ + var Module = + /*#__PURE__*/ + function () { + /** + * @constructor + * @param {EditorConfig} + */ + function Module(_ref) { + var config = _ref.config; + (0, _classCallCheck2.default)(this, Module); + + if ((this instanceof Module ? this.constructor : void 0) === Module) { + throw new TypeError('Constructors for abstract class Module are not allowed.'); + } + + this.config = config; + } + /** + * Editor modules setter + * @param {EditorModules} Editor + */ + + + (0, _createClass2.default)(Module, [{ + key: "state", + set: function set(Editor) { + this.Editor = Editor; + } + }]); + return Module; + }(); + + _exports.default = Module; + Module.displayName = "Module"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/block-tunes/block-tune-delete.ts": +/*!*********************************************************!*\ + !*** ./src/components/block-tunes/block-tune-delete.ts ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _dom = _interopRequireDefault(_dom); + + var DeleteTune = + /*#__PURE__*/ + function () { + /** + * DeleteTune constructor + * + * @param {{api: API}} api + */ + function DeleteTune(_ref) { + var _this = this; + + var api = _ref.api; + (0, _classCallCheck2.default)(this, DeleteTune); + + /** + * Styles + * @type {{wrapper: string}} + */ + this.CSS = { + wrapper: 'ass', + button: 'ce-settings__button', + buttonDelete: 'ce-settings__button--delete', + buttonConfirm: 'ce-settings__button--confirm' + }; + /** + * Tune nodes + */ + + this.nodes = { + button: null + }; + this.api = api; + + this.resetConfirmation = function () { + _this.setConfirmation(false); + }; + } + /** + * Create "Delete" button and add click event listener + * @returns [Element} + */ + + + (0, _createClass2.default)(DeleteTune, [{ + key: "render", + value: function render() { + var _this2 = this; + + this.nodes.button = _dom.default.make('div', [this.CSS.button, this.CSS.buttonDelete], {}); + this.nodes.button.appendChild(_dom.default.svg('cross', 12, 12)); + this.api.listeners.on(this.nodes.button, 'click', function (event) { + return _this2.handleClick(event); + }, false); + return this.nodes.button; + } + /** + * Delete block conditions passed + * @param {MouseEvent} event + */ + + }, { + key: "handleClick", + value: function handleClick(event) { + /** + * if block is not waiting the confirmation, subscribe on block-settings-closing event to reset + * otherwise delete block + */ + if (!this.needConfirmation) { + this.setConfirmation(true); + /** + * Subscribe on event. + * When toolbar block settings is closed but block deletion is not confirmed, + * then reset confirmation state + */ + + this.api.events.on('block-settings-closed', this.resetConfirmation); + } else { + /** + * Unsubscribe from block-settings closing event + */ + this.api.events.off('block-settings-closed', this.resetConfirmation); + this.api.blocks.delete(); + this.api.toolbar.close(); + /** + * Prevent firing ui~documentClicked that can drop currentBlock pointer + */ + + event.stopPropagation(); + } + } + /** + * change tune state + */ + + }, { + key: "setConfirmation", + value: function setConfirmation(state) { + this.needConfirmation = state; + this.nodes.button.classList.add(this.CSS.buttonConfirm); + } + }]); + return DeleteTune; + }(); + + _exports.default = DeleteTune; + DeleteTune.displayName = "DeleteTune"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/block-tunes/block-tune-move-down.ts": +/*!************************************************************!*\ + !*** ./src/components/block-tunes/block-tune-move-down.ts ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _dom = _interopRequireDefault(_dom); + + /** + * @class MoveDownTune + * @classdesc Editor's default tune - Moves down highlighted block + * + * @copyright 2018 + */ + var MoveDownTune = + /*#__PURE__*/ + function () { + /** + * MoveDownTune constructor + * + * @param {{api: API}} api + */ + function MoveDownTune(_ref) { + var api = _ref.api; + (0, _classCallCheck2.default)(this, MoveDownTune); + + /** + * Styles + * @type {{wrapper: string}} + */ + this.CSS = { + button: 'ce-settings__button', + wrapper: 'ce-tune-move-down', + animation: 'wobble' + }; + this.api = api; + } + /** + * Return 'move down' button + */ + + + (0, _createClass2.default)(MoveDownTune, [{ + key: "render", + value: function render() { + var _this = this; + + var moveDownButton = _dom.default.make('div', [this.CSS.button, this.CSS.wrapper], {}); + + moveDownButton.appendChild(_dom.default.svg('arrow-down', 14, 14)); + this.api.listeners.on(moveDownButton, 'click', function (event) { + return _this.handleClick(event, moveDownButton); + }, false); + return moveDownButton; + } + /** + * Handle clicks on 'move down' button + * @param {MouseEvent} event + * @param {HTMLElement} button + */ + + }, { + key: "handleClick", + value: function handleClick(event, button) { + var _this2 = this; + + var currentBlockIndex = this.api.blocks.getCurrentBlockIndex(); // If Block is last do nothing + + if (currentBlockIndex === this.api.blocks.getBlocksCount() - 1) { + button.classList.add(this.CSS.animation); + window.setTimeout(function () { + button.classList.remove(_this2.CSS.animation); + }, 500); + return; + } + + var nextBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex + 1); + var nextBlockCoords = nextBlockElement.getBoundingClientRect(); + var scrollOffset = Math.abs(window.innerHeight - nextBlockElement.offsetHeight); + /** + * Next block ends on screen. + * Increment scroll by next block's height to save element onscreen-position + */ + + if (nextBlockCoords.top < window.innerHeight) { + scrollOffset = window.scrollY + nextBlockElement.offsetHeight; + } + + window.scrollTo(0, scrollOffset); + /** Change blocks positions */ + + this.api.blocks.swap(currentBlockIndex, currentBlockIndex + 1); + } + }]); + return MoveDownTune; + }(); + + _exports.default = MoveDownTune; + MoveDownTune.displayName = "MoveDownTune"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/block-tunes/block-tune-move-up.ts": +/*!**********************************************************!*\ + !*** ./src/components/block-tunes/block-tune-move-up.ts ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _dom = _interopRequireDefault(_dom); + + /** + * @class MoveUpTune + * @classdesc Editor's default tune that moves up selected block + * + * @copyright 2018 + */ + var MoveUpTune = + /*#__PURE__*/ + function () { + /** + * MoveUpTune constructor + * + * @param {{api: API}} api + */ + function MoveUpTune(_ref) { + var api = _ref.api; + (0, _classCallCheck2.default)(this, MoveUpTune); + + /** + * Styles + * @type {{wrapper: string}} + */ + this.CSS = { + button: 'ce-settings__button', + wrapper: 'ce-tune-move-up', + animation: 'wobble' + }; + this.api = api; + } + /** + * Create "MoveUp" button and add click event listener + * @returns [HTMLElement} + */ + + + (0, _createClass2.default)(MoveUpTune, [{ + key: "render", + value: function render() { + var _this = this; + + var moveUpButton = _dom.default.make('div', [this.CSS.button, this.CSS.wrapper], {}); + + moveUpButton.appendChild(_dom.default.svg('arrow-up', 14, 14)); + this.api.listeners.on(moveUpButton, 'click', function (event) { + return _this.handleClick(event, moveUpButton); + }, false); + return moveUpButton; + } + /** + * Move current block up + * @param {MouseEvent} event + * @param {HTMLElement} button + */ + + }, { + key: "handleClick", + value: function handleClick(event, button) { + var _this2 = this; + + var currentBlockIndex = this.api.blocks.getCurrentBlockIndex(); + + if (currentBlockIndex === 0) { + button.classList.add(this.CSS.animation); + window.setTimeout(function () { + button.classList.remove(_this2.CSS.animation); + }, 500); + return; + } + + var currentBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex); + var previousBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex - 1); + /** + * Here is two cases: + * - when previous block has negative offset and part of it is visible on window, then we scroll + * by window's height and add offset which is mathematically difference between two blocks + * + * - when previous block is visible and has offset from the window, + * than we scroll window to the difference between this offsets. + */ + + var currentBlockCoords = currentBlockElement.getBoundingClientRect(), + previousBlockCoords = previousBlockElement.getBoundingClientRect(); + var scrollUpOffset; + + if (previousBlockCoords.top > 0) { + scrollUpOffset = Math.abs(currentBlockCoords.top) - Math.abs(previousBlockCoords.top); + } else { + scrollUpOffset = window.innerHeight - Math.abs(currentBlockCoords.top) + Math.abs(previousBlockCoords.top); + } + + window.scrollBy(0, -1 * scrollUpOffset); + /** Change blocks positions */ + + this.api.blocks.swap(currentBlockIndex, currentBlockIndex - 1); + } + }]); + return MoveUpTune; + }(); + + _exports.default = MoveUpTune; + MoveUpTune.displayName = "MoveUpTune"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/block.ts": +/*!*********************************!*\ + !*** ./src/components/block.ts ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"), __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ./dom */ "./src/components/dom.ts"), __webpack_require__(/*! ./utils */ "./src/components/utils.ts"), __webpack_require__(/*! ./block-tunes/block-tune-move-up */ "./src/components/block-tunes/block-tune-move-up.ts"), __webpack_require__(/*! ./block-tunes/block-tune-delete */ "./src/components/block-tunes/block-tune-delete.ts"), __webpack_require__(/*! ./block-tunes/block-tune-move-down */ "./src/components/block-tunes/block-tune-move-down.ts"), __webpack_require__(/*! ./selection */ "./src/components/selection.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _toConsumableArray2, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _dom, _utils, _blockTuneMoveUp, _blockTuneDelete, _blockTuneMoveDown, _selection) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _toConsumableArray2 = _interopRequireDefault(_toConsumableArray2); + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + _blockTuneMoveUp = _interopRequireDefault(_blockTuneMoveUp); + _blockTuneDelete = _interopRequireDefault(_blockTuneDelete); + _blockTuneMoveDown = _interopRequireDefault(_blockTuneMoveDown); + _selection = _interopRequireDefault(_selection); + + /** + * @class Block + * @classdesc This class describes editor`s block, including block`s HTMLElement, data and tool + * + * @property {BlockTool} tool — current block tool (Paragraph, for example) + * @property {Object} CSS — block`s css classes + * + */ + + /** Import default tunes */ + + /** + * @classdesc Abstract Block class that contains Block information, Tool name and Tool class instance + * + * @property tool - Tool instance + * @property html - Returns HTML content of plugin + * @property holder - Div element that wraps block content with Tool's content. Has `ce-block` CSS class + * @property pluginsContent - HTML content that returns by Tool's render function + */ + var Block = + /*#__PURE__*/ + function () { + /** + * @constructor + * @param {String} toolName - Tool name that passed on initialization + * @param {Object} toolInstance — passed Tool`s instance that rendered the Block + * @param {Object} toolClass — Tool's class + * @param {Object} settings - default settings + * @param {Object} apiMethods - Editor API + */ + function Block(toolName, toolInstance, toolClass, settings, apiMethods) { + var _this = this; + + (0, _classCallCheck2.default)(this, Block); + + /** + * Cached inputs + * @type {HTMLElement[]} + */ + this.cachedInputs = []; + /** + * Focused input index + * @type {number} + */ + + this.inputIndex = 0; + /** + * Is fired when DOM mutation has been happened + */ + + this.didMutated = function () { + /** + * Drop cache + */ + _this.cachedInputs = []; + /** + * Update current input + */ + + _this.updateCurrentInput(); + }; + + this.name = toolName; + this.tool = toolInstance; + this.class = toolClass; + this.settings = settings; + this.api = apiMethods; + this.holder = this.compose(); + this.mutationObserver = new MutationObserver(this.didMutated); + /** + * @type {BlockTune[]} + */ + + this.tunes = this.makeTunes(); + } + /** + * CSS classes for the Block + * @return {{wrapper: string, content: string}} + */ + + + (0, _createClass2.default)(Block, [{ + key: "call", + + /** + * Calls Tool's method + * + * Method checks tool property {MethodName}. Fires method with passes params If it is instance of Function + * + * @param {String} methodName + * @param {Object} params + */ + value: function call(methodName, params) { + /** + * call Tool's method with the instance context + */ + if (this.tool[methodName] && this.tool[methodName] instanceof Function) { + this.tool[methodName].call(this.tool, params); + } + } + /** + * Call plugins merge method + * @param {Object} data + */ + + }, { + key: "mergeWith", + value: function () { + var _mergeWith = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(data) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this.tool.merge(data); + + case 2: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + return function mergeWith(_x) { + return _mergeWith.apply(this, arguments); + }; + }() + /** + * Extracts data from Block + * Groups Tool's save processing time + * @return {Object} + */ + + }, { + key: "save", + value: function () { + var _save = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2() { + var _this2 = this; + + var extractedBlock, measuringStart, measuringEnd; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this.tool.save(this.pluginsContent); + + case 2: + extractedBlock = _context2.sent; + + /** + * Measuring execution time + */ + measuringStart = window.performance.now(); + return _context2.abrupt("return", Promise.resolve(extractedBlock).then(function (finishedExtraction) { + /** measure promise execution */ + measuringEnd = window.performance.now(); + return { + tool: _this2.name, + data: finishedExtraction, + time: measuringEnd - measuringStart + }; + }).catch(function (error) { + _utils.default.log("Saving proccess for ".concat(_this2.name, " tool failed due to the ").concat(error), 'log', 'red'); + })); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function save() { + return _save.apply(this, arguments); + }; + }() + /** + * Uses Tool's validation method to check the correctness of output data + * Tool's validation method is optional + * + * @description Method returns true|false whether data passed the validation or not + * + * @param {BlockToolData} data + * @returns {Promise} valid + */ + + }, { + key: "validate", + value: function () { + var _validate = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee3(data) { + var isValid; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + isValid = true; + + if (!(this.tool.validate instanceof Function)) { + _context3.next = 5; + break; + } + + _context3.next = 4; + return this.tool.validate(data); + + case 4: + isValid = _context3.sent; + + case 5: + return _context3.abrupt("return", isValid); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + return function validate(_x2) { + return _validate.apply(this, arguments); + }; + }() + /** + * Make an array with default settings + * Each block has default tune instance that have states + * @return {BlockTune[]} + */ + + }, { + key: "makeTunes", + value: function makeTunes() { + var _this3 = this; + + var tunesList = [_blockTuneMoveUp.default, _blockTuneDelete.default, _blockTuneMoveDown.default]; // Pluck tunes list and return tune instances with passed Editor API and settings + + return tunesList.map(function (tune) { + return new tune({ + api: _this3.api, + settings: _this3.settings + }); + }); + } + /** + * Enumerates initialized tunes and returns fragment that can be appended to the toolbars area + * @return {DocumentFragment} + */ + + }, { + key: "renderTunes", + value: function renderTunes() { + var tunesElement = document.createDocumentFragment(); + this.tunes.forEach(function (tune) { + _dom.default.append(tunesElement, tune.render()); + }); + return tunesElement; + } + /** + * Update current input index with selection anchor node + */ + + }, { + key: "updateCurrentInput", + value: function updateCurrentInput() { + this.currentInput = _selection.default.anchorNode; + } + /** + * Is fired when Block will be selected as current + */ + + }, { + key: "willSelect", + value: function willSelect() { + /** + * Observe DOM mutations to update Block inputs + */ + this.mutationObserver.observe(this.holder, { + childList: true, + subtree: true + }); + } + /** + * Is fired when Block will be unselected + */ + + }, { + key: "willUnselect", + value: function willUnselect() { + this.mutationObserver.disconnect(); + } + /** + * Make default Block wrappers and put Tool`s content there + * @returns {HTMLDivElement} + */ + + }, { + key: "compose", + value: function compose() { + var wrapper = _dom.default.make('div', Block.CSS.wrapper), + contentNode = _dom.default.make('div', Block.CSS.content), + pluginsContent = this.tool.render(); + + contentNode.appendChild(pluginsContent); + wrapper.appendChild(contentNode); + return wrapper; + } + }, { + key: "inputs", + + /** + * Find and return all editable elements (contenteditables and native inputs) in the Tool HTML + * + * @returns {HTMLElement[]} + */ + get: function get() { + /** + * Return from cache if existed + */ + if (this.cachedInputs.length !== 0) { + return this.cachedInputs; + } + + var content = this.holder; + var allowedInputTypes = ['text', 'password', 'email', 'number', 'search', 'tel', 'url']; + var selector = '[contenteditable], textarea, input:not([type]), ' + allowedInputTypes.map(function (type) { + return "input[type=\"".concat(type, "\"]"); + }).join(', '); + + var inputs = _utils.default.array(content.querySelectorAll(selector)); + /** + * If contenteditable element contains block elements, treat them as inputs. + */ + + + inputs = inputs.reduce(function (result, input) { + if (_dom.default.isNativeInput(input) || _dom.default.containsOnlyInlineElements(input)) { + return [].concat((0, _toConsumableArray2.default)(result), [input]); + } + + return [].concat((0, _toConsumableArray2.default)(result), (0, _toConsumableArray2.default)(_dom.default.getDeepestBlockElements(input))); + }, []); + /** + * If inputs amount was changed we need to check if input index is bigger then inputs array length + */ + + if (this.inputIndex > inputs.length - 1) { + this.inputIndex = inputs.length - 1; + } + /** + * Cache inputs + */ + + + this.cachedInputs = inputs; + return inputs; + } + /** + * Return current Tool`s input + * + * @returns {HTMLElement} + */ + + }, { + key: "currentInput", + get: function get() { + return this.inputs[this.inputIndex]; + } + /** + * Set input index to the passed element + * + * @param {HTMLElement} element + */ + , + set: function set(element) { + var index = this.inputs.findIndex(function (input) { + return input === element || input.contains(element); + }); + + if (index !== -1) { + this.inputIndex = index; + } + } + /** + * Return first Tool`s input + * + * @returns {HTMLElement} + */ + + }, { + key: "firstInput", + get: function get() { + return this.inputs[0]; + } + /** + * Return first Tool`s input + * + * @returns {HTMLElement} + */ + + }, { + key: "lastInput", + get: function get() { + var inputs = this.inputs; + return inputs[inputs.length - 1]; + } + /** + * Return next Tool`s input or undefined if it doesn't exist + * + * @returns {HTMLElement} + */ + + }, { + key: "nextInput", + get: function get() { + return this.inputs[this.inputIndex + 1]; + } + /** + * Return previous Tool`s input or undefined if it doesn't exist + * + * @returns {HTMLElement} + */ + + }, { + key: "previousInput", + get: function get() { + return this.inputs[this.inputIndex - 1]; + } + /** + * Returns Plugins content + * @return {HTMLElement} + */ + + }, { + key: "pluginsContent", + get: function get() { + var pluginsContent = this.holder.querySelector(".".concat(Block.CSS.content)); + + if (pluginsContent && pluginsContent.childNodes.length) { + return pluginsContent.childNodes[0]; + } + + return null; + } + /** + * Get Block's JSON data + * @return {Object} + */ + + }, { + key: "data", + get: function get() { + return this.save().then(function (savedObject) { + if (savedObject && !_utils.default.isEmpty(savedObject.data)) { + return savedObject.data; + } else { + return {}; + } + }); + } + /** + * Returns tool's sanitizer config + * @return {object} + */ + + }, { + key: "sanitize", + get: function get() { + return this.tool.sanitize; + } + /** + * is block mergeable + * We plugin have merge function then we call it mergable + * @return {boolean} + */ + + }, { + key: "mergeable", + get: function get() { + return typeof this.tool.merge === 'function'; + } + /** + * Check block for emptiness + * @return {Boolean} + */ + + }, { + key: "isEmpty", + get: function get() { + var emptyText = _dom.default.isEmpty(this.pluginsContent); + + var emptyMedia = !this.hasMedia; + return emptyText && emptyMedia; + } + /** + * Check if block has a media content such as images, iframes and other + * @return {Boolean} + */ + + }, { + key: "hasMedia", + get: function get() { + /** + * This tags represents media-content + * @type {string[]} + */ + var mediaTags = ['img', 'iframe', 'video', 'audio', 'source', 'input', 'textarea', 'twitterwidget']; + return !!this.holder.querySelector(mediaTags.join(',')); + } + /** + * Set focused state + * @param {Boolean} state - 'true' to select, 'false' to remove selection + */ + + }, { + key: "focused", + set: function set(state) { + this.holder.classList.toggle(Block.CSS.focused, state); + } + /** + * Set selected state + * We don't need to mark Block as Selected when it is empty + * @param {Boolean} state - 'true' to select, 'false' to remove selection + */ + + }, { + key: "selected", + set: function set(state) { + if (state) { + this.holder.classList.add(Block.CSS.selected); + } else { + this.holder.classList.remove(Block.CSS.selected); + } + } + /** + * Returns True if it is Selected + * @return {boolean} + */ + , + get: function get() { + return this.holder.classList.contains(Block.CSS.selected); + } + /** + * Set stretched state + * @param {Boolean} state - 'true' to enable, 'false' to disable stretched statte + */ + + }, { + key: "stretched", + set: function set(state) { + this.holder.classList.toggle(Block.CSS.wrapperStretched, state); + } + /** + * Toggle drop target state + * @param {boolean} state + */ + + }, { + key: "dropTarget", + set: function set(state) { + this.holder.classList.toggle(Block.CSS.dropTarget, state); + } + }], [{ + key: "CSS", + get: function get() { + return { + wrapper: 'ce-block', + wrapperStretched: 'ce-block--stretched', + content: 'ce-block__content', + focused: 'ce-block--focused', + selected: 'ce-block--selected', + dropTarget: 'ce-block--drop-target' + }; + } + }]); + return Block; + }(); + + _exports.default = Block; + Block.displayName = "Block"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/blocks.ts": +/*!**********************************!*\ + !*** ./src/components/blocks.ts ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ./utils */ "./src/components/utils.ts"), __webpack_require__(/*! ./dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _utils, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _utils = _interopRequireDefault(_utils); + _dom = _interopRequireDefault(_dom); + + /** + * @class Blocks + * @classdesc Class to work with Block instances array + * + * @private + * + * @property {HTMLElement} workingArea — editor`s working node + * + */ + var Blocks = + /*#__PURE__*/ + function () { + (0, _createClass2.default)(Blocks, [{ + key: "length", + + /** + * Get length of Block instances array + * + * @returns {Number} + */ + get: function get() { + return this.blocks.length; + } + /** + * Get Block instances array + * + * @returns {Block[]} + */ + + }, { + key: "array", + get: function get() { + return this.blocks; + } + /** + * Get blocks html elements array + * + * @returns {HTMLElement[]} + */ + + }, { + key: "nodes", + get: function get() { + return _utils.default.array(this.workingArea.children); + } + /** + * Proxy trap to implement array-like setter + * + * @example + * blocks[0] = new Block(...) + * + * @param {Blocks} instance — Blocks instance + * @param {Number|String} index — block index + * @param {Block} block — Block to set + * @returns {Boolean} + */ + + }], [{ + key: "set", + value: function set(instance, index, block) { + if (isNaN(Number(index))) { + return false; + } + + instance.insert(+index, block); + return true; + } + /** + * Proxy trap to implement array-like getter + * + * @param {Blocks} instance — Blocks instance + * @param {Number|String} index — Block index + * @returns {Block|*} + */ + + }, { + key: "get", + value: function get(instance, index) { + if (isNaN(Number(index))) { + return instance[index]; + } + + return instance.get(+index); + } + /** + * @constructor + * + * @param {HTMLElement} workingArea — editor`s working node + */ + + }]); + + function Blocks(workingArea) { + (0, _classCallCheck2.default)(this, Blocks); + this.blocks = []; + this.workingArea = workingArea; + } + /** + * Push new Block to the blocks array and append it to working area + * + * @param {Block} block + */ + + + (0, _createClass2.default)(Blocks, [{ + key: "push", + value: function push(block) { + this.blocks.push(block); + this.workingArea.appendChild(block.holder); + } + /** + * Swaps blocks with indexes first and second + * @param {Number} first - first block index + * @param {Number} second - second block index + */ + + }, { + key: "swap", + value: function swap(first, second) { + var secondBlock = this.blocks[second]; + /** + * Change in DOM + */ + + _dom.default.swap(this.blocks[first].holder, secondBlock.holder); + /** + * Change in array + */ + + + this.blocks[second] = this.blocks[first]; + this.blocks[first] = secondBlock; + } + /** + * Insert new Block at passed index + * + * @param {Number} index — index to insert Block + * @param {Block} block — Block to insert + * @param {Boolean} replace — it true, replace block on given index + */ + + }, { + key: "insert", + value: function insert(index, block) { + var replace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (!this.length) { + this.push(block); + return; + } + + if (index > this.length) { + index = this.length; + } + + if (replace) { + this.blocks[index].holder.remove(); + } + + var deleteCount = replace ? 1 : 0; + this.blocks.splice(index, deleteCount, block); + + if (index > 0) { + var previousBlock = this.blocks[index - 1]; + previousBlock.holder.insertAdjacentElement('afterend', block.holder); + } else { + var nextBlock = this.blocks[index + 1]; + + if (nextBlock) { + nextBlock.holder.insertAdjacentElement('beforebegin', block.holder); + } else { + this.workingArea.appendChild(block.holder); + } + } + } + /** + * Remove block + * @param {Number|null} index + */ + + }, { + key: "remove", + value: function remove(index) { + if (isNaN(index)) { + index = this.length - 1; + } + + this.blocks[index].holder.remove(); + this.blocks.splice(index, 1); + } + /** + * Remove all blocks + */ + + }, { + key: "removeAll", + value: function removeAll() { + this.workingArea.innerHTML = ''; + this.blocks.length = 0; + } + /** + * Insert Block after passed target + * + * @todo decide if this method is necessary + * + * @param {Block} targetBlock — target after wich Block should be inserted + * @param {Block} newBlock — Block to insert + */ + + }, { + key: "insertAfter", + value: function insertAfter(targetBlock, newBlock) { + var index = this.blocks.indexOf(targetBlock); + this.insert(index + 1, newBlock); + } + /** + * Get Block by index + * + * @param {Number} index — Block index + * @returns {Block} + */ + + }, { + key: "get", + value: function get(index) { + return this.blocks[index]; + } + /** + * Return index of passed Block + * + * @param {Block} block + * @returns {Number} + */ + + }, { + key: "indexOf", + value: function indexOf(block) { + return this.blocks.indexOf(block); + } + }]); + return Blocks; + }(); + + _exports.default = Blocks; + Blocks.displayName = "Blocks"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/core.ts": +/*!********************************!*\ + !*** ./src/components/core.ts ***! + \********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"), __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ./dom */ "./src/components/dom.ts"), __webpack_require__(/*! ./utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _typeof2, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _dom, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _typeof2 = _interopRequireDefault(_typeof2); + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + + /** + * @typedef {Core} Core - editor core class + */ + + /** + * Require Editor modules places in components/modules dir + */ + var contextRequire = __webpack_require__("./src/components/modules sync recursive ^\\.\\/.*$"); + + var modules = []; + contextRequire.keys().forEach(function (filename) { + /** + * Include files if: + * - extension is .js or .ts + * - does not starts with _ + */ + if (filename.match(/^\.\/[^_][\w/]*\.([tj])s$/)) { + modules.push(contextRequire(filename)); + } + }); + /** + * @class Core + * + * @classdesc Editor.js core class + * + * @property this.config - all settings + * @property this.moduleInstances - constructed editor components + * + * @type {Core} + */ + + var Core = + /*#__PURE__*/ + function () { + /** + * @param {EditorConfig} config - user configuration + * + */ + function Core(config) { + var _this = this; + + (0, _classCallCheck2.default)(this, Core); + + /** + * Object with core modules instances + */ + this.moduleInstances = {}; + /** + * Ready promise. Resolved if Editor.js is ready to work, rejected otherwise + */ + + var onReady, onFail; + this.isReady = new Promise(function (resolve, reject) { + onReady = resolve; + onFail = reject; + }); + Promise.resolve().then( + /*#__PURE__*/ + (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee() { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _this.configuration = config; + _context.next = 3; + return _this.validate(); + + case 3: + _context.next = 5; + return _this.init(); + + case 5: + _context.next = 7; + return _this.start(); + + case 7: + _utils.default.log('I\'m ready! (ノ◕ヮ◕)ノ*:・゚✧', 'log', '', 'color: #E24A75'); + + setTimeout(function () { + if (_this.configuration.autofocus) { + var _this$moduleInstances = _this.moduleInstances, + BlockManager = _this$moduleInstances.BlockManager, + Caret = _this$moduleInstances.Caret; + Caret.setToBlock(BlockManager.blocks[0], Caret.positions.START); + } + /** + * Remove loader, show content + */ + + + _this.moduleInstances.UI.removeLoader(); + /** + * Resolve this.isReady promise + */ + + + onReady(); + }, 500); + + case 9: + case "end": + return _context.stop(); + } + } + }, _callee); + }))).catch(function (error) { + _utils.default.log("Editor.js is not ready because of ".concat(error), 'error'); + /** + * Reject this.isReady promise + */ + + + onFail(error); + }); + } + /** + * Setting for configuration + * @param {EditorConfig|string|undefined} config + */ + + + (0, _createClass2.default)(Core, [{ + key: "validate", + + /** + * Checks for required fields in Editor's config + * @returns {Promise} + */ + value: function () { + var _validate = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2() { + var _this$config, holderId, holder; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _this$config = this.config, holderId = _this$config.holderId, holder = _this$config.holder; + + if (!(holderId && holder)) { + _context2.next = 3; + break; + } + + throw Error('«holderId» and «holder» param can\'t assign at the same time.'); + + case 3: + if (!(typeof holder === 'string' && !_dom.default.get(holder))) { + _context2.next = 5; + break; + } + + throw Error("element with ID \xAB".concat(holder, "\xBB is missing. Pass correct holder's ID.")); + + case 5: + if (!(holder && (0, _typeof2.default)(holder) === 'object' && !_dom.default.isElement(holder))) { + _context2.next = 7; + break; + } + + throw Error('holder as HTMLElement if provided must be inherit from Element class.'); + + case 7: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function validate() { + return _validate.apply(this, arguments); + }; + }() + /** + * Initializes modules: + * - make and save instances + * - configure + */ + + }, { + key: "init", + value: function init() { + /** + * Make modules instances and save it to the @property this.moduleInstances + */ + this.constructModules(); + /** + * Modules configuration + */ + + this.configureModules(); + } + /** + * Start Editor! + * + * Get list of modules that needs to be prepared and return a sequence (Promise) + * @return {Promise} + */ + + }, { + key: "start", + value: function () { + var _start = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee4() { + var _this2 = this; + + var modulesToPrepare; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + modulesToPrepare = ['Tools', 'UI', 'BlockManager', 'Paste', 'DragNDrop', 'ModificationsObserver', 'BlockSelection', 'RectangleSelection']; + _context4.next = 3; + return modulesToPrepare.reduce(function (promise, module) { + return promise.then( + /*#__PURE__*/ + (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee3() { + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.prev = 0; + _context3.next = 3; + return _this2.moduleInstances[module].prepare(); + + case 3: + _context3.next = 8; + break; + + case 5: + _context3.prev = 5; + _context3.t0 = _context3["catch"](0); + + _utils.default.log("Module ".concat(module, " was skipped because of %o"), 'warn', _context3.t0); + + case 8: + case "end": + return _context3.stop(); + } + } + }, _callee3, null, [[0, 5]]); + }))); + }, Promise.resolve()); + + case 3: + return _context4.abrupt("return", this.moduleInstances.Renderer.render(this.config.data.blocks)); + + case 4: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + return function start() { + return _start.apply(this, arguments); + }; + }() + /** + * Make modules instances and save it to the @property this.moduleInstances + */ + + }, { + key: "constructModules", + value: function constructModules() { + var _this3 = this; + + modules.forEach(function (Module) { + try { + /** + * We use class name provided by displayName property + * + * On build, Babel will transform all Classes to the Functions so, name will always be 'Function' + * To prevent this, we use 'babel-plugin-class-display-name' plugin + * @see https://www.npmjs.com/package/babel-plugin-class-display-name + */ + _this3.moduleInstances[Module.displayName] = new Module({ + config: _this3.configuration + }); + } catch (e) { + _utils.default.log("Module ".concat(Module.displayName, " skipped because"), 'warn', e); + } + }); + } + /** + * Modules instances configuration: + * - pass other modules to the 'state' property + * - ... + */ + + }, { + key: "configureModules", + value: function configureModules() { + for (var name in this.moduleInstances) { + if (this.moduleInstances.hasOwnProperty(name)) { + /** + * Module does not need self-instance + */ + this.moduleInstances[name].state = this.getModulesDiff(name); + } + } + } + /** + * Return modules without passed name + * @param {string} name - module for witch modules difference should be calculated + */ + + }, { + key: "getModulesDiff", + value: function getModulesDiff(name) { + var diff = {}; + + for (var moduleName in this.moduleInstances) { + /** + * Skip module with passed name + */ + if (moduleName === name) { + continue; + } + + diff[moduleName] = this.moduleInstances[moduleName]; + } + + return diff; + } + }, { + key: "configuration", + set: function set(config) { + /** + * Process zero-configuration or with only holderId + * Make config object + */ + if ((0, _typeof2.default)(config) !== 'object') { + config = { + holder: config + }; + } + /** + * If holderId is preset, assign him to holder property and work next only with holder + */ + + + if (config.holderId && !config.holder) { + config.holder = config.holderId; + config.holderId = null; + + _utils.default.log('holderId property will deprecated in next major release, use holder property instead.', 'warn'); + } + /** + * Place config into the class property + * @type {EditorConfig} + */ + + + this.config = config; + /** + * If holder is empty then set a default value + */ + + if (this.config.holder == null) { + this.config.holder = 'editorjs'; + } + /** + * If initial Block's Tool was not passed, use the Paragraph Tool + */ + + + this.config.initialBlock = this.config.initialBlock || 'paragraph'; + /** + * Height of Editor's bottom area that allows to set focus on the last Block + * @type {number} + */ + + this.config.minHeight = this.config.minHeight || 300; + /** + * Initial block type + * Uses in case when there is no blocks passed + * @type {{type: (*), data: {text: null}}} + */ + + var initialBlockData = { + type: this.config.initialBlock, + data: {} + }; + this.config.placeholder = this.config.placeholder || false; + this.config.sanitizer = this.config.sanitizer || { + p: true, + b: true, + a: true + }; + this.config.hideToolbar = this.config.hideToolbar ? this.config.hideToolbar : false; + this.config.tools = this.config.tools || {}; + this.config.data = this.config.data || {}; + + this.config.onReady = this.config.onReady || function () {}; + + this.config.onChange = this.config.onChange || function () {}; + /** + * Initialize Blocks to pass data to the Renderer + */ + + + if (_utils.default.isEmpty(this.config.data)) { + this.config.data = {}; + this.config.data.blocks = [initialBlockData]; + } else { + if (!this.config.data.blocks || this.config.data.blocks.length === 0) { + this.config.data.blocks = [initialBlockData]; + } + } + } + /** + * Returns private property + * @returns {EditorConfig} + */ + , + get: function get() { + return this.config; + } + }]); + return Core; + }(); + + _exports.default = Core; + Core.displayName = "Core"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/dom.ts": +/*!*******************************!*\ + !*** ./src/components/dom.ts ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"), __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _typeof2, _toConsumableArray2, _classCallCheck2, _createClass2) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _typeof2 = _interopRequireDefault(_typeof2); + _toConsumableArray2 = _interopRequireDefault(_toConsumableArray2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + + /** + * DOM manipulations helper + */ + var Dom = + /*#__PURE__*/ + function () { + function Dom() { + (0, _classCallCheck2.default)(this, Dom); + } + + (0, _createClass2.default)(Dom, null, [{ + key: "isSingleTag", + + /** + * Check if passed tag has no closed tag + * @param {HTMLElement} tag + * @return {Boolean} + */ + value: function isSingleTag(tag) { + return tag.tagName && ['AREA', 'BASE', 'BR', 'COL', 'COMMAND', 'EMBED', 'HR', 'IMG', 'INPUT', 'KEYGEN', 'LINK', 'META', 'PARAM', 'SOURCE', 'TRACK', 'WBR'].includes(tag.tagName); + } + /** + * Check if element is BR or WBR + * + * @param {HTMLElement} element + * @return {boolean} + */ + + }, { + key: "isLineBreakTag", + value: function isLineBreakTag(element) { + return element && element.tagName && ['BR', 'WBR'].includes(element.tagName); + } + /** + * Helper for making Elements with classname and attributes + * + * @param {string} tagName - new Element tag name + * @param {array|string} classNames - list or name of CSS classname(s) + * @param {Object} attributes - any attributes + * @return {HTMLElement} + */ + + }, { + key: "make", + value: function make(tagName) { + var classNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var el = document.createElement(tagName); + + if (Array.isArray(classNames)) { + var _el$classList; + + (_el$classList = el.classList).add.apply(_el$classList, (0, _toConsumableArray2.default)(classNames)); + } else if (classNames) { + el.classList.add(classNames); + } + + for (var attrName in attributes) { + if (attributes.hasOwnProperty(attrName)) { + el[attrName] = attributes[attrName]; + } + } + + return el; + } + /** + * Creates Text Node with the passed content + * @param {String} content - text content + * @return {Text} + */ + + }, { + key: "text", + value: function text(content) { + return document.createTextNode(content); + } + /** + * Creates SVG icon linked to the sprite + * @param {string} name - name (id) of icon from sprite + * @param {number} width + * @param {number} height + * @return {SVGElement} + */ + + }, { + key: "svg", + value: function svg(name) { + var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 14; + var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 14; + var icon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + icon.classList.add('icon', 'icon--' + name); + icon.setAttribute('width', width + 'px'); + icon.setAttribute('height', height + 'px'); + icon.innerHTML = ""); + return icon; + } + /** + * Append one or several elements to the parent + * + * @param {Element|DocumentFragment} parent - where to append + * @param {Element|Element[]} elements - element or elements list + */ + + }, { + key: "append", + value: function append(parent, elements) { + if (Array.isArray(elements)) { + elements.forEach(function (el) { + return parent.appendChild(el); + }); + } else { + parent.appendChild(elements); + } + } + /** + * Append element or a couple to the beginning of the parent elements + * + * @param {Element} parent - where to append + * @param {Element|Element[]} elements - element or elements list + */ + + }, { + key: "prepend", + value: function prepend(parent, elements) { + if (Array.isArray(elements)) { + elements = elements.reverse(); + elements.forEach(function (el) { + return parent.prepend(el); + }); + } else { + parent.prepend(elements); + } + } + /** + * Swap two elements in parent + * @param {HTMLElement} el1 - from + * @param {HTMLElement} el2 - to + */ + + }, { + key: "swap", + value: function swap(el1, el2) { + // create marker element and insert it where el1 is + var temp = document.createElement('div'), + parent = el1.parentNode; + parent.insertBefore(temp, el1); // move el1 to right before el2 + + parent.insertBefore(el1, el2); // move el2 to right before where el1 used to be + + parent.insertBefore(el2, temp); // remove temporary marker node + + parent.removeChild(temp); + } + /** + * Selector Decorator + * + * Returns first match + * + * @param {Element} el - element we searching inside. Default - DOM Document + * @param {String} selector - searching string + * + * @returns {Element} + */ + + }, { + key: "find", + value: function find() { + var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document; + var selector = arguments.length > 1 ? arguments[1] : undefined; + return el.querySelector(selector); + } + /** + * Get Element by Id + * + * @param {string} id + * @returns {HTMLElement | null} + */ + + }, { + key: "get", + value: function get(id) { + return document.getElementById(id); + } + /** + * Selector Decorator. + * + * Returns all matches + * + * @param {Element} el - element we searching inside. Default - DOM Document + * @param {String} selector - searching string + * @returns {NodeList} + */ + + }, { + key: "findAll", + value: function findAll() { + var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document; + var selector = arguments.length > 1 ? arguments[1] : undefined; + return el.querySelectorAll(selector); + } + /** + * Search for deepest node which is Leaf. + * Leaf is the vertex that doesn't have any child nodes + * + * @description Method recursively goes throw the all Node until it finds the Leaf + * + * @param {Node} node - root Node. From this vertex we start Deep-first search + * {@link https://en.wikipedia.org/wiki/Depth-first_search} + * @param {Boolean} atLast - find last text node + * @return {Node} - it can be text Node or Element Node, so that caret will able to work with it + */ + + }, { + key: "getDeepestNode", + value: function getDeepestNode(node) { + var atLast = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + /** + * Current function have two directions: + * - starts from first child and every time gets first or nextSibling in special cases + * - starts from last child and gets last or previousSibling + * @type {string} + */ + var child = atLast ? 'lastChild' : 'firstChild', + sibling = atLast ? 'previousSibling' : 'nextSibling'; + + if (node && node.nodeType === Node.ELEMENT_NODE && node[child]) { + var nodeChild = node[child]; + /** + * special case when child is single tag that can't contain any content + */ + + if (Dom.isSingleTag(nodeChild) && !Dom.isNativeInput(nodeChild) && !Dom.isLineBreakTag(nodeChild)) { + /** + * 1) We need to check the next sibling. If it is Node Element then continue searching for deepest + * from sibling + * + * 2) If single tag's next sibling is null, then go back to parent and check his sibling + * In case of Node Element continue searching + * + * 3) If none of conditions above happened return parent Node Element + */ + if (nodeChild[sibling]) { + nodeChild = nodeChild[sibling]; + } else if (nodeChild.parentNode[sibling]) { + nodeChild = nodeChild.parentNode[sibling]; + } else { + return nodeChild.parentNode; + } + } + + return this.getDeepestNode(nodeChild, atLast); + } + + return node; + } + /** + * Check if object is DOM node + * + * @param {Object} node + * @returns {boolean} + */ + + }, { + key: "isElement", + value: function isElement(node) { + return node && (0, _typeof2.default)(node) === 'object' && node.nodeType && node.nodeType === Node.ELEMENT_NODE; + } + /** + * Check if object is DocumentFragmemt node + * + * @param {Object} node + * @returns {boolean} + */ + + }, { + key: "isFragment", + value: function isFragment(node) { + return node && (0, _typeof2.default)(node) === 'object' && node.nodeType && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE; + } + /** + * Check if passed element is contenteditable + * @param {HTMLElement} element + * @return {boolean} + */ + + }, { + key: "isContentEditable", + value: function isContentEditable(element) { + return element.contentEditable === 'true'; + } + /** + * Checks target if it is native input + * @param {Element|String|Node} target - HTML element or string + * @return {Boolean} + */ + + }, { + key: "isNativeInput", + value: function isNativeInput(target) { + var nativeInputs = ['INPUT', 'TEXTAREA']; + return target && target.tagName ? nativeInputs.includes(target.tagName) : false; + } + /** + * Checks if we can set caret + * @param {HTMLElement} target + * @return {boolean} + */ + + }, { + key: "canSetCaret", + value: function canSetCaret(target) { + var result = true; + + if (Dom.isNativeInput(target)) { + var inputElement = target; + + switch (inputElement.type) { + case 'file': + case 'checkbox': + case 'radio': + case 'hidden': + case 'submit': + case 'button': + case 'image': + case 'reset': + result = false; + break; + } + } else { + result = Dom.isContentEditable(target); + } + + return result; + } + /** + * Checks node if it is empty + * + * @description Method checks simple Node without any childs for emptiness + * If you have Node with 2 or more children id depth, you better use {@link Dom#isEmpty} method + * + * @param {Node} node + * @return {Boolean} true if it is empty + */ + + }, { + key: "isNodeEmpty", + value: function isNodeEmpty(node) { + var nodeText; + + if (this.isSingleTag(node) && !this.isLineBreakTag(node)) { + return false; + } + + if (this.isElement(node) && this.isNativeInput(node)) { + nodeText = node.value; + } else { + nodeText = node.textContent.replace("\u200B", ''); + } + + return nodeText.trim().length === 0; + } + /** + * checks node if it is doesn't have any child nodes + * @param {Node} node + * @return {boolean} + */ + + }, { + key: "isLeaf", + value: function isLeaf(node) { + if (!node) { + return false; + } + + return node.childNodes.length === 0; + } + /** + * breadth-first search (BFS) + * {@link https://en.wikipedia.org/wiki/Breadth-first_search} + * + * @description Pushes to stack all DOM leafs and checks for emptiness + * + * @param {Node} node + * @return {boolean} + */ + + }, { + key: "isEmpty", + value: function isEmpty(node) { + var _this = this; + + var treeWalker = [], + leafs = []; + + if (!node) { + return true; + } + + if (!node.childNodes.length) { + return this.isNodeEmpty(node); + } + + treeWalker.push(node.firstChild); + + while (treeWalker.length > 0) { + node = treeWalker.shift(); + + if (!node) { + continue; + } + + if (this.isLeaf(node)) { + leafs.push(node); + } else { + treeWalker.push(node.firstChild); + } + + while (node && node.nextSibling) { + node = node.nextSibling; + + if (!node) { + continue; + } + + treeWalker.push(node); + } + /** + * If one of childs is not empty, checked Node is not empty too + */ + + + if (node && !this.isNodeEmpty(node)) { + return false; + } + } + + return leafs.every(function (leaf) { + return _this.isNodeEmpty(leaf); + }); + } + /** + * Check if string contains html elements + * + * @returns {boolean} + * @param {String} str + */ + + }, { + key: "isHTMLString", + value: function isHTMLString(str) { + var wrapper = Dom.make('div'); + wrapper.innerHTML = str; + return wrapper.childElementCount > 0; + } + /** + * Return length of node`s text content + * + * @param {Node} node + * @returns {number} + */ + + }, { + key: "getContentLength", + value: function getContentLength(node) { + if (Dom.isNativeInput(node)) { + return node.value.length; + } + + if (node.nodeType === Node.TEXT_NODE) { + return node.length; + } + + return node.textContent.length; + } + /** + * Return array of names of block html elements + * + * @returns {string[]} + */ + + }, { + key: "containsOnlyInlineElements", + + /** + * Check if passed content includes only inline elements + * + * @param {string|HTMLElement} data - element or html string + * @return {boolean} + */ + value: function containsOnlyInlineElements(data) { + var wrapper; + + if (typeof data === 'string') { + wrapper = document.createElement('div'); + wrapper.innerHTML = data; + } else { + wrapper = data; + } + + var check = function check(element) { + return !Dom.blockElements.includes(element.tagName.toLowerCase()) && Array.from(element.children).every(check); + }; + + return Array.from(wrapper.children).every(check); + } + /** + * Find and return all block elements in the passed parent (including subtree) + * + * @param {HTMLElement} parent + * + * @return {HTMLElement[]} + */ + + }, { + key: "getDeepestBlockElements", + value: function getDeepestBlockElements(parent) { + if (Dom.containsOnlyInlineElements(parent)) { + return [parent]; + } + + return Array.from(parent.children).reduce(function (result, element) { + return [].concat((0, _toConsumableArray2.default)(result), (0, _toConsumableArray2.default)(Dom.getDeepestBlockElements(element))); + }, []); + } + /** + * Leafs nodes inside the target list from active element + * + * @param {HTMLElement[]} nodeList - target list of nodes + * @param {number} activeIndex — index of active node. By default it must be -1 + * @param {string} direction - leaf direction. Can be 'left' or 'right' + * @param {string} activeCSSClass - css class that will be added + * + * @return {Number} index of active node + */ + + }, { + key: "leafNodesAndReturnIndex", + value: function leafNodesAndReturnIndex(nodeList, activeIndex, direction, activeCSSClass) { + /** + * If activeButtonIndex === -1 then we have no chosen Tool in Toolbox + */ + if (activeIndex === -1) { + /** + * Normalize "previous" Tool index depending on direction. + * We need to do this to highlight "first" Tool correctly + * + * Order of Tools: [0] [1] ... [n - 1] + * [0 = n] because of: n % n = 0 % n + * + * Direction 'right': for [0] the [n - 1] is a previous index + * [n - 1] -> [0] + * + * Direction 'left': for [n - 1] the [0] is a previous index + * [n - 1] <- [0] + * + * @type {number} + */ + activeIndex = direction === 'right' ? -1 : 0; + } else { + /** + * If we have chosen Tool then remove highlighting + */ + nodeList[activeIndex].classList.remove(activeCSSClass); + } + /** + * Count index for next Tool + */ + + + if (direction === 'right') { + /** + * If we go right then choose next (+1) Tool + * @type {number} + */ + activeIndex = (activeIndex + 1) % nodeList.length; + } else { + /** + * If we go left then choose previous (-1) Tool + * Before counting module we need to add length before because of "The JavaScript Modulo Bug" + * @type {number} + */ + activeIndex = (nodeList.length + activeIndex - 1) % nodeList.length; + } + + if (Dom.isNativeInput(nodeList[activeIndex])) { + /** + * Focus input + */ + nodeList[activeIndex].focus(); + } + /** + * Highlight new chosen Tool + */ + + + nodeList[activeIndex].classList.add(activeCSSClass); + /** + * Return Active index + */ + + return activeIndex; + } + /* + * Helper for get holder from {string} or return HTMLElement + * @param element + */ + + }, { + key: "getHolder", + value: function getHolder(element) { + if (typeof element === 'string') { + return document.getElementById(element); + } + + return element; + } + }, { + key: "blockElements", + get: function get() { + return ['address', 'article', 'aside', 'blockquote', 'canvas', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'li', 'main', 'nav', 'noscript', 'ol', 'output', 'p', 'pre', 'ruby', 'section', 'table', 'tr', 'tfoot', 'ul', 'video']; + } + }]); + return Dom; + }(); + + _exports.default = Dom; + Dom.displayName = "Dom"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/inline-tools/inline-tool-bold.ts": +/*!*********************************************************!*\ + !*** ./src/components/inline-tools/inline-tool-bold.ts ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _dom = _interopRequireDefault(_dom); + + /** + * Bold Tool + * + * Inline Toolbar Tool + * + * Makes selected text bolder + */ + var BoldInlineTool = + /*#__PURE__*/ + function () { + function BoldInlineTool() { + (0, _classCallCheck2.default)(this, BoldInlineTool); + + /** + * Native Document's command that uses for Bold + */ + this.commandName = 'bold'; + /** + * Styles + */ + + this.CSS = { + button: 'ce-inline-tool', + buttonActive: 'ce-inline-tool--active', + buttonModifier: 'ce-inline-tool--bold' + }; + /** + * Elements + */ + + this.nodes = { + button: undefined + }; + } + /** + * Sanitizer Rule + * Leave tags + * @return {object} + */ + + + (0, _createClass2.default)(BoldInlineTool, [{ + key: "render", + + /** + * Create button for Inline Toolbar + */ + value: function render() { + this.nodes.button = document.createElement('button'); + this.nodes.button.type = 'button'; + this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier); + this.nodes.button.appendChild(_dom.default.svg('bold', 12, 14)); + return this.nodes.button; + } + /** + * Wrap range with tag + * @param {Range} range + */ + + }, { + key: "surround", + value: function surround(range) { + document.execCommand(this.commandName); + } + /** + * Check selection and set activated state to button if there are tag + * @param {Selection} selection + */ + + }, { + key: "checkState", + value: function checkState(selection) { + var isActive = document.queryCommandState(this.commandName); + this.nodes.button.classList.toggle(this.CSS.buttonActive, isActive); + return isActive; + } + /** + * Set a shortcut + */ + + }, { + key: "shortcut", + get: function get() { + return 'CMD+B'; + } + }], [{ + key: "sanitize", + get: function get() { + return { + b: {} + }; + } + }]); + return BoldInlineTool; + }(); + /** + * Specifies Tool as Inline Toolbar Tool + * + * @return {boolean} + */ + + + _exports.default = BoldInlineTool; + BoldInlineTool.displayName = "BoldInlineTool"; + BoldInlineTool.isInline = true; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/inline-tools/inline-tool-italic.ts": +/*!***********************************************************!*\ + !*** ./src/components/inline-tools/inline-tool-italic.ts ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _dom = _interopRequireDefault(_dom); + + /** + * Italic Tool + * + * Inline Toolbar Tool + * + * Style selected text with italic + */ + var ItalicInlineTool = + /*#__PURE__*/ + function () { + function ItalicInlineTool() { + (0, _classCallCheck2.default)(this, ItalicInlineTool); + + /** + * Native Document's command that uses for Italic + */ + this.commandName = 'italic'; + /** + * Styles + */ + + this.CSS = { + button: 'ce-inline-tool', + buttonActive: 'ce-inline-tool--active', + buttonModifier: 'ce-inline-tool--italic' + }; + /** + * Elements + */ + + this.nodes = { + button: null + }; + } + /** + * Sanitizer Rule + * Leave tags + * @return {object} + */ + + + (0, _createClass2.default)(ItalicInlineTool, [{ + key: "render", + + /** + * Create button for Inline Toolbar + */ + value: function render() { + this.nodes.button = document.createElement('button'); + this.nodes.button.type = 'button'; + this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier); + this.nodes.button.appendChild(_dom.default.svg('italic', 34, 34)); + return this.nodes.button; + } + /** + * Wrap range with tag + * @param {Range} range + */ + + }, { + key: "surround", + value: function surround(range) { + document.execCommand(this.commandName); + } + /** + * Check selection and set activated state to button if there are tag + * @param {Selection} selection + */ + + }, { + key: "checkState", + value: function checkState(selection) { + var isActive = document.queryCommandState(this.commandName); + this.nodes.button.classList.toggle(this.CSS.buttonActive, isActive); + return isActive; + } + /** + * Set a shortcut + */ + + }, { + key: "shortcut", + get: function get() { + return 'CMD+I'; + } + }], [{ + key: "sanitize", + get: function get() { + return { + i: {} + }; + } + }]); + return ItalicInlineTool; + }(); + /** + * Specifies Tool as Inline Toolbar Tool + * + * @return {boolean} + */ + + + _exports.default = ItalicInlineTool; + ItalicInlineTool.displayName = "ItalicInlineTool"; + ItalicInlineTool.isInline = true; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/inline-tools/inline-tool-link.ts": +/*!*********************************************************!*\ + !*** ./src/components/inline-tools/inline-tool-link.ts ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _selection, _dom, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _selection = _interopRequireDefault(_selection); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + + /** + * Link Tool + * + * Inline Toolbar Tool + * + * Wrap selected text with tag + */ + var LinkInlineTool = + /*#__PURE__*/ + function () { + /** + * @param {{api: API}} - Editor.js API + */ + function LinkInlineTool(_ref) { + var api = _ref.api; + (0, _classCallCheck2.default)(this, LinkInlineTool); + + /** + * Native Document's commands for link/unlink + */ + this.commandLink = 'createLink'; + this.commandUnlink = 'unlink'; + /** + * Enter key code + */ + + this.ENTER_KEY = 13; + /** + * Styles + */ + + this.CSS = { + button: 'ce-inline-tool', + buttonActive: 'ce-inline-tool--active', + buttonModifier: 'ce-inline-tool--link', + buttonUnlink: 'ce-inline-tool--unlink', + input: 'ce-inline-tool-input', + inputShowed: 'ce-inline-tool-input--showed' + }; + /** + * Elements + */ + + this.nodes = { + button: null, + input: null + }; + /** + * Input opening state + */ + + this.inputOpened = false; + this.toolbar = api.toolbar; + this.inlineToolbar = api.inlineToolbar; + this.notifier = api.notifier; + this.selection = new _selection.default(); + } + /** + * Sanitizer Rule + * Leave tags + * @return {object} + */ + + + (0, _createClass2.default)(LinkInlineTool, [{ + key: "render", + + /** + * Create button for Inline Toolbar + */ + value: function render() { + this.nodes.button = document.createElement('button'); + this.nodes.button.type = 'button'; + this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier); + this.nodes.button.appendChild(_dom.default.svg('link', 34, 34)); + this.nodes.button.appendChild(_dom.default.svg('unlink', 16, 18)); + return this.nodes.button; + } + /** + * Input for the link + */ + + }, { + key: "renderActions", + value: function renderActions() { + var _this = this; + + this.nodes.input = document.createElement('input'); + this.nodes.input.placeholder = 'Add a link'; + this.nodes.input.classList.add(this.CSS.input); + this.nodes.input.addEventListener('keydown', function (event) { + if (event.keyCode === _this.ENTER_KEY) { + _this.enterPressed(event); + } + }); + return this.nodes.input; + } + /** + * Handle clicks on the Inline Toolbar icon + * @param {Range} range + */ + + }, { + key: "surround", + value: function surround(range) { + /** + * Range will be null when user makes second click on the 'link icon' to close opened input + */ + if (range) { + /** + * Save selection before change focus to the input + */ + if (!this.inputOpened) { + /** Create blue background instead of selection */ + this.selection.setFakeBackground(); + this.selection.save(); + } else { + this.selection.restore(); + this.selection.removeFakeBackground(); + } + + var parentAnchor = this.selection.findParentTag('A'); + /** + * Unlink icon pressed + */ + + if (parentAnchor) { + this.selection.expandToTag(parentAnchor); + this.unlink(); + this.closeActions(); + this.checkState(); + this.toolbar.close(); + return; + } + } + + this.toggleActions(); + } + /** + * Check selection and set activated state to button if there are tag + * @param {Selection} selection + */ + + }, { + key: "checkState", + value: function checkState(selection) { + var anchorTag = this.selection.findParentTag('A'); + + if (anchorTag) { + this.nodes.button.classList.add(this.CSS.buttonUnlink); + this.nodes.button.classList.add(this.CSS.buttonActive); + this.openActions(); + /** + * Fill input value with link href + */ + + var hrefAttr = anchorTag.getAttribute('href'); + this.nodes.input.value = hrefAttr !== 'null' ? hrefAttr : ''; + this.selection.save(); + } else { + this.nodes.button.classList.remove(this.CSS.buttonUnlink); + this.nodes.button.classList.remove(this.CSS.buttonActive); + } + + return !!anchorTag; + } + /** + * Function called with Inline Toolbar closing + */ + + }, { + key: "clear", + value: function clear() { + this.closeActions(); + } + /** + * Set a shortcut + */ + + }, { + key: "toggleActions", + value: function toggleActions() { + if (!this.inputOpened) { + this.openActions(true); + } else { + this.closeActions(false); + } + } + /** + * @param {boolean} needFocus - on link creation we need to focus input. On editing - nope. + */ + + }, { + key: "openActions", + value: function openActions() { + var needFocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + this.nodes.input.classList.add(this.CSS.inputShowed); + + if (needFocus) { + this.nodes.input.focus(); + } + + this.inputOpened = true; + } + /** + * Close input + * @param {boolean} clearSavedSelection — we don't need to clear saved selection + * on toggle-clicks on the icon of opened Toolbar + */ + + }, { + key: "closeActions", + value: function closeActions() { + var clearSavedSelection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + if (this.selection.isFakeBackgroundEnabled) { + // if actions is broken by other selection We need to save new selection + var currentSelection = new _selection.default(); + currentSelection.save(); + this.selection.restore(); + this.selection.removeFakeBackground(); // and recover new selection after removing fake background + + currentSelection.restore(); + } + + this.nodes.input.classList.remove(this.CSS.inputShowed); + this.nodes.input.value = ''; + + if (clearSavedSelection) { + this.selection.clearSaved(); + } + + this.inputOpened = false; + } + /** + * Enter pressed on input + * @param {KeyboardEvent} event + */ + + }, { + key: "enterPressed", + value: function enterPressed(event) { + var value = this.nodes.input.value || ''; + + if (!value.trim()) { + this.selection.restore(); + this.unlink(); + event.preventDefault(); + this.closeActions(); + } + + if (!this.validateURL(value)) { + this.notifier.show({ + message: 'Pasted link is not valid.', + style: 'error' + }); + + _utils.default.log('Incorrect Link pasted', 'warn', value); + + return; + } + + value = this.prepareLink(value); + this.selection.restore(); + this.selection.removeFakeBackground(); + this.insertLink(value); + /** + * Preventing events that will be able to happen + */ + + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + this.selection.collapseToEnd(); + this.inlineToolbar.close(); + } + /** + * Detects if passed string is URL + * @param {string} str + * @return {Boolean} + */ + + }, { + key: "validateURL", + value: function validateURL(str) { + /** + * Don't allow spaces + */ + return !/\s/.test(str); + } + /** + * Process link before injection + * - sanitize + * - add protocol for links like 'google.com' + * @param {string} link - raw user input + */ + + }, { + key: "prepareLink", + value: function prepareLink(link) { + link = link.trim(); + link = this.addProtocol(link); + return link; + } + /** + * Add 'http' protocol to the links like 'vc.ru', 'google.com' + * @param {String} link + */ + + }, { + key: "addProtocol", + value: function addProtocol(link) { + /** + * If protocol already exists, do nothing + */ + if (/^(\w+):(\/\/)?/.test(link)) { + return link; + } + /** + * We need to add missed HTTP protocol to the link, but skip 2 cases: + * 1) Internal links like "/general" + * 2) Anchors looks like "#results" + * 3) Protocol-relative URLs like "//google.com" + */ + + + var isInternal = /^\/[^\/\s]/.test(link), + isAnchor = link.substring(0, 1) === '#', + isProtocolRelative = /^\/\/[^\/\s]/.test(link); + + if (!isInternal && !isAnchor && !isProtocolRelative) { + link = 'http://' + link; + } + + return link; + } + /** + * Inserts tag with "href" + * @param {string} link - "href" value + */ + + }, { + key: "insertLink", + value: function insertLink(link) { + /** + * Edit all link, not selected part + */ + var anchorTag = this.selection.findParentTag('A'); + + if (anchorTag) { + this.selection.expandToTag(anchorTag); + } + + document.execCommand(this.commandLink, false, link); + } + /** + * Removes tag + */ + + }, { + key: "unlink", + value: function unlink() { + document.execCommand(this.commandUnlink); + } + }, { + key: "shortcut", + get: function get() { + return 'CMD+K'; + } + }], [{ + key: "sanitize", + get: function get() { + return { + a: { + href: true, + target: '_blank', + rel: 'nofollow' + } + }; + } + }]); + return LinkInlineTool; + }(); + /** + * Specifies Tool as Inline Toolbar Tool + * + * @return {boolean} + */ + + + _exports.default = LinkInlineTool; + LinkInlineTool.displayName = "LinkInlineTool"; + LinkInlineTool.isInline = true; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules sync recursive ^\\.\\/.*$": +/*!**********************************************!*\ + !*** ./src/components/modules sync ^\.\/.*$ ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./api": "./src/components/modules/api/index.ts", + "./api/": "./src/components/modules/api/index.ts", + "./api/blocks": "./src/components/modules/api/blocks.ts", + "./api/blocks.ts": "./src/components/modules/api/blocks.ts", + "./api/caret": "./src/components/modules/api/caret.ts", + "./api/caret.ts": "./src/components/modules/api/caret.ts", + "./api/events": "./src/components/modules/api/events.ts", + "./api/events.ts": "./src/components/modules/api/events.ts", + "./api/index": "./src/components/modules/api/index.ts", + "./api/index.ts": "./src/components/modules/api/index.ts", + "./api/inlineToolbar": "./src/components/modules/api/inlineToolbar.ts", + "./api/inlineToolbar.ts": "./src/components/modules/api/inlineToolbar.ts", + "./api/listeners": "./src/components/modules/api/listeners.ts", + "./api/listeners.ts": "./src/components/modules/api/listeners.ts", + "./api/notifier": "./src/components/modules/api/notifier.ts", + "./api/notifier.ts": "./src/components/modules/api/notifier.ts", + "./api/sanitizer": "./src/components/modules/api/sanitizer.ts", + "./api/sanitizer.ts": "./src/components/modules/api/sanitizer.ts", + "./api/saver": "./src/components/modules/api/saver.ts", + "./api/saver.ts": "./src/components/modules/api/saver.ts", + "./api/selection": "./src/components/modules/api/selection.ts", + "./api/selection.ts": "./src/components/modules/api/selection.ts", + "./api/styles": "./src/components/modules/api/styles.ts", + "./api/styles.ts": "./src/components/modules/api/styles.ts", + "./api/toolbar": "./src/components/modules/api/toolbar.ts", + "./api/toolbar.ts": "./src/components/modules/api/toolbar.ts", + "./blockEvents": "./src/components/modules/blockEvents.ts", + "./blockEvents.ts": "./src/components/modules/blockEvents.ts", + "./blockManager": "./src/components/modules/blockManager.ts", + "./blockManager.ts": "./src/components/modules/blockManager.ts", + "./blockSelection": "./src/components/modules/blockSelection.ts", + "./blockSelection.ts": "./src/components/modules/blockSelection.ts", + "./caret": "./src/components/modules/caret.ts", + "./caret.ts": "./src/components/modules/caret.ts", + "./crossBlockSelection": "./src/components/modules/crossBlockSelection.ts", + "./crossBlockSelection.ts": "./src/components/modules/crossBlockSelection.ts", + "./dragNDrop": "./src/components/modules/dragNDrop.ts", + "./dragNDrop.ts": "./src/components/modules/dragNDrop.ts", + "./events": "./src/components/modules/events.ts", + "./events.ts": "./src/components/modules/events.ts", + "./listeners": "./src/components/modules/listeners.ts", + "./listeners.ts": "./src/components/modules/listeners.ts", + "./modificationsObserver": "./src/components/modules/modificationsObserver.ts", + "./modificationsObserver.ts": "./src/components/modules/modificationsObserver.ts", + "./notifier": "./src/components/modules/notifier.ts", + "./notifier.ts": "./src/components/modules/notifier.ts", + "./paste": "./src/components/modules/paste.ts", + "./paste.ts": "./src/components/modules/paste.ts", + "./rectangleSelection": "./src/components/modules/rectangleSelection.ts", + "./rectangleSelection.ts": "./src/components/modules/rectangleSelection.ts", + "./renderer": "./src/components/modules/renderer.ts", + "./renderer.ts": "./src/components/modules/renderer.ts", + "./sanitizer": "./src/components/modules/sanitizer.ts", + "./sanitizer.ts": "./src/components/modules/sanitizer.ts", + "./saver": "./src/components/modules/saver.ts", + "./saver.ts": "./src/components/modules/saver.ts", + "./shortcuts": "./src/components/modules/shortcuts.ts", + "./shortcuts.ts": "./src/components/modules/shortcuts.ts", + "./toolbar": "./src/components/modules/toolbar/index.ts", + "./toolbar/": "./src/components/modules/toolbar/index.ts", + "./toolbar/blockSettings": "./src/components/modules/toolbar/blockSettings.ts", + "./toolbar/blockSettings.ts": "./src/components/modules/toolbar/blockSettings.ts", + "./toolbar/conversion": "./src/components/modules/toolbar/conversion.ts", + "./toolbar/conversion.ts": "./src/components/modules/toolbar/conversion.ts", + "./toolbar/index": "./src/components/modules/toolbar/index.ts", + "./toolbar/index.ts": "./src/components/modules/toolbar/index.ts", + "./toolbar/inline": "./src/components/modules/toolbar/inline.ts", + "./toolbar/inline.ts": "./src/components/modules/toolbar/inline.ts", + "./toolbar/toolbox": "./src/components/modules/toolbar/toolbox.ts", + "./toolbar/toolbox.ts": "./src/components/modules/toolbar/toolbox.ts", + "./tools": "./src/components/modules/tools.ts", + "./tools.ts": "./src/components/modules/tools.ts", + "./ui": "./src/components/modules/ui.ts", + "./ui.ts": "./src/components/modules/ui.ts" +}; + + +function webpackContext(req) { + var id = webpackContextResolve(req); + return __webpack_require__(id); +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = "./src/components/modules sync recursive ^\\.\\/.*$"; + +/***/ }), + +/***/ "./src/components/modules/api/blocks.ts": +/*!**********************************************!*\ + !*** ./src/components/modules/api/blocks.ts ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ./../../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _utils = _interopRequireDefault(_utils); + + /** + * @class BlocksAPI + * provides with methods working with Block + */ + var BlocksAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(BlocksAPI, _Module); + + function BlocksAPI() { + var _this; + + (0, _classCallCheck2.default)(this, BlocksAPI); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(BlocksAPI).apply(this, arguments)); + /** + * Insert new Block + * + * @param {string} type — Tool name + * @param {BlockToolData} data — Tool data to insert + * @param {ToolConfig} config — Tool config + * @param {number?} index — index where to insert new Block + * @param {boolean?} needToFocus - flag to focus inserted Block + */ + + _this.insert = function () { + var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.config.initialBlock; + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 ? arguments[3] : undefined; + var needToFocus = arguments.length > 4 ? arguments[4] : undefined; + + _this.Editor.BlockManager.insert(type, data, config, index, needToFocus); + }; + + return _this; + } + /** + * Available methods + * @return {Blocks} + */ + + + (0, _createClass2.default)(BlocksAPI, [{ + key: "getBlocksCount", + + /** + * Returns Blocks count + * @return {number} + */ + value: function getBlocksCount() { + return this.Editor.BlockManager.blocks.length; + } + /** + * Returns current block index + * @return {number} + */ + + }, { + key: "getCurrentBlockIndex", + value: function getCurrentBlockIndex() { + return this.Editor.BlockManager.currentBlockIndex; + } + /** + * Returns Block holder by Block index + * @param {Number} index + * + * @return {HTMLElement} + */ + + }, { + key: "getBlockByIndex", + value: function getBlockByIndex(index) { + var block = this.Editor.BlockManager.getBlockByIndex(index); + return block.holder; + } + /** + * Call Block Manager method that swap Blocks + * @param {number} fromIndex - position of first Block + * @param {number} toIndex - position of second Block + */ + + }, { + key: "swap", + value: function swap(fromIndex, toIndex) { + this.Editor.BlockManager.swap(fromIndex, toIndex); + /** + * Move toolbar + * DO not close the settings + */ + + this.Editor.Toolbar.move(false); + } + /** + * Deletes Block + * @param blockIndex + */ + + }, { + key: "delete", + value: function _delete(blockIndex) { + this.Editor.BlockManager.removeBlock(blockIndex); + /** + * in case of last block deletion + * Insert new initial empty block + */ + + if (this.Editor.BlockManager.blocks.length === 0) { + this.Editor.BlockManager.insert(); + } + /** + * In case of deletion first block we need to set caret to the current Block + */ + + + if (this.Editor.BlockManager.currentBlockIndex === 0) { + this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock); + } else { + this.Editor.Caret.navigatePrevious(true); + } + + this.Editor.Toolbar.close(); + } + /** + * Clear Editor's area + */ + + }, { + key: "clear", + value: function clear() { + this.Editor.BlockManager.clear(true); + this.Editor.InlineToolbar.close(); + } + /** + * Fills Editor with Blocks data + * @param {OutputData} data — Saved Editor data + */ + + }, { + key: "render", + value: function render(data) { + this.Editor.BlockManager.clear(); + return this.Editor.Renderer.render(data.blocks); + } + /** + * Render passed HTML string + * @param {string} data + * @return {Promise} + */ + + }, { + key: "renderFromHTML", + value: function renderFromHTML(data) { + this.Editor.BlockManager.clear(); + return this.Editor.Paste.processText(data, true); + } + /** + * Stretch Block's content + * @param {number} index + * @param {boolean} status - true to enable, false to disable + */ + + }, { + key: "stretchBlock", + value: function stretchBlock(index) { + var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var block = this.Editor.BlockManager.getBlockByIndex(index); + + if (!block) { + return; + } + + block.stretched = status; + } + /** + * Insert new Block + * After set caret to this Block + * + * @todo: remove in 3.0.0 + * + * @deprecated with insert() method + */ + + }, { + key: "insertNewBlock", + value: function insertNewBlock() { + _utils.default.log('Method blocks.insertNewBlock() is deprecated and it will be removed in next major release. ' + 'Use blocks.insert() instead.', 'warn'); + + this.insert(); + } + }, { + key: "methods", + get: function get() { + var _this2 = this; + + return { + clear: function clear() { + return _this2.clear(); + }, + render: function render(data) { + return _this2.render(data); + }, + renderFromHTML: function renderFromHTML(data) { + return _this2.renderFromHTML(data); + }, + delete: function _delete() { + return _this2.delete(); + }, + swap: function swap(fromIndex, toIndex) { + return _this2.swap(fromIndex, toIndex); + }, + getBlockByIndex: function getBlockByIndex(index) { + return _this2.getBlockByIndex(index); + }, + getCurrentBlockIndex: function getCurrentBlockIndex() { + return _this2.getCurrentBlockIndex(); + }, + getBlocksCount: function getBlocksCount() { + return _this2.getBlocksCount(); + }, + stretchBlock: function stretchBlock(index) { + var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return _this2.stretchBlock(index, status); + }, + insertNewBlock: function insertNewBlock() { + return _this2.insertNewBlock(); + }, + insert: this.insert + }; + } + }]); + return BlocksAPI; + }(_module.default); + + _exports.default = BlocksAPI; + BlocksAPI.displayName = "BlocksAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/caret.ts": +/*!*********************************************!*\ + !*** ./src/components/modules/api/caret.ts ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @class CaretAPI + * provides with methods to work with caret + */ + var CaretAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(CaretAPI, _Module); + + function CaretAPI() { + var _this; + + (0, _classCallCheck2.default)(this, CaretAPI); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(CaretAPI).apply(this, arguments)); + /** + * Sets caret to the first Block + * + * @param {string} position - position where to set caret + * @param {number} offset - caret offset + * + * @return {boolean} + */ + + _this.setToFirstBlock = function () { + var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.Editor.Caret.positions.DEFAULT; + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + if (!_this.Editor.BlockManager.firstBlock) { + return false; + } + + _this.Editor.Caret.setToBlock(_this.Editor.BlockManager.firstBlock, position, offset); + + return true; + }; + /** + * Sets caret to the last Block + * + * @param {string} position - position where to set caret + * @param {number} offset - caret offset + * + * @return {boolean} + */ + + + _this.setToLastBlock = function () { + var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.Editor.Caret.positions.DEFAULT; + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + if (!_this.Editor.BlockManager.lastBlock) { + return false; + } + + _this.Editor.Caret.setToBlock(_this.Editor.BlockManager.lastBlock, position, offset); + + return true; + }; + /** + * Sets caret to the previous Block + * + * @param {string} position - position where to set caret + * @param {number} offset - caret offset + * + * @return {boolean} + */ + + + _this.setToPreviousBlock = function () { + var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.Editor.Caret.positions.DEFAULT; + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + if (!_this.Editor.BlockManager.previousBlock) { + return false; + } + + _this.Editor.Caret.setToBlock(_this.Editor.BlockManager.previousBlock, position, offset); + + return true; + }; + /** + * Sets caret to the next Block + * + * @param {string} position - position where to set caret + * @param {number} offset - caret offset + * + * @return {boolean} + */ + + + _this.setToNextBlock = function () { + var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.Editor.Caret.positions.DEFAULT; + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + if (!_this.Editor.BlockManager.nextBlock) { + return false; + } + + _this.Editor.Caret.setToBlock(_this.Editor.BlockManager.nextBlock, position, offset); + + return true; + }; + /** + * Sets caret to the Block by passed index + * + * @param {number} index - index of Block where to set caret + * @param {string} position - position where to set caret + * @param {number} offset - caret offset + * + * @return {boolean} + */ + + + _this.setToBlock = function (index) { + var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.Editor.Caret.positions.DEFAULT; + var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + + if (!_this.Editor.BlockManager.blocks[index]) { + return false; + } + + _this.Editor.Caret.setToBlock(_this.Editor.BlockManager.blocks[index], position, offset); + + return true; + }; + /** + * Sets caret to the Editor + * + * @param {boolean} atEnd - if true, set Caret to the end of the Editor + * + * @return {boolean} + */ + + + _this.focus = function () { + var atEnd = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (atEnd) { + return _this.setToLastBlock(_this.Editor.Caret.positions.END); + } + + return _this.setToFirstBlock(_this.Editor.Caret.positions.START); + }; + + return _this; + } + /** + * Available methods + * @return {Caret} + */ + + + (0, _createClass2.default)(CaretAPI, [{ + key: "methods", + get: function get() { + return { + setToFirstBlock: this.setToFirstBlock, + setToLastBlock: this.setToLastBlock, + setToPreviousBlock: this.setToPreviousBlock, + setToNextBlock: this.setToNextBlock, + setToBlock: this.setToBlock, + focus: this.focus + }; + } + }]); + return CaretAPI; + }(_module.default); + + _exports.default = CaretAPI; + CaretAPI.displayName = "CaretAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/events.ts": +/*!**********************************************!*\ + !*** ./src/components/modules/api/events.ts ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @class EventsAPI + * provides with methods working with Toolbar + */ + var EventsAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(EventsAPI, _Module); + + function EventsAPI() { + (0, _classCallCheck2.default)(this, EventsAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(EventsAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(EventsAPI, [{ + key: "on", + + /** + * Subscribe on Events + * @param {String} eventName + * @param {Function} callback + */ + value: function on(eventName, callback) { + this.Editor.Events.on(eventName, callback); + } + /** + * Emit event with data + * @param {String} eventName + * @param {Object} data + */ + + }, { + key: "emit", + value: function emit(eventName, data) { + this.Editor.Events.emit(eventName, data); + } + /** + * Unsubscribe from Event + * @param {String} eventName + * @param {Function} callback + */ + + }, { + key: "off", + value: function off(eventName, callback) { + this.Editor.Events.off(eventName, callback); + } + }, { + key: "methods", + + /** + * Available methods + * @return {Events} + */ + get: function get() { + var _this = this; + + return { + emit: function emit(eventName, data) { + return _this.emit(eventName, data); + }, + off: function off(eventName, callback) { + return _this.off(eventName, callback); + }, + on: function on(eventName, callback) { + return _this.on(eventName, callback); + } + }; + } + }]); + return EventsAPI; + }(_module.default); + + _exports.default = EventsAPI; + EventsAPI.displayName = "EventsAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/index.ts": +/*!*********************************************!*\ + !*** ./src/components/modules/api/index.ts ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @module API + * @copyright 2018 + * + * Each block has an Editor API instance to use provided public methods + * if you cant to read more about how API works, please see docs + */ + + /** + * @class API + */ + var API = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(API, _Module); + + function API() { + (0, _classCallCheck2.default)(this, API); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(API).apply(this, arguments)); + } + + (0, _createClass2.default)(API, [{ + key: "methods", + get: function get() { + return { + blocks: this.Editor.BlocksAPI.methods, + caret: this.Editor.CaretAPI.methods, + events: this.Editor.EventsAPI.methods, + listeners: this.Editor.ListenersAPI.methods, + notifier: this.Editor.NotifierAPI.methods, + sanitizer: this.Editor.SanitizerAPI.methods, + saver: this.Editor.SaverAPI.methods, + selection: this.Editor.SelectionAPI.methods, + styles: this.Editor.StylesAPI.classes, + toolbar: this.Editor.ToolbarAPI.methods, + inlineToolbar: this.Editor.InlineToolbarAPI.methods + }; + } + }]); + return API; + }(_module.default); + + _exports.default = API; + API.displayName = "API"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/inlineToolbar.ts": +/*!*****************************************************!*\ + !*** ./src/components/modules/api/inlineToolbar.ts ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @class InlineToolbarAPI + * Provides methods for working with the Inline Toolbar + */ + var InlineToolbarAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(InlineToolbarAPI, _Module); + + function InlineToolbarAPI() { + (0, _classCallCheck2.default)(this, InlineToolbarAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(InlineToolbarAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(InlineToolbarAPI, [{ + key: "open", + + /** + * Open Inline Toolbar + */ + value: function open() { + this.Editor.InlineToolbar.tryToShow(); + } + /** + * Close Inline Toolbar + */ + + }, { + key: "close", + value: function close() { + this.Editor.InlineToolbar.close(); + } + }, { + key: "methods", + + /** + * Available methods + * @return {InlineToolbar} + */ + get: function get() { + var _this = this; + + return { + close: function close() { + return _this.close(); + }, + open: function open() { + return _this.open(); + } + }; + } + }]); + return InlineToolbarAPI; + }(_module.default); + + _exports.default = InlineToolbarAPI; + InlineToolbarAPI.displayName = "InlineToolbarAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/listeners.ts": +/*!*************************************************!*\ + !*** ./src/components/modules/api/listeners.ts ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @class ListenersAPI + * Provides with methods working with DOM Listener + */ + var ListenersAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(ListenersAPI, _Module); + + function ListenersAPI() { + (0, _classCallCheck2.default)(this, ListenersAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ListenersAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(ListenersAPI, [{ + key: "on", + + /** + * adds DOM event listener + * + * @param {HTMLElement} element + * @param {string} eventType + * @param {() => void} handler + * @param {boolean} useCapture + */ + value: function on(element, eventType, handler, useCapture) { + this.Editor.Listeners.on(element, eventType, handler, useCapture); + } + /** + * Removes DOM listener from element + * + * @param element + * @param eventType + * @param handler + */ + + }, { + key: "off", + value: function off(element, eventType, handler) { + this.Editor.Listeners.off(element, eventType, handler); + } + }, { + key: "methods", + + /** + * Available methods + * @return {Listeners} + */ + get: function get() { + var _this = this; + + return { + on: function on(element, eventType, handler, useCapture) { + return _this.on(element, eventType, handler, useCapture); + }, + off: function off(element, eventType, handler) { + return _this.off(element, eventType, handler); + } + }; + } + }]); + return ListenersAPI; + }(_module.default); + + _exports.default = ListenersAPI; + ListenersAPI.displayName = "ListenersAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/notifier.ts": +/*!************************************************!*\ + !*** ./src/components/modules/api/notifier.ts ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + var NotifierAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(NotifierAPI, _Module); + + function NotifierAPI() { + (0, _classCallCheck2.default)(this, NotifierAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(NotifierAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(NotifierAPI, [{ + key: "show", + value: function show(options) { + return this.Editor.Notifier.show(options); + } + }, { + key: "methods", + + /** + * Available methods + */ + get: function get() { + var _this = this; + + return { + show: function show(options) { + return _this.show(options); + } + }; + } + }]); + return NotifierAPI; + }(_module.default); + + _exports.default = NotifierAPI; + NotifierAPI.displayName = "NotifierAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/sanitizer.ts": +/*!*************************************************!*\ + !*** ./src/components/modules/api/sanitizer.ts ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @class SanitizerAPI + * Provides Editor.js Sanitizer that allows developers to clean their HTML + */ + var SanitizerAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(SanitizerAPI, _Module); + + function SanitizerAPI() { + (0, _classCallCheck2.default)(this, SanitizerAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SanitizerAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(SanitizerAPI, [{ + key: "clean", + value: function clean(taintString, config) { + return this.Editor.Sanitizer.clean(taintString, config); + } + }, { + key: "methods", + + /** + * Available methods + * @return {Sanitizer} + */ + get: function get() { + var _this = this; + + return { + clean: function clean(taintString, config) { + return _this.clean(taintString, config); + } + }; + } + }]); + return SanitizerAPI; + }(_module.default); + + _exports.default = SanitizerAPI; + SanitizerAPI.displayName = "SanitizerAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/saver.ts": +/*!*********************************************!*\ + !*** ./src/components/modules/api/saver.ts ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @class SaverAPI + * provides with methods to save data + */ + var SaverAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(SaverAPI, _Module); + + function SaverAPI() { + (0, _classCallCheck2.default)(this, SaverAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SaverAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(SaverAPI, [{ + key: "save", + + /** + * Return Editor's data + */ + value: function save() { + return this.Editor.Saver.save(); + } + }, { + key: "methods", + + /** + * Available methods + * @return {Saver} + */ + get: function get() { + var _this = this; + + return { + save: function save() { + return _this.save(); + } + }; + } + }]); + return SaverAPI; + }(_module.default); + + _exports.default = SaverAPI; + SaverAPI.displayName = "SaverAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/selection.ts": +/*!*************************************************!*\ + !*** ./src/components/modules/api/selection.ts ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../../selection */ "./src/components/selection.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _selection) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _selection = _interopRequireDefault(_selection); + + /** + * @class SelectionAPI + * Provides with methods working with SelectionUtils + */ + var SelectionAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(SelectionAPI, _Module); + + function SelectionAPI() { + (0, _classCallCheck2.default)(this, SelectionAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SelectionAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(SelectionAPI, [{ + key: "findParentTag", + + /** + * Looks ahead from selection and find passed tag with class name + * @param {string} tagName - tag to find + * @param {string} className - tag's class name + * @return {HTMLElement|null} + */ + value: function findParentTag(tagName, className) { + return new _selection.default().findParentTag(tagName, className); + } + /** + * Expand selection to passed tag + * @param {HTMLElement} node - tag that should contain selection + */ + + }, { + key: "expandToTag", + value: function expandToTag(node) { + new _selection.default().expandToTag(node); + } + }, { + key: "methods", + + /** + * Available methods + * @return {SelectionAPIInterface} + */ + get: function get() { + var _this = this; + + return { + findParentTag: function findParentTag(tagName, className) { + return _this.findParentTag(tagName, className); + }, + expandToTag: function expandToTag(node) { + return _this.expandToTag(node); + } + }; + } + }]); + return SelectionAPI; + }(_module.default); + + _exports.default = SelectionAPI; + SelectionAPI.displayName = "SelectionAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/styles.ts": +/*!**********************************************!*\ + !*** ./src/components/modules/api/styles.ts ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * + */ + var StylesAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(StylesAPI, _Module); + + function StylesAPI() { + (0, _classCallCheck2.default)(this, StylesAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(StylesAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(StylesAPI, [{ + key: "classes", + get: function get() { + return { + /** + * Base Block styles + */ + block: 'cdx-block', + + /** + * Inline Tools styles + */ + inlineToolButton: 'ce-inline-tool', + inlineToolButtonActive: 'ce-inline-tool--active', + + /** + * UI elements + */ + input: 'cdx-input', + loader: 'cdx-loader', + button: 'cdx-button', + + /** + * Settings styles + */ + settingsButton: 'cdx-settings-button', + settingsButtonActive: 'cdx-settings-button--active' + }; + } + }]); + return StylesAPI; + }(_module.default); + + _exports.default = StylesAPI; + StylesAPI.displayName = "StylesAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/api/toolbar.ts": +/*!***********************************************!*\ + !*** ./src/components/modules/api/toolbar.ts ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @class ToolbarAPI + * Provides methods for working with the Toolbar + */ + var ToolbarAPI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(ToolbarAPI, _Module); + + function ToolbarAPI() { + (0, _classCallCheck2.default)(this, ToolbarAPI); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ToolbarAPI).apply(this, arguments)); + } + + (0, _createClass2.default)(ToolbarAPI, [{ + key: "open", + + /** + * Open toolbar + */ + value: function open() { + this.Editor.Toolbar.open(); + } + /** + * Close toolbar and all included elements + */ + + }, { + key: "close", + value: function close() { + this.Editor.Toolbar.close(); + } + }, { + key: "methods", + + /** + * Available methods + * @return {Toolbar} + */ + get: function get() { + var _this = this; + + return { + close: function close() { + return _this.close(); + }, + open: function open() { + return _this.open(); + } + }; + } + }]); + return ToolbarAPI; + }(_module.default); + + _exports.default = ToolbarAPI; + ToolbarAPI.displayName = "ToolbarAPI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/blockEvents.ts": +/*!***********************************************!*\ + !*** ./src/components/modules/blockEvents.ts ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _utils, _selection) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _utils = _interopRequireDefault(_utils); + _selection = _interopRequireDefault(_selection); + + /** + * Contains keyboard and mouse events binded on each Block by Block Manager + */ + var BlockEvents = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(BlockEvents, _Module); + + function BlockEvents() { + (0, _classCallCheck2.default)(this, BlockEvents); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(BlockEvents).apply(this, arguments)); + } + + (0, _createClass2.default)(BlockEvents, [{ + key: "keydown", + + /** + * All keydowns on Block + * @param {KeyboardEvent} event - keydown + */ + value: function keydown(event) { + /** + * Run common method for all keydown events + */ + this.beforeKeydownProcessing(event); + /** + * Fire keydown processor by event.keyCode + */ + + switch (event.keyCode) { + case _utils.default.keyCodes.BACKSPACE: + this.backspace(event); + break; + + case _utils.default.keyCodes.ENTER: + this.enter(event); + break; + + case _utils.default.keyCodes.DOWN: + case _utils.default.keyCodes.RIGHT: + this.arrowRightAndDown(event); + break; + + case _utils.default.keyCodes.UP: + case _utils.default.keyCodes.LEFT: + this.arrowLeftAndUp(event); + break; + + case _utils.default.keyCodes.TAB: + this.tabPressed(event); + break; + + case _utils.default.keyCodes.ESC: + this.escapePressed(event); + break; + + default: + this.defaultHandler(); + break; + } + } + /** + * Fires on keydown before event processing + * @param {KeyboardEvent} event - keydown + */ + + }, { + key: "beforeKeydownProcessing", + value: function beforeKeydownProcessing(event) { + /** + * Do not close Toolbox on Tabs or on Enter with opened Toolbox + */ + if (!this.needToolbarClosing(event)) { + return; + } + /** + * When user type something: + * - close Toolbar + * - close Conversion Toolbar + * - clear block highlighting + */ + + + if (_utils.default.isPrintableKey(event.keyCode)) { + this.Editor.Toolbar.close(); + this.Editor.ConversionToolbar.close(); + /** + * Allow to use shortcuts with selected blocks + * @type {boolean} + */ + + var isShortcut = event.ctrlKey || event.metaKey || event.altKey || event.shiftKey; + + if (!isShortcut) { + this.Editor.BlockManager.clearFocused(); + this.Editor.BlockSelection.clearSelection(event); + } + } + } + /** + * Key up on Block: + * - shows Inline Toolbar if something selected + * - shows conversion toolbar with 85% of block selection + */ + + }, { + key: "keyup", + value: function keyup(event) { + /** + * If shift key was pressed some special shortcut is used (eg. cross block selection via shift + arrows) + */ + if (event.shiftKey) { + return; + } + + var _this$Editor = this.Editor, + InlineToolbar = _this$Editor.InlineToolbar, + ConversionToolbar = _this$Editor.ConversionToolbar, + UI = _this$Editor.UI, + BlockManager = _this$Editor.BlockManager; + var block = BlockManager.getBlock(event.target); + /** + * Conversion Toolbar will be opened when user selects 85% of plugins content + * that why we must with the length of pluginsContent + */ + + if (_selection.default.almostAllSelected(block.pluginsContent.textContent)) { + InlineToolbar.close(); + ConversionToolbar.tryToShow(block); + } else { + ConversionToolbar.close(); + InlineToolbar.tryToShow(true); + } + /** + * Check if editor is empty on each keyup and add special css class to wrapper + */ + + + UI.checkEmptiness(); + } + /** + * Mouse up on Block: + * - shows Inline Toolbar if something selected + */ + + }, { + key: "mouseUp", + value: function mouseUp(event) { + var _this$Editor2 = this.Editor, + InlineToolbar = _this$Editor2.InlineToolbar, + ConversionToolbar = _this$Editor2.ConversionToolbar, + BlockManager = _this$Editor2.BlockManager, + BlockSelection = _this$Editor2.BlockSelection; + var block = BlockManager.getBlock(event.target); + /** + * Timeout uses to wait if selection will cleared after mouse up (regular click on block) + */ + + _utils.default.delay(function () { + /** + * 1) selected 85% of block - open Conversion Toolbar + * 2) select something inside block - open Inline Toolbar + * 3) nothing selected - close Toolbars + */ + if (_selection.default.almostAllSelected(block.pluginsContent.textContent)) { + InlineToolbar.close(); + ConversionToolbar.tryToShow(block); + } else if (!_selection.default.isCollapsed) { + InlineToolbar.tryToShow(); + ConversionToolbar.close(); + } else { + InlineToolbar.close(); + /** + * Don't close Conversion toolbar when Rectangle Selection ended with one block selected + * @see RectangleSelection#endSelection + */ + + if (BlockSelection.selectedBlocks.length !== 1) { + ConversionToolbar.close(); + } + } + }, 30)(); + } + /** + * Set up mouse selection handlers + * + * @param {MouseEvent} event + */ + + }, { + key: "mouseDown", + value: function mouseDown(event) { + this.Editor.CrossBlockSelection.watchSelection(event); + } + /** + * Open Toolbox to leaf Tools + * @param {KeyboardEvent} event + */ + + }, { + key: "tabPressed", + value: function tabPressed(event) { + /** + * Clear blocks selection by tab + */ + this.Editor.BlockSelection.clearSelection(event); + var _this$Editor3 = this.Editor, + BlockManager = _this$Editor3.BlockManager, + Tools = _this$Editor3.Tools, + ConversionToolbar = _this$Editor3.ConversionToolbar, + InlineToolbar = _this$Editor3.InlineToolbar; + var currentBlock = BlockManager.currentBlock; + + if (!currentBlock) { + return; + } + /** Prevent Default behaviour */ + + + event.preventDefault(); + event.stopPropagation(); + /** this property defines leaf direction */ + + var shiftKey = event.shiftKey, + direction = shiftKey ? 'left' : 'right'; + var canLeafToolbox = Tools.isInitial(currentBlock.tool) && currentBlock.isEmpty; + var canLeafInlineToolbar = !currentBlock.isEmpty && !_selection.default.isCollapsed && InlineToolbar.opened; + var canLeafConversionToolbar = !currentBlock.isEmpty && ConversionToolbar.opened; + /** + * For empty Blocks we show Plus button via Toobox only for initial Blocks + */ + + if (canLeafToolbox) { + this.leafToolboxTools(direction); + } else if (canLeafInlineToolbar) { + this.leafInlineToolbarTools(direction); + } else if (canLeafConversionToolbar) { + this.leafConversionToolbarTools(direction); + } else { + this.leafBlockSettingsTools(direction); + } + } + /** + * Escape pressed + * If some of Toolbar components are opened, then close it otherwise close Toolbar + * + * @param {Event} event + */ + + }, { + key: "escapePressed", + value: function escapePressed(event) { + /** + * Clear blocks selection by ESC + */ + this.Editor.BlockSelection.clearSelection(event); + + if (this.Editor.Toolbox.opened) { + this.Editor.Toolbox.close(); + } else if (this.Editor.BlockSettings.opened) { + this.Editor.BlockSettings.close(); + } else if (this.Editor.InlineToolbar.opened) { + this.Editor.InlineToolbar.close(); + } else { + this.Editor.Toolbar.close(); + } + } + /** + * Add drop target styles + * + * @param {DragEvent} e + */ + + }, { + key: "dragOver", + value: function dragOver(e) { + var block = this.Editor.BlockManager.getBlockByChildNode(e.target); + block.dropTarget = true; + } + /** + * Remove drop target style + * + * @param {DragEvent} e + */ + + }, { + key: "dragLeave", + value: function dragLeave(e) { + var block = this.Editor.BlockManager.getBlockByChildNode(e.target); + block.dropTarget = false; + } + /** + * Copying selected blocks + * Before putting to the clipboard we sanitize all blocks and then copy to the clipboard + * + * @param event + */ + + }, { + key: "handleCommandC", + value: function handleCommandC(event) { + var BlockSelection = this.Editor.BlockSelection; + + if (!BlockSelection.anyBlockSelected) { + return; + } + /** + * Prevent default copy + * Remove "decline sound" on macOS + */ + + + event.preventDefault(); // Copy Selected Blocks + + BlockSelection.copySelectedBlocks(); + } + /** + * Copy and Delete selected Blocks + * @param event + */ + + }, { + key: "handleCommandX", + value: function handleCommandX(event) { + var _this$Editor4 = this.Editor, + BlockSelection = _this$Editor4.BlockSelection, + BlockManager = _this$Editor4.BlockManager, + Caret = _this$Editor4.Caret; + + if (!BlockSelection.anyBlockSelected) { + return; + } + /** + * Copy Blocks before removing + * + * Prevent default copy + * Remove "decline sound" on macOS + */ + + + event.preventDefault(); + BlockSelection.copySelectedBlocks(); + var selectionPositionIndex = BlockManager.removeSelectedBlocks(); + Caret.setToBlock(BlockManager.insertInitialBlockAtIndex(selectionPositionIndex, true), Caret.positions.START); + /** Clear selection */ + + BlockSelection.clearSelection(event); + } + /** + * ENTER pressed on block + * @param {KeyboardEvent} event - keydown + */ + + }, { + key: "enter", + value: function enter(event) { + var _this$Editor5 = this.Editor, + BlockManager = _this$Editor5.BlockManager, + Toolbox = _this$Editor5.Toolbox, + BlockSettings = _this$Editor5.BlockSettings, + InlineToolbar = _this$Editor5.InlineToolbar, + ConversionToolbar = _this$Editor5.ConversionToolbar, + Tools = _this$Editor5.Tools; + var currentBlock = BlockManager.currentBlock; + var tool = Tools.available[currentBlock.name]; + /** + * Don't handle Enter keydowns when Tool sets enableLineBreaks to true. + * Uses for Tools like where line breaks should be handled by default behaviour. + */ + + if (tool && tool[Tools.apiSettings.IS_ENABLED_LINE_BREAKS] && !BlockSettings.opened && !InlineToolbar.opened && !ConversionToolbar.opened) { + return; + } + + if (Toolbox.opened && Toolbox.getActiveTool) { + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + Toolbox.toolButtonActivate(event, Toolbox.getActiveTool); + return; + } + + if (InlineToolbar.opened && InlineToolbar.focusedButton) { + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + InlineToolbar.focusedButton.click(); + return; + } + /** + * Allow to create linebreaks by Shift+Enter + */ + + + if (event.shiftKey) { + return; + } + + var newCurrent = this.Editor.BlockManager.currentBlock; + /** + * If enter has been pressed at the start of the text, just insert paragraph Block above + */ + + if (this.Editor.Caret.isAtStart && !this.Editor.BlockManager.currentBlock.hasMedia) { + this.Editor.BlockManager.insertInitialBlockAtIndex(this.Editor.BlockManager.currentBlockIndex); + } else { + /** + * Split the Current Block into two blocks + * Renew local current node after split + */ + newCurrent = this.Editor.BlockManager.split(); + } + + this.Editor.Caret.setToBlock(newCurrent); + /** + * If new Block is empty + */ + + if (this.Editor.Tools.isInitial(newCurrent.tool) && newCurrent.isEmpty) { + /** + * Show Toolbar + */ + this.Editor.Toolbar.open(false); + /** + * Show Plus Button + */ + + this.Editor.Toolbar.plusButton.show(); + } + + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + } + /** + * Handle backspace keydown on Block + * @param {KeyboardEvent} event - keydown + */ + + }, { + key: "backspace", + value: function backspace(event) { + var _this$Editor6 = this.Editor, + BlockManager = _this$Editor6.BlockManager, + BlockSelection = _this$Editor6.BlockSelection, + Caret = _this$Editor6.Caret; + var currentBlock = BlockManager.currentBlock; + var tool = this.Editor.Tools.available[currentBlock.name]; + /** + * Check if Block should be removed by current Backspace keydown + */ + + if (currentBlock.selected || currentBlock.isEmpty && currentBlock.currentInput === currentBlock.firstInput) { + event.preventDefault(); + var index = BlockManager.currentBlockIndex; + + if (BlockManager.previousBlock && BlockManager.previousBlock.inputs.length === 0) { + /** If previous block doesn't contain inputs, remove it */ + BlockManager.removeBlock(index - 1); + } else { + /** If block is empty, just remove it */ + BlockManager.removeBlock(); + } + + Caret.setToBlock(BlockManager.currentBlock, index ? Caret.positions.END : Caret.positions.START); + /** Close Toolbar */ + + this.Editor.Toolbar.close(); + /** Clear selection */ + + BlockSelection.clearSelection(event); + return; + } + /** + * Don't handle Backspaces when Tool sets enableLineBreaks to true. + * Uses for Tools like where line breaks should be handled by default behaviour. + * + * But if caret is at start of the block, we allow to remove it by backspaces + */ + + + if (tool && tool[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS] && !Caret.isAtStart) { + return; + } + + var isFirstBlock = BlockManager.currentBlockIndex === 0; + var canMergeBlocks = Caret.isAtStart && currentBlock.currentInput === currentBlock.firstInput && !isFirstBlock; + + if (canMergeBlocks) { + /** + * preventing browser default behaviour + */ + event.preventDefault(); + /** + * Merge Blocks + */ + + this.mergeBlocks(); + } + } + /** + * Merge current and previous Blocks if they have the same type + */ + + }, { + key: "mergeBlocks", + value: function mergeBlocks() { + var _this$Editor7 = this.Editor, + BlockManager = _this$Editor7.BlockManager, + Caret = _this$Editor7.Caret, + Toolbar = _this$Editor7.Toolbar; + var targetBlock = BlockManager.previousBlock; + var blockToMerge = BlockManager.currentBlock; + /** + * Blocks that can be merged: + * 1) with the same Name + * 2) Tool has 'merge' method + * + * other case will handle as usual ARROW LEFT behaviour + */ + + if (blockToMerge.name !== targetBlock.name || !targetBlock.mergeable) { + /** If target Block doesn't contain inputs or empty, remove it */ + if (targetBlock.inputs.length === 0 || targetBlock.isEmpty) { + BlockManager.removeBlock(BlockManager.currentBlockIndex - 1); + Caret.setToBlock(BlockManager.currentBlock); + Toolbar.close(); + return; + } + + if (Caret.navigatePrevious()) { + Toolbar.close(); + } + + return; + } + + Caret.createShadow(targetBlock.pluginsContent); + BlockManager.mergeBlocks(targetBlock, blockToMerge).then(function () { + /** Restore caret position after merge */ + Caret.restoreCaret(targetBlock.pluginsContent); + targetBlock.pluginsContent.normalize(); + Toolbar.close(); + }); + } + /** + * Handle right and down keyboard keys + */ + + }, { + key: "arrowRightAndDown", + value: function arrowRightAndDown(event) { + var _this = this; + + var shouldEnableCBS = this.Editor.Caret.isAtEnd || this.Editor.BlockSelection.anyBlockSelected; + + if (event.shiftKey && event.keyCode === _utils.default.keyCodes.DOWN && shouldEnableCBS) { + this.Editor.CrossBlockSelection.toggleBlockSelectedState(); + return; + } + + if (this.Editor.Caret.navigateNext()) { + /** + * Default behaviour moves cursor by 1 character, we need to prevent it + */ + event.preventDefault(); + } else { + /** + * After caret is set, update Block input index + */ + _utils.default.delay(function () { + /** Check currentBlock for case when user moves selection out of Editor */ + if (_this.Editor.BlockManager.currentBlock) { + _this.Editor.BlockManager.currentBlock.updateCurrentInput(); + } + }, 20)(); + } + /** + * Clear blocks selection by arrows + */ + + + this.Editor.BlockSelection.clearSelection(event); + } + /** + * Handle left and up keyboard keys + */ + + }, { + key: "arrowLeftAndUp", + value: function arrowLeftAndUp(event) { + var _this2 = this; + + var shouldEnableCBS = this.Editor.Caret.isAtStart || this.Editor.BlockSelection.anyBlockSelected; + + if (event.shiftKey && event.keyCode === _utils.default.keyCodes.UP && shouldEnableCBS) { + this.Editor.CrossBlockSelection.toggleBlockSelectedState(false); + return; + } + + if (this.Editor.Caret.navigatePrevious()) { + /** + * Default behaviour moves cursor by 1 character, we need to prevent it + */ + event.preventDefault(); + } else { + /** + * After caret is set, update Block input index + */ + _utils.default.delay(function () { + /** Check currentBlock for case when user ends selection out of Editor and then press arrow-key */ + if (_this2.Editor.BlockManager.currentBlock) { + _this2.Editor.BlockManager.currentBlock.updateCurrentInput(); + } + }, 20)(); + } + /** + * Clear blocks selection by arrows + */ + + + this.Editor.BlockSelection.clearSelection(event); + } + /** + * Default keydown handler + */ + + }, { + key: "defaultHandler", + value: function defaultHandler() {} + /** + * Cases when we need to close Toolbar + */ + + }, { + key: "needToolbarClosing", + value: function needToolbarClosing(event) { + var toolboxItemSelected = event.keyCode === _utils.default.keyCodes.ENTER && this.Editor.Toolbox.opened, + blockSettingsItemSelected = event.keyCode === _utils.default.keyCodes.ENTER && this.Editor.BlockSettings.opened, + inlineToolbarItemSelected = event.keyCode === _utils.default.keyCodes.ENTER && this.Editor.InlineToolbar.opened, + conversionToolbarItemSelected = event.keyCode === _utils.default.keyCodes.ENTER && this.Editor.ConversionToolbar.opened, + flippingToolbarItems = event.keyCode === _utils.default.keyCodes.TAB; + /** + * Do not close Toolbar in cases: + * 1. ShiftKey pressed (or combination with shiftKey) + * 2. When Toolbar is opened and Tab leafs its Tools + * 3. When Toolbar's component is opened and some its item selected + */ + + return !(event.shiftKey || flippingToolbarItems || toolboxItemSelected || blockSettingsItemSelected || inlineToolbarItemSelected || conversionToolbarItemSelected); + } + /** + * If Toolbox is not open, then just open it and show plus button + * Next Tab press will leaf Toolbox Tools + * + * @param {string} direction + */ + + }, { + key: "leafToolboxTools", + value: function leafToolboxTools(direction) { + if (!this.Editor.Toolbar.opened) { + this.Editor.Toolbar.open(false, false); + this.Editor.Toolbar.plusButton.show(); + } else { + this.Editor.Toolbox.leaf(direction); + } + + this.Editor.Toolbox.open(); + } + /** + * If InlineToolbar is not open, just open it and focus first button + * Next Tab press will leaf InlineToolbar Tools + * + * @param {string} direction + */ + + }, { + key: "leafInlineToolbarTools", + value: function leafInlineToolbarTools(direction) { + if (this.Editor.InlineToolbar.opened) { + this.Editor.InlineToolbar.leaf(direction); + } + } + /** + * Leaf Conversion Toolbar Tools + * @param {string} direction + */ + + }, { + key: "leafConversionToolbarTools", + value: function leafConversionToolbarTools(direction) { + this.Editor.ConversionToolbar.leaf(direction); + } + /** + * Open Toolbar and show BlockSettings before flipping Tools + * @param {string} direction + */ + + }, { + key: "leafBlockSettingsTools", + value: function leafBlockSettingsTools(direction) { + if (!this.Editor.Toolbar.opened) { + this.Editor.BlockManager.currentBlock.focused = true; + this.Editor.Toolbar.open(true, false); + this.Editor.Toolbar.plusButton.hide(); + } + /** + * If BlockSettings is not open, then open BlockSettings + * Next Tab press will leaf Settings Buttons + */ + + + if (!this.Editor.BlockSettings.opened) { + this.Editor.BlockSettings.open(); + } + + this.Editor.BlockSettings.leaf(direction); + } + }]); + return BlockEvents; + }(_module.default); + + _exports.default = BlockEvents; + BlockEvents.displayName = "BlockEvents"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/blockManager.ts": +/*!************************************************!*\ + !*** ./src/components/modules/blockManager.ts ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../block */ "./src/components/block.ts"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts"), __webpack_require__(/*! ../blocks */ "./src/components/blocks.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _block, _module, _dom, _utils, _blocks) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _block = _interopRequireDefault(_block); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + _blocks = _interopRequireDefault(_blocks); + + /** + * @class BlockManager + * @classdesc Manage editor`s blocks storage and appearance + * + * @module BlockManager + * + * @version 2.0.0 + */ + + /** + * @typedef {BlockManager} BlockManager + * @property {Number} currentBlockIndex - Index of current working block + * @property {Proxy} _blocks - Proxy for Blocks instance {@link Blocks} + */ + var BlockManager = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(BlockManager, _Module); + + function BlockManager() { + var _this; + + (0, _classCallCheck2.default)(this, BlockManager); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(BlockManager).apply(this, arguments)); + /** + * Index of current working block + * + * @type {number} + */ + + _this._currentBlockIndex = -1; + /** + * Proxy for Blocks instance {@link Blocks} + * + * @type {Proxy} + * @private + */ + + _this._blocks = null; + return _this; + } + /** + * Returns current Block index + * @return {number} + */ + + + (0, _createClass2.default)(BlockManager, [{ + key: "prepare", + + /** + * Should be called after Editor.UI preparation + * Define this._blocks property + * + * @returns {Promise} + */ + value: function () { + var _prepare = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee() { + var blocks, _this$Editor, BlockEvents, Shortcuts; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + blocks = new _blocks.default(this.Editor.UI.nodes.redactor); + _this$Editor = this.Editor, BlockEvents = _this$Editor.BlockEvents, Shortcuts = _this$Editor.Shortcuts; + /** + * We need to use Proxy to overload set/get [] operator. + * So we can use array-like syntax to access blocks + * + * @example + * this._blocks[0] = new Block(...); + * + * block = this._blocks[0]; + * + * @todo proxy the enumerate method + * + * @type {Proxy} + * @private + */ + + this._blocks = new Proxy(blocks, { + set: _blocks.default.set, + get: _blocks.default.get + }); + /** Copy shortcut */ + + Shortcuts.add({ + name: 'CMD+C', + handler: function handler(event) { + BlockEvents.handleCommandC(event); + } + }); + /** Copy and cut */ + + Shortcuts.add({ + name: 'CMD+X', + handler: function handler(event) { + BlockEvents.handleCommandX(event); + } + }); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + return function prepare() { + return _prepare.apply(this, arguments); + }; + }() + /** + * Creates Block instance by tool name + * + * @param {String} toolName - tools passed in editor config {@link EditorConfig#tools} + * @param {Object} data - constructor params + * @param {Object} settings - block settings + * + * @return {Block} + */ + + }, { + key: "composeBlock", + value: function composeBlock(toolName) { + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var toolInstance = this.Editor.Tools.construct(toolName, data); + var toolClass = this.Editor.Tools.available[toolName]; + var block = new _block.default(toolName, toolInstance, toolClass, settings, this.Editor.API.methods); + this.bindEvents(block); + return block; + } + /** + * Insert new block into _blocks + * + * @param {String} toolName — plugin name, by default method inserts initial block type + * @param {Object} data — plugin data + * @param {Object} settings - default settings + * @param {number} index - index where to insert new Block + * @param {boolean} needToFocus - flag shows if needed to update current Block index + * + * @return {Block} + */ + + }, { + key: "insert", + value: function insert() { + var toolName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.config.initialBlock; + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.currentBlockIndex + 1; + var needToFocus = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var block = this.composeBlock(toolName, data, settings); + this._blocks[index] = block; + + if (needToFocus) { + this.currentBlockIndex = index; + } + + return block; + } + /** + * Insert pasted content. Call onPaste callback after insert. + * + * @param {string} toolName + * @param {PasteEvent} pasteEvent - pasted data + * @param {boolean} replace - should replace current block + */ + + }, { + key: "paste", + value: function paste(toolName, pasteEvent) { + var replace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var block; + + if (replace) { + block = this.replace(toolName); + } else { + block = this.insert(toolName); + } + + try { + block.call('onPaste', pasteEvent); + } catch (e) { + _utils.default.log("".concat(toolName, ": onPaste callback call is failed"), 'error', e); + } + + return block; + } + /** + * Insert new initial block at passed index + * + * @param {number} index - index where Block should be inserted + * @param {boolean} needToFocus - if true, updates current Block index + * + * TODO: Remove method and use insert() with index instead (?) + * + * @return {Block} inserted Block + */ + + }, { + key: "insertInitialBlockAtIndex", + value: function insertInitialBlockAtIndex(index) { + var needToFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var block = this.composeBlock(this.config.initialBlock, {}, {}); + this._blocks[index] = block; + + if (needToFocus) { + this.currentBlockIndex = index; + } else if (index <= this.currentBlockIndex) { + this.currentBlockIndex++; + } + + return block; + } + /** + * Always inserts at the end + * @return {Block} + */ + + }, { + key: "insertAtEnd", + value: function insertAtEnd() { + /** + * Define new value for current block index + */ + this.currentBlockIndex = this.blocks.length - 1; + /** + * Insert initial typed block + */ + + return this.insert(); + } + /** + * Merge two blocks + * @param {Block} targetBlock - previous block will be append to this block + * @param {Block} blockToMerge - block that will be merged with target block + * + * @return {Promise} - the sequence that can be continued + */ + + }, { + key: "mergeBlocks", + value: function () { + var _mergeBlocks = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2(targetBlock, blockToMerge) { + var blockToMergeIndex, blockToMergeData; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + blockToMergeIndex = this._blocks.indexOf(blockToMerge); + + if (!blockToMerge.isEmpty) { + _context2.next = 3; + break; + } + + return _context2.abrupt("return"); + + case 3: + _context2.next = 5; + return blockToMerge.data; + + case 5: + blockToMergeData = _context2.sent; + + if (_utils.default.isEmpty(blockToMergeData)) { + _context2.next = 9; + break; + } + + _context2.next = 9; + return targetBlock.mergeWith(blockToMergeData); + + case 9: + this.removeBlock(blockToMergeIndex); + this.currentBlockIndex = this._blocks.indexOf(targetBlock); + + case 11: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function mergeBlocks(_x, _x2) { + return _mergeBlocks.apply(this, arguments); + }; + }() + /** + * Remove block with passed index or remove last + * @param {Number|null} index + */ + + }, { + key: "removeBlock", + value: function removeBlock(index) { + if (index === undefined) { + index = this.currentBlockIndex; + } + + this._blocks.remove(index); + + if (this.currentBlockIndex >= index) { + this.currentBlockIndex--; + } + /** + * If first Block was removed, insert new Initial Block and set focus on it`s first input + */ + + + if (!this.blocks.length) { + this.currentBlockIndex = -1; + this.insert(); + return; + } else if (index === 0) { + this.currentBlockIndex = 0; + } + } + /** + * Remove only selected Blocks + * and returns first Block index where started removing... + * @return number|undefined + */ + + }, { + key: "removeSelectedBlocks", + value: function removeSelectedBlocks() { + var firstSelectedBlockIndex; + /** + * Remove selected Blocks from the end + */ + + for (var index = this.blocks.length - 1; index >= 0; index--) { + if (!this.blocks[index].selected) { + continue; + } + + this.removeBlock(index); + firstSelectedBlockIndex = index; + } + + return firstSelectedBlockIndex; + } + /** + * Attention! + * After removing insert new initial typed Block and focus on it + * Removes all blocks + */ + + }, { + key: "removeAllBlocks", + value: function removeAllBlocks() { + for (var index = this.blocks.length - 1; index >= 0; index--) { + this._blocks.remove(index); + } + + this.currentBlockIndex = -1; + this.insert(); + this.currentBlock.firstInput.focus(); + } + /** + * Split current Block + * 1. Extract content from Caret position to the Block`s end + * 2. Insert a new Block below current one with extracted content + * + * @return {Block} + */ + + }, { + key: "split", + value: function split() { + var extractedFragment = this.Editor.Caret.extractFragmentFromCaretPosition(); + + var wrapper = _dom.default.make('div'); + + wrapper.appendChild(extractedFragment); + /** + * @todo make object in accordance with Tool + */ + + var data = { + text: _dom.default.isEmpty(wrapper) ? '' : wrapper.innerHTML + }; + /** + * Renew current Block + * @type {Block} + */ + + return this.insert(this.config.initialBlock, data); + } + /** + * Replace current working block + * + * @param {String} toolName — plugin name + * @param {Object} data — plugin data + * + * @return {Block} + */ + + }, { + key: "replace", + value: function replace() { + var toolName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.config.initialBlock; + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var block = this.composeBlock(toolName, data); + + this._blocks.insert(this.currentBlockIndex, block, true); + + return block; + } + /** + * Returns Block by passed index + * @param {Number} index + * @return {Block} + */ + + }, { + key: "getBlockByIndex", + value: function getBlockByIndex(index) { + return this._blocks[index]; + } + /** + * Get Block instance by html element + * @param {Node} element + * @returns {Block} + */ + + }, { + key: "getBlock", + value: function getBlock(element) { + if (!_dom.default.isElement(element)) { + element = element.parentNode; + } + + var nodes = this._blocks.nodes, + firstLevelBlock = element.closest(".".concat(_block.default.CSS.wrapper)), + index = nodes.indexOf(firstLevelBlock); + + if (index >= 0) { + return this._blocks[index]; + } + } + /** + * Remove selection from all Blocks then highlight only Current Block + */ + + }, { + key: "highlightCurrentNode", + value: function highlightCurrentNode() { + /** + * Remove previous selected Block's state + */ + this.clearFocused(); + /** + * Mark current Block as selected + * @type {boolean} + */ + + this.currentBlock.focused = true; + } + /** + * Remove selection from all Blocks + */ + + }, { + key: "clearFocused", + value: function clearFocused() { + this.blocks.forEach(function (block) { + return block.focused = false; + }); + } + /** + * 1) Find first-level Block from passed child Node + * 2) Mark it as current + * + * @param {Node} childNode - look ahead from this node. + * @param {string} caretPosition - position where to set caret + * @throws Error - when passed Node is not included at the Block + */ + + }, { + key: "setCurrentBlockByChildNode", + value: function setCurrentBlockByChildNode(childNode) { + /** + * If node is Text TextNode + */ + if (!_dom.default.isElement(childNode)) { + childNode = childNode.parentNode; + } + + var parentFirstLevelBlock = childNode.closest(".".concat(_block.default.CSS.wrapper)); + + if (parentFirstLevelBlock) { + /** + * Update current Block's index + * @type {number} + */ + this.currentBlockIndex = this._blocks.nodes.indexOf(parentFirstLevelBlock); + return this.currentBlock; + } else { + throw new Error('Can not find a Block from this child Node'); + } + } + /** + * Return block which contents passed node + * + * @param {Node} childNode + * @return {Block} + */ + + }, { + key: "getBlockByChildNode", + value: function getBlockByChildNode(childNode) { + /** + * If node is Text TextNode + */ + if (!_dom.default.isElement(childNode)) { + childNode = childNode.parentNode; + } + + var firstLevelBlock = childNode.closest(".".concat(_block.default.CSS.wrapper)); + return this.blocks.find(function (block) { + return block.holder === firstLevelBlock; + }); + } + /** + * Swap Blocks Position + * @param {Number} fromIndex + * @param {Number} toIndex + */ + + }, { + key: "swap", + value: function swap(fromIndex, toIndex) { + /** Move up current Block */ + this._blocks.swap(fromIndex, toIndex); + /** Now actual block moved up so that current block index decreased */ + + + this.currentBlockIndex = toIndex; + } + /** + * Sets current Block Index -1 which means unknown + * and clear highlightings + */ + + }, { + key: "dropPointer", + value: function dropPointer() { + this.currentBlockIndex = -1; + this.clearFocused(); + } + /** + * Clears Editor + * @param {boolean} needAddInitialBlock - 1) in internal calls (for example, in api.blocks.render) + * we don't need to add empty initial block + * 2) in api.blocks.clear we should add empty block + */ + + }, { + key: "clear", + value: function clear() { + var needAddInitialBlock = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + this._blocks.removeAll(); + + this.dropPointer(); + + if (needAddInitialBlock) { + this.insert(this.config.initialBlock); + } + /** + * Add empty modifier + */ + + + this.Editor.UI.checkEmptiness(); + } + /** + * Bind Events + * @param {Object} block + */ + + }, { + key: "bindEvents", + value: function bindEvents(block) { + var _this$Editor2 = this.Editor, + BlockEvents = _this$Editor2.BlockEvents, + Listeners = _this$Editor2.Listeners; + Listeners.on(block.holder, 'keydown', function (event) { + return BlockEvents.keydown(event); + }, true); + Listeners.on(block.holder, 'mouseup', function (event) { + return BlockEvents.mouseUp(event); + }); + Listeners.on(block.holder, 'mousedown', function (event) { + return BlockEvents.mouseDown(event); + }); + Listeners.on(block.holder, 'keyup', function (event) { + return BlockEvents.keyup(event); + }); + Listeners.on(block.holder, 'dragover', function (event) { + return BlockEvents.dragOver(event); + }); + Listeners.on(block.holder, 'dragleave', function (event) { + return BlockEvents.dragLeave(event); + }); + } + }, { + key: "currentBlockIndex", + get: function get() { + return this._currentBlockIndex; + } + /** + * Set current Block index and fire Block lifecycle callbacks + * @param newIndex + */ + , + set: function set(newIndex) { + if (this._blocks[this._currentBlockIndex]) { + this._blocks[this._currentBlockIndex].willUnselect(); + } + + if (this._blocks[newIndex]) { + this._blocks[newIndex].willSelect(); + } + + this._currentBlockIndex = newIndex; + } + /** + * returns first Block + * @return {Block} + */ + + }, { + key: "firstBlock", + get: function get() { + return this._blocks[0]; + } + /** + * returns last Block + * @return {Block} + */ + + }, { + key: "lastBlock", + get: function get() { + return this._blocks[this._blocks.length - 1]; + } + /** + * Get current Block instance + * + * @return {Block} + */ + + }, { + key: "currentBlock", + get: function get() { + return this._blocks[this.currentBlockIndex]; + } + /** + * Returns next Block instance + * @return {Block|null} + */ + + }, { + key: "nextBlock", + get: function get() { + var isLastBlock = this.currentBlockIndex === this._blocks.length - 1; + + if (isLastBlock) { + return null; + } + + return this._blocks[this.currentBlockIndex + 1]; + } + /** + * Return first Block with inputs after current Block + * + * @returns {Block | undefined} + */ + + }, { + key: "nextContentfulBlock", + get: function get() { + var nextBlocks = this.blocks.slice(this.currentBlockIndex + 1); + return nextBlocks.find(function (block) { + return !!block.inputs.length; + }); + } + /** + * Return first Block with inputs before current Block + * + * @returns {Block | undefined} + */ + + }, { + key: "previousContentfulBlock", + get: function get() { + var previousBlocks = this.blocks.slice(0, this.currentBlockIndex).reverse(); + return previousBlocks.find(function (block) { + return !!block.inputs.length; + }); + } + /** + * Returns previous Block instance + * @return {Block|null} + */ + + }, { + key: "previousBlock", + get: function get() { + var isFirstBlock = this.currentBlockIndex === 0; + + if (isFirstBlock) { + return null; + } + + return this._blocks[this.currentBlockIndex - 1]; + } + /** + * Get array of Block instances + * + * @returns {Block[]} {@link Blocks#array} + */ + + }, { + key: "blocks", + get: function get() { + return this._blocks.array; + } + /** + * Check if each Block is empty + * + * @returns {boolean} + */ + + }, { + key: "isEditorEmpty", + get: function get() { + return this.blocks.every(function (block) { + return block.isEmpty; + }); + } + }]); + return BlockManager; + }(_module.default); + + _exports.default = BlockManager; + BlockManager.displayName = "BlockManager"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/blockSelection.ts": +/*!**************************************************!*\ + !*** ./src/components/modules/blockSelection.ts ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _utils, _dom, _selection) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _utils = _interopRequireDefault(_utils); + _dom = _interopRequireDefault(_dom); + _selection = _interopRequireDefault(_selection); + + /** + * @class BlockSelection + * @classdesc Manages Block selection with shortcut CMD+A + * + * @module BlockSelection + * @version 1.0.0 + */ + var BlockSelection = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(BlockSelection, _Module); + + function BlockSelection() { + var _this; + + (0, _classCallCheck2.default)(this, BlockSelection); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(BlockSelection).apply(this, arguments)); + /** + * Flag used to define block selection + * First CMD+A defines it as true and then second CMD+A selects all Blocks + * @type {boolean} + */ + + _this.needToSelectAll = false; + /** + * Flag used to define native input selection + * In this case we allow double CMD+A to select Block + * @type {boolean} + */ + + _this.nativeInputSelected = false; + /** + * Flag identifies any input selection + * That means we can select whole Block + * @type {boolean} + */ + + _this.readyToBlockSelection = false; + return _this; + } + /** + * Sanitizer Config + * @return {SanitizerConfig} + */ + + + (0, _createClass2.default)(BlockSelection, [{ + key: "prepare", + + /** + * Module Preparation + * Registers Shortcuts CMD+A and CMD+C + * to select all and copy them + */ + value: function prepare() { + var _this2 = this; + + var Shortcuts = this.Editor.Shortcuts; + /** Selection shortcut */ + + Shortcuts.add({ + name: 'CMD+A', + handler: function handler(event) { + var BlockManager = _this2.Editor.BlockManager; + /** + * When one page consist of two or more EditorJS instances + * Shortcut module tries to handle all events. Thats why Editor's selection works inside the target Editor, but + * for others error occurs because nothing to select. + * + * Prevent such actions if focus is not inside the Editor + */ + + if (!BlockManager.currentBlock) { + return; + } + + _this2.handleCommandA(event); + } + }); + this.selection = new _selection.default(); + } + /** + * Remove selection of Block + * @param {number?} index - Block index according to the BlockManager's indexes + */ + + }, { + key: "unSelectBlockByIndex", + value: function unSelectBlockByIndex(index) { + var BlockManager = this.Editor.BlockManager; + var block; + + if (isNaN(index)) { + block = BlockManager.currentBlock; + } else { + block = BlockManager.getBlockByIndex(index); + } + + block.selected = false; + } + /** + * Clear selection from Blocks + * + * @param {Event} reason - event caused clear of selection + * @param {boolean} restoreSelection - if true, restore saved selection + */ + + }, { + key: "clearSelection", + value: function clearSelection(reason) { + var restoreSelection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var _this$Editor = this.Editor, + BlockManager = _this$Editor.BlockManager, + Caret = _this$Editor.Caret, + RectangleSelection = _this$Editor.RectangleSelection; + this.needToSelectAll = false; + this.nativeInputSelected = false; + this.readyToBlockSelection = false; + /** + * If reason caused clear of the selection was printable key and any block is selected, + * remove selected blocks and insert pressed key + */ + + if (this.anyBlockSelected && reason && reason instanceof KeyboardEvent && _utils.default.isPrintableKey(reason.keyCode)) { + var indexToInsert = BlockManager.removeSelectedBlocks(); + BlockManager.insertInitialBlockAtIndex(indexToInsert, true); + Caret.setToBlock(BlockManager.currentBlock); + + _utils.default.delay(function () { + Caret.insertContentAtCaretPosition(reason.key); + }, 20)(); + } + + this.Editor.CrossBlockSelection.clear(reason); + + if (!this.anyBlockSelected || RectangleSelection.isRectActivated()) { + this.Editor.RectangleSelection.clearSelection(); + return; + } + /** + * Restore selection when Block is already selected + * but someone tries to write something. + */ + + + if (restoreSelection) { + this.selection.restore(); + } + /** Now all blocks cleared */ + + + this.allBlocksSelected = false; + } + /** + * Reduce each Block and copy its content + */ + + }, { + key: "copySelectedBlocks", + value: function copySelectedBlocks() { + var _this3 = this; + + var fakeClipboard = _dom.default.make('div'); + + this.selectedBlocks.forEach(function (block) { + /** + * Make

    tag that holds clean HTML + */ + var cleanHTML = _this3.Editor.Sanitizer.clean(block.holder.innerHTML, _this3.sanitizerConfig); + + var fragment = _dom.default.make('p'); + + fragment.innerHTML = cleanHTML; + fakeClipboard.appendChild(fragment); + }); + + _utils.default.copyTextToClipboard(fakeClipboard.innerHTML); + } + /** + * select Block + * @param {number?} index - Block index according to the BlockManager's indexes + */ + + }, { + key: "selectBlockByIndex", + value: function selectBlockByIndex(index) { + var BlockManager = this.Editor.BlockManager; + /** + * Remove previous focused Block's state + */ + + BlockManager.clearFocused(); + var block; + + if (isNaN(index)) { + block = BlockManager.currentBlock; + } else { + block = BlockManager.getBlockByIndex(index); + } + /** Save selection */ + + + this.selection.save(); + + _selection.default.get().removeAllRanges(); + + block.selected = true; + } + /** + * First CMD+A selects all input content by native behaviour, + * next CMD+A keypress selects all blocks + * + * @param {KeyboardEvent} event + */ + + }, { + key: "handleCommandA", + value: function handleCommandA(event) { + this.Editor.RectangleSelection.clearSelection(); + /** allow default selection on native inputs */ + + if (_dom.default.isNativeInput(event.target) && !this.nativeInputSelected) { + this.nativeInputSelected = true; + return; + } + + var workingBlock = this.Editor.BlockManager.getBlock(event.target); + var inputs = workingBlock.inputs; + /** + * If Block has more than one editable element allow native selection + * Second cmd+a will select whole Block + */ + + if (inputs.length > 1 && !this.readyToBlockSelection) { + this.readyToBlockSelection = true; + return; + } + + if (this.needToSelectAll) { + /** Prevent default selection */ + event.preventDefault(); + /** + * Save selection + * Will be restored when closeSelection fired + */ + + this.selection.save(); + /** + * Remove Ranges from Selection + */ + + _selection.default.get().removeAllRanges(); + + this.selectAllBlocks(); + this.needToSelectAll = false; + /** + * Close ConversionToolbar when all Blocks selected + */ + + this.Editor.ConversionToolbar.close(); + } else { + this.needToSelectAll = true; + } + } + /** + * Select All Blocks + * Each Block has selected setter that makes Block copyable + */ + + }, { + key: "selectAllBlocks", + value: function selectAllBlocks() { + this.allBlocksSelected = true; + } + }, { + key: "sanitizerConfig", + get: function get() { + return { + p: {}, + h1: {}, + h2: {}, + h3: {}, + h4: {}, + h5: {}, + h6: {}, + ol: {}, + ul: {}, + li: {}, + br: true, + img: { + src: true, + width: true, + height: true + }, + a: { + href: true + }, + b: {}, + i: {}, + u: {} + }; + } + /** + * Flag that identifies all Blocks selection + * @return {boolean} + */ + + }, { + key: "allBlocksSelected", + get: function get() { + var BlockManager = this.Editor.BlockManager; + return BlockManager.blocks.every(function (block) { + return block.selected === true; + }); + } + /** + * Set selected all blocks + * @param {boolean} state + */ + , + set: function set(state) { + var BlockManager = this.Editor.BlockManager; + BlockManager.blocks.forEach(function (block) { + return block.selected = state; + }); + } + /** + * Flag that identifies any Block selection + * @return {boolean} + */ + + }, { + key: "anyBlockSelected", + get: function get() { + var BlockManager = this.Editor.BlockManager; + return BlockManager.blocks.some(function (block) { + return block.selected === true; + }); + } + /** + * Return selected Blocks array + * @return {Block[]} + */ + + }, { + key: "selectedBlocks", + get: function get() { + return this.Editor.BlockManager.blocks.filter(function (block) { + return block.selected; + }); + } + }]); + return BlockSelection; + }(_module.default); + + _exports.default = BlockSelection; + BlockSelection.displayName = "BlockSelection"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/caret.ts": +/*!*****************************************!*\ + !*** ./src/components/modules/caret.ts ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _selection, _module, _dom, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _selection = _interopRequireDefault(_selection); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + + /** + * @class Caret + * @classdesc Contains methods for working Caret + * + * Uses Range methods to manipulate with caret + * + * @module Caret + * + * @version 2.0.0 + */ + + /** + * @typedef {Caret} Caret + */ + var Caret = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Caret, _Module); + + function Caret() { + (0, _classCallCheck2.default)(this, Caret); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Caret).apply(this, arguments)); + } + + (0, _createClass2.default)(Caret, [{ + key: "setToBlock", + + /** + * Method gets Block instance and puts caret to the text node with offset + * There two ways that method applies caret position: + * - first found text node: sets at the beginning, but you can pass an offset + * - last found text node: sets at the end of the node. Also, you can customize the behaviour + * + * @param {Block} block - Block class + * @param {String} position - position where to set caret. + * If default - leave default behaviour and apply offset if it's passed + * @param {Number} offset - caret offset regarding to the text node + */ + value: function setToBlock(block) { + var _this = this; + + var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.positions.DEFAULT; + var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var BlockManager = this.Editor.BlockManager; + var element; + + switch (position) { + case this.positions.START: + element = block.firstInput; + break; + + case this.positions.END: + element = block.lastInput; + break; + + default: + element = block.currentInput; + } + + if (!element) { + return; + } + + var nodeToSet = _dom.default.getDeepestNode(element, position === this.positions.END); + + var contentLength = _dom.default.getContentLength(nodeToSet); + + switch (true) { + case position === this.positions.START: + offset = 0; + break; + + case position === this.positions.END: + case offset > contentLength: + offset = contentLength; + break; + } + /** + * @todo try to fix via Promises or use querySelectorAll to not to use timeout + */ + + + _utils.default.delay(function () { + _this.set(nodeToSet, offset); + }, 20)(); + + BlockManager.setCurrentBlockByChildNode(block.holder); + BlockManager.currentBlock.currentInput = element; + } + /** + * Set caret to the current input of current Block. + * + * @param {HTMLElement} input - input where caret should be set + * @param {String} position - position of the caret. + * If default - leave default behaviour and apply offset if it's passed + * @param {number} offset - caret offset regarding to the text node + */ + + }, { + key: "setToInput", + value: function setToInput(input) { + var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.positions.DEFAULT; + var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var currentBlock = this.Editor.BlockManager.currentBlock; + + var nodeToSet = _dom.default.getDeepestNode(input); + + switch (position) { + case this.positions.START: + this.set(nodeToSet, 0); + break; + + case this.positions.END: + var contentLength = _dom.default.getContentLength(nodeToSet); + + this.set(nodeToSet, contentLength); + break; + + default: + if (offset) { + this.set(nodeToSet, offset); + } + + } + + currentBlock.currentInput = input; + } + /** + * Creates Document Range and sets caret to the element with offset + * @param {HTMLElement} element - target node. + * @param {Number} offset - offset + */ + + }, { + key: "set", + value: function set(element) { + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + var range = document.createRange(), + selection = _selection.default.get(); + /** if found deepest node is native input */ + + + if (_dom.default.isNativeInput(element)) { + if (!_dom.default.canSetCaret(element)) { + return; + } + + element.focus(); + element.selectionStart = element.selectionEnd = offset; + return; + } + + range.setStart(element, offset); + range.setEnd(element, offset); + selection.removeAllRanges(); + selection.addRange(range); + /** If new cursor position is not visible, scroll to it */ + + var _ref = element.nodeType === Node.ELEMENT_NODE ? element.getBoundingClientRect() : range.getBoundingClientRect(), + top = _ref.top, + bottom = _ref.bottom; + + var _window = window, + innerHeight = _window.innerHeight; + + if (top < 0) { + window.scrollBy(0, top); + } + + if (bottom > innerHeight) { + window.scrollBy(0, bottom - innerHeight); + } + } + /** + * Set Caret to the last Block + * If last block is not empty, append another empty block + */ + + }, { + key: "setToTheLastBlock", + value: function setToTheLastBlock() { + var lastBlock = this.Editor.BlockManager.lastBlock; + + if (!lastBlock) { + return; + } + /** + * If last block is empty and it is an initialBlock, set to that. + * Otherwise, append new empty block and set to that + */ + + + if (this.Editor.Tools.isInitial(lastBlock.tool) && lastBlock.isEmpty) { + this.setToBlock(lastBlock); + } else { + var newBlock = this.Editor.BlockManager.insertAtEnd(); + this.setToBlock(newBlock); + } + } + /** + * Extract content fragment of current Block from Caret position to the end of the Block + */ + + }, { + key: "extractFragmentFromCaretPosition", + value: function extractFragmentFromCaretPosition() { + var selection = _selection.default.get(); + + if (selection.rangeCount) { + var selectRange = selection.getRangeAt(0); + var currentBlockInput = this.Editor.BlockManager.currentBlock.currentInput; + selectRange.deleteContents(); + + if (currentBlockInput) { + var range = selectRange.cloneRange(); + range.selectNodeContents(currentBlockInput); + range.setStart(selectRange.endContainer, selectRange.endOffset); + return range.extractContents(); + } + } + } + /** + * Set's caret to the next Block or Tool`s input + * Before moving caret, we should check if caret position is at the end of Plugins node + * Using {@link Dom#getDeepestNode} to get a last node and match with current selection + * + * @param {Boolean} force - force navigation even if caret is not at the end + * + * @return {Boolean} + */ + + }, { + key: "navigateNext", + value: function navigateNext() { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var _this$Editor$BlockMan = this.Editor.BlockManager, + currentBlock = _this$Editor$BlockMan.currentBlock, + nextContentfulBlock = _this$Editor$BlockMan.nextContentfulBlock; + var nextInput = currentBlock.nextInput; + + if (!nextContentfulBlock && !nextInput) { + return false; + } + + if (force || this.isAtEnd) { + /** If next Tool`s input exists, focus on it. Otherwise set caret to the next Block */ + if (!nextInput) { + this.setToBlock(nextContentfulBlock, this.positions.START); + } else { + this.setToInput(nextInput, this.positions.START); + } + + return true; + } + + return false; + } + /** + * Set's caret to the previous Tool`s input or Block + * Before moving caret, we should check if caret position is start of the Plugins node + * Using {@link Dom#getDeepestNode} to get a last node and match with current selection + * + * @param {Boolean} force - force navigation even if caret is not at the start + * + * @return {Boolean} + */ + + }, { + key: "navigatePrevious", + value: function navigatePrevious() { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var _this$Editor$BlockMan2 = this.Editor.BlockManager, + currentBlock = _this$Editor$BlockMan2.currentBlock, + previousContentfulBlock = _this$Editor$BlockMan2.previousContentfulBlock; + + if (!currentBlock) { + return false; + } + + var previousInput = currentBlock.previousInput; + + if (!previousContentfulBlock && !previousInput) { + return false; + } + + if (force || this.isAtStart) { + /** If previous Tool`s input exists, focus on it. Otherwise set caret to the previous Block */ + if (!previousInput) { + this.setToBlock(previousContentfulBlock, this.positions.END); + } else { + this.setToInput(previousInput, this.positions.END); + } + + return true; + } + + return false; + } + /** + * Inserts shadow element after passed element where caret can be placed + * @param {Node} element + */ + + }, { + key: "createShadow", + value: function createShadow(element) { + var shadowCaret = document.createElement('span'); + shadowCaret.classList.add(Caret.CSS.shadowCaret); + element.insertAdjacentElement('beforeEnd', shadowCaret); + } + /** + * Restores caret position + * @param {HTMLElement} element + */ + + }, { + key: "restoreCaret", + value: function restoreCaret(element) { + var shadowCaret = element.querySelector(".".concat(Caret.CSS.shadowCaret)); + + if (!shadowCaret) { + return; + } + /** + * After we set the caret to the required place + * we need to clear shadow caret + * + * - make new range + * - select shadowed span + * - use extractContent to remove it from DOM + */ + + + var sel = new _selection.default(); + sel.expandToTag(shadowCaret); + setTimeout(function () { + var newRange = document.createRange(); + newRange.selectNode(shadowCaret); + newRange.extractContents(); + }, 50); + } + /** + * Inserts passed content at caret position + * + * @param {string} content - content to insert + */ + + }, { + key: "insertContentAtCaretPosition", + value: function insertContentAtCaretPosition(content) { + var fragment = document.createDocumentFragment(); + var wrapper = document.createElement('div'); + + var selection = _selection.default.get(); + + var range = _selection.default.range; + wrapper.innerHTML = content; + Array.from(wrapper.childNodes).forEach(function (child) { + return fragment.appendChild(child); + }); + var lastChild = fragment.lastChild; + range.deleteContents(); + range.insertNode(fragment); + /** Cross-browser caret insertion */ + + var newRange = document.createRange(); + newRange.setStart(lastChild, lastChild.textContent.length); + selection.removeAllRanges(); + selection.addRange(newRange); + } + /** + * Get all first-level (first child of [contenteditabel]) siblings from passed node + * Then you can check it for emptiness + * + * @example + *

    + * + * @return {Element[]} + */ + + }, { + key: "getHigherLevelSiblings", + value: function getHigherLevelSiblings(from, direction) { + var current = from; + var siblings = []; + /** + * Find passed node's firs-level parent (in example - blockquote) + */ + + while (current.parentNode && current.parentNode.contentEditable !== 'true') { + current = current.parentNode; + } + + var sibling = direction === 'left' ? 'previousSibling' : 'nextSibling'; + /** + * Find all left/right siblings + */ + + while (current[sibling]) { + current = current[sibling]; + siblings.push(current); + } + + return siblings; + } + }, { + key: "positions", + + /** + * Allowed caret positions in input + * + * @static + * @returns {{START: string, END: string, DEFAULT: string}} + */ + get: function get() { + return { + START: 'start', + END: 'end', + DEFAULT: 'default' + }; + } + /** + * Elements styles that can be useful for Caret Module + */ + + }, { + key: "isAtStart", + + /** + * Get's deepest first node and checks if offset is zero + * @return {boolean} + */ + get: function get() { + var selection = _selection.default.get(); + + var firstNode = _dom.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput); + + var focusNode = selection.focusNode; + /** In case lastNode is native input */ + + if (_dom.default.isNativeInput(firstNode)) { + return firstNode.selectionEnd === 0; + } + /** Case when selection have been cleared programmatically, for example after CBS */ + + + if (!selection.anchorNode) { + return false; + } + /** + * Workaround case when caret in the text like " |Hello!" + * selection.anchorOffset is 1, but real caret visible position is 0 + * @type {number} + */ + + + var firstLetterPosition = focusNode.textContent.search(/\S/); + + if (firstLetterPosition === -1) { + // empty text + firstLetterPosition = 0; + } + /** + * If caret was set by external code, it might be set to text node wrapper. + *
    |hello
    <---- Selection references to
    instead of text node + * + * In this case, anchor node has ELEMENT_NODE node type. + * Anchor offset shows amount of children between start of the element and caret position. + * + * So we use child with focusOffset index as new anchorNode. + */ + + + var focusOffset = selection.focusOffset; + + if (focusNode.nodeType !== Node.TEXT_NODE && focusNode.childNodes.length) { + if (focusNode.childNodes[focusOffset]) { + focusNode = focusNode.childNodes[focusOffset]; + focusOffset = 0; + } else { + focusNode = focusNode.childNodes[focusOffset - 1]; + focusOffset = focusNode.textContent.length; + } + } + /** + * In case of + *
    + *

    <-- first (and deepest) node is + * |adaddad <-- focus node + *
    + */ + + + if (_dom.default.isLineBreakTag(firstNode) || _dom.default.isEmpty(firstNode)) { + var leftSiblings = this.getHigherLevelSiblings(focusNode, 'left'); + var nothingAtLeft = leftSiblings.every(function (node) { + /** + * Workaround case when block starts with several
    's (created by SHIFT+ENTER) + * @see https://github.com/codex-team/editor.js/issues/726 + * We need to allow to delete such linebreaks, so in this case caret IS NOT AT START + */ + var regularLineBreak = _dom.default.isLineBreakTag(node); + /** + * Workaround SHIFT+ENTER in Safari, that creates

    instead of
    + */ + + + var lineBreakInSafari = node.children.length === 1 && _dom.default.isLineBreakTag(node.children[0]); + + var isLineBreak = regularLineBreak || lineBreakInSafari; + return _dom.default.isEmpty(node) && !isLineBreak; + }); + + if (nothingAtLeft && focusOffset === firstLetterPosition) { + return true; + } + } + /** + * We use <= comparison for case: + * "| Hello" <--- selection.anchorOffset is 0, but firstLetterPosition is 1 + */ + + + return firstNode === null || focusNode === firstNode && focusOffset <= firstLetterPosition; + } + /** + * Get's deepest last node and checks if offset is last node text length + * @return {boolean} + */ + + }, { + key: "isAtEnd", + get: function get() { + var selection = _selection.default.get(); + + var focusNode = selection.focusNode; + + var lastNode = _dom.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput, true); + /** In case lastNode is native input */ + + + if (_dom.default.isNativeInput(lastNode)) { + return lastNode.selectionEnd === lastNode.value.length; + } + /** Case when selection have been cleared programmatically, for example after CBS */ + + + if (!selection.focusNode) { + return false; + } + /** + * If caret was set by external code, it might be set to text node wrapper. + *
    hello|
    <---- Selection references to
    instead of text node + * + * In this case, anchor node has ELEMENT_NODE node type. + * Anchor offset shows amount of children between start of the element and caret position. + * + * So we use child with anchofocusOffset - 1 as new focusNode. + */ + + + var focusOffset = selection.focusOffset; + + if (focusNode.nodeType !== Node.TEXT_NODE && focusNode.childNodes.length) { + if (focusNode.childNodes[focusOffset - 1]) { + focusNode = focusNode.childNodes[focusOffset - 1]; + focusOffset = focusNode.textContent.length; + } else { + focusNode = focusNode.childNodes[0]; + focusOffset = 0; + } + } + /** + * In case of + *
    + * adaddad| <-- anchor node + *

    <-- first (and deepest) node is + *
    + */ + + + if (_dom.default.isLineBreakTag(lastNode) || _dom.default.isEmpty(lastNode)) { + var rightSiblings = this.getHigherLevelSiblings(focusNode, 'right'); + var nothingAtRight = rightSiblings.every(function (node, i) { + /** + * If last right sibling is BR isEmpty returns false, but there actually nothing at right + */ + var isLastBR = i === rightSiblings.length - 1 && _dom.default.isLineBreakTag(node); + + return isLastBR || _dom.default.isEmpty(node) && !_dom.default.isLineBreakTag(node); + }); + + if (nothingAtRight && focusOffset === focusNode.textContent.length) { + return true; + } + } + /** + * Workaround case: + * hello | <--- anchorOffset will be 5, but textContent.length will be 6. + * Why not regular .trim(): + * in case of ' hello |' trim() will also remove space at the beginning, so length will be lower than anchorOffset + */ + + + var rightTrimmedText = lastNode.textContent.replace(/\s+$/, ''); + /** + * We use >= comparison for case: + * "Hello |" <--- selection.anchorOffset is 7, but rightTrimmedText is 6 + */ + + return focusNode === lastNode && focusOffset >= rightTrimmedText.length; + } + }], [{ + key: "CSS", + get: function get() { + return { + shadowCaret: 'cdx-shadow-caret' + }; + } + }]); + return Caret; + }(_module.default); + + _exports.default = Caret; + Caret.displayName = "Caret"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/crossBlockSelection.ts": +/*!*******************************************************!*\ + !*** ./src/components/modules/crossBlockSelection.ts ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _selection, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _selection = _interopRequireDefault(_selection); + _utils = _interopRequireDefault(_utils); + + var CrossBlockSelection = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(CrossBlockSelection, _Module); + + function CrossBlockSelection() { + var _this; + + (0, _classCallCheck2.default)(this, CrossBlockSelection); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(CrossBlockSelection).apply(this, arguments)); + /** + * Mouse up event handler. + * Removes the listeners + */ + + _this.onMouseUp = function () { + var Listeners = _this.Editor.Listeners; + Listeners.off(document, 'mouseover', _this.onMouseOver); + Listeners.off(document, 'mouseup', _this.onMouseUp); + }; + /** + * Mouse over event handler + * Gets target and related blocks and change selected state for blocks in between + * + * @param {MouseEvent} event + */ + + + _this.onMouseOver = function (event) { + var BlockManager = _this.Editor.BlockManager; + + var relatedBlock = BlockManager.getBlockByChildNode(event.relatedTarget) || _this.lastSelectedBlock; + + var targetBlock = BlockManager.getBlockByChildNode(event.target); + + if (!relatedBlock || !targetBlock) { + return; + } + + if (targetBlock === relatedBlock) { + return; + } + + if (relatedBlock === _this.firstSelectedBlock) { + _selection.default.get().removeAllRanges(); + + relatedBlock.selected = true; + targetBlock.selected = true; + return; + } + + if (targetBlock === _this.firstSelectedBlock) { + relatedBlock.selected = false; + targetBlock.selected = false; + return; + } + + _this.toggleBlocksSelectedState(relatedBlock, targetBlock); + + _this.lastSelectedBlock = targetBlock; + }; + + return _this; + } + /** + * Sets up listeners + * + * @param {MouseEvent} event - mouse down event + */ + + + (0, _createClass2.default)(CrossBlockSelection, [{ + key: "watchSelection", + value: function watchSelection(event) { + if (event.button !== _utils.default.mouseButtons.LEFT) { + return; + } + + var _this$Editor = this.Editor, + BlockManager = _this$Editor.BlockManager, + UI = _this$Editor.UI, + Listeners = _this$Editor.Listeners; + this.firstSelectedBlock = BlockManager.getBlock(event.target); + this.lastSelectedBlock = this.firstSelectedBlock; + Listeners.on(document, 'mouseover', this.onMouseOver); + Listeners.on(document, 'mouseup', this.onMouseUp); + } + /** + * Change selection state of the next Block + * Used for CBS via Shift + arrow keys + * + * @param {boolean} next - if true, toggle next block. Previous otherwise + */ + + }, { + key: "toggleBlockSelectedState", + value: function toggleBlockSelectedState() { + var next = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var BlockManager = this.Editor.BlockManager; + + if (!this.lastSelectedBlock) { + this.lastSelectedBlock = this.firstSelectedBlock = BlockManager.currentBlock; + } + + if (this.firstSelectedBlock === this.lastSelectedBlock) { + this.firstSelectedBlock.selected = true; + + _selection.default.get().removeAllRanges(); + } + + var nextBlockIndex = BlockManager.blocks.indexOf(this.lastSelectedBlock) + (next ? 1 : -1); + var nextBlock = BlockManager.blocks[nextBlockIndex]; + + if (!nextBlock) { + return; + } + + if (this.lastSelectedBlock.selected !== nextBlock.selected) { + nextBlock.selected = true; + } else { + this.lastSelectedBlock.selected = false; + } + + this.lastSelectedBlock = nextBlock; + } + /** + * Clear saved state + * + * @param {Event} reason - event caused clear of selection + */ + + }, { + key: "clear", + value: function clear(reason) { + var _this$Editor2 = this.Editor, + BlockManager = _this$Editor2.BlockManager, + BlockSelection = _this$Editor2.BlockSelection, + Caret = _this$Editor2.Caret; + var fIndex = BlockManager.blocks.indexOf(this.firstSelectedBlock); + var lIndex = BlockManager.blocks.indexOf(this.lastSelectedBlock); + + if (BlockSelection.anyBlockSelected && fIndex > -1 && lIndex > -1) { + if (reason && reason instanceof KeyboardEvent) { + /** + * Set caret depending on pressed key if pressed key is an arrow. + */ + switch (reason.keyCode) { + case _utils.default.keyCodes.DOWN: + case _utils.default.keyCodes.RIGHT: + Caret.setToBlock(BlockManager.blocks[Math.max(fIndex, lIndex)], Caret.positions.END); + break; + + case _utils.default.keyCodes.UP: + case _utils.default.keyCodes.LEFT: + Caret.setToBlock(BlockManager.blocks[Math.min(fIndex, lIndex)], Caret.positions.START); + break; + + default: + Caret.setToBlock(BlockManager.blocks[Math.max(fIndex, lIndex)], Caret.positions.END); + } + } else { + /** + * By default set caret at the end of the last selected block + */ + Caret.setToBlock(BlockManager.blocks[Math.max(fIndex, lIndex)], Caret.positions.END); + } + } + + this.firstSelectedBlock = this.lastSelectedBlock = null; + } + /** + * Change blocks selection state between passed two blocks. + * + * @param {Block} firstBlock + * @param {Block} lastBlock + */ + + }, { + key: "toggleBlocksSelectedState", + value: function toggleBlocksSelectedState(firstBlock, lastBlock) { + var BlockManager = this.Editor.BlockManager; + var fIndex = BlockManager.blocks.indexOf(firstBlock); + var lIndex = BlockManager.blocks.indexOf(lastBlock); + /** + * If first and last block have the different selection state + * it means we should't toggle selection of the first selected block. + * In the other case we shouldn't toggle the last selected block. + */ + + var shouldntSelectFirstBlock = firstBlock.selected !== lastBlock.selected; + + for (var i = Math.min(fIndex, lIndex); i <= Math.max(fIndex, lIndex); i++) { + var block = BlockManager.blocks[i]; + + if (block !== this.firstSelectedBlock && block !== (shouldntSelectFirstBlock ? firstBlock : lastBlock)) { + BlockManager.blocks[i].selected = !BlockManager.blocks[i].selected; + } + } + } + }]); + return CrossBlockSelection; + }(_module.default); + + _exports.default = CrossBlockSelection; + CrossBlockSelection.displayName = "CrossBlockSelection"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/dragNDrop.ts": +/*!*********************************************!*\ + !*** ./src/components/modules/dragNDrop.ts ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _selection, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _selection = _interopRequireDefault(_selection); + _module = _interopRequireDefault(_module); + + var DragNDrop = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(DragNDrop, _Module); + + function DragNDrop() { + var _this; + + (0, _classCallCheck2.default)(this, DragNDrop); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(DragNDrop).apply(this, arguments)); + /** + * If drag has been started at editor, we save it + * + * @type Boolean + * @private + */ + + _this.isStartedAtEditor = false; + /** + * Handle drop event + * + * @param {DragEvent} dropEvent + */ + + _this.processDrop = + /*#__PURE__*/ + function () { + var _ref = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(dropEvent) { + var _this$Editor, BlockManager, Caret, Paste, targetBlock, _targetBlock; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _this$Editor = _this.Editor, BlockManager = _this$Editor.BlockManager, Caret = _this$Editor.Caret, Paste = _this$Editor.Paste; + dropEvent.preventDefault(); + BlockManager.blocks.forEach(function (block) { + return block.dropTarget = false; + }); + + if (_selection.default.isAtEditor && !_selection.default.isCollapsed && _this.isStartedAtEditor) { + document.execCommand('delete'); + } + + _this.isStartedAtEditor = false; + /** + * Try to set current block by drop target. + * If drop target (error will be thrown) is not part of the Block, set last Block as current. + */ + + try { + targetBlock = BlockManager.setCurrentBlockByChildNode(dropEvent.target); + + _this.Editor.Caret.setToBlock(targetBlock, Caret.positions.END); + } catch (e) { + _targetBlock = BlockManager.setCurrentBlockByChildNode(BlockManager.lastBlock.holder); + + _this.Editor.Caret.setToBlock(_targetBlock, Caret.positions.END); + } + + Paste.processDataTransfer(dropEvent.dataTransfer, true); + + case 7: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); + + return _this; + } + /** + * Bind events + * + * @private + */ + + + (0, _createClass2.default)(DragNDrop, [{ + key: "prepare", + value: function prepare() { + this.bindEvents(); + } + /** + * Add drag events listeners to editor zone + * @private + */ + + }, { + key: "bindEvents", + value: function bindEvents() { + var _this2 = this; + + this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'drop', this.processDrop, true); + this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'dragstart', function (dragEvent) { + if (_selection.default.isAtEditor && !_selection.default.isCollapsed) { + _this2.isStartedAtEditor = true; + } + + _this2.Editor.InlineToolbar.close(); + }); + /* Prevent default browser behavior to allow drop on non-contenteditable elements */ + + this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'dragover', function (e) { + return e.preventDefault(); + }, true); + } + }]); + return DragNDrop; + }(_module.default); + + _exports.default = DragNDrop; + DragNDrop.displayName = "DragNDrop"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/events.ts": +/*!******************************************!*\ + !*** ./src/components/modules/events.ts ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * @module eventDispatcher + * + * Has two important methods: + * - {Function} on - appends subscriber to the event. If event doesn't exist - creates new one + * - {Function} emit - fires all subscribers with data + * - {Function off - unsubsribes callback + * + * @version 1.0.0 + * + * @typedef {Events} Events + * @property {Object} subscribers - all subscribers grouped by event name + */ + var Events = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Events, _Module); + + function Events() { + var _this; + + (0, _classCallCheck2.default)(this, Events); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Events).apply(this, arguments)); + /** + * Object with events` names as key and array of callback functions as value + * @type {{}} + */ + + _this.subscribers = {}; + return _this; + } + /** + * Subscribe any event on callback + * + * @param {String} eventName - event name + * @param {Function} callback - subscriber + */ + + + (0, _createClass2.default)(Events, [{ + key: "on", + value: function on(eventName, callback) { + if (!(eventName in this.subscribers)) { + this.subscribers[eventName] = []; + } // group by events + + + this.subscribers[eventName].push(callback); + } + /** + * Emit callbacks with passed data + * + * @param {String} eventName - event name + * @param {Object} data - subscribers get this data when they were fired + */ + + }, { + key: "emit", + value: function emit(eventName, data) { + if (!this.subscribers[eventName]) { + return; + } + + this.subscribers[eventName].reduce(function (previousData, currentHandler) { + var newData = currentHandler(previousData); + return newData ? newData : previousData; + }, data); + } + /** + * Unsubsribe callback from event + * + * @param eventName + * @param callback + */ + + }, { + key: "off", + value: function off(eventName, callback) { + for (var i = 0; i < this.subscribers[eventName].length; i++) { + if (this.subscribers[eventName][i] === callback) { + delete this.subscribers[eventName][i]; + break; + } + } + } + /** + * Destroyer + * clears subsribers list + */ + + }, { + key: "destroy", + value: function destroy() { + this.subscribers = null; + } + }]); + return Events; + }(_module.default); + + _exports.default = Events; + Events.displayName = "Events"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/listeners.ts": +/*!*********************************************!*\ + !*** ./src/components/modules/listeners.ts ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + + /** + * Editor.js Listeners module + * + * @module Listeners + * + * Module-decorator for event listeners assignment + * + * @author Codex Team + * @version 2.0.0 + */ + + /** + * @typedef {Listeners} Listeners + * @property {Array} allListeners + */ + var Listeners = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Listeners, _Module); + + function Listeners() { + var _this; + + (0, _classCallCheck2.default)(this, Listeners); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Listeners).apply(this, arguments)); + /** + * Stores all listeners data to find/remove/process it + * @type {ListenerData[]} + */ + + _this.allListeners = []; + return _this; + } + /** + * Assigns event listener on element + * + * @param {EventTarget} element - DOM element that needs to be listened + * @param {String} eventType - event type + * @param {Function} handler - method that will be fired on event + * @param {Boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once} + */ + + + (0, _createClass2.default)(Listeners, [{ + key: "on", + value: function on(element, eventType, handler) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var assignedEventData = { + element: element, + eventType: eventType, + handler: handler, + options: options + }; + var alreadyExist = this.findOne(element, eventType, handler); + + if (alreadyExist) { + return; + } + + this.allListeners.push(assignedEventData); + element.addEventListener(eventType, handler, options); + } + /** + * Removes event listener from element + * + * @param {EventTarget} element - DOM element that we removing listener + * @param {String} eventType - event type + * @param {Function} handler - remove handler, if element listens several handlers on the same event type + * @param {Boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once} + */ + + }, { + key: "off", + value: function off(element, eventType, handler, options) { + var _this2 = this; + + var existingListeners = this.findAll(element, eventType, handler); + existingListeners.forEach(function (listener, i) { + var index = _this2.allListeners.indexOf(existingListeners[i]); + + if (index > 0) { + _this2.allListeners.splice(index, 1); + + listener.element.removeEventListener(listener.eventType, listener.handler, listener.options); + } + }); + } + /** + * @param {EventTarget} element + * @param {String} eventType + * @param {Function} handler + * @return {ListenerData|null} + */ + + }, { + key: "findOne", + value: function findOne(element, eventType, handler) { + var foundListeners = this.findAll(element, eventType, handler); + return foundListeners.length > 0 ? foundListeners[0] : null; + } + /** + * @param {EventTarget} element + * @param {String} eventType + * @param {Function} handler + * @return {ListenerData[]} + */ + + }, { + key: "findAll", + value: function findAll(element, eventType, handler) { + var found; + var foundByEventTargets = element ? this.findByEventTarget(element) : []; + + if (element && eventType && handler) { + found = foundByEventTargets.filter(function (event) { + return event.eventType === eventType && event.handler === handler; + }); + } else if (element && eventType) { + found = foundByEventTargets.filter(function (event) { + return event.eventType === eventType; + }); + } else { + found = foundByEventTargets; + } + + return found; + } + /** + * Removes all listeners + */ + + }, { + key: "removeAll", + value: function removeAll() { + this.allListeners.map(function (current) { + current.element.removeEventListener(current.eventType, current.handler); + }); + this.allListeners = []; + } + /** + * Search method: looks for listener by passed element + * @param {EventTarget} element - searching element + * @returns {Array} listeners that found on element + */ + + }, { + key: "findByEventTarget", + value: function findByEventTarget(element) { + return this.allListeners.filter(function (listener) { + if (listener.element === element) { + return listener; + } + }); + } + /** + * Search method: looks for listener by passed event type + * @param {String} eventType + * @return {Array} listeners that found on element + */ + + }, { + key: "findByType", + value: function findByType(eventType) { + return this.allListeners.filter(function (listener) { + if (listener.eventType === eventType) { + return listener; + } + }); + } + /** + * Search method: looks for listener by passed handler + * @param {Function} handler + * @return {Array} listeners that found on element + */ + + }, { + key: "findByHandler", + value: function findByHandler(handler) { + return this.allListeners.filter(function (listener) { + if (listener.handler === handler) { + return listener; + } + }); + } + }]); + return Listeners; + }(_module.default); + + _exports.default = Listeners; + Listeners.displayName = "Listeners"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/modificationsObserver.ts": +/*!*********************************************************!*\ + !*** ./src/components/modules/modificationsObserver.ts ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts"), __webpack_require__(/*! ../block */ "./src/components/block.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _utils, _block) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _utils = _interopRequireDefault(_utils); + _block = _interopRequireDefault(_block); + + /** + * @module ModificationsObserver + * + * Handles any mutations + * and gives opportunity to handle outside + */ + var ModificationsObserver = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(ModificationsObserver, _Module); + + function ModificationsObserver() { + var _this; + + (0, _classCallCheck2.default)(this, ModificationsObserver); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ModificationsObserver).apply(this, arguments)); + /** + * Used to prevent several mutation callback execution + * @type {Function} + */ + + _this.mutationDebouncer = _utils.default.debounce(function () { + _this.updateNativeInputs(); + + _this.config.onChange(); + }, ModificationsObserver.DebounceTimer); + /** + * Array of native inputs in Blocks. + * Changes in native inputs are not handled by modification observer, so we need to set change event listeners on them + */ + + _this.nativeInputs = []; + return _this; + } + /** + * Clear timeout and set null to mutationDebouncer property + */ + + + (0, _createClass2.default)(ModificationsObserver, [{ + key: "destroy", + value: function destroy() { + var _this2 = this; + + this.mutationDebouncer = null; + this.observer.disconnect(); + this.observer = null; + this.nativeInputs.forEach(function (input) { + return _this2.Editor.Listeners.off(input, 'input', _this2.mutationDebouncer); + }); + } + /** + * Preparation method + * @return {Promise} + */ + + }, { + key: "prepare", + value: function () { + var _prepare = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee() { + var _this3 = this; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + /** + * wait till Browser render Editor's Blocks + */ + window.setTimeout(function () { + _this3.setObserver(); + }, 1000); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function prepare() { + return _prepare.apply(this, arguments); + }; + }() + /** + * Allows to disable observer, + * for example when Editor wants to stealthy mutate DOM + */ + + }, { + key: "disable", + value: function disable() { + this.disabled = true; + } + /** + * Enables mutation handling + * Should be called after .disable() + */ + + }, { + key: "enable", + value: function enable() { + this.disabled = false; + } + /** + * setObserver + * + * sets 'DOMSubtreeModified' listener on Editor's UI.nodes.redactor + * so that User can handle outside from API + */ + + }, { + key: "setObserver", + value: function setObserver() { + var _this4 = this; + + var UI = this.Editor.UI; + var observerOptions = { + childList: true, + attributes: true, + subtree: true, + characterData: true, + characterDataOldValue: true + }; + this.observer = new MutationObserver(function (mutationList, observer) { + _this4.mutationHandler(mutationList, observer); + }); + this.observer.observe(UI.nodes.redactor, observerOptions); + } + /** + * MutationObserver events handler + * @param mutationList + * @param observer + */ + + }, { + key: "mutationHandler", + value: function mutationHandler(mutationList, observer) { + /** + * Skip mutations in stealth mode + */ + if (this.disabled) { + return; + } + /** + * We divide two Mutation types: + * 1) mutations that concerns client changes: settings changes, symbol added, deletion, insertions and so on + * 2) functional changes. On each client actions we set functional identifiers to interact with user + */ + + + var contentMutated = false; + mutationList.forEach(function (mutation) { + switch (mutation.type) { + case 'childList': + case 'subtree': + case 'characterData': + case 'characterDataOldValue': + contentMutated = true; + break; + + case 'attributes': + var mutatedTarget = mutation.target; + /** + * Changes on Element.ce-block usually is functional + */ + + if (!mutatedTarget.classList.contains(_block.default.CSS.wrapper)) { + contentMutated = true; + return; + } + + break; + } + }); + /** call once */ + + if (contentMutated) { + this.mutationDebouncer(); + } + } + /** + * Gets native inputs and set oninput event handler + */ + + }, { + key: "updateNativeInputs", + value: function updateNativeInputs() { + var _this5 = this; + + if (this.nativeInputs) { + this.nativeInputs.forEach(function (input) { + _this5.Editor.Listeners.off(input, 'input'); + }); + } + + this.nativeInputs = Array.from(this.Editor.UI.nodes.redactor.querySelectorAll('textarea, input, select')); + this.nativeInputs.forEach(function (input) { + return _this5.Editor.Listeners.on(input, 'input', _this5.mutationDebouncer); + }); + } + }]); + return ModificationsObserver; + }(_module.default); + /** + * Debounce Timer + * @type {number} + */ + + + _exports.default = ModificationsObserver; + ModificationsObserver.displayName = "ModificationsObserver"; + ModificationsObserver.DebounceTimer = 450; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/notifier.ts": +/*!********************************************!*\ + !*** ./src/components/modules/notifier.ts ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! codex-notifier */ "./node_modules/codex-notifier/dist/bundle.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _codexNotifier) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _codexNotifier = _interopRequireDefault(_codexNotifier); + + /** + * Use external package module for notifications + * + * @see https://github.com/codex-team/js-notifier + */ + + /** + * Notifier module + */ + var Notifier = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Notifier, _Module); + + function Notifier() { + (0, _classCallCheck2.default)(this, Notifier); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Notifier).apply(this, arguments)); + } + + (0, _createClass2.default)(Notifier, [{ + key: "show", + + /** + * Show web notification + * + * @param {NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions} options + */ + value: function show(options) { + _codexNotifier.default.show(options); + } + }]); + return Notifier; + }(_module.default); + + _exports.default = Notifier; + Notifier.displayName = "Notifier"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/paste.ts": +/*!*****************************************!*\ + !*** ./src/components/modules/paste.ts ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"), __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _toConsumableArray2, _regenerator, _asyncToGenerator2, _slicedToArray2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _dom, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _toConsumableArray2 = _interopRequireDefault(_toConsumableArray2); + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _slicedToArray2 = _interopRequireDefault(_slicedToArray2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + + /** + * @class Paste + * @classdesc Contains methods to handle paste on editor + * + * @module Paste + * + * @version 2.0.0 + */ + var Paste = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Paste, _Module); + + function Paste() { + var _this; + + (0, _classCallCheck2.default)(this, Paste); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Paste).apply(this, arguments)); + /** + * Tags` substitutions parameters + */ + + _this.toolsTags = {}; + /** + * Store tags to substitute by tool name + */ + + _this.tagsByTool = {}; + /** Patterns` substitutions parameters */ + + _this.toolsPatterns = []; + /** Files` substitutions parameters */ + + _this.toolsFiles = {}; + /** + * List of tools which do not need a paste handling + */ + + _this.exceptionList = []; + /** + * Process paste config for each tool + * + * @param {string} name + * @param {Tool} tool + */ + + _this.processTool = function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + name = _ref2[0], + tool = _ref2[1]; + + try { + var toolInstance = new _this.Editor.Tools.blockTools[name]({ + api: _this.Editor.API.methods, + config: {}, + data: {} + }); + + if (tool.pasteConfig === false) { + _this.exceptionList.push(name); + + return; + } + + if (typeof toolInstance.onPaste !== 'function') { + return; + } + + var toolPasteConfig = tool.pasteConfig || {}; + + _this.getTagsConfig(name, toolPasteConfig); + + _this.getFilesConfig(name, toolPasteConfig); + + _this.getPatternsConfig(name, toolPasteConfig); + } catch (e) { + _utils.default.log("Paste handling for \xAB".concat(name, "\xBB Tool hasn't been set up because of the error"), 'warn', e); + } + }; + /** + * Check if Editor should process pasted data and pass data transfer object to handler + * + * @param {ClipboardEvent} event + */ + + + _this.handlePasteEvent = + /*#__PURE__*/ + function () { + var _ref3 = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(event) { + var _this$Editor, BlockManager, Toolbar; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _this$Editor = _this.Editor, BlockManager = _this$Editor.BlockManager, Toolbar = _this$Editor.Toolbar; + /** If target is native input or is not Block, use browser behaviour */ + + if (!(!BlockManager.currentBlock || _this.isNativeBehaviour(event.target) && !event.clipboardData.types.includes('Files'))) { + _context.next = 3; + break; + } + + return _context.abrupt("return"); + + case 3: + if (!(BlockManager.currentBlock && _this.exceptionList.includes(BlockManager.currentBlock.name))) { + _context.next = 5; + break; + } + + return _context.abrupt("return"); + + case 5: + event.preventDefault(); + + _this.processDataTransfer(event.clipboardData); + + BlockManager.clearFocused(); + Toolbar.close(); + + case 9: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x) { + return _ref3.apply(this, arguments); + }; + }(); + + return _this; + } + /** + * Set onPaste callback and collect tools` paste configurations + * + * @public + */ + + + (0, _createClass2.default)(Paste, [{ + key: "prepare", + value: function () { + var _prepare = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2() { + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + this.setCallback(); + this.processTools(); + + case 2: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function prepare() { + return _prepare.apply(this, arguments); + }; + }() + /** + * Handle pasted or dropped data transfer object + * + * @param {DataTransfer} dataTransfer - pasted or dropped data transfer object + * @param {boolean} isDragNDrop + */ + + }, { + key: "processDataTransfer", + value: function () { + var _processDataTransfer = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee3(dataTransfer) { + var isDragNDrop, + Sanitizer, + types, + includesFiles, + plainData, + htmlData, + toolsTags, + customConfig, + cleanData, + _args3 = arguments; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + isDragNDrop = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : false; + Sanitizer = this.Editor.Sanitizer; + types = dataTransfer.types; + /** + * In Microsoft Edge types is DOMStringList. So 'contains' is used to check if 'Files' type included + */ + + includesFiles = types.includes ? types.includes('Files') : types.contains('Files'); + + if (!includesFiles) { + _context3.next = 8; + break; + } + + _context3.next = 7; + return this.processFiles(dataTransfer.files); + + case 7: + return _context3.abrupt("return"); + + case 8: + plainData = dataTransfer.getData('text/plain'); + htmlData = dataTransfer.getData('text/html'); + /** + * If text was drag'n'dropped, wrap content with P tag to insert it as the new Block + */ + + if (isDragNDrop && plainData.trim() && htmlData.trim()) { + htmlData = '

    ' + (htmlData.trim() ? htmlData : plainData) + '

    '; + } + /** Add all tags that can be substituted to sanitizer configuration */ + + + toolsTags = Object.keys(this.toolsTags).reduce(function (result, tag) { + result[tag.toLowerCase()] = true; + return result; + }, {}); + customConfig = Object.assign({}, toolsTags, Sanitizer.getAllInlineToolsConfig(), { + br: {} + }); + cleanData = Sanitizer.clean(htmlData, customConfig); + /** If there is no HTML or HTML string is equal to plain one, process it as plain text */ + + if (!(!cleanData.trim() || cleanData.trim() === plainData || !_dom.default.isHTMLString(cleanData))) { + _context3.next = 19; + break; + } + + _context3.next = 17; + return this.processText(plainData); + + case 17: + _context3.next = 21; + break; + + case 19: + _context3.next = 21; + return this.processText(cleanData, true); + + case 21: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + return function processDataTransfer(_x2) { + return _processDataTransfer.apply(this, arguments); + }; + }() + /** + * Process pasted text and divide them into Blocks + * + * @param {string} data - text to process. Can be HTML or plain. + * @param {boolean} isHTML - if passed string is HTML, this parameter should be true + */ + + }, { + key: "processText", + value: function () { + var _processText = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee5(data) { + var _this2 = this; + + var isHTML, + _this$Editor2, + Caret, + BlockManager, + Tools, + dataToInsert, + isCurrentBlockInitial, + needToReplaceCurrentBlock, + _args5 = arguments; + + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + isHTML = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : false; + _this$Editor2 = this.Editor, Caret = _this$Editor2.Caret, BlockManager = _this$Editor2.BlockManager, Tools = _this$Editor2.Tools; + dataToInsert = isHTML ? this.processHTML(data) : this.processPlain(data); + + if (dataToInsert.length) { + _context5.next = 5; + break; + } + + return _context5.abrupt("return"); + + case 5: + if (!(dataToInsert.length === 1)) { + _context5.next = 8; + break; + } + + if (!dataToInsert[0].isBlock) { + this.processInlinePaste(dataToInsert.pop()); + } else { + this.processSingleBlock(dataToInsert.pop()); + } + + return _context5.abrupt("return"); + + case 8: + isCurrentBlockInitial = BlockManager.currentBlock && Tools.isInitial(BlockManager.currentBlock.tool); + needToReplaceCurrentBlock = isCurrentBlockInitial && BlockManager.currentBlock.isEmpty; + _context5.next = 12; + return Promise.all(dataToInsert.map( + /*#__PURE__*/ + function () { + var _ref4 = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee4(content, i) { + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return _this2.insertBlock(content, i === 0 && needToReplaceCurrentBlock); + + case 2: + return _context4.abrupt("return", _context4.sent); + + case 3: + case "end": + return _context4.stop(); + } + } + }, _callee4); + })); + + return function (_x4, _x5) { + return _ref4.apply(this, arguments); + }; + }())); + + case 12: + if (BlockManager.currentBlock) { + Caret.setToBlock(BlockManager.currentBlock, Caret.positions.END); + } + + case 13: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + return function processText(_x3) { + return _processText.apply(this, arguments); + }; + }() + /** + * Set onPaste callback handler + */ + + }, { + key: "setCallback", + value: function setCallback() { + var Listeners = this.Editor.Listeners; + Listeners.on(document, 'paste', this.handlePasteEvent); + } + /** + * Get and process tool`s paste configs + */ + + }, { + key: "processTools", + value: function processTools() { + var tools = this.Editor.Tools.blockTools; + Object.entries(tools).forEach(this.processTool); + } + /** + * Get tags to substitute by Tool + * + * @param {string} name - Tool name + * @param {PasteConfig} toolPasteConfig - Tool onPaste configuration + */ + + }, { + key: "getTagsConfig", + value: function getTagsConfig(name, toolPasteConfig) { + var _this3 = this; + + var tags = toolPasteConfig.tags || []; + tags.forEach(function (tag) { + if (_this3.toolsTags.hasOwnProperty(tag)) { + _utils.default.log("Paste handler for \xAB".concat(name, "\xBB Tool on \xAB").concat(tag, "\xBB tag is skipped ") + "because it is already used by \xAB".concat(_this3.toolsTags[tag].tool, "\xBB Tool."), 'warn'); + + return; + } + + _this3.toolsTags[tag.toUpperCase()] = { + tool: name + }; + }); + this.tagsByTool[name] = tags.map(function (t) { + return t.toUpperCase(); + }); + } + /** + * Get files` types and extensions to substitute by Tool + * + * @param {string} name - Tool name + * @param {PasteConfig} toolPasteConfig - Tool onPaste configuration + */ + + }, { + key: "getFilesConfig", + value: function getFilesConfig(name, toolPasteConfig) { + var _toolPasteConfig$file = toolPasteConfig.files, + files = _toolPasteConfig$file === void 0 ? {} : _toolPasteConfig$file; + var extensions = files.extensions, + mimeTypes = files.mimeTypes; + + if (!extensions && !mimeTypes) { + return; + } + + if (extensions && !Array.isArray(extensions)) { + _utils.default.log("\xABextensions\xBB property of the onDrop config for \xAB".concat(name, "\xBB Tool should be an array")); + + extensions = []; + } + + if (mimeTypes && !Array.isArray(mimeTypes)) { + _utils.default.log("\xABmimeTypes\xBB property of the onDrop config for \xAB".concat(name, "\xBB Tool should be an array")); + + mimeTypes = []; + } + + if (mimeTypes) { + mimeTypes = mimeTypes.filter(function (type) { + if (!_utils.default.isValidMimeType(type)) { + _utils.default.log("MIME type value \xAB".concat(type, "\xBB for the \xAB").concat(name, "\xBB Tool is not a valid MIME type"), 'warn'); + + return false; + } + + return true; + }); + } + + this.toolsFiles[name] = { + extensions: extensions || [], + mimeTypes: mimeTypes || [] + }; + } + /** + * Get RegExp patterns to substitute by Tool + * + * @param {string} name - Tool name + * @param {PasteConfig} toolPasteConfig - Tool onPaste configuration + */ + + }, { + key: "getPatternsConfig", + value: function getPatternsConfig(name, toolPasteConfig) { + var _this4 = this; + + if (!toolPasteConfig.patterns || _utils.default.isEmpty(toolPasteConfig.patterns)) { + return; + } + + Object.entries(toolPasteConfig.patterns).forEach(function (_ref5) { + var _ref6 = (0, _slicedToArray2.default)(_ref5, 2), + key = _ref6[0], + pattern = _ref6[1]; + + /** Still need to validate pattern as it provided by user */ + if (!(pattern instanceof RegExp)) { + _utils.default.log("Pattern ".concat(pattern, " for \xAB").concat(name, "\xBB Tool is skipped because it should be a Regexp instance."), 'warn'); + } + + _this4.toolsPatterns.push({ + key: key, + pattern: pattern, + tool: name + }); + }); + } + /** + * Check if browser behavior suits better + * + * @param {EventTarget} element - element where content has been pasted + * @returns {boolean} + */ + + }, { + key: "isNativeBehaviour", + value: function isNativeBehaviour(element) { + return _dom.default.isNativeInput(element); + } + /** + * Get files from data transfer object and insert related Tools + * + * @param {FileList} items - pasted or dropped items + */ + + }, { + key: "processFiles", + value: function () { + var _processFiles = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee6(items) { + var _this5 = this; + + var _this$Editor3, BlockManager, Tools, dataToInsert, isCurrentBlockInitial, needToReplaceCurrentBlock; + + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _this$Editor3 = this.Editor, BlockManager = _this$Editor3.BlockManager, Tools = _this$Editor3.Tools; + _context6.next = 3; + return Promise.all(Array.from(items).map(function (item) { + return _this5.processFile(item); + })); + + case 3: + dataToInsert = _context6.sent; + dataToInsert = dataToInsert.filter(function (data) { + return !!data; + }); + isCurrentBlockInitial = Tools.isInitial(BlockManager.currentBlock.tool); + needToReplaceCurrentBlock = isCurrentBlockInitial && BlockManager.currentBlock.isEmpty; + dataToInsert.forEach(function (data, i) { + BlockManager.paste(data.type, data.event, i === 0 && needToReplaceCurrentBlock); + }); + + case 8: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + return function processFiles(_x6) { + return _processFiles.apply(this, arguments); + }; + }() + /** + * Get information about file and find Tool to handle it + * + * @param {File} file + */ + + }, { + key: "processFile", + value: function () { + var _processFile = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee7(file) { + var extension, foundConfig, _foundConfig, tool, pasteEvent; + + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + extension = _utils.default.getFileExtension(file); + foundConfig = Object.entries(this.toolsFiles).find(function (_ref7) { + var _ref8 = (0, _slicedToArray2.default)(_ref7, 2), + toolName = _ref8[0], + _ref8$ = _ref8[1], + mimeTypes = _ref8$.mimeTypes, + extensions = _ref8$.extensions; + + var _file$type$split = file.type.split('/'), + _file$type$split2 = (0, _slicedToArray2.default)(_file$type$split, 2), + fileType = _file$type$split2[0], + fileSubtype = _file$type$split2[1]; + + var foundExt = extensions.find(function (ext) { + return ext.toLowerCase() === extension.toLowerCase(); + }); + var foundMimeType = mimeTypes.find(function (mime) { + var _mime$split = mime.split('/'), + _mime$split2 = (0, _slicedToArray2.default)(_mime$split, 2), + type = _mime$split2[0], + subtype = _mime$split2[1]; + + return type === fileType && (subtype === fileSubtype || subtype === '*'); + }); + return !!foundExt || !!foundMimeType; + }); + + if (foundConfig) { + _context7.next = 4; + break; + } + + return _context7.abrupt("return"); + + case 4: + _foundConfig = (0, _slicedToArray2.default)(foundConfig, 1), tool = _foundConfig[0]; + pasteEvent = this.composePasteEvent('file', { + file: file + }); + return _context7.abrupt("return", { + event: pasteEvent, + type: tool + }); + + case 7: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + return function processFile(_x7) { + return _processFile.apply(this, arguments); + }; + }() + /** + * Split HTML string to blocks and return it as array of Block data + * + * @param {string} innerHTML + * @returns {PasteData[]} + */ + + }, { + key: "processHTML", + value: function processHTML(innerHTML) { + var _this6 = this; + + var _this$Editor4 = this.Editor, + Tools = _this$Editor4.Tools, + Sanitizer = _this$Editor4.Sanitizer; + var initialTool = this.config.initialBlock; + + var wrapper = _dom.default.make('DIV'); + + wrapper.innerHTML = innerHTML; + var nodes = this.getNodes(wrapper); + return nodes.map(function (node) { + var content, + tool = initialTool, + isBlock = false; + + switch (node.nodeType) { + /** If node is a document fragment, use temp wrapper to get innerHTML */ + case Node.DOCUMENT_FRAGMENT_NODE: + content = _dom.default.make('div'); + content.appendChild(node); + break; + + /** If node is an element, then there might be a substitution */ + + case Node.ELEMENT_NODE: + content = node; + isBlock = true; + + if (_this6.toolsTags[content.tagName]) { + tool = _this6.toolsTags[content.tagName].tool; + } + + break; + } + + var tags = Tools.blockTools[tool].pasteConfig.tags; + var toolTags = tags.reduce(function (result, tag) { + result[tag.toLowerCase()] = {}; + return result; + }, {}); + var customConfig = Object.assign({}, toolTags, Sanitizer.getInlineToolsConfig(tool)); + content.innerHTML = Sanitizer.clean(content.innerHTML, customConfig); + + var event = _this6.composePasteEvent('tag', { + data: content + }); + + return { + content: content, + isBlock: isBlock, + tool: tool, + event: event + }; + }).filter(function (data) { + return !_dom.default.isNodeEmpty(data.content) || _dom.default.isSingleTag(data.content); + }); + } + /** + * Split plain text by new line symbols and return it as array of Block data + * + * @param {string} plain + * @returns {PasteData[]} + */ + + }, { + key: "processPlain", + value: function processPlain(plain) { + var _this7 = this; + + var initialBlock = this.config.initialBlock, + Tools = this.Editor.Tools; + + if (!plain) { + return []; + } + + var tool = initialBlock; + return plain.split(/\r?\n/).filter(function (text) { + return text.trim(); + }).map(function (text) { + var content = _dom.default.make('div'); + + content.innerHTML = text; + + var event = _this7.composePasteEvent('tag', { + data: content + }); + + return { + content: content, + tool: tool, + isBlock: false, + event: event + }; + }); + } + /** + * Process paste of single Block tool content + * + * @param {PasteData} dataToInsert + */ + + }, { + key: "processSingleBlock", + value: function () { + var _processSingleBlock = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee8(dataToInsert) { + var _this$Editor5, Caret, BlockManager, Tools, currentBlock; + + return _regenerator.default.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + _this$Editor5 = this.Editor, Caret = _this$Editor5.Caret, BlockManager = _this$Editor5.BlockManager, Tools = _this$Editor5.Tools; + currentBlock = BlockManager.currentBlock; + /** + * If pasted tool isn`t equal current Block or if pasted content contains block elements, insert it as new Block + */ + + if (!(!currentBlock || dataToInsert.tool !== currentBlock.name || !_dom.default.containsOnlyInlineElements(dataToInsert.content.innerHTML))) { + _context8.next = 5; + break; + } + + this.insertBlock(dataToInsert, currentBlock && Tools.isInitial(currentBlock.tool) && currentBlock.isEmpty); + return _context8.abrupt("return"); + + case 5: + Caret.insertContentAtCaretPosition(dataToInsert.content.innerHTML); + + case 6: + case "end": + return _context8.stop(); + } + } + }, _callee8, this); + })); + + return function processSingleBlock(_x8) { + return _processSingleBlock.apply(this, arguments); + }; + }() + /** + * Process paste to single Block: + * 1. Find patterns` matches + * 2. Insert new block if it is not the same type as current one + * 3. Just insert text if there is no substitutions + * + * @param {PasteData} dataToInsert + */ + + }, { + key: "processInlinePaste", + value: function () { + var _processInlinePaste = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee9(dataToInsert) { + var _this$Editor6, BlockManager, Caret, Sanitizer, Tools, content, tool, currentBlockIsInitial, blockData, insertedBlock, needToReplaceCurrentBlock, currentToolSanitizeConfig; + + return _regenerator.default.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _this$Editor6 = this.Editor, BlockManager = _this$Editor6.BlockManager, Caret = _this$Editor6.Caret, Sanitizer = _this$Editor6.Sanitizer, Tools = _this$Editor6.Tools; + content = dataToInsert.content, tool = dataToInsert.tool; + currentBlockIsInitial = BlockManager.currentBlock && Tools.isInitial(BlockManager.currentBlock.tool); + + if (!(currentBlockIsInitial && content.textContent.length < Paste.PATTERN_PROCESSING_MAX_LENGTH)) { + _context9.next = 12; + break; + } + + _context9.next = 6; + return this.processPattern(content.textContent); + + case 6: + blockData = _context9.sent; + + if (!blockData) { + _context9.next = 12; + break; + } + + needToReplaceCurrentBlock = BlockManager.currentBlock && Tools.isInitial(BlockManager.currentBlock.tool) && BlockManager.currentBlock.isEmpty; + insertedBlock = BlockManager.paste(blockData.tool, blockData.event, needToReplaceCurrentBlock); + Caret.setToBlock(insertedBlock, Caret.positions.END); + return _context9.abrupt("return"); + + case 12: + /** If there is no pattern substitute - insert string as it is */ + if (BlockManager.currentBlock && BlockManager.currentBlock.currentInput) { + currentToolSanitizeConfig = Sanitizer.getInlineToolsConfig(BlockManager.currentBlock.name); + document.execCommand('insertHTML', false, Sanitizer.clean(content.innerHTML, currentToolSanitizeConfig)); + } else { + this.insertBlock(dataToInsert); + } + + case 13: + case "end": + return _context9.stop(); + } + } + }, _callee9, this); + })); + + return function processInlinePaste(_x9) { + return _processInlinePaste.apply(this, arguments); + }; + }() + /** + * Get patterns` matches + * + * @param {string} text + * @returns Promise<{data: BlockToolData, tool: string}> + */ + + }, { + key: "processPattern", + value: function () { + var _processPattern = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee10(text) { + var pattern, event; + return _regenerator.default.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + pattern = this.toolsPatterns.find(function (substitute) { + var execResult = substitute.pattern.exec(text); + + if (!execResult) { + return false; + } + + return text === execResult.shift(); + }); + + if (pattern) { + _context10.next = 3; + break; + } + + return _context10.abrupt("return"); + + case 3: + event = this.composePasteEvent('pattern', { + key: pattern.key, + data: text + }); + return _context10.abrupt("return", { + event: event, + tool: pattern.tool + }); + + case 5: + case "end": + return _context10.stop(); + } + } + }, _callee10, this); + })); + + return function processPattern(_x10) { + return _processPattern.apply(this, arguments); + }; + }() + /** + * + * @param {PasteData} data + * @param {Boolean} canReplaceCurrentBlock - if true and is current Block is empty, will replace current Block + * @returns {Promise} + */ + + }, { + key: "insertBlock", + value: function () { + var _insertBlock = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee11(data) { + var canReplaceCurrentBlock, + _this$Editor7, + BlockManager, + Caret, + currentBlock, + block, + _args11 = arguments; + + return _regenerator.default.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + canReplaceCurrentBlock = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : false; + _this$Editor7 = this.Editor, BlockManager = _this$Editor7.BlockManager, Caret = _this$Editor7.Caret; + currentBlock = BlockManager.currentBlock; + + if (!(canReplaceCurrentBlock && currentBlock && currentBlock.isEmpty)) { + _context11.next = 7; + break; + } + + block = BlockManager.paste(data.tool, data.event, true); + Caret.setToBlock(block, Caret.positions.END); + return _context11.abrupt("return"); + + case 7: + block = BlockManager.paste(data.tool, data.event); + Caret.setToBlock(block, Caret.positions.END); + + case 9: + case "end": + return _context11.stop(); + } + } + }, _callee11, this); + })); + + return function insertBlock(_x11) { + return _insertBlock.apply(this, arguments); + }; + }() + /** + * Recursively divide HTML string to two types of nodes: + * 1. Block element + * 2. Document Fragments contained text and markup tags like a, b, i etc. + * + * @param {Node} wrapper + * @returns {Node[]} + */ + + }, { + key: "getNodes", + value: function getNodes(wrapper) { + var _this8 = this; + + var children = Array.from(wrapper.childNodes), + tags = Object.keys(this.toolsTags); + + var reducer = function reducer(nodes, node) { + if (_dom.default.isEmpty(node) && !_dom.default.isSingleTag(node)) { + return nodes; + } + + var lastNode = nodes[nodes.length - 1]; + var destNode = new DocumentFragment(); + + if (lastNode && _dom.default.isFragment(lastNode)) { + destNode = nodes.pop(); + } + + switch (node.nodeType) { + /** + * If node is HTML element: + * 1. Check if it is inline element + * 2. Check if it contains another block or substitutable elements + */ + case Node.ELEMENT_NODE: + var element = node; + + if (element.tagName === 'BR') { + return [].concat((0, _toConsumableArray2.default)(nodes), [destNode, new DocumentFragment()]); + } + + var _ref9 = _this8.toolsTags[element.tagName] || {}, + _ref9$tool = _ref9.tool, + tool = _ref9$tool === void 0 ? '' : _ref9$tool; + + var toolTags = _this8.tagsByTool[tool] || []; + var isSubstitutable = tags.includes(element.tagName); + + var isBlockElement = _dom.default.blockElements.includes(element.tagName.toLowerCase()); + + var containsAnotherToolTags = Array.from(element.children).some(function (_ref10) { + var tagName = _ref10.tagName; + return tags.includes(tagName) && !toolTags.includes(tagName); + }); + var containsBlockElements = Array.from(element.children).some(function (_ref11) { + var tagName = _ref11.tagName; + return _dom.default.blockElements.includes(tagName.toLowerCase()); + }); + /** Append inline elements to previous fragment */ + + if (!isBlockElement && !isSubstitutable && !containsAnotherToolTags) { + destNode.appendChild(element); + return [].concat((0, _toConsumableArray2.default)(nodes), [destNode]); + } + + if (isSubstitutable && !containsAnotherToolTags || isBlockElement && !containsBlockElements && !containsAnotherToolTags) { + return [].concat((0, _toConsumableArray2.default)(nodes), [destNode, element]); + } + + break; + + /** + * If node is text node, wrap it with DocumentFragment + */ + + case Node.TEXT_NODE: + destNode.appendChild(node); + return [].concat((0, _toConsumableArray2.default)(nodes), [destNode]); + + default: + return [].concat((0, _toConsumableArray2.default)(nodes), [destNode]); + } + + return [].concat((0, _toConsumableArray2.default)(nodes), (0, _toConsumableArray2.default)(Array.from(node.childNodes).reduce(reducer, []))); + }; + + return children.reduce(reducer, []); + } + /** + * Compose paste event with passed type and detail + * + * @param {string} type + * @param {PasteEventDetail} detail + */ + + }, { + key: "composePasteEvent", + value: function composePasteEvent(type, detail) { + return new CustomEvent(type, { + detail: detail + }); + } + }]); + return Paste; + }(_module.default); + /** If string`s length is greater than this number we don't check paste patterns */ + + + _exports.default = Paste; + Paste.displayName = "Paste"; + Paste.PATTERN_PROCESSING_MAX_LENGTH = 450; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/rectangleSelection.ts": +/*!******************************************************!*\ + !*** ./src/components/modules/rectangleSelection.ts ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts"), __webpack_require__(/*! ../block */ "./src/components/block.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _dom, _selection, _block) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _selection = _interopRequireDefault(_selection); + _block = _interopRequireDefault(_block); + + /** + * @class RectangleSelection + * @classdesc Manages Block selection with mouse + * + * @module RectangleSelection + * @version 1.0.0 + */ + var RectangleSelection = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(RectangleSelection, _Module); + + function RectangleSelection() { + var _this; + + (0, _classCallCheck2.default)(this, RectangleSelection); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(RectangleSelection).apply(this, arguments)); + /** + * Using the selection rectangle + * @type {boolean} + */ + + _this.isRectSelectionActivated = false; + /** + * Speed of Scrolling + */ + + _this.SCROLL_SPEED = 3; + /** + * Height of scroll zone on boundary of screen + */ + + _this.HEIGHT_OF_SCROLL_ZONE = 40; + /** + * Scroll zone type indicators + */ + + _this.BOTTOM_SCROLL_ZONE = 1; + _this.TOP_SCROLL_ZONE = 2; + /** + * Id of main button for event.button + */ + + _this.MAIN_MOUSE_BUTTON = 0; + /** + * Mouse is clamped + */ + + _this.mousedown = false; + /** + * Is scrolling now + */ + + _this.isScrolling = false; + /** + * Mouse is in scroll zone + */ + + _this.inScrollZone = null; + /** + * Coords of rect + */ + + _this.startX = 0; + _this.startY = 0; + _this.mouseX = 0; + _this.mouseY = 0; + /** + * Selected blocks + */ + + _this.stackOfSelected = []; + return _this; + } + /** + * CSS classes for the Block + * @return {{wrapper: string, content: string}} + */ + + + (0, _createClass2.default)(RectangleSelection, [{ + key: "prepare", + + /** + * Module Preparation + * Creating rect and hang handlers + */ + value: function prepare() { + var _this2 = this; + + var Listeners = this.Editor.Listeners; + + var _this$genHTML = this.genHTML(), + container = _this$genHTML.container; + + Listeners.on(container, 'mousedown', function (event) { + if (event.button !== _this2.MAIN_MOUSE_BUTTON) { + return; + } + + _this2.startSelection(event.pageX, event.pageY); + }, false); + Listeners.on(document.body, 'mousemove', function (event) { + _this2.changingRectangle(event); + + _this2.scrollByZones(event.clientY); + }, false); + Listeners.on(document.body, 'mouseleave', function () { + _this2.clearSelection(); + + _this2.endSelection(); + }); + Listeners.on(window, 'scroll', function (event) { + _this2.changingRectangle(event); + }, false); + Listeners.on(document.body, 'mouseup', function () { + _this2.endSelection(); + }, false); + } + /** + * Init rect params + * @param {number} pageX - X coord of mouse + * @param {number} pageY - Y coord of mouse + */ + + }, { + key: "startSelection", + value: function startSelection(pageX, pageY) { + this.Editor.BlockSelection.allBlocksSelected = false; + this.clearSelection(); + this.stackOfSelected = []; + var elemWhereSelectionStart = document.elementFromPoint(pageX - window.pageXOffset, pageY - window.pageYOffset); + var selectorsToAvoid = [".".concat(_block.default.CSS.content), ".".concat(this.Editor.Toolbar.CSS.toolbar), ".".concat(this.Editor.InlineToolbar.CSS.inlineToolbar)]; + var startsInsideEditor = elemWhereSelectionStart.closest('.' + this.Editor.UI.CSS.editorWrapper); + var startsInSelectorToAvoid = selectorsToAvoid.some(function (selector) { + return !!elemWhereSelectionStart.closest(selector); + }); + /** + * If selection starts outside of the editor or inside the blocks or on Editor UI elements, do not handle it + */ + + if (!startsInsideEditor || startsInSelectorToAvoid) { + return; + } + + this.mousedown = true; + this.startX = pageX; + this.startY = pageY; + } + /** + * Clear all params to end selection + */ + + }, { + key: "endSelection", + value: function endSelection() { + this.mousedown = false; + this.startX = 0; + this.startY = 0; + this.overlayRectangle.style.display = 'none'; + /** + * Show Conversion Toolbar when user select one Block + */ + + var selectedBlocks = this.Editor.BlockSelection.selectedBlocks; + + if (selectedBlocks.length === 1) { + this.Editor.ConversionToolbar.tryToShow(selectedBlocks[0]); + } + } + /** + * is RectSelection Activated + */ + + }, { + key: "isRectActivated", + value: function isRectActivated() { + return this.isRectSelectionActivated; + } + /** + * Mark that selection is end + */ + + }, { + key: "clearSelection", + value: function clearSelection() { + this.isRectSelectionActivated = false; + } + /** + * Scroll If mouse in scroll zone + * @param {number} clientY - Y coord of mouse + */ + + }, { + key: "scrollByZones", + value: function scrollByZones(clientY) { + this.inScrollZone = null; + + if (clientY <= this.HEIGHT_OF_SCROLL_ZONE) { + this.inScrollZone = this.TOP_SCROLL_ZONE; + } + + if (document.documentElement.clientHeight - clientY <= this.HEIGHT_OF_SCROLL_ZONE) { + this.inScrollZone = this.BOTTOM_SCROLL_ZONE; + } + + if (!this.inScrollZone) { + this.isScrolling = false; + return; + } + + if (!this.isScrolling) { + this.scrollVertical(this.inScrollZone === this.TOP_SCROLL_ZONE ? -this.SCROLL_SPEED : this.SCROLL_SPEED); + this.isScrolling = true; + } + } + }, { + key: "genHTML", + value: function genHTML() { + var UI = this.Editor.UI; + var container = UI.nodes.holder.querySelector('.' + UI.CSS.editorWrapper); + + var overlay = _dom.default.make('div', RectangleSelection.CSS.overlay, {}); + + var overlayContainer = _dom.default.make('div', RectangleSelection.CSS.overlayContainer, {}); + + var overlayRectangle = _dom.default.make('div', RectangleSelection.CSS.rect, {}); + + overlayContainer.appendChild(overlayRectangle); + overlay.appendChild(overlayContainer); + container.appendChild(overlay); + this.overlayRectangle = overlayRectangle; + return { + container: container, + overlay: overlay + }; + } + /** + * Activates scrolling if blockSelection is active and mouse is in scroll zone + * @param {number} speed - speed of scrolling + */ + + }, { + key: "scrollVertical", + value: function scrollVertical(speed) { + var _this3 = this; + + if (!(this.inScrollZone && this.mousedown)) { + return; + } + + var lastOffset = window.pageYOffset; + window.scrollBy(0, speed); + this.mouseY += window.pageYOffset - lastOffset; + setTimeout(function () { + _this3.scrollVertical(speed); + }, 0); + } + /** + * Handles the change in the rectangle and its effect + * @param {MouseEvent} event + */ + + }, { + key: "changingRectangle", + value: function changingRectangle(event) { + if (!this.mousedown) { + return; + } + + if (event.pageY !== undefined) { + this.mouseX = event.pageX; + this.mouseY = event.pageY; + } + + var _this$genInfoForMouse = this.genInfoForMouseSelection(), + rightPos = _this$genInfoForMouse.rightPos, + leftPos = _this$genInfoForMouse.leftPos, + index = _this$genInfoForMouse.index; // There is not new block in selection + + + var rectIsOnRighSideOfredactor = this.startX > rightPos && this.mouseX > rightPos; + var rectISOnLeftSideOfRedactor = this.startX < leftPos && this.mouseX < leftPos; + this.rectCrossesBlocks = !(rectIsOnRighSideOfredactor || rectISOnLeftSideOfRedactor); + + if (!this.isRectSelectionActivated) { + this.rectCrossesBlocks = false; + this.isRectSelectionActivated = true; + this.shrinkRectangleToPoint(); + this.overlayRectangle.style.display = 'block'; + } + + this.updateRectangleSize(); + + if (index === undefined) { + return; + } + + this.trySelectNextBlock(index); // For case, when rect is out from blocks + + this.inverseSelection(); + + _selection.default.get().removeAllRanges(); + + event.preventDefault(); + } + /** + * Shrink rect to singular point + */ + + }, { + key: "shrinkRectangleToPoint", + value: function shrinkRectangleToPoint() { + this.overlayRectangle.style.left = "".concat(this.startX - window.pageXOffset, "px"); + this.overlayRectangle.style.top = "".concat(this.startY - window.pageYOffset, "px"); + this.overlayRectangle.style.bottom = "calc(100% - ".concat(this.startY - window.pageYOffset, "px"); + this.overlayRectangle.style.right = "calc(100% - ".concat(this.startX - window.pageXOffset, "px"); + } + /** + * Select or unselect all of blocks in array if rect is out or in selectable area + */ + + }, { + key: "inverseSelection", + value: function inverseSelection() { + var firstBlockInStack = this.Editor.BlockManager.getBlockByIndex(this.stackOfSelected[0]); + var isSelecteMode = firstBlockInStack.selected; + + if (this.rectCrossesBlocks && !isSelecteMode) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this.stackOfSelected[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var it = _step.value; + this.Editor.BlockSelection.selectBlockByIndex(it); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + + if (!this.rectCrossesBlocks && isSelecteMode) { + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = this.stackOfSelected[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var _it = _step2.value; + this.Editor.BlockSelection.unSelectBlockByIndex(_it); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } + /** + * Updates size of rectangle + */ + + }, { + key: "updateRectangleSize", + value: function updateRectangleSize() { + // Depending on the position of the mouse relative to the starting point, + // change this.e distance from the desired edge of the screen*/ + if (this.mouseY >= this.startY) { + this.overlayRectangle.style.top = "".concat(this.startY - window.pageYOffset, "px"); + this.overlayRectangle.style.bottom = "calc(100% - ".concat(this.mouseY - window.pageYOffset, "px"); + } else { + this.overlayRectangle.style.bottom = "calc(100% - ".concat(this.startY - window.pageYOffset, "px"); + this.overlayRectangle.style.top = "".concat(this.mouseY - window.pageYOffset, "px"); + } + + if (this.mouseX >= this.startX) { + this.overlayRectangle.style.left = "".concat(this.startX - window.pageXOffset, "px"); + this.overlayRectangle.style.right = "calc(100% - ".concat(this.mouseX - window.pageXOffset, "px"); + } else { + this.overlayRectangle.style.right = "calc(100% - ".concat(this.startX - window.pageXOffset, "px"); + this.overlayRectangle.style.left = "".concat(this.mouseX - window.pageXOffset, "px"); + } + } + /** + * Collects information needed to determine the behavior of the rectangle + * @return {number} index - index next Block, leftPos - start of left border of Block, rightPos - right border + */ + + }, { + key: "genInfoForMouseSelection", + value: function genInfoForMouseSelection() { + var widthOfRedactor = document.body.offsetWidth; + var centerOfRedactor = widthOfRedactor / 2; + var Y = this.mouseY - window.pageYOffset; + var elementUnderMouse = document.elementFromPoint(centerOfRedactor, Y); + var blockInCurrentPos = this.Editor.BlockManager.getBlockByChildNode(elementUnderMouse); + var index; + + if (blockInCurrentPos !== undefined) { + index = this.Editor.BlockManager.blocks.findIndex(function (block) { + return block.holder === blockInCurrentPos.holder; + }); + } + + var contentElement = this.Editor.BlockManager.lastBlock.holder.querySelector('.' + _block.default.CSS.content); + var centerOfBlock = Number.parseInt(window.getComputedStyle(contentElement).width, 10) / 2; + var leftPos = centerOfRedactor - centerOfBlock; + var rightPos = centerOfRedactor + centerOfBlock; + return { + index: index, + leftPos: leftPos, + rightPos: rightPos + }; + } + /** + * Select block with index index + * @param index - index of block in redactor + */ + + }, { + key: "addBlockInSelection", + value: function addBlockInSelection(index) { + if (this.rectCrossesBlocks) { + this.Editor.BlockSelection.selectBlockByIndex(index); + } + + this.stackOfSelected.push(index); + } + /** + * Adds a block to the selection and determines which blocks should be selected + * @param {object} index - index of new block in the reactor + */ + + }, { + key: "trySelectNextBlock", + value: function trySelectNextBlock(index) { + var _this4 = this; + + var sameBlock = this.stackOfSelected[this.stackOfSelected.length - 1] === index; + var sizeStack = this.stackOfSelected.length; + var down = 1, + up = -1, + undef = 0; + + if (sameBlock) { + return; + } + + var blockNumbersIncrease = this.stackOfSelected[sizeStack - 1] - this.stackOfSelected[sizeStack - 2] > 0; + var direction = sizeStack <= 1 ? undef : blockNumbersIncrease ? down : up; + var selectionInDownDurection = index > this.stackOfSelected[sizeStack - 1] && direction === down; + var selectionInUpDirection = index < this.stackOfSelected[sizeStack - 1] && direction === up; + var generalSelection = selectionInDownDurection || selectionInUpDirection || direction === undef; + var reduction = !generalSelection; // When the selection is too fast, some blocks do not have time to be noticed. Fix it. + + if (!reduction && (index > this.stackOfSelected[sizeStack - 1] || this.stackOfSelected[sizeStack - 1] === undefined)) { + var ind = this.stackOfSelected[sizeStack - 1] + 1 || index; + + for (ind; ind <= index; ind++) { + this.addBlockInSelection(ind); + } + + return; + } // for both directions + + + if (!reduction && index < this.stackOfSelected[sizeStack - 1]) { + for (var _ind = this.stackOfSelected[sizeStack - 1] - 1; _ind >= index; _ind--) { + this.addBlockInSelection(_ind); + } + + return; + } + + if (!reduction) { + return; + } + + var i = sizeStack - 1; + var cmp; // cmp for different directions + + if (index > this.stackOfSelected[sizeStack - 1]) { + cmp = function cmp() { + return index > _this4.stackOfSelected[i]; + }; + } else { + cmp = function cmp() { + return index < _this4.stackOfSelected[i]; + }; + } // Remove blocks missed due to speed. + // cmp checks if we have removed all the necessary blocks + + + while (cmp()) { + if (this.rectCrossesBlocks) { + this.Editor.BlockSelection.unSelectBlockByIndex(this.stackOfSelected[i]); + } + + this.stackOfSelected.pop(); + i--; + } + + return; + } + }], [{ + key: "CSS", + get: function get() { + return { + overlay: 'codex-editor-overlay', + overlayContainer: 'codex-editor-overlay__container', + rect: 'codex-editor-overlay__rectangle', + topScrollZone: 'codex-editor-overlay__scroll-zone--top', + bottomScrollZone: 'codex-editor-overlay__scroll-zone--bottom' + }; + } + }]); + return RectangleSelection; + }(_module.default); + + _exports.default = RectangleSelection; + RectangleSelection.displayName = "RectangleSelection"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/renderer.ts": +/*!********************************************!*\ + !*** ./src/components/modules/renderer.ts ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _utils = _interopRequireDefault(_utils); + + /** + * Editor.js Renderer Module + * + * @module Renderer + * @author CodeX Team + * + * @version 2.0.0 + */ + var Renderer = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Renderer, _Module); + + function Renderer() { + (0, _classCallCheck2.default)(this, Renderer); + return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Renderer).apply(this, arguments)); + } + + (0, _createClass2.default)(Renderer, [{ + key: "render", + + /** + * @typedef {Object} RendererBlocks + * @property {String} type - tool name + * @property {Object} data - tool data + */ + + /** + * @example + * + * blocks: [ + * { + * type : 'paragraph', + * data : { + * text : 'Hello from Codex!' + * } + * }, + * { + * type : 'paragraph', + * data : { + * text : 'Leave feedback if you like it!' + * } + * }, + * ] + * + */ + + /** + * Make plugin blocks from array of plugin`s data + * @param {RendererBlocks[]} blocks + */ + value: function () { + var _render = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(blocks) { + var _this = this; + + var chainData, sequence; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + chainData = blocks.map(function (block) { + return { + function: function _function() { + return _this.insertBlock(block); + } + }; + }); + _context.next = 3; + return _utils.default.sequence(chainData); + + case 3: + sequence = _context.sent; + this.Editor.UI.checkEmptiness(); + return _context.abrupt("return", sequence); + + case 6: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + return function render(_x) { + return _render.apply(this, arguments); + }; + }() + /** + * Get plugin instance + * Add plugin instance to BlockManager + * Insert block to working zone + * + * @param {Object} item + * @returns {Promise} + * @private + */ + + }, { + key: "insertBlock", + value: function () { + var _insertBlock = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2(item) { + var _this$Editor, Tools, BlockManager, tool, data, settings, stubData, toolToolboxSettings, userToolboxSettings, stub; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _this$Editor = this.Editor, Tools = _this$Editor.Tools, BlockManager = _this$Editor.BlockManager; + tool = item.type; + data = item.data; + settings = item.settings; + + if (!(tool in Tools.available)) { + _context2.next = 15; + break; + } + + _context2.prev = 5; + BlockManager.insert(tool, data, settings); + _context2.next = 13; + break; + + case 9: + _context2.prev = 9; + _context2.t0 = _context2["catch"](5); + + _utils.default.log("Block \xAB".concat(tool, "\xBB skipped because of plugins error"), 'warn', data); + + throw Error(_context2.t0); + + case 13: + _context2.next = 20; + break; + + case 15: + /** If Tool is unavailable, create stub Block for it */ + stubData = { + savedData: { + type: tool, + data: data + }, + title: tool + }; + + if (tool in Tools.unavailable) { + toolToolboxSettings = Tools.unavailable[tool].toolbox; + userToolboxSettings = Tools.getToolSettings(tool).toolbox; + stubData.title = toolToolboxSettings.title || userToolboxSettings.title || stubData.title; + } + + stub = BlockManager.insert(Tools.stubTool, stubData, settings); + stub.stretched = true; + + _utils.default.log("Tool \xAB".concat(tool, "\xBB is not found. Check 'tools' property at your initial Editor.js config."), 'warn'); + + case 20: + case "end": + return _context2.stop(); + } + } + }, _callee2, this, [[5, 9]]); + })); + + return function insertBlock(_x2) { + return _insertBlock.apply(this, arguments); + }; + }() + }]); + return Renderer; + }(_module.default); + + _exports.default = Renderer; + Renderer.displayName = "Renderer"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/sanitizer.ts": +/*!*********************************************!*\ + !*** ./src/components/modules/sanitizer.ts ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"), __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts"), __webpack_require__(/*! html-janitor */ "./node_modules/html-janitor/src/html-janitor.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _slicedToArray2, _typeof2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _utils, _htmlJanitor) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _slicedToArray2 = _interopRequireDefault(_slicedToArray2); + _typeof2 = _interopRequireDefault(_typeof2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _utils = _interopRequireDefault(_utils); + _htmlJanitor = _interopRequireDefault(_htmlJanitor); + + /** + * CodeX Sanitizer + * + * @module Sanitizer + * Clears HTML from taint tags + * + * @version 2.0.0 + * + * @example + * Module can be used within two ways: + * 1) When you have an instance + * - this.Editor.Sanitizer.clean(yourTaintString); + * 2) As static method + * - EditorJS.Sanitizer.clean(yourTaintString, yourCustomConfiguration); + * + * {@link SanitizerConfig} + */ + + /** + * @typedef {Object} SanitizerConfig + * @property {Object} tags - define tags restrictions + * + * @example + * + * tags : { + * p: true, + * a: { + * href: true, + * rel: "nofollow", + * target: "_blank" + * } + * } + */ + var Sanitizer = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Sanitizer, _Module); + + function Sanitizer() { + var _this; + + (0, _classCallCheck2.default)(this, Sanitizer); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Sanitizer).apply(this, arguments)); + /** + * Memoize tools config + */ + + _this.configCache = {}; + /** + * Cached inline tools config + */ + + _this.inlineToolsConfigCache = null; + return _this; + } + /** + * Sanitize Blocks + * + * Enumerate blocks and clean data + * + * @param {{tool, data: BlockToolData}[]} blocksData[] + */ + + + (0, _createClass2.default)(Sanitizer, [{ + key: "sanitizeBlocks", + value: function sanitizeBlocks(blocksData) { + var _this2 = this; + + return blocksData.map(function (block) { + var toolConfig = _this2.composeToolConfig(block.tool); + + if (_utils.default.isEmpty(toolConfig)) { + return block; + } + + block.data = _this2.deepSanitize(block.data, toolConfig); + return block; + }); + } + /** + * Method recursively reduces Block's data and cleans with passed rules + * + * @param {BlockToolData|object|*} dataToSanitize - taint string or object/array that contains taint string + * @param {SanitizerConfig} rules - object with sanitizer rules + */ + + }, { + key: "deepSanitize", + value: function deepSanitize(dataToSanitize, rules) { + /** + * BlockData It may contain 3 types: + * - Array + * - Object + * - Primitive + */ + if (Array.isArray(dataToSanitize)) { + /** + * Array: call sanitize for each item + */ + return this.cleanArray(dataToSanitize, rules); + } else if ((0, _typeof2.default)(dataToSanitize) === 'object') { + /** + * Objects: just clean object deeper. + */ + return this.cleanObject(dataToSanitize, rules); + } else { + /** + * Primitives (number|string|boolean): clean this item + * + * Clean only strings + */ + if (typeof dataToSanitize === 'string') { + return this.cleanOneItem(dataToSanitize, rules); + } + + return dataToSanitize; + } + } + /** + * Cleans string from unwanted tags + * Method allows to use default config + * + * @param {string} taintString - taint string + * @param {SanitizerConfig} customConfig - allowed tags + * + * @return {string} clean HTML + */ + + }, { + key: "clean", + value: function clean(taintString) { + var customConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var sanitizerConfig = { + tags: customConfig + }; + /** + * API client can use custom config to manage sanitize process + */ + + var sanitizerInstance = this.createHTMLJanitorInstance(sanitizerConfig); + return sanitizerInstance.clean(taintString); + } + /** + * Merge with inline tool config + * + * @param {string} toolName + * @param {SanitizerConfig} toolRules + * @return {SanitizerConfig} + */ + + }, { + key: "composeToolConfig", + value: function composeToolConfig(toolName) { + /** + * If cache is empty, then compose tool config and put it to the cache object + */ + if (this.configCache[toolName]) { + return this.configCache[toolName]; + } + + var sanitizeGetter = this.Editor.Tools.apiSettings.SANITIZE_CONFIG; + var toolClass = this.Editor.Tools.available[toolName]; + var baseConfig = this.getInlineToolsConfig(toolName); + /** + * If Tools doesn't provide sanitizer config or it is empty + */ + + if (!toolClass.sanitize || toolClass[sanitizeGetter] && _utils.default.isEmpty(toolClass[sanitizeGetter])) { + return baseConfig; + } + + var toolRules = toolClass.sanitize; + var toolConfig = {}; + + for (var fieldName in toolRules) { + if (toolRules.hasOwnProperty(fieldName)) { + var rule = toolRules[fieldName]; + + if ((0, _typeof2.default)(rule) === 'object') { + toolConfig[fieldName] = Object.assign({}, baseConfig, rule); + } else { + toolConfig[fieldName] = rule; + } + } + } + + this.configCache[toolName] = toolConfig; + return toolConfig; + } + /** + * Returns Sanitizer config + * When Tool's "inlineToolbar" value is True, get all sanitizer rules from all tools, + * otherwise get only enabled + */ + + }, { + key: "getInlineToolsConfig", + value: function getInlineToolsConfig(name) { + var Tools = this.Editor.Tools; + var toolsConfig = Tools.getToolSettings(name); + var enableInlineTools = toolsConfig.inlineToolbar || []; + var config = {}; + + if (typeof enableInlineTools === 'boolean' && enableInlineTools) { + /** + * getting all tools sanitizer rule + */ + config = this.getAllInlineToolsConfig(); + } else { + /** + * getting only enabled + */ + enableInlineTools.map(function (inlineToolName) { + config = Object.assign(config, Tools.inline[inlineToolName][Tools.apiSettings.SANITIZE_CONFIG]); + }); + } + + return config; + } + /** + * Return general config for all inline tools + */ + + }, { + key: "getAllInlineToolsConfig", + value: function getAllInlineToolsConfig() { + var Tools = this.Editor.Tools; + + if (this.inlineToolsConfigCache) { + return this.inlineToolsConfigCache; + } + + var config = {}; + Object.entries(Tools.inline).forEach(function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + name = _ref2[0], + inlineTool = _ref2[1]; + + Object.assign(config, inlineTool[Tools.apiSettings.SANITIZE_CONFIG]); + }); + this.inlineToolsConfigCache = config; + return this.inlineToolsConfigCache; + } + /** + * Clean array + * @param {array} array - [1, 2, {}, []] + * @param {object} ruleForItem + */ + + }, { + key: "cleanArray", + value: function cleanArray(array, ruleForItem) { + var _this3 = this; + + return array.map(function (arrayItem) { + return _this3.deepSanitize(arrayItem, ruleForItem); + }); + } + /** + * Clean object + * @param {object} object - {level: 0, text: 'adada', items: [1,2,3]}} + * @param {object} rules - { b: true } or true|false + * @return {object} + */ + + }, { + key: "cleanObject", + value: function cleanObject(object, rules) { + var cleanData = {}; + + for (var fieldName in object) { + if (!object.hasOwnProperty(fieldName)) { + continue; + } + + var currentIterationItem = object[fieldName]; + /** + * Get object from config by field name + * - if it is a HTML Janitor rule, call with this rule + * - otherwise, call with parent's config + */ + + var ruleForItem = this.isRule(rules[fieldName]) ? rules[fieldName] : rules; + cleanData[fieldName] = this.deepSanitize(currentIterationItem, ruleForItem); + } + + return cleanData; + } + /** + * @param {string} taintString + * @param {SanitizerConfig|boolean} rule + * @return {string} + */ + + }, { + key: "cleanOneItem", + value: function cleanOneItem(taintString, rule) { + if ((0, _typeof2.default)(rule) === 'object') { + return this.clean(taintString, rule); + } else if (rule === false) { + return this.clean(taintString, {}); + } else { + return taintString; + } + } + /** + * Check if passed item is a HTML Janitor rule: + * { a : true }, {}, false, true, function(){} — correct rules + * undefined, null, 0, 1, 2 — not a rules + * @param config + */ + + }, { + key: "isRule", + value: function isRule(config) { + return (0, _typeof2.default)(config) === 'object' || typeof config === 'boolean' || typeof config === 'function'; + } + /** * If developer uses editor's API, then he can customize sanitize restrictions. * Or, sanitizing config can be defined globally in editors initialization. That config will be used everywhere * At least, if there is no config overrides, that API uses Default configuration @@ -19,20 +20835,4505 @@ * @license https://github.com/guardian/html-janitor/blob/master/LICENSE * * @param {SanitizerConfig} config - sanitizer extension - */},{key:"createHTMLJanitorInstance",value:function(t){return t?new p.default(t):null}}]),e}(f.default);o.default=v,v.displayName="Sanitizer",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(26),n(27),n(1),n(2),n(4),n(5),n(6),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f){"use strict";var d=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),a=d(a),s=d(s),c=d(c),l=d(l),u=d(u);var p=function(t){function e(){return(0,a.default)(this,e),(0,c.default)(this,(0,l.default)(e).apply(this,arguments))}var n,o;return(0,u.default)(e,t),(0,s.default)(e,[{key:"save",value:(o=(0,i.default)(r.default.mark(function t(){var e,n,o,i,a,s,c,l,u=this;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.Editor,n=e.BlockManager,o=e.Sanitizer,i=e.ModificationsObserver,a=n.blocks,s=[],i.disable(),a.forEach(function(t){s.push(u.getSavedData(t))}),t.next=6,Promise.all(s);case 6:return c=t.sent,t.next=9,o.sanitizeBlocks(c);case 9:return l=t.sent,i.enable(),t.abrupt("return",this.makeOutput(l));case 12:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})},{key:"getSavedData",value:(n=(0,i.default)(r.default.mark(function t(e){var n,o;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.save();case 2:if(n=t.sent,t.t0=n,!t.t0){t.next=8;break}return t.next=7,e.validate(n.data);case 7:t.t0=t.sent;case 8:return o=t.t0,t.abrupt("return",Object.assign({},n,{isValid:o}));case 10:case"end":return t.stop()}},t)})),function(t){return n.apply(this,arguments)})},{key:"makeOutput",value:function(t){var e=this,n=0,o=[];return console.groupCollapsed("[Editor.js saving]:"),t.forEach(function(t){var r=t.tool,i=t.data,a=t.time,s=t.isValid;if(n+=a,console.group("".concat(r.charAt(0).toUpperCase()+r.slice(1))),!s)return console.log("Block «".concat(r,"» skipped because saved data is invalid")),void console.groupEnd();console.log(i),console.groupEnd(),r!==e.Editor.Tools.stubTool?o.push({type:r,data:i}):o.push(i)}),console.log("Total",n),console.groupEnd(),{time:+new Date,blocks:o,version:"2.15.0"}}}]),e}((f=d(f)).default);o.default=p,p.displayName="Saver",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(351),n(7)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u){"use strict";var f=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),c=f(c),l=f(l);var d=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).registeredShortcuts=[],t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"add",value:function(t){this.Editor.UI;var e=new l.default({name:t.name,on:document,callback:t.handler});this.registeredShortcuts.push(e)}},{key:"remove",value:function(t){var e=this.registeredShortcuts.findIndex(function(e){return e.name===t});this.registeredShortcuts[e].remove(),this.registeredShortcuts.splice(e,1)}}]),e}((u=f(u)).default);o.default=d,d.displayName="Shortcuts",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u){"use strict";var f=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),c=f(c),l=f(l),u=f(u);var d=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={wrapper:null,toolSettings:null,defaultSettings:null},t.buttons=[],t.focusedButtonIndex=-1,t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){this.nodes.wrapper=u.default.make("div",this.CSS.wrapper),this.nodes.toolSettings=u.default.make("div",this.CSS.toolSettings),this.nodes.defaultSettings=u.default.make("div",this.CSS.defaultSettings),u.default.append(this.nodes.wrapper,[this.nodes.toolSettings,this.nodes.defaultSettings])}},{key:"open",value:function(){this.nodes.wrapper.classList.add(this.CSS.wrapperOpened),this.addToolSettings(),this.addDefaultSettings(),this.Editor.Events.emit(this.events.opened)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.wrapperOpened),this.nodes.toolSettings.innerHTML="",this.nodes.defaultSettings.innerHTML="",this.Editor.Events.emit(this.events.closed),this.buttons=[],this.focusedButtonIndex=-1}},{key:"leaf",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right";this.focusedButtonIndex=u.default.leafNodesAndReturnIndex(this.blockTunesButtons,this.focusedButtonIndex,t,this.CSS.focusedButton)}},{key:"addToolSettings",value:function(){"function"==typeof this.Editor.BlockManager.currentBlock.tool.renderSettings&&u.default.append(this.nodes.toolSettings,this.Editor.BlockManager.currentBlock.tool.renderSettings())}},{key:"addDefaultSettings",value:function(){u.default.append(this.nodes.defaultSettings,this.Editor.BlockManager.currentBlock.renderTunes())}},{key:"events",get:function(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}},{key:"CSS",get:function(){return{wrapper:"ce-settings",wrapperOpened:"ce-settings--opened",toolSettings:"ce-settings__plugin-zone",defaultSettings:"ce-settings__default-zone",button:"ce-settings__button",focusedButton:"ce-settings__button--focused",focusedButtonAnimated:"ce-settings__button--focused-animated"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(this.CSS.wrapperOpened)}},{key:"blockTunesButtons",get:function(){var t=this;if(0!==this.buttons.length)return this.buttons;var e=this.nodes.toolSettings.querySelectorAll(".".concat(this.Editor.StylesAPI.classes.settingsButton)),n=this.nodes.defaultSettings.querySelectorAll(".".concat(this.CSS.button));return e.forEach(function(e,n){t.buttons.push(e),e.classList.contains(t.CSS.focusedButton)&&(t.focusedButtonIndex=n)}),n.forEach(function(e){t.buttons.push(e)}),this.buttons}},{key:"focusedButton",get:function(){return-1===this.focusedButtonIndex?null:this.buttons[this.focusedButtonIndex]}}]),e}(l.default);o.default=d,d.displayName="BlockSettings",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(26),n(27),n(1),n(2),n(4),n(5),n(6),n(7),n(13),n(14)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p){"use strict";var h=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),a=h(a),s=h(s),c=h(c),l=h(l),u=h(u),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,c.default)(this,(0,l.default)(e).apply(this,arguments))).nodes={wrapper:null,tools:null},t.opened=!1,t.focusedButtonIndex=-1,t.tools={},t}var n;return(0,u.default)(e,t),(0,s.default)(e,[{key:"make",value:function(){this.nodes.wrapper=d.default.make("div",e.CSS.conversionToolbarWrapper),this.nodes.tools=d.default.make("div",e.CSS.conversionToolbarTools),this.addTools(),d.default.append(this.nodes.wrapper,this.nodes.tools),d.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}},{key:"tryToShow",value:function(t){var n=t.class.conversionConfig&&t.class.conversionConfig.export;if(n){var o=t.name;this.tools[o]&&(this.focusedButton&&this.focusedButton.classList.contains(e.CSS.conversionToolActive)&&this.focusedButton.classList.remove(e.CSS.conversionToolActive),this.tools[o].classList.add(e.CSS.conversionToolActive)),this.move(t),this.opened||this.open()}}},{key:"open",value:function(){this.opened=!0,this.nodes.wrapper.classList.add(e.CSS.conversionToolbarShowed)}},{key:"close",value:function(){this.opened=!1,this.nodes.wrapper.classList.remove(e.CSS.conversionToolbarShowed),this.dropFocusedButton()}},{key:"leaf",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right",n=Array.from(this.nodes.tools.childNodes);this.focusedButtonIndex=d.default.leafNodesAndReturnIndex(n,this.focusedButtonIndex,t,e.CSS.conversionToolFocused)}},{key:"dropFocusedButton",value:function(){Object.values(this.tools).forEach(function(t){t.classList.remove(e.CSS.conversionToolActive,e.CSS.conversionToolFocused)}),this.focusedButtonIndex=-1}},{key:"replaceWithBlock",value:(n=(0,i.default)(r.default.mark(function t(e){var n,o,i,a,s,c,l,u,f,d,h=this;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.Editor.BlockManager.currentBlock.class,o=this.Editor.BlockManager.currentBlock.name,t.next=4,this.Editor.BlockManager.currentBlock.save();case 4:if(i=t.sent,a=i.data,o===e&&(e=this.config.initialBlock),s=this.Editor.Tools.toolsClasses[e],c="","function"!=typeof(l=n.conversionConfig.export)){t.next=14;break}c=l(a),t.next=20;break;case 14:if("string"!=typeof l){t.next=18;break}c=a[l],t.next=20;break;case 18:return p.default.log("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),t.abrupt("return");case 20:if(u=this.Editor.Sanitizer.clean(c,s.sanitize),f={},"function"!=typeof(d=s.conversionConfig.import)){t.next=27;break}f=d(u),t.next=33;break;case 27:if("string"!=typeof d){t.next=31;break}f[d]=u,t.next=33;break;case 31:return p.default.log("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),t.abrupt("return");case 33:this.Editor.BlockManager.replace(e,f),this.Editor.BlockSelection.clearSelection(),this.close(),p.default.delay(function(){h.Editor.Caret.setToBlock(h.Editor.BlockManager.currentBlock)},10)();case 37:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"move",value:function(t){var e=t.pluginsContent.getBoundingClientRect(),n=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),o={x:e.left-n.left,y:e.top+e.height-n.top};this.nodes.wrapper.style.left=Math.floor(o.x)+"px",this.nodes.wrapper.style.top=Math.floor(o.y)+"px"}},{key:"addTools",value:function(){var t=this.Editor.Tools.blockTools;for(var e in t)if(t.hasOwnProperty(e)){var n=this.Editor.Tools.apiSettings,o=t[e],r=o[n.TOOLBOX],i=o[n.CONVERSION_CONFIG];!p.default.isEmpty(r)&&r.icon&&i&&i.import&&this.addTool(e,r.icon)}}},{key:"addTool",value:function(t,n){var o=this,a=d.default.make("div",[e.CSS.conversionTool]);a.dataset.tool=t,a.innerHTML=n,d.default.append(this.nodes.tools,a),this.tools[t]=a,this.Editor.Listeners.on(a,"click",(0,i.default)(r.default.mark(function e(){return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.replaceWithBlock(t);case 2:case"end":return e.stop()}},e)})))}},{key:"focusedButton",get:function(){return-1===this.focusedButtonIndex?null:this.nodes.tools.childNodes[this.focusedButtonIndex]}}],[{key:"CSS",get:function(){return{conversionToolbarWrapper:"ce-conversion-toolbar",conversionToolbarShowed:"ce-conversion-toolbar--showed",conversionToolbarTools:"ce-conversion-toolbar__tools",conversionTool:"ce-conversion-tool",conversionToolFocused:"ce-conversion-tool--focused",conversionToolActive:"ce-conversion-tool--active"}}}]),e}(f.default);o.default=v,v.displayName="ConversionToolbar",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(58),n(1),n(2),n(4),n(5),n(6),n(7),n(13),n(28),n(14)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p){"use strict";var h=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),a=h(a),s=h(s),c=h(c),l=h(l),u=h(u),f=h(f),d=h(d),p=h(p);var v=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,s.default)(this,(0,c.default)(e).apply(this,arguments))).CSS={inlineToolbar:"ce-inline-toolbar",inlineToolbarShowed:"ce-inline-toolbar--showed",inlineToolbarLeftOriented:"ce-inline-toolbar--left-oriented",inlineToolbarRightOriented:"ce-inline-toolbar--right-oriented",buttonsWrapper:"ce-inline-toolbar__buttons",actionsWrapper:"ce-inline-toolbar__actions",inlineToolButton:"ce-inline-tool",inlineToolButtonLast:"ce-inline-tool--last",inputField:"cdx-input",focusedButton:"ce-inline-tool--focused"},t.opened=!1,t.nodes={wrapper:null,buttons:null,actions:null},t.toolbarVerticalMargin=20,t.buttonsList=null,t.visibleButtonsList=[],t.focusedButtonIndex=-1,t.width=0,t}return(0,l.default)(e,t),(0,a.default)(e,[{key:"make",value:function(){var t=this;this.nodes.wrapper=f.default.make("div",this.CSS.inlineToolbar),this.nodes.buttons=f.default.make("div",this.CSS.buttonsWrapper),this.nodes.actions=f.default.make("div",this.CSS.actionsWrapper),this.Editor.Listeners.on(this.nodes.wrapper,"mousedown",function(e){var n=e.target.closest(".".concat(t.CSS.actionsWrapper));n||e.preventDefault()}),f.default.append(this.nodes.wrapper,[this.nodes.buttons,this.nodes.actions]),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addTools(),this.recalculateWidth()}},{key:"tryToShow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.allowedToShow()?(this.move(),this.open(),this.Editor.Toolbar.close(),this.checkToolsState(),this.Editor.BlockSelection.clearSelection()):t&&this.close()}},{key:"move",value:function(){var t=d.default.rect,e=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:t.x-e.left,y:t.y+t.height-e.top+this.toolbarVerticalMargin};t.width&&(n.x+=Math.floor(t.width/2));var o=n.x-this.width/2,r=n.x+this.width/2;this.nodes.wrapper.classList.toggle(this.CSS.inlineToolbarLeftOriented,othis.Editor.UI.contentRect.right),this.nodes.wrapper.style.left=Math.floor(n.x)+"px",this.nodes.wrapper.style.top=Math.floor(n.y)+"px"}},{key:"leaf",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right";this.visibleButtonsList=Array.from(this.buttonsList).filter(function(t){return!t.hidden}),0!==this.visibleButtonsList.length&&(this.focusedButtonIndex=f.default.leafNodesAndReturnIndex(this.visibleButtonsList,this.focusedButtonIndex,t,this.CSS.focusedButton))}},{key:"dropFocusedButtonIndex",value:function(){-1!==this.focusedButtonIndex&&(this.visibleButtonsList[this.focusedButtonIndex].classList.remove(this.CSS.focusedButton),this.focusedButtonIndex=-1)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),this.tools.forEach(function(t){"function"==typeof t.clear&&t.clear()}),this.opened=!1,-1!==this.focusedButtonIndex&&(this.visibleButtonsList[this.focusedButtonIndex].classList.remove(this.CSS.focusedButton),this.focusedButtonIndex=-1)}},{key:"open",value:function(){this.filterTools(),this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.tools.forEach(function(t){"function"==typeof t.clear&&t.clear()}),this.buttonsList=this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton)),this.opened=!0}},{key:"allowedToShow",value:function(){var t=d.default.get(),e=d.default.text;if(!t||!t.anchorNode)return!1;if(t.isCollapsed||e.length<1)return!1;var n=f.default.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(t&&["IMG","INPUT"].includes(n.tagName))return!1;var o=n.closest('[contenteditable="true"]');if(null===o)return!1;var r=this.Editor.BlockManager.getBlock(t.anchorNode);if(!r)return!1;var i=this.Editor.Tools.getToolSettings(r.name);return i&&i[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]}},{key:"filterTools",value:function(){var t=this,e=d.default.get(),n=this.Editor.BlockManager.getBlock(e.anchorNode),o=this.Editor.Tools.getToolSettings(n.name),r=o&&o[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR],i=Array.from(this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton)));i.forEach(function(e){e.hidden=!1,e.classList.remove(t.CSS.inlineToolButtonLast)}),Array.isArray(r)&&i.forEach(function(t){t.hidden=!r.includes(t.dataset.tool)});var a=i.filter(function(t){return!t.hidden}).pop();a&&a.classList.add(this.CSS.inlineToolButtonLast),this.recalculateWidth()}},{key:"recalculateWidth",value:function(){this.width=this.nodes.wrapper.offsetWidth}},{key:"addTools",value:function(){var t=this;this.tools.forEach(function(e,n){t.addTool(n,e)})}},{key:"addTool",value:function(t,e){var n=this,o=this.Editor,i=o.Listeners,a=o.Tools,s=e.render();if(s){if(s.dataset.tool=t,this.nodes.buttons.appendChild(s),"function"==typeof e.renderActions){var c=e.renderActions();this.nodes.actions.appendChild(c)}i.on(s,"click",function(t){n.toolClicked(e),t.preventDefault()});var l=a.getToolSettings(t),u=null,f=Object.entries(a.internalTools).filter(function(t){var e=(0,r.default)(t,2),n=(e[0],e[1]);return p.default.isFunction(n)?n[a.apiSettings.IS_INLINE]:n.class[a.apiSettings.IS_INLINE]}).map(function(t){var e=(0,r.default)(t,1),n=e[0];return n});f.includes(t)?u=this.inlineTools[t].shortcut:l&&l[a.apiSettings.SHORTCUT]&&(u=l[a.apiSettings.SHORTCUT]),u&&this.enableShortcuts(e,u)}else p.default.log("Render method must return an instance of Node","warn",t)}},{key:"enableShortcuts",value:function(t,e){var n=this;this.Editor.Shortcuts.add({name:e,handler:function(e){var o=n.Editor.BlockManager.currentBlock;if(o){var r=n.Editor.Tools.getToolSettings(o.name);r&&r[n.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]&&(e.preventDefault(),n.toolClicked(t))}}})}},{key:"toolClicked",value:function(t){var e=d.default.range;t.surround(e),this.checkToolsState()}},{key:"checkToolsState",value:function(){this.tools.forEach(function(t){t.checkState(d.default.get())})}},{key:"tools",get:function(){if(!this.toolsInstances||0===this.toolsInstances.size){var t=this.inlineTools;for(var e in this.toolsInstances=new Map,t)t.hasOwnProperty(e)&&this.toolsInstances.set(e,t[e])}return this.toolsInstances}},{key:"focusedButton",get:function(){return-1===this.focusedButtonIndex?null:this.visibleButtonsList[this.focusedButtonIndex]}},{key:"inlineTools",get:function(){var t={};for(var e in this.Editor.Tools.inline)if(this.Editor.Tools.inline.hasOwnProperty(e)){var n=this.Editor.Tools.getToolSettings(e);t[e]=this.Editor.Tools.constructInline(this.Editor.Tools.inline[e],n)}return t}}]),e}(u.default);o.default=v,v.displayName="InlineToolbar",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(4),n(5),n(6),n(7),n(13),n(14)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f){"use strict";var d=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),a=d(a),s=d(s),c=d(c),l=d(l),u=d(u),f=d(f);var p=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).opened=!1,t.nodes={toolbox:null,tooltip:null,buttons:[]},t.activeButtonIndex=-1,t.displayedToolsCount=0,t}return(0,c.default)(e,t),(0,i.default)(e,[{key:"make",value:function(){this.nodes.toolbox=u.default.make("div",this.CSS.toolbox),u.default.append(this.Editor.Toolbar.nodes.content,this.nodes.toolbox),this.addTools(),this.addTooltip()}},{key:"toolButtonActivate",value:function(t,e){var n=this.Editor.Tools.toolsClasses[e];this.insertNewBlock(n,e)}},{key:"open",value:function(){this.isEmpty||(this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolbarHolderModifier),this.nodes.toolbox.classList.add(this.CSS.toolboxOpened),this.opened=!0)}},{key:"close",value:function(){this.hideTooltip(),this.nodes.toolbox.classList.remove(this.CSS.toolboxOpened),this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolbarHolderModifier),this.opened=!1,-1!==this.activeButtonIndex&&(this.nodes.toolbox.childNodes[this.activeButtonIndex].classList.remove(this.CSS.toolboxButtonActive),this.activeButtonIndex=-1)}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"leaf",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.LEAF_DIRECTIONS.RIGHT,n=Array.from(this.nodes.toolbox.childNodes);this.activeButtonIndex=u.default.leafNodesAndReturnIndex(n,this.activeButtonIndex,t,this.CSS.toolboxButtonActive)}},{key:"hideTooltip",value:function(){this.nodes.tooltip.classList.remove(this.CSS.tooltipShown)}},{key:"addTools",value:function(){var t=this.Editor.Tools.available;for(var e in t)t.hasOwnProperty(e)&&this.addTool(e,t[e])}},{key:"addTool",value:function(t,e){var n=this,o=this.Editor.Tools.apiSettings,r=e[o.TOOLBOX];if(!f.default.isEmpty(r))if(!r||r.icon){var i=this.Editor.Tools.getToolSettings(t),a=i.toolbox,s=void 0===a?{}:a,c=u.default.make("li",[this.CSS.toolboxButton]);c.dataset.tool=t,c.innerHTML=s.icon||r.icon,u.default.append(this.nodes.toolbox,c),this.nodes.toolbox.appendChild(c),this.nodes.buttons.push(c),this.Editor.Listeners.on(c,"click",function(e){n.toolButtonActivate(e,t)}),this.Editor.Listeners.on(c,"mouseenter",function(){n.showTooltip(c,t)}),this.Editor.Listeners.on(c,"mouseleave",function(){n.hideTooltip()});var l=this.Editor.Tools.getToolSettings(t);l&&l[this.Editor.Tools.apiSettings.SHORTCUT]&&this.enableShortcut(e,t,l[this.Editor.Tools.apiSettings.SHORTCUT]),this.displayedToolsCount++}else f.default.log("Toolbar icon is missed. Tool %o skipped","warn",t)}},{key:"addTooltip",value:function(){this.nodes.tooltip=u.default.make("div",this.CSS.tooltip,{innerHTML:""}),u.default.append(this.Editor.Toolbar.nodes.content,this.nodes.tooltip)}},{key:"showTooltip",value:function(t,e){var n=this.Editor.Tools.getToolSettings(e),o=this.Editor.Tools.available[e][this.Editor.Tools.apiSettings.TOOLBOX]||{},r=n.toolbox||{},i=r.title||o.title||e,a=n[this.Editor.Tools.apiSettings.SHORTCUT],s=document.createDocumentFragment(),c=document.createTextNode(f.default.capitalize(i));if(s.appendChild(c),a){var l=f.default.getUserOS();a=a.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),a=l.mac?a.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):a.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),s.appendChild(u.default.make("div",this.CSS.tooltipShortcut,{textContent:a}))}var d=t.offsetLeft,p=Math.floor(this.Editor.BlockManager.currentBlock.holder.offsetHeight/2);this.nodes.tooltip.innerHTML="",this.nodes.tooltip.appendChild(s),this.nodes.tooltip.style.left="".concat(d+16,"px"),this.nodes.tooltip.style.transform="translate3d(-50%, ".concat(p,"px, 0)"),this.nodes.tooltip.classList.add(this.CSS.tooltipShown)}},{key:"enableShortcut",value:function(t,e,n){var o=this;this.Editor.Shortcuts.add({name:n,handler:function(n){n.preventDefault(),o.insertNewBlock(t,e)}})}},{key:"insertNewBlock",value:function(t,e){var n,o=this.Editor,r=o.BlockManager,i=o.Caret,a=r.currentBlock;(n=a.isEmpty?r.replace(e):r.insert(e)).call("appendCallback",{}),this.Editor.Caret.setToBlock(n),0===n.inputs.length&&(n===r.lastBlock?(r.insertAtEnd(),i.setToBlock(r.lastBlock)):i.setToBlock(r.nextBlock)),this.Editor.Toolbar.close()}},{key:"CSS",get:function(){return{toolbox:"ce-toolbox",toolboxButton:"ce-toolbox__button",toolboxButtonActive:"ce-toolbox__button--active",toolboxOpened:"ce-toolbox--opened",tooltip:"ce-toolbox__tooltip",tooltipShown:"ce-toolbox__tooltip--shown",tooltipShortcut:"ce-toolbox__tooltip-shortcut",openedToolbarHolderModifier:"codex-editor--toolbox-opened"}}},{key:"getActiveTool",get:function(){var t=this.nodes.toolbox.childNodes;return-1===this.activeButtonIndex?null:t[this.activeButtonIndex].dataset.tool}},{key:"isEmpty",get:function(){return 0===this.displayedToolsCount}}]),e}(l.default);o.default=p,p.displayName="Toolbox",p.LEAF_DIRECTIONS={RIGHT:"right",LEFT:"left"},t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(58),n(55),n(1),n(2),n(4),n(5),n(6),n(352),n(7),n(14),n(353),n(354),n(355),n(356)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p,h,v,g,y){"use strict";var b=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=b(r),i=b(i),a=b(a),s=b(s),c=b(c),l=b(l),u=b(u),f=b(f),d=b(d),p=b(p),h=b(h),v=b(v),g=b(g),y=b(y);var k=function(t){function e(t){var n,o=t.config;return(0,a.default)(this,e),(n=(0,c.default)(this,(0,l.default)(e).call(this,{config:o}))).stubTool="stub",n.toolsClasses={},n.toolsAvailable={},n.toolsUnavailable={},n.toolsSettings={},n._inlineTools={},n.toolsClasses={},n.toolsSettings={},n.toolsAvailable={},n.toolsUnavailable={},n._inlineTools=null,n}return(0,u.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){var t=this;if(this.validateTools(),this.config.tools=p.default.deepMerge({},this.internalTools,this.config.tools),!this.config.hasOwnProperty("tools")||0===Object.keys(this.config.tools).length)throw Error("Can't start without tools");for(var e in this.config.tools)"object"===(0,i.default)(this.config.tools[e])?(this.toolsClasses[e]=this.config.tools[e].class,this.toolsSettings[e]=this.config.tools[e],delete this.toolsSettings[e].class):(this.toolsClasses[e]=this.config.tools[e],this.toolsSettings[e]={class:this.config.tools[e]});var n=this.getListOfPrepareFunctions();return 0===n.length?Promise.resolve():p.default.sequence(n,function(e){t.success(e)},function(e){t.fallback(e)})}},{key:"success",value:function(t){this.toolsAvailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"fallback",value:function(t){this.toolsUnavailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"construct",value:function(t,e){var n=this.toolsClasses[t],o=this.toolsSettings[t][this.apiSettings.CONFIG]||{};t!==this.config.initialBlock||o.placeholder||(o.placeholder=this.config.placeholder);var r={api:this.Editor.API.methods,config:o,data:e};return new n(r)}},{key:"constructInline",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={api:this.Editor.API.methods,config:e[this.apiSettings.CONFIG]||{}};return new t(n)}},{key:"isInitial",value:function(t){return t instanceof this.available[this.config.initialBlock]}},{key:"getToolSettings",value:function(t){return this.toolsSettings[t]}},{key:"getListOfPrepareFunctions",value:function(){var t=[];for(var e in this.toolsClasses)if(this.toolsClasses.hasOwnProperty(e)){var n=this.toolsClasses[e];"function"==typeof n.prepare?t.push({function:n.prepare,data:{toolName:e,config:this.toolsSettings[e][this.apiSettings.CONFIG]}}):this.toolsAvailable[e]=n}return t}},{key:"validateTools",value:function(){for(var t in this.config.tools)if(this.config.tools.hasOwnProperty(t)){if(t in this.internalTools)return;var e=this.config.tools[t];if(!p.default.isFunction(e)&&!p.default.isFunction(e.class))throw Error("Tool «".concat(t,"» must be a constructor function or an object with function in the «class» property"))}}},{key:"available",get:function(){return this.toolsAvailable}},{key:"unavailable",get:function(){return this.toolsUnavailable}},{key:"inline",get:function(){var t=this;if(this._inlineTools)return this._inlineTools;var e=Object.entries(this.available).filter(function(e){var n=(0,r.default)(e,2),o=(n[0],n[1]);if(!o[t.apiSettings.IS_INLINE])return!1;var i=["render","surround","checkState"].filter(function(e){return!t.constructInline(o)[e]});return!i.length||(p.default.log("Incorrect Inline Tool: ".concat(o.name,". Some of required methods is not implemented %o"),"warn",i),!1)}),n={};return e.forEach(function(t){var e=(0,r.default)(t,2),o=e[0],i=e[1];return n[o]=i}),this._inlineTools=n,this._inlineTools}},{key:"blockTools",get:function(){var t=this,e=Object.entries(this.available).filter(function(e){var n=(0,r.default)(e,2),o=(n[0],n[1]);return!o[t.apiSettings.IS_INLINE]}),n={};return e.forEach(function(t){var e=(0,r.default)(t,2),o=e[0],i=e[1];return n[o]=i}),n}},{key:"apiSettings",get:function(){return{CONFIG:"config",IS_ENABLED_INLINE_TOOLBAR:"inlineToolbar",IS_ENABLED_LINE_BREAKS:"enableLineBreaks",IS_INLINE:"isInline",IS_PASTE_DISALLOWED:"disallowPaste",SHORTCUT:"shortcut",TOOLBOX:"toolbox",SANITIZE_CONFIG:"sanitize",CONVERSION_CONFIG:"conversionConfig"}}},{key:"internalTools",get:function(){return{bold:{class:h.default},italic:{class:v.default},link:{class:g.default},paragraph:{class:f.default,inlineToolbar:!0},stub:{class:y.default}}}}]),e}(d.default);o.default=k,k.displayName="Tools",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(26),n(27),n(1),n(2),n(4),n(5),n(6),n(357),n(7),n(13),n(14),n(28),n(71)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u,f,d,p,h,v,g){"use strict";var y=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=y(r),i=y(i),a=y(a),s=y(s),c=y(c),l=y(l),u=y(u),f=y(f),d=y(d),p=y(p),h=y(h),v=y(v),g=y(g);var b=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,c.default)(this,(0,l.default)(e).apply(this,arguments))).isMobile=!1,t.nodes={holder:null,wrapper:null,redactor:null},t.contentRectCache=void 0,t.resizeDebouncer=h.default.debounce(function(){t.windowResize()},200),t}var o,d;return(0,u.default)(e,t),(0,s.default)(e,[{key:"addLoader",value:function(){this.nodes.loader=p.default.make("div",this.CSS.editorLoader),this.nodes.wrapper.prepend(this.nodes.loader),this.nodes.redactor.classList.add(this.CSS.editorZoneHidden)}},{key:"removeLoader",value:function(){this.nodes.loader.remove(),this.nodes.redactor.classList.remove(this.CSS.editorZoneHidden)}},{key:"prepare",value:(d=(0,i.default)(r.default.mark(function t(){return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.checkIsMobile(),t.next=3,this.make();case 3:return this.addLoader(),t.next=6,this.appendSVGSprite();case 6:return t.next=8,this.Editor.Toolbar.make();case 8:return t.next=10,this.Editor.InlineToolbar.make();case 10:return t.next=12,this.Editor.ConversionToolbar.make();case 12:return t.next=14,this.loadStyles();case 14:return t.next=16,this.bindEvents();case 16:case"end":return t.stop()}},t,this)})),function(){return d.apply(this,arguments)})},{key:"checkEmptiness",value:function(){var t=this.Editor.BlockManager;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,t.isEditorEmpty)}},{key:"destroy",value:function(){this.nodes.holder.innerHTML=""}},{key:"checkIsMobile",value:function(){this.isMobile=window.innerWidth<650}},{key:"make",value:(o=(0,i.default)(r.default.mark(function t(){return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.nodes.holder=p.default.getHolder(this.config.holder),this.nodes.wrapper=p.default.make("div",this.CSS.editorWrapper),this.nodes.redactor=p.default.make("div",this.CSS.editorZone),this.nodes.holder.offsetWidth=0;if(i.opened&&i.focusedButton)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),i.focusedButton.click(),i.focusedButton&&(i.focusedButton.classList.add(i.CSS.focusedButtonAnimated),h.default.delay(function(){i.focusedButton&&i.focusedButton.classList.remove(i.CSS.focusedButtonAnimated)},280)()),void h.default.delay(function(){r.setToBlock(n.currentBlock)},10)();if(a.opened&&a.focusedButton)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),void a.focusedButton.click();if(o.anyBlockSelected){var c=n.removeSelectedBlocks();return r.setToBlock(n.insertInitialBlockAtIndex(c,!0),r.positions.START),o.clearSelection(t),t.preventDefault(),t.stopImmediatePropagation(),void t.stopPropagation()}if(s&&"BODY"===t.target.tagName){var l=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(l),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.move(),this.Editor.Toolbar.plusButton.show()}this.Editor.BlockSelection.clearSelection(t)}},{key:"documentClicked",value:function(t){var e=t.target,n=this.nodes.holder.contains(e)||v.default.isAtEditor;n||(this.Editor.BlockManager.dropPointer(),this.Editor.InlineToolbar.close(),this.Editor.Toolbar.close(),this.Editor.BlockSelection.clearSelection(t),this.Editor.ConversionToolbar.close()),v.default.isAtEditor&&(v.default.anchorNode===this.nodes.redactor?this.Editor.Caret.setToTheLastBlock():this.Editor.BlockManager.setCurrentBlockByChildNode(v.default.anchorNode))}},{key:"redactorClicked",value:function(t){if(v.default.isCollapsed){var e=t.target;e===this.nodes.redactor&&(e=document.elementFromPoint(t.clientX,t.clientY));try{this.Editor.BlockManager.setCurrentBlockByChildNode(e),this.Editor.BlockManager.highlightCurrentNode()}catch(t){this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}t.stopImmediatePropagation(),t.stopPropagation(),this.Editor.Toolbar.open(),this.Editor.Toolbar.plusButton.hide(),this.Editor.BlockManager.currentBlock||this.Editor.BlockManager.insert();var n=this.Editor.Tools.isInitial(this.Editor.BlockManager.currentBlock.tool);if(n){var o=this.Editor.BlockManager.currentBlock.isEmpty;o&&this.Editor.Toolbar.plusButton.show()}}}},{key:"selectionChanged",value:function(t){var e=v.default.anchorElement;e&&e.closest(".".concat(g.default.CSS.content))&&this.Editor.InlineToolbar.tryToShow()}},{key:"appendSVGSprite",value:function(){var t=p.default.make("div");t.hidden=!0,t.style.display="none",t.innerHTML=f.default,p.default.append(this.nodes.wrapper,t)}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorLoader:"codex-editor__loader",editorEmpty:"codex-editor--empty"}}},{key:"contentRect",get:function(){if(this.contentRectCache)return this.contentRectCache;var t=this.nodes.wrapper.querySelector(".".concat(g.default.CSS.content));return t?(this.contentRectCache=t.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}}]),e}(d.default);o.default=b,b.displayName="UI",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){n(163),t.exports=n(329)},function(t,e,n){n(164)},function(t,e,n){"use strict";n(165),n(309),n(311),n(313),n(315),n(317),n(319),n(321),n(323),n(325),n(128)},function(t,e,n){n(166),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(247),n(248),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(94),n(272),n(273),n(118),n(274),n(275),n(276),n(277),n(119),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),t.exports=n(17)},function(t,e,n){"use strict";var o=n(9),r=n(21),i=n(16),a=n(0),s=n(19),c=n(39).KEY,l=n(8),u=n(74),f=n(48),d=n(41),p=n(12),h=n(75),v=n(100),g=n(167),y=n(78),b=n(11),k=n(10),m=n(23),x=n(38),S=n(40),w=n(45),E=n(103),T=n(29),B=n(15),C=n(43),_=T.f,I=B.f,O=E.f,N=o.Symbol,M=o.JSON,L=M&&M.stringify,A=p("_hidden"),P=p("toPrimitive"),R={}.propertyIsEnumerable,j=u("symbol-registry"),F=u("symbols"),D=u("op-symbols"),U=Object.prototype,z="function"==typeof N,H=o.QObject,W=!H||!H.prototype||!H.prototype.findChild,X=i&&l(function(){return 7!=w(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a})?function(t,e,n){var o=_(U,e);o&&delete U[e],I(t,e,n),o&&t!==U&&I(U,e,o)}:I,Y=function(t){var e=F[t]=w(N.prototype);return e._k=t,e},G=z&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},V=function(t,e,n){return t===U&&V(D,e,n),b(t),e=x(e,!0),b(n),r(F,e)?(n.enumerable?(r(t,A)&&t[A][e]&&(t[A][e]=!1),n=w(n,{enumerable:S(0,!1)})):(r(t,A)||I(t,A,S(1,{})),t[A][e]=!0),X(t,e,n)):I(t,e,n)},K=function(t,e){b(t);for(var n,o=g(e=m(e)),r=0,i=o.length;i>r;)V(t,n=o[r++],e[n]);return t},Z=function(t){var e=R.call(this,t=x(t,!0));return!(this===U&&r(F,t)&&!r(D,t))&&(!(e||!r(this,t)||!r(F,t)||r(this,A)&&this[A][t])||e)},q=function(t,e){if(t=m(t),e=x(e,!0),t!==U||!r(F,e)||r(D,e)){var n=_(t,e);return!n||!r(F,e)||r(t,A)&&t[A][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=O(m(t)),o=[],i=0;n.length>i;)r(F,e=n[i++])||e==A||e==c||o.push(e);return o},$=function(t){for(var e,n=t===U,o=O(n?D:m(t)),i=[],a=0;o.length>a;)!r(F,e=o[a++])||n&&!r(U,e)||i.push(F[e]);return i};z||(s((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===U&&e.call(D,n),r(this,A)&&r(this[A],t)&&(this[A][t]=!1),X(this,t,S(1,n))};return i&&W&&X(U,t,{configurable:!0,set:e}),Y(t)}).prototype,"toString",function(){return this._k}),T.f=q,B.f=V,n(46).f=E.f=J,n(57).f=Z,n(60).f=$,i&&!n(42)&&s(U,"propertyIsEnumerable",Z,!0),h.f=function(t){return Y(p(t))}),a(a.G+a.W+a.F*!z,{Symbol:N});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=C(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!z,"Symbol",{for:function(t){return r(j,t+="")?j[t]:j[t]=N(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var e in j)if(j[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!z,"Object",{create:function(t,e){return void 0===e?w(t):K(w(t),e)},defineProperty:V,defineProperties:K,getOwnPropertyDescriptor:q,getOwnPropertyNames:J,getOwnPropertySymbols:$}),M&&a(a.S+a.F*(!z||l(function(){var t=N();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))})),"JSON",{stringify:function(t){for(var e,n,o=[t],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=e=o[1],(k(e)||void 0!==t)&&!G(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!G(e))return e}),o[1]=e,L.apply(M,o)}}),N.prototype[P]||n(22)(N.prototype,P,N.prototype.valueOf),f(N,"Symbol"),f(Math,"Math",!0),f(o.JSON,"JSON",!0)},function(t,e,n){var o=n(43),r=n(60),i=n(57);t.exports=function(t){var e=o(t),n=r.f;if(n)for(var a,s=n(t),c=i.f,l=0;s.length>l;)c.call(t,a=s[l++])&&e.push(a);return e}},function(t,e,n){var o=n(0);o(o.S,"Object",{create:n(45)})},function(t,e,n){var o=n(0);o(o.S+o.F*!n(16),"Object",{defineProperty:n(15).f})},function(t,e,n){var o=n(0);o(o.S+o.F*!n(16),"Object",{defineProperties:n(102)})},function(t,e,n){var o=n(23),r=n(29).f;n(30)("getOwnPropertyDescriptor",function(){return function(t,e){return r(o(t),e)}})},function(t,e,n){var o=n(24),r=n(47);n(30)("getPrototypeOf",function(){return function(t){return r(o(t))}})},function(t,e,n){var o=n(24),r=n(43);n(30)("keys",function(){return function(t){return r(o(t))}})},function(t,e,n){n(30)("getOwnPropertyNames",function(){return n(103).f})},function(t,e,n){var o=n(10),r=n(39).onFreeze;n(30)("freeze",function(t){return function(e){return t&&o(e)?t(r(e)):e}})},function(t,e,n){var o=n(10),r=n(39).onFreeze;n(30)("seal",function(t){return function(e){return t&&o(e)?t(r(e)):e}})},function(t,e,n){var o=n(10),r=n(39).onFreeze;n(30)("preventExtensions",function(t){return function(e){return t&&o(e)?t(r(e)):e}})},function(t,e,n){var o=n(10);n(30)("isFrozen",function(t){return function(e){return!o(e)||!!t&&t(e)}})},function(t,e,n){var o=n(10);n(30)("isSealed",function(t){return function(e){return!o(e)||!!t&&t(e)}})},function(t,e,n){var o=n(10);n(30)("isExtensible",function(t){return function(e){return!!o(e)&&(!t||t(e))}})},function(t,e,n){var o=n(0);o(o.S+o.F,"Object",{assign:n(104)})},function(t,e,n){var o=n(0);o(o.S,"Object",{is:n(183)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var o=n(0);o(o.S,"Object",{setPrototypeOf:n(80).set})},function(t,e,n){"use strict";var o=n(61),r={};r[n(12)("toStringTag")]="z",r+""!="[object z]"&&n(19)(Object.prototype,"toString",function(){return"[object "+o(this)+"]"},!0)},function(t,e,n){var o=n(0);o(o.P,"Function",{bind:n(105)})},function(t,e,n){var o=n(15).f,r=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in r||n(16)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var o=n(10),r=n(47),i=n(12)("hasInstance"),a=Function.prototype;i in a||n(15).f(a,i,{value:function(t){if("function"!=typeof this||!o(t))return!1;if(!o(this.prototype))return t instanceof this;for(;t=r(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var o=n(0),r=n(107);o(o.G+o.F*(parseInt!=r),{parseInt:r})},function(t,e,n){var o=n(0),r=n(108);o(o.G+o.F*(parseFloat!=r),{parseFloat:r})},function(t,e,n){"use strict";var o=n(9),r=n(21),i=n(34),a=n(82),s=n(38),c=n(8),l=n(46).f,u=n(29).f,f=n(15).f,d=n(62).trim,p=o.Number,h=p,v=p.prototype,g="Number"==i(n(45)(v)),y="trim"in String.prototype,b=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,o,r,i=(e=y?e.trim():d(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+e}for(var a,c=e.slice(2),l=0,u=c.length;lr)return NaN;return parseInt(c,o)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?c(function(){v.valueOf.call(n)}):"Number"!=i(n))?a(new h(b(e)),n,p):b(e)};for(var k,m=n(16)?l(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;m.length>x;x++)r(h,k=m[x])&&!r(p,k)&&f(p,k,u(h,k));p.prototype=v,v.constructor=p,n(19)(o,"Number",p)}},function(t,e,n){"use strict";var o=n(0),r=n(36),i=n(109),a=n(83),s=1..toFixed,c=Math.floor,l=[0,0,0,0,0,0],u="Number.toFixed: incorrect invocation!",f=function(t,e){for(var n=-1,o=e;++n<6;)o+=t*l[n],l[n]=o%1e7,o=c(o/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=l[e],l[e]=c(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==l[t]){var n=String(l[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},h=function(t,e,n){return 0===e?n:e%2==1?h(t,e-1,n*t):h(t*t,e/2,n)};o(o.P+o.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,o,s,c=i(this,u),l=r(t),v="",g="0";if(l<0||l>20)throw RangeError(u);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*h(2,69,1))-69)<0?c*h(2,-e,1):c/h(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),o=l;o>=7;)f(1e7,0),o-=7;for(f(h(10,o,1),0),o=e-1;o>=23;)d(1<<23),o-=23;d(1<0?v+((s=g.length)<=l?"0."+a.call("0",l-s)+g:g.slice(0,s-l)+"."+g.slice(s-l)):v+g}})},function(t,e,n){"use strict";var o=n(0),r=n(8),i=n(109),a=1..toPrecision;o(o.P+o.F*(r(function(){return"1"!==a.call(1,void 0)})||!r(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var o=n(0);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var o=n(0),r=n(9).isFinite;o(o.S,"Number",{isFinite:function(t){return"number"==typeof t&&r(t)}})},function(t,e,n){var o=n(0);o(o.S,"Number",{isInteger:n(110)})},function(t,e,n){var o=n(0);o(o.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var o=n(0),r=n(110),i=Math.abs;o(o.S,"Number",{isSafeInteger:function(t){return r(t)&&i(t)<=9007199254740991}})},function(t,e,n){var o=n(0);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var o=n(0);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var o=n(0),r=n(108);o(o.S+o.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(t,e,n){var o=n(0),r=n(107);o(o.S+o.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(t,e,n){var o=n(0),r=n(111),i=Math.sqrt,a=Math.acosh;o(o.S+o.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:r(t-1+i(t-1)*i(t+1))}})},function(t,e,n){var o=n(0),r=Math.asinh;o(o.S+o.F*!(r&&1/r(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var o=n(0),r=Math.atanh;o(o.S+o.F*!(r&&1/r(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var o=n(0),r=n(84);o(o.S,"Math",{cbrt:function(t){return r(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var o=n(0);o(o.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var o=n(0),r=Math.exp;o(o.S,"Math",{cosh:function(t){return(r(t=+t)+r(-t))/2}})},function(t,e,n){var o=n(0),r=n(85);o(o.S+o.F*(r!=Math.expm1),"Math",{expm1:r})},function(t,e,n){var o=n(0);o(o.S,"Math",{fround:n(211)})},function(t,e,n){var o=n(84),r=Math.pow,i=r(2,-52),a=r(2,-23),s=r(2,127)*(2-a),c=r(2,-126);t.exports=Math.fround||function(t){var e,n,r=Math.abs(t),l=o(t);return rs||n!=n?l*(1/0):l*n}},function(t,e,n){var o=n(0),r=Math.abs;o(o.S,"Math",{hypot:function(t,e){for(var n,o,i=0,a=0,s=arguments.length,c=0;a0?(o=n/c)*o:n;return c===1/0?1/0:c*Math.sqrt(i)}})},function(t,e,n){var o=n(0),r=Math.imul;o(o.S+o.F*n(8)(function(){return-5!=r(4294967295,5)||2!=r.length}),"Math",{imul:function(t,e){var n=+t,o=+e,r=65535&n,i=65535&o;return 0|r*i+((65535&n>>>16)*i+r*(65535&o>>>16)<<16>>>0)}})},function(t,e,n){var o=n(0);o(o.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var o=n(0);o(o.S,"Math",{log1p:n(111)})},function(t,e,n){var o=n(0);o(o.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var o=n(0);o(o.S,"Math",{sign:n(84)})},function(t,e,n){var o=n(0),r=n(85),i=Math.exp;o(o.S+o.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(r(t)-r(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){var o=n(0),r=n(85),i=Math.exp;o(o.S,"Math",{tanh:function(t){var e=r(t=+t),n=r(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){var o=n(0);o(o.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var o=n(0),r=n(44),i=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],o=arguments.length,a=0;o>a;){if(e=+arguments[a++],r(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var o=n(0),r=n(23),i=n(18);o(o.S,"String",{raw:function(t){for(var e=r(t.raw),n=i(e.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=o(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var o=n(0),r=n(112)(!1);o(o.P,"String",{codePointAt:function(t){return r(this,t)}})},function(t,e,n){"use strict";var o=n(0),r=n(18),i=n(87),a="".endsWith;o(o.P+o.F*n(89)("endsWith"),"String",{endsWith:function(t){var e=i(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=r(e.length),s=void 0===n?o:Math.min(r(n),o),c=String(t);return a?a.call(e,c,s):e.slice(s-c.length,s)===c}})},function(t,e,n){"use strict";var o=n(0),r=n(87);o(o.P+o.F*n(89)("includes"),"String",{includes:function(t){return!!~r(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var o=n(0);o(o.P,"String",{repeat:n(83)})},function(t,e,n){"use strict";var o=n(0),r=n(18),i=n(87),a="".startsWith;o(o.P+o.F*n(89)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),o=String(t);return a?a.call(e,o,n):e.slice(n,n+o.length)===o}})},function(t,e,n){"use strict";n(20)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(20)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(20)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(20)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(20)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(20)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(20)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(20)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(20)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(20)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(20)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(20)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(20)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var o=n(0);o(o.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var o=n(0),r=n(24),i=n(38);o(o.P+o.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=r(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var o=n(0),r=n(246);o(o.P+o.F*(Date.prototype.toISOString!==r),"Date",{toISOString:r})},function(t,e,n){"use strict";var o=n(8),r=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=o(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!o(function(){i.call(new Date(NaN))})?function(){if(!isFinite(r.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),o=e<0?"-":e>9999?"+":"";return o+("00000"+Math.abs(e)).slice(o?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(t,e,n){var o=Date.prototype,r=o.toString,i=o.getTime;new Date(NaN)+""!="Invalid Date"&&n(19)(o,"toString",function(){var t=i.call(this);return t==t?r.call(this):"Invalid Date"})},function(t,e,n){var o=n(12)("toPrimitive"),r=Date.prototype;o in r||n(22)(r,o,n(249))},function(t,e,n){"use strict";var o=n(11),r=n(38);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return r(o(this),"number"!=t)}},function(t,e,n){var o=n(0);o(o.S,"Array",{isArray:n(78)})},function(t,e,n){"use strict";var o=n(32),r=n(0),i=n(24),a=n(114),s=n(90),c=n(18),l=n(91),u=n(92);r(r.S+r.F*!n(63)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,r,f,d=i(t),p="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,g=void 0!==v,y=0,b=u(d);if(g&&(v=o(v,h>2?arguments[2]:void 0,2)),null==b||p==Array&&s(b))for(n=new p(e=c(d.length));e>y;y++)l(n,y,g?v(d[y],y):d[y]);else for(f=b.call(d),n=new p;!(r=f.next()).done;y++)l(n,y,g?a(f,v,[r.value,y],!0):r.value);return n.length=y,n}})},function(t,e,n){"use strict";var o=n(0),r=n(91);o(o.S+o.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)r(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var o=n(0),r=n(23),i=[].join;o(o.P+o.F*(n(56)!=Object||!n(25)(i)),"Array",{join:function(t){return i.call(r(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var o=n(0),r=n(79),i=n(34),a=n(44),s=n(18),c=[].slice;o(o.P+o.F*n(8)(function(){r&&c.call(r)}),"Array",{slice:function(t,e){var n=s(this.length),o=i(this);if(e=void 0===e?n:e,"Array"==o)return c.call(this,t,e);for(var r=a(t,n),l=a(e,n),u=s(l-r),f=new Array(u),d=0;d1&&(o=Math.min(o,i(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}})},function(t,e,n){var o=n(0);o(o.P,"Array",{copyWithin:n(116)}),n(50)("copyWithin")},function(t,e,n){var o=n(0);o(o.P,"Array",{fill:n(93)}),n(50)("fill")},function(t,e,n){"use strict";var o=n(0),r=n(31)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),o(o.P+o.F*i,"Array",{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)("find")},function(t,e,n){"use strict";var o=n(0),r=n(31)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),o(o.P+o.F*a,"Array",{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)(i)},function(t,e,n){n(51)("Array")},function(t,e,n){var o=n(9),r=n(82),i=n(15).f,a=n(46).f,s=n(88),c=n(95),l=o.RegExp,u=l,f=l.prototype,d=/a/g,p=/a/g,h=new l(d)!==d;if(n(16)&&(!h||n(8)(function(){return p[n(12)("match")]=!1,l(d)!=d||l(p)==p||"/a/i"!=l(d,"i")}))){l=function(t,e){var n=this instanceof l,o=s(t),i=void 0===e;return!n&&o&&t.constructor===l&&i?t:r(h?new u(o&&!i?t.source:t,e):u((o=t instanceof l)?t.source:t,o&&i?c.call(t):e),n?this:f,l)};for(var v=function(t){t in l||i(l,t,{configurable:!0,get:function(){return u[t]},set:function(e){u[t]=e}})},g=a(u),y=0;g.length>y;)v(g[y++]);f.constructor=l,l.prototype=f,n(19)(o,"RegExp",l)}n(51)("RegExp")},function(t,e,n){"use strict";n(118);var o=n(11),r=n(95),i=n(16),a=/./.toString,s=function(t){n(19)(RegExp.prototype,"toString",t,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=o(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(t,e,n){n(64)("match",1,function(t,e,n){return[function(n){"use strict";var o=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,o):new RegExp(n)[e](String(o))},n]})},function(t,e,n){n(64)("replace",2,function(t,e,n){return[function(o,r){"use strict";var i=t(this),a=null==o?void 0:o[e];return void 0!==a?a.call(o,i,r):n.call(String(i),o,r)},n]})},function(t,e,n){n(64)("search",1,function(t,e,n){return[function(n){"use strict";var o=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,o):new RegExp(n)[e](String(o))},n]})},function(t,e,n){n(64)("split",2,function(t,e,o){"use strict";var r=n(88),i=o,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];o=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!r(t))return i.call(n,t,e);var o,c,l,u,f,d=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,v=void 0===e?4294967295:e>>>0,g=new RegExp(t.source,p+"g");for(s||(o=new RegExp("^"+g.source+"$(?!\\s)",p));(c=g.exec(n))&&!((l=c.index+c[0].length)>h&&(d.push(n.slice(h,c.index)),!s&&c.length>1&&c[0].replace(o,function(){for(f=1;f1&&c.index=v));)g.lastIndex===c.index&&g.lastIndex++;return h===n.length?!u&&g.test("")||d.push(""):d.push(n.slice(h)),d.length>v?d.slice(0,v):d}}else"0".split(void 0,0).length&&(o=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,r){var i=t(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,r):o.call(String(i),n,r)},o]})},function(t,e,n){var o=n(9),r=n(96).set,i=o.MutationObserver||o.WebKitMutationObserver,a=o.process,s=o.Promise,c="process"==n(34)(a);t.exports=function(){var t,e,n,l=function(){var o,r;for(c&&(o=a.domain)&&o.exit();t;){r=t.fn,t=t.next;try{r()}catch(o){throw t?n():e=void 0,o}}e=void 0,o&&o.enter()};if(c)n=function(){a.nextTick(l)};else if(!i||o.navigator&&o.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(l)}}else n=function(){r.call(o,l)};else{var f=!0,d=document.createTextNode("");new i(l).observe(d,{characterData:!0}),n=function(){d.data=f=!f}}return function(o){var r={fn:o,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var o=n(122),r=n(54);t.exports=n(68)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=o.getEntry(r(this,"Map"),t);return e&&e.v},set:function(t,e){return o.def(r(this,"Map"),0===t?0:t,e)}},o,!0)},function(t,e,n){"use strict";var o=n(122),r=n(54);t.exports=n(68)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return o.def(r(this,"Set"),t=0===t?0:t,t)}},o)},function(t,e,n){"use strict";var o,r=n(31)(0),i=n(19),a=n(39),s=n(104),c=n(123),l=n(10),u=n(8),f=n(54),d=a.getWeak,p=Object.isExtensible,h=c.ufstore,v={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(l(t)){var e=d(t);return!0===e?h(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(f(this,"WeakMap"),t,e)}},b=t.exports=n(68)("WeakMap",g,y,c,!0,!0);u(function(){return 7!=(new b).set((Object.freeze||Object)(v),7).get(v)})&&(s((o=c.getConstructor(g,"WeakMap")).prototype,y),a.NEED=!0,r(["delete","has","get","set"],function(t){var e=b.prototype,n=e[t];i(e,t,function(e,r){if(l(e)&&!p(e)){this._f||(this._f=new o);var i=this._f[t](e,r);return"set"==t?this:i}return n.call(this,e,r)})}))},function(t,e,n){"use strict";var o=n(123),r=n(54);n(68)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return o.def(r(this,"WeakSet"),t,!0)}},o,!1,!0)},function(t,e,n){"use strict";var o=n(0),r=n(69),i=n(97),a=n(11),s=n(44),c=n(18),l=n(10),u=n(9).ArrayBuffer,f=n(66),d=i.ArrayBuffer,p=i.DataView,h=r.ABV&&u.isView,v=d.prototype.slice,g=r.VIEW;o(o.G+o.W+o.F*(u!==d),{ArrayBuffer:d}),o(o.S+o.F*!r.CONSTR,"ArrayBuffer",{isView:function(t){return h&&h(t)||l(t)&&g in t}}),o(o.P+o.U+o.F*n(8)(function(){return!new d(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,o=s(t,n),r=s(void 0===e?n:e,n),i=new(f(this,d))(c(r-o)),l=new p(this),u=new p(i),h=0;o=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),o(o.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){var o=n(29),r=n(47),i=n(21),a=n(0),s=n(10),c=n(11);a(a.S,"Reflect",{get:function t(e,n){var a,l,u=arguments.length<3?e:arguments[2];return c(e)===u?e[n]:(a=o.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(u):void 0:s(l=r(e))?t(l,n,u):void 0}})},function(t,e,n){var o=n(29),r=n(0),i=n(11);r(r.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return o.f(i(t),e)}})},function(t,e,n){var o=n(0),r=n(47),i=n(11);o(o.S,"Reflect",{getPrototypeOf:function(t){return r(i(t))}})},function(t,e,n){var o=n(0);o(o.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var o=n(0),r=n(11),i=Object.isExtensible;o(o.S,"Reflect",{isExtensible:function(t){return r(t),!i||i(t)}})},function(t,e,n){var o=n(0);o(o.S,"Reflect",{ownKeys:n(125)})},function(t,e,n){var o=n(0),r=n(11),i=Object.preventExtensions;o(o.S,"Reflect",{preventExtensions:function(t){r(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){var o=n(15),r=n(29),i=n(47),a=n(21),s=n(0),c=n(40),l=n(11),u=n(10);s(s.S,"Reflect",{set:function t(e,n,s){var f,d,p=arguments.length<4?e:arguments[3],h=r.f(l(e),n);if(!h){if(u(d=i(e)))return t(d,n,s,p);h=c(0)}if(a(h,"value")){if(!1===h.writable||!u(p))return!1;if(f=r.f(p,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,o.f(p,n,f)}else o.f(p,n,c(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(t,e,n){var o=n(0),r=n(80);r&&o(o.S,"Reflect",{setPrototypeOf:function(t,e){r.check(t,e);try{return r.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(310),t.exports=n(17).Array.includes},function(t,e,n){"use strict";var o=n(0),r=n(59)(!0);o(o.P,"Array",{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(50)("includes")},function(t,e,n){n(312),t.exports=n(17).String.padStart},function(t,e,n){"use strict";var o=n(0),r=n(126),i=n(67);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(314),t.exports=n(17).String.padEnd},function(t,e,n){"use strict";var o=n(0),r=n(126),i=n(67);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(316),t.exports=n(75).f("asyncIterator")},function(t,e,n){n(100)("asyncIterator")},function(t,e,n){n(318),t.exports=n(17).Object.getOwnPropertyDescriptors},function(t,e,n){var o=n(0),r=n(125),i=n(23),a=n(29),s=n(91);o(o.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,o=i(t),c=a.f,l=r(o),u={},f=0;l.length>f;)void 0!==(n=c(o,e=l[f++]))&&s(u,e,n);return u}})},function(t,e,n){n(320),t.exports=n(17).Object.values},function(t,e,n){var o=n(0),r=n(127)(!1);o(o.S,"Object",{values:function(t){return r(t)}})},function(t,e,n){n(322),t.exports=n(17).Object.entries},function(t,e,n){var o=n(0),r=n(127)(!0);o(o.S,"Object",{entries:function(t){return r(t)}})},function(t,e,n){"use strict";n(119),n(324),t.exports=n(17).Promise.finally},function(t,e,n){"use strict";var o=n(0),r=n(17),i=n(9),a=n(66),s=n(121);o(o.P+o.R,"Promise",{finally:function(t){var e=a(this,r.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){n(326),n(327),n(328),t.exports=n(17)},function(t,e,n){var o=n(9),r=n(0),i=n(67),a=[].slice,s=/MSIE .\./.test(i),c=function(t){return function(e,n){var o=arguments.length>2,r=!!o&&a.call(arguments,2);return t(o?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,n)}};r(r.G+r.B+r.F*s,{setTimeout:c(o.setTimeout),setInterval:c(o.setInterval)})},function(t,e,n){var o=n(0),r=n(96);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(t,e,n){for(var o=n(94),r=n(43),i=n(19),a=n(9),s=n(22),c=n(49),l=n(12),u=l("iterator"),f=l("toStringTag"),d=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=r(p),v=0;v=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(t){var e=document.createDocumentFragment();Array.isArray(t)||(t=[t]),t.forEach(function(t){var n=t instanceof Node;e.appendChild(n?t:document.createTextNode(String(t)))}),this.insertBefore(e,this.firstChild)})})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(55),n(26),n(27),n(1),n(2),n(13),n(14)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,c,l,u){"use strict";var f=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),c=f(c),l=f(l),u=f(u);var d=n(342),p=[];d.keys().forEach(function(t){t.match(/^\.\/[^_][\w\/]*\.([tj])s$/)&&p.push(d(t))});var h=function(){function t(e){var n,o,r=this;(0,s.default)(this,t),this.moduleInstances={},this.isReady=new Promise(function(t,e){n=t,o=e}),Promise.resolve().then((0,a.default)(i.default.mark(function t(){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r.configuration=e,t.next=3,r.validate();case 3:return t.next=5,r.init();case 5:return t.next=7,r.start();case 7:u.default.log("I'm ready! (ノ◕ヮ◕)ノ*:・゚✧","log","","color: #E24A75"),setTimeout(function(){if(r.configuration.autofocus){var t=r.moduleInstances,e=t.BlockManager,o=t.Caret;o.setToBlock(e.blocks[0],o.positions.START)}r.moduleInstances.UI.removeLoader(),n()},500);case 9:case"end":return t.stop()}},t)}))).catch(function(t){u.default.log("Editor.js is not ready because of ".concat(t),"error"),o(t)})}var e,n;return(0,c.default)(t,[{key:"validate",value:(n=(0,a.default)(i.default.mark(function t(){var e,n,o;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.config,n=e.holderId,o=e.holder,!n||!o){t.next=3;break}throw Error("«holderId» and «holder» param can't assign at the same time.");case 3:if("string"!=typeof o||l.default.get(o)){t.next=5;break}throw Error("element with ID «".concat(o,"» is missing. Pass correct holder's ID."));case 5:if(!o||"object"!==(0,r.default)(o)||l.default.isElement(o)){t.next=7;break}throw Error("holder as HTMLElement if provided must be inherit from Element class.");case 7:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"init",value:function(){this.constructModules(),this.configureModules()}},{key:"start",value:(e=(0,a.default)(i.default.mark(function t(){var e,n=this;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=["Tools","UI","BlockManager","Paste","DragNDrop","ModificationsObserver","BlockSelection","RectangleSelection"],t.next=3,e.reduce(function(t,e){return t.then((0,a.default)(i.default.mark(function t(){return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.moduleInstances[e].prepare();case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),u.default.log("Module ".concat(e," was skipped because of %o"),"warn",t.t0);case 8:case"end":return t.stop()}},t,null,[[0,5]])})))},Promise.resolve());case 3:return t.abrupt("return",this.moduleInstances.Renderer.render(this.config.data.blocks));case 4:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"constructModules",value:function(){var t=this;p.forEach(function(e){try{t.moduleInstances[e.displayName]=new e({config:t.configuration})}catch(t){u.default.log("Module ".concat(e.displayName," skipped because"),"warn",t)}})}},{key:"configureModules",value:function(){for(var t in this.moduleInstances)this.moduleInstances.hasOwnProperty(t)&&(this.moduleInstances[t].state=this.getModulesDiff(t))}},{key:"getModulesDiff",value:function(t){var e={};for(var n in this.moduleInstances)n!==t&&(e[n]=this.moduleInstances[n]);return e}},{key:"configuration",set:function(t){"object"!==(0,r.default)(t)&&(t={holder:t}),t.holderId&&!t.holder&&(t.holder=t.holderId,t.holderId=null,u.default.log("holderId property will deprecated in next major release, use holder property instead.","warn")),this.config=t,null==this.config.holder&&(this.config.holder="editorjs"),this.config.initialBlock=this.config.initialBlock||"paragraph",this.config.minHeight=this.config.minHeight||300;var e={type:this.config.initialBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=!!this.config.hideToolbar&&this.config.hideToolbar,this.config.tools=this.config.tools||{},this.config.data=this.config.data||{},this.config.onReady=this.config.onReady||function(){},this.config.onChange=this.config.onChange||function(){},u.default.isEmpty(this.config.data)?(this.config.data={},this.config.data.blocks=[e]):this.config.data.blocks&&0!==this.config.data.blocks.length||(this.config.data.blocks=[e])},get:function(){return this.config}}]),t}();o.default=h,h.displayName="Core",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o=function(){return this||"object"==typeof self&&self}()||Function("return this")(),r=o.regeneratorRuntime&&Object.getOwnPropertyNames(o).indexOf("regeneratorRuntime")>=0,i=r&&o.regeneratorRuntime;if(o.regeneratorRuntime=void 0,t.exports=n(128),r)o.regeneratorRuntime=i;else try{delete o.regeneratorRuntime}catch(t){o.regeneratorRuntime=void 0}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?Math.abs(s.top)-Math.abs(c.top):window.innerHeight-Math.abs(s.top)+Math.abs(c.top),window.scrollBy(0,-1*r),this.api.blocks.swap(o,o-1)}}]),t}();o.default=c,c.displayName="MoveUpTune",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var c=function(){function t(e){var n=this,o=e.api;(0,r.default)(this,t),this.CSS={wrapper:"ass",button:"ce-settings__button",buttonDelete:"ce-settings__button--delete",buttonConfirm:"ce-settings__button--confirm"},this.nodes={button:null},this.api=o,this.resetConfirmation=function(){n.setConfirmation(!1)}}return(0,i.default)(t,[{key:"render",value:function(){var t=this;return this.nodes.button=a.default.make("div",[this.CSS.button,this.CSS.buttonDelete],{}),this.nodes.button.appendChild(a.default.svg("cross",12,12)),this.api.listeners.on(this.nodes.button,"click",function(e){return t.handleClick(e)},!1),this.nodes.button}},{key:"handleClick",value:function(t){this.needConfirmation?(this.api.events.off("block-settings-closed",this.resetConfirmation),this.api.blocks.delete(),this.api.toolbar.close(),t.stopPropagation()):(this.setConfirmation(!0),this.api.events.on("block-settings-closed",this.resetConfirmation))}},{key:"setConfirmation",value:function(t){this.needConfirmation=t,this.nodes.button.classList.add(this.CSS.buttonConfirm)}}]),t}();o.default=c,c.displayName="DeleteTune",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var c=function(){function t(e){var n=e.api;(0,r.default)(this,t),this.CSS={button:"ce-settings__button",wrapper:"ce-tune-move-down",animation:"wobble"},this.api=n}return(0,i.default)(t,[{key:"render",value:function(){var t=this,e=a.default.make("div",[this.CSS.button,this.CSS.wrapper],{});return e.appendChild(a.default.svg("arrow-down",14,14)),this.api.listeners.on(e,"click",function(n){return t.handleClick(n,e)},!1),e}},{key:"handleClick",value:function(t,e){var n=this,o=this.api.blocks.getCurrentBlockIndex();if(o===this.api.blocks.getBlocksCount()-1)return e.classList.add(this.CSS.animation),void window.setTimeout(function(){e.classList.remove(n.CSS.animation)},500);var r=this.api.blocks.getBlockByIndex(o+1),i=r.getBoundingClientRect(),a=Math.abs(window.innerHeight-r.offsetHeight);i.top2&&void 0!==arguments[2]&&arguments[2];if(this.length){t>this.length&&(t=this.length),n&&this.blocks[t].holder.remove();var o=n?1:0;if(this.blocks.splice(t,o,e),t>0){var r=this.blocks[t-1];r.holder.insertAdjacentElement("afterend",e.holder)}else{var i=this.blocks[t+1];i?i.holder.insertAdjacentElement("beforebegin",e.holder):this.workingArea.appendChild(e.holder)}}else this.push(e)}},{key:"remove",value:function(t){isNaN(t)&&(t=this.length-1),this.blocks[t].holder.remove(),this.blocks.splice(t,1)}},{key:"removeAll",value:function(){this.workingArea.innerHTML="",this.blocks.length=0}},{key:"insertAfter",value:function(t,e){var n=this.blocks.indexOf(t);this.insert(n+1,e)}},{key:"get",value:function(t){return this.blocks[t]}},{key:"indexOf",value:function(t){return this.blocks.indexOf(t)}}]),t}();o.default=l,l.displayName="Blocks",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){window,t.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){"use strict";n(1), -/*! - * Codex JavaScript Notification module - * https://github.com/codex-team/js-notifier - */ -t.exports=function(){var t=n(6),e=null;return{show:function(n){if(n.message){!function(){if(e)return!0;e=t.getWrapper(),document.body.appendChild(e)}();var o=null,r=n.time||8e3;switch(n.type){case"confirm":o=t.confirm(n);break;case"prompt":o=t.prompt(n);break;default:o=t.alert(n),window.setTimeout(function(){o.remove()},r)}e.appendChild(o),o.classList.add("cdx-notify--bounce-in")}}}}()},function(t,e,n){var o=n(2);"string"==typeof o&&(o=[[t.i,o,""]]),n(4)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(t.exports=o.locals)},function(t,e,n){(t.exports=n(3)(!1)).push([t.i,'.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:\'\';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:\'\';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}',""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n,o=t[1]||"",r=t[3];if(!r)return o;if(e&&"function"==typeof btoa){var i=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[o].concat(a).concat([i]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r=0&&u.splice(e,1)}function g(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),h(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function b(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var a=l++;n=c||(c=g(e)),o=x.bind(null,n,a,!1),r=x.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),h(t,e),e}(e),o=function(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(e),o=function(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){v(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var o=[],r=0;r0;)e.insertBefore(c.childNodes[0],c);e.removeChild(c),this._sanitize(t,e);break}for(var v=0;v 0 && arguments[0] !== undefined ? arguments[0] : 'right'; + this.focusedButtonIndex = _dom.default.leafNodesAndReturnIndex(this.blockTunesButtons, this.focusedButtonIndex, direction, this.CSS.focusedButton); + } + /** + * Returns active button HTML element + * @return {HTMLElement} + */ + + }, { + key: "addToolSettings", + + /** + * Add Tool's settings + */ + value: function addToolSettings() { + if (typeof this.Editor.BlockManager.currentBlock.tool.renderSettings === 'function') { + _dom.default.append(this.nodes.toolSettings, this.Editor.BlockManager.currentBlock.tool.renderSettings()); + } + } + /** + * Add default settings + */ + + }, { + key: "addDefaultSettings", + value: function addDefaultSettings() { + _dom.default.append(this.nodes.defaultSettings, this.Editor.BlockManager.currentBlock.renderTunes()); + } + }, { + key: "events", + get: function get() { + return { + opened: 'block-settings-opened', + closed: 'block-settings-closed' + }; + } + /** + * Block Settings CSS + * @return {{wrapper, wrapperOpened, toolSettings, defaultSettings, button}} + */ + + }, { + key: "CSS", + get: function get() { + return { + // Settings Panel + wrapper: 'ce-settings', + wrapperOpened: 'ce-settings--opened', + toolSettings: 'ce-settings__plugin-zone', + defaultSettings: 'ce-settings__default-zone', + button: 'ce-settings__button', + focusedButton: 'ce-settings__button--focused', + focusedButtonAnimated: 'ce-settings__button--focused-animated' + }; + } + /** + * Is Block Settings opened or not + * @returns {boolean} + */ + + }, { + key: "opened", + get: function get() { + return this.nodes.wrapper.classList.contains(this.CSS.wrapperOpened); + } + }, { + key: "blockTunesButtons", + get: function get() { + var _this2 = this; + + /** + * Return from cache + * if exists + */ + if (this.buttons.length !== 0) { + return this.buttons; + } + + var toolSettings = this.nodes.toolSettings.querySelectorAll(".".concat(this.Editor.StylesAPI.classes.settingsButton)); + var defaultSettings = this.nodes.defaultSettings.querySelectorAll(".".concat(this.CSS.button)); + toolSettings.forEach(function (item, index) { + _this2.buttons.push(item); + + if (item.classList.contains(_this2.CSS.focusedButton)) { + _this2.focusedButtonIndex = index; + } + }); + defaultSettings.forEach(function (item) { + _this2.buttons.push(item); + }); + return this.buttons; + } + }, { + key: "focusedButton", + get: function get() { + if (this.focusedButtonIndex === -1) { + return null; + } + + return this.buttons[this.focusedButtonIndex]; + } + }]); + return BlockSettings; + }(_module.default); + + _exports.default = BlockSettings; + BlockSettings.displayName = "BlockSettings"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/toolbar/conversion.ts": +/*!******************************************************!*\ + !*** ./src/components/modules/toolbar/conversion.ts ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _dom, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + + /** + * Block Converter + */ + var ConversionToolbar = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(ConversionToolbar, _Module); + + function ConversionToolbar() { + var _this; + + (0, _classCallCheck2.default)(this, ConversionToolbar); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ConversionToolbar).apply(this, arguments)); + /** + * HTML Elements used for UI + */ + + _this.nodes = { + wrapper: null, + tools: null + }; + /** + * Conversion Toolbar open/close state + * @type {boolean} + */ + + _this.opened = false; + /** + * Focused button index + * -1 equals no chosen Tool + * @type {number} + */ + + _this.focusedButtonIndex = -1; + /** + * Available tools + */ + + _this.tools = {}; + return _this; + } + /** + * CSS getter + */ + + + (0, _createClass2.default)(ConversionToolbar, [{ + key: "make", + + /** + * Create UI of Conversion Toolbar + */ + value: function make() { + this.nodes.wrapper = _dom.default.make('div', ConversionToolbar.CSS.conversionToolbarWrapper); + this.nodes.tools = _dom.default.make('div', ConversionToolbar.CSS.conversionToolbarTools); + /** + * Add Tools that has 'import' method + */ + + this.addTools(); + + _dom.default.append(this.nodes.wrapper, this.nodes.tools); + + _dom.default.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper); + } + /** + * Try to show Conversion Toolbar near passed Block + * @param {Block} block - block to convert + */ + + }, { + key: "tryToShow", + value: function tryToShow(block) { + var hasExportConfig = block.class.conversionConfig && block.class.conversionConfig.export; + + if (!hasExportConfig) { + return; + } + + var currentToolName = block.name; + /** + * Focus current tool in conversion toolbar + */ + + if (this.tools[currentToolName]) { + /** + * Drop previous active button before moving + */ + if (this.focusedButton && this.focusedButton.classList.contains(ConversionToolbar.CSS.conversionToolActive)) { + this.focusedButton.classList.remove(ConversionToolbar.CSS.conversionToolActive); + } + + this.tools[currentToolName].classList.add(ConversionToolbar.CSS.conversionToolActive); + } + + this.move(block); + + if (!this.opened) { + this.open(); + } + } + /** + * Shows Conversion Toolbar + */ + + }, { + key: "open", + value: function open() { + this.opened = true; + this.nodes.wrapper.classList.add(ConversionToolbar.CSS.conversionToolbarShowed); + } + /** + * Closes Conversion Toolbar + */ + + }, { + key: "close", + value: function close() { + this.opened = false; + this.nodes.wrapper.classList.remove(ConversionToolbar.CSS.conversionToolbarShowed); + this.dropFocusedButton(); + } + /** + * Leaf tools by Tab + * @todo use class with tool iterator + */ + + }, { + key: "leaf", + value: function leaf() { + var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'right'; + var toolsElements = Array.from(this.nodes.tools.childNodes); + this.focusedButtonIndex = _dom.default.leafNodesAndReturnIndex(toolsElements, this.focusedButtonIndex, direction, ConversionToolbar.CSS.conversionToolFocused); + } + /** + * Returns focused tool as HTML element + * @return {HTMLElement} + */ + + }, { + key: "dropFocusedButton", + + /** + * Drops focused button + */ + value: function dropFocusedButton() { + Object.values(this.tools).forEach(function (tool) { + tool.classList.remove(ConversionToolbar.CSS.conversionToolActive, ConversionToolbar.CSS.conversionToolFocused); + }); + this.focusedButtonIndex = -1; + } + /** + * Replaces one Block with another + * For that Tools must provide import/export methods + * + * @param {string} replacingToolName + */ + + }, { + key: "replaceWithBlock", + value: function () { + var _replaceWithBlock = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(replacingToolName) { + var _this2 = this; + + var currentBlockClass, currentBlockName, savedBlock, blockData, replacingTool, exportData, exportProp, cleaned, newBlockData, importProp; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + /** + * At first, we get current Block data + * @type {BlockToolConstructable} + */ + currentBlockClass = this.Editor.BlockManager.currentBlock.class; + currentBlockName = this.Editor.BlockManager.currentBlock.name; + _context.next = 4; + return this.Editor.BlockManager.currentBlock.save(); + + case 4: + savedBlock = _context.sent; + blockData = savedBlock.data; + /** + * When current Block name is equals to the replacing tool Name, + * than convert this Block back to the initial Block + */ + + if (currentBlockName === replacingToolName) { + replacingToolName = this.config.initialBlock; + } + /** + * Getting a class of replacing Tool + * @type {BlockToolConstructable} + */ + + + replacingTool = this.Editor.Tools.toolsClasses[replacingToolName]; + /** + * Export property can be: + * 1) Function — Tool defines which data to return + * 2) String — the name of saved property + * + * In both cases returning value must be a string + */ + + exportData = ''; + exportProp = currentBlockClass.conversionConfig.export; + + if (!(typeof exportProp === 'function')) { + _context.next = 14; + break; + } + + exportData = exportProp(blockData); + _context.next = 20; + break; + + case 14: + if (!(typeof exportProp === 'string')) { + _context.next = 18; + break; + } + + exportData = blockData[exportProp]; + _context.next = 20; + break; + + case 18: + _utils.default.log('Conversion «export» property must be a string or function. ' + 'String means key of saved data object to export. Function should export processed string to export.'); + + return _context.abrupt("return"); + + case 20: + /** + * Clean exported data with replacing sanitizer config + */ + cleaned = this.Editor.Sanitizer.clean(exportData, replacingTool.sanitize); + /** + * «import» property can be Function or String + * function — accept imported string and compose tool data object + * string — the name of data field to import + */ + + newBlockData = {}; + importProp = replacingTool.conversionConfig.import; + + if (!(typeof importProp === 'function')) { + _context.next = 27; + break; + } + + newBlockData = importProp(cleaned); + _context.next = 33; + break; + + case 27: + if (!(typeof importProp === 'string')) { + _context.next = 31; + break; + } + + newBlockData[importProp] = cleaned; + _context.next = 33; + break; + + case 31: + _utils.default.log('Conversion «import» property must be a string or function. ' + 'String means key of tool data to import. Function accepts a imported string and return composed tool data.'); + + return _context.abrupt("return"); + + case 33: + this.Editor.BlockManager.replace(replacingToolName, newBlockData); + this.Editor.BlockSelection.clearSelection(); + this.close(); + + _utils.default.delay(function () { + _this2.Editor.Caret.setToBlock(_this2.Editor.BlockManager.currentBlock); + }, 10)(); + + case 37: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + return function replaceWithBlock(_x) { + return _replaceWithBlock.apply(this, arguments); + }; + }() + /** + * Move Conversion Toolbar to the working Block + */ + + }, { + key: "move", + value: function move(block) { + var blockRect = block.pluginsContent.getBoundingClientRect(); + var wrapperRect = this.Editor.UI.nodes.wrapper.getBoundingClientRect(); + var newCoords = { + x: blockRect.left - wrapperRect.left, + y: blockRect.top + blockRect.height - wrapperRect.top + }; + this.nodes.wrapper.style.left = Math.floor(newCoords.x) + 'px'; + this.nodes.wrapper.style.top = Math.floor(newCoords.y) + 'px'; + } + /** + * Iterates existing Tools and inserts to the ConversionToolbar + * if tools have ability to import + */ + + }, { + key: "addTools", + value: function addTools() { + var tools = this.Editor.Tools.blockTools; + + for (var toolName in tools) { + if (!tools.hasOwnProperty(toolName)) { + continue; + } + + var api = this.Editor.Tools.apiSettings; + var toolClass = tools[toolName]; + var toolToolboxSettings = toolClass[api.TOOLBOX]; + var conversionConfig = toolClass[api.CONVERSION_CONFIG]; + /** + * Skip tools that don't pass 'toolbox' property + */ + + if (_utils.default.isEmpty(toolToolboxSettings) || !toolToolboxSettings.icon) { + continue; + } + /** + * Skip tools without «import» rule specified + */ + + + if (!conversionConfig || !conversionConfig.import) { + continue; + } + + this.addTool(toolName, toolToolboxSettings.icon); + } + } + /** + * Add tool to the Conversion Toolbar + */ + + }, { + key: "addTool", + value: function addTool(toolName, toolIcon) { + var _this3 = this; + + var tool = _dom.default.make('div', [ConversionToolbar.CSS.conversionTool]); + + tool.dataset.tool = toolName; + tool.innerHTML = toolIcon; + + _dom.default.append(this.nodes.tools, tool); + + this.tools[toolName] = tool; + this.Editor.Listeners.on(tool, 'click', + /*#__PURE__*/ + (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2() { + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return _this3.replaceWithBlock(toolName); + + case 2: + case "end": + return _context2.stop(); + } + } + }, _callee2); + }))); + } + }, { + key: "focusedButton", + get: function get() { + if (this.focusedButtonIndex === -1) { + return null; + } + + return this.nodes.tools.childNodes[this.focusedButtonIndex]; + } + }], [{ + key: "CSS", + get: function get() { + return { + conversionToolbarWrapper: 'ce-conversion-toolbar', + conversionToolbarShowed: 'ce-conversion-toolbar--showed', + conversionToolbarTools: 'ce-conversion-toolbar__tools', + conversionTool: 'ce-conversion-tool', + conversionToolFocused: 'ce-conversion-tool--focused', + conversionToolActive: 'ce-conversion-tool--active' + }; + } + }]); + return ConversionToolbar; + }(_module.default); + + _exports.default = ConversionToolbar; + ConversionToolbar.displayName = "ConversionToolbar"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/toolbar/index.ts": +/*!*************************************************!*\ + !*** ./src/components/modules/toolbar/index.ts ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../../dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + + /** + * + * «Toolbar» is the node that moves up/down over current block + * + * ______________________________________ Toolbar ____________________________________________ + * | | + * | ..................... Content .................... ......... Block Actions .......... | + * | . . . . | + * | . . . [Open Settings] . | + * | . [Plus Button] [Toolbox: {Tool1}, {Tool2}] . . . | + * | . . . [Settings Panel] . | + * | .................................................. .................................. | + * | | + * |___________________________________________________________________________________________| + * + * + * Toolbox — its an Element contains tools buttons. Can be shown by Plus Button. + * + * _______________ Toolbox _______________ + * | | + * | [Header] [Image] [List] [Quote] ... | + * |_______________________________________| + * + * + * Settings Panel — is an Element with block settings: + * + * ____ Settings Panel ____ + * | ...................... | + * | . Tool Settings . | + * | ...................... | + * | . Default Settings . | + * | ...................... | + * |________________________| + * + * + * @class + * @classdesc Toolbar module + * + * @typedef {Toolbar} Toolbar + * @property {Object} nodes + * @property {Element} nodes.wrapper - Toolbar main element + * @property {Element} nodes.content - Zone with Plus button and toolbox. + * @property {Element} nodes.actions - Zone with Block Settings and Remove Button + * @property {Element} nodes.blockActionsButtons - Zone with Block Buttons: [Settings] + * @property {Element} nodes.plusButton - Button that opens or closes Toolbox + * @property {Element} nodes.toolbox - Container for tools + * @property {Element} nodes.settingsToggler - open/close Settings Panel button + * @property {Element} nodes.settings - Settings Panel + * @property {Element} nodes.pluginSettings - Plugin Settings section of Settings Panel + * @property {Element} nodes.defaultSettings - Default Settings section of Settings Panel + */ + var Toolbar = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Toolbar, _Module); + + function Toolbar() { + var _this; + + (0, _classCallCheck2.default)(this, Toolbar); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Toolbar).apply(this, arguments)); + /** + * HTML Elements used for Toolbar UI + */ + + _this.nodes = { + wrapper: null, + content: null, + actions: null, + // Content Zone + plusButton: null, + // Actions Zone + blockActionsButtons: null, + settingsToggler: null + }; + return _this; + } + /** + * CSS styles + * @return {Object} + */ + + + (0, _createClass2.default)(Toolbar, [{ + key: "make", + + /** + * Makes toolbar + */ + value: function make() { + var _this2 = this; + + this.nodes.wrapper = _dom.default.make('div', this.CSS.toolbar); + /** + * Make Content Zone and Actions Zone + */ + + ['content', 'actions'].forEach(function (el) { + _this2.nodes[el] = _dom.default.make('div', _this2.CSS[el]); + + _dom.default.append(_this2.nodes.wrapper, _this2.nodes[el]); + }); + /** + * Fill Content Zone: + * - Plus Button + * - Toolbox + */ + + this.nodes.plusButton = _dom.default.make('div', this.CSS.plusButton); + /** + * Add events to show/hide tooltip for plus button + */ + + this.Editor.Listeners.on(this.nodes.plusButton, 'mouseenter', function () { + var tooltip = _this2.Editor.Toolbox.nodes.tooltip; + var fragment = document.createDocumentFragment(); + fragment.appendChild(document.createTextNode('Add')); + fragment.appendChild(_dom.default.make('div', _this2.Editor.Toolbox.CSS.tooltipShortcut, { + textContent: '⇥ Tab' + })); + tooltip.style.left = '-17px'; + tooltip.innerHTML = ''; + tooltip.appendChild(fragment); + tooltip.classList.add(_this2.Editor.Toolbox.CSS.tooltipShown); + }); + this.Editor.Listeners.on(this.nodes.plusButton, 'mouseleave', function () { + _this2.Editor.Toolbox.hideTooltip(); + }); + + _dom.default.append(this.nodes.plusButton, _dom.default.svg('plus', 14, 14)); + + _dom.default.append(this.nodes.content, this.nodes.plusButton); + + this.Editor.Listeners.on(this.nodes.plusButton, 'click', function () { + return _this2.plusButtonClicked(); + }, false); + /** + * Make a Toolbox + */ + + this.Editor.Toolbox.make(); + /** + * Fill Actions Zone: + * - Settings Toggler + * - Remove Block Button + * - Settings Panel + */ + + this.nodes.blockActionsButtons = _dom.default.make('div', this.CSS.blockActionsButtons); + this.nodes.settingsToggler = _dom.default.make('span', this.CSS.settingsToggler); + + var settingsIcon = _dom.default.svg('dots', 18, 4); + + _dom.default.append(this.nodes.settingsToggler, settingsIcon); + + _dom.default.append(this.nodes.blockActionsButtons, this.nodes.settingsToggler); + + _dom.default.append(this.nodes.actions, this.nodes.blockActionsButtons); + /** + * Make and append Settings Panel + */ + + + this.Editor.BlockSettings.make(); + + _dom.default.append(this.nodes.actions, this.Editor.BlockSettings.nodes.wrapper); + /** + * Append toolbar to the Editor + */ + + + _dom.default.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper); + /** + * Bind events on the Toolbar elements + */ + + + this.bindEvents(); + } + /** + * Move Toolbar to the Current Block + * @param {Boolean} forceClose - force close Toolbar Settings and Toolbar + */ + + }, { + key: "move", + value: function move() { + var forceClose = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + if (forceClose) { + /** Close Toolbox when we move toolbar */ + this.Editor.Toolbox.close(); + this.Editor.BlockSettings.close(); + } + + var currentBlock = this.Editor.BlockManager.currentBlock.holder; + /** + * If no one Block selected as a Current + */ + + if (!currentBlock) { + return; + } + + var isMobile = this.Editor.UI.isMobile; + var blockHeight = currentBlock.offsetHeight; + var toolbarY = currentBlock.offsetTop; + /** + * 1) On desktop — Toolbar at the top of Block, Plus/Toolbox moved the center of Block + * 2) On mobile — Toolbar at the bottom of Block + */ + + if (!isMobile) { + var contentOffset = Math.floor(blockHeight / 2); + this.nodes.plusButton.style.transform = "translate3d(0, calc(".concat(contentOffset, "px - 50%), 0)"); + this.Editor.Toolbox.nodes.toolbox.style.transform = "translate3d(0, calc(".concat(contentOffset, "px - 50%), 0)"); + } else { + toolbarY += blockHeight; + } + /** + * Move Toolbar to the Top coordinate of Block + */ + + + this.nodes.wrapper.style.transform = "translate3D(0, ".concat(Math.floor(toolbarY), "px, 0)"); + } + /** + * Open Toolbar with Plus Button and Actions + * @param {boolean} withBlockActions - by default, Toolbar opens with Block Actions. + * This flag allows to open Toolbar without Actions. + * @param {boolean} needToCloseToolbox - by default, Toolbar will be moved with opening + * (by click on Block, or by enter) + * with closing Toolbox and Block Settings + * This flag allows to open Toolbar with Toolbox + */ + + }, { + key: "open", + value: function open() { + var _this3 = this; + + var withBlockActions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var needToCloseToolbox = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + setTimeout(function () { + _this3.move(needToCloseToolbox); + + _this3.nodes.wrapper.classList.add(_this3.CSS.toolbarOpened); + + if (withBlockActions) { + _this3.blockActions.show(); + } else { + _this3.blockActions.hide(); + } + }, 50); + } + /** + * returns toolbar opened state + * @return {Boolean} + */ + + }, { + key: "close", + + /** + * Close the Toolbar + */ + value: function close() { + this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened); + /** Close components */ + + this.blockActions.hide(); + this.Editor.Toolbox.close(); + this.Editor.BlockSettings.close(); + } + /** + * Plus Button public methods + * @return {{hide: function(): void, show: function(): void}} + */ + + }, { + key: "plusButtonClicked", + + /** + * Handler for Plus Button + * @param {MouseEvent} event + */ + value: function plusButtonClicked() { + this.Editor.Toolbox.toggle(); + } + /** + * Bind events on the Toolbar Elements: + * - Block Settings + */ + + }, { + key: "bindEvents", + value: function bindEvents() { + var _this4 = this; + + /** + * Settings toggler + */ + this.Editor.Listeners.on(this.nodes.settingsToggler, 'click', function () { + return _this4.settingsTogglerClicked(); + }); + } + /** + * Clicks on the Block Settings toggler + */ + + }, { + key: "settingsTogglerClicked", + value: function settingsTogglerClicked() { + if (this.Editor.BlockSettings.opened) { + this.Editor.BlockSettings.close(); + } else { + this.Editor.BlockSettings.open(); + } + } + }, { + key: "CSS", + get: function get() { + return { + toolbar: 'ce-toolbar', + content: 'ce-toolbar__content', + actions: 'ce-toolbar__actions', + actionsOpened: 'ce-toolbar__actions--opened', + toolbarOpened: 'ce-toolbar--opened', + // Content Zone + plusButton: 'ce-toolbar__plus', + plusButtonHidden: 'ce-toolbar__plus--hidden', + // Actions Zone + blockActionsButtons: 'ce-toolbar__actions-buttons', + settingsToggler: 'ce-toolbar__settings-btn' + }; + } + }, { + key: "opened", + get: function get() { + return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened); + } + }, { + key: "plusButton", + get: function get() { + var _this5 = this; + + return { + hide: function hide() { + return _this5.nodes.plusButton.classList.add(_this5.CSS.plusButtonHidden); + }, + show: function show() { + if (_this5.Editor.Toolbox.isEmpty) { + return; + } + + _this5.nodes.plusButton.classList.remove(_this5.CSS.plusButtonHidden); + } + }; + } + /** + * Block actions appearance manipulations + * @return {{hide: function(): void, show: function(): void}} + */ + + }, { + key: "blockActions", + get: function get() { + var _this6 = this; + + return { + hide: function hide() { + _this6.nodes.actions.classList.remove(_this6.CSS.actionsOpened); + }, + show: function show() { + _this6.nodes.actions.classList.add(_this6.CSS.actionsOpened); + } + }; + } + }]); + return Toolbar; + }(_module.default); + + _exports.default = Toolbar; + Toolbar.displayName = "Toolbar"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/toolbar/inline.ts": +/*!**************************************************!*\ + !*** ./src/components/modules/toolbar/inline.ts ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"), __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../../selection */ "./src/components/selection.ts"), __webpack_require__(/*! ../../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _toConsumableArray2, _slicedToArray2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _dom, _selection, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _toConsumableArray2 = _interopRequireDefault(_toConsumableArray2); + _slicedToArray2 = _interopRequireDefault(_slicedToArray2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _selection = _interopRequireDefault(_selection); + _utils = _interopRequireDefault(_utils); + + /** + * Inline toolbar with actions that modifies selected text fragment + * + * |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯| + * | B i [link] [mark] | + * |________________________| + */ + var InlineToolbar = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(InlineToolbar, _Module); + + function InlineToolbar() { + var _this; + + (0, _classCallCheck2.default)(this, InlineToolbar); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(InlineToolbar).apply(this, arguments)); + /** + * CSS styles + */ + + _this.CSS = { + inlineToolbar: 'ce-inline-toolbar', + inlineToolbarShowed: 'ce-inline-toolbar--showed', + inlineToolbarLeftOriented: 'ce-inline-toolbar--left-oriented', + inlineToolbarRightOriented: 'ce-inline-toolbar--right-oriented', + buttonsWrapper: 'ce-inline-toolbar__buttons', + actionsWrapper: 'ce-inline-toolbar__actions', + inlineToolButton: 'ce-inline-tool', + inlineToolButtonLast: 'ce-inline-tool--last', + inputField: 'cdx-input', + focusedButton: 'ce-inline-tool--focused' + }; + /** + * State of inline toolbar + * @type {boolean} + */ + + _this.opened = false; + /** + * Inline Toolbar elements + */ + + _this.nodes = { + wrapper: null, + buttons: null, + + /** + * Zone below the buttons where Tools can create additional actions by 'renderActions()' method + * For example, input for the 'link' tool or textarea for the 'comment' tool + */ + actions: null + }; + /** + * Margin above/below the Toolbar + */ + + _this.toolbarVerticalMargin = 20; + /** + * Buttons List + * @type {NodeList} + */ + + _this.buttonsList = null; + /** + * Visible Buttons + * Some Blocks might disable inline tools + * @type {HTMLElement[]} + */ + + _this.visibleButtonsList = []; + /** + * Focused button index + * @type {number} + */ + + _this.focusedButtonIndex = -1; + /** + * Cache for Inline Toolbar width + * @type {number} + */ + + _this.width = 0; + return _this; + } + /** + * Inline Toolbar Tools + * + * @returns Map + */ + + + (0, _createClass2.default)(InlineToolbar, [{ + key: "make", + + /** + * Making DOM + */ + value: function make() { + var _this2 = this; + + this.nodes.wrapper = _dom.default.make('div', this.CSS.inlineToolbar); + this.nodes.buttons = _dom.default.make('div', this.CSS.buttonsWrapper); + this.nodes.actions = _dom.default.make('div', this.CSS.actionsWrapper); // To prevent reset of a selection when click on the wrapper + + this.Editor.Listeners.on(this.nodes.wrapper, 'mousedown', function (event) { + var isClickedOnActionsWrapper = event.target.closest(".".concat(_this2.CSS.actionsWrapper)); // If click is on actions wrapper, + // do not prevent default behaviour because actions might include interactive elements + + if (!isClickedOnActionsWrapper) { + event.preventDefault(); + } + }); + /** + * Append Inline Toolbar to the Editor + */ + + _dom.default.append(this.nodes.wrapper, [this.nodes.buttons, this.nodes.actions]); + + _dom.default.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper); + /** + * Append Inline Toolbar Tools + */ + + + this.addTools(); + /** + * Recalculate initial width with all buttons + */ + + this.recalculateWidth(); + } + /** + * Moving / appearance + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + + /** + * Shows Inline Toolbar if something is selected + * @param {boolean} [needToClose] - pass true to close toolbar if it is not allowed. + * Avoid to use it just for closing IT, better call .close() clearly. + */ + + }, { + key: "tryToShow", + value: function tryToShow() { + var needToClose = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!this.allowedToShow()) { + if (needToClose) { + this.close(); + } + + return; + } + + this.move(); + this.open(); + this.Editor.Toolbar.close(); + /** Check Tools state for selected fragment */ + + this.checkToolsState(); + /** Clear selection */ + + this.Editor.BlockSelection.clearSelection(); + } + /** + * Move Toolbar to the selected text + */ + + }, { + key: "move", + value: function move() { + var selectionRect = _selection.default.rect; + var wrapperOffset = this.Editor.UI.nodes.wrapper.getBoundingClientRect(); + var newCoords = { + x: selectionRect.x - wrapperOffset.left, + y: selectionRect.y + selectionRect.height // + window.scrollY + - wrapperOffset.top + this.toolbarVerticalMargin + }; + /** + * If we know selections width, place InlineToolbar to center + */ + + if (selectionRect.width) { + newCoords.x += Math.floor(selectionRect.width / 2); + } + /** + * Inline Toolbar has -50% translateX, so we need to check real coords to prevent overflowing + */ + + + var realLeftCoord = newCoords.x - this.width / 2; + var realRightCoord = newCoords.x + this.width / 2; + /** + * By default, Inline Toolbar has top-corner at the center + * We are adding a modifiers for to move corner to the left or right + */ + + this.nodes.wrapper.classList.toggle(this.CSS.inlineToolbarLeftOriented, realLeftCoord < this.Editor.UI.contentRect.left); + this.nodes.wrapper.classList.toggle(this.CSS.inlineToolbarRightOriented, realRightCoord > this.Editor.UI.contentRect.right); + this.nodes.wrapper.style.left = Math.floor(newCoords.x) + 'px'; + this.nodes.wrapper.style.top = Math.floor(newCoords.y) + 'px'; + } + /** + * Leaf Inline Tools + * @param {string} direction + */ + + }, { + key: "leaf", + value: function leaf() { + var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'right'; + this.visibleButtonsList = Array.from(this.buttonsList).filter(function (tool) { + return !tool.hidden; + }); + + if (this.visibleButtonsList.length === 0) { + return; + } + + this.focusedButtonIndex = _dom.default.leafNodesAndReturnIndex(this.visibleButtonsList, this.focusedButtonIndex, direction, this.CSS.focusedButton); + } + /** + * Drops focused button index + */ + + }, { + key: "dropFocusedButtonIndex", + value: function dropFocusedButtonIndex() { + if (this.focusedButtonIndex === -1) { + return; + } + + this.visibleButtonsList[this.focusedButtonIndex].classList.remove(this.CSS.focusedButton); + this.focusedButtonIndex = -1; + } + /** + * Returns Focused button Node + * @return {HTMLElement} + */ + + }, { + key: "close", + + /** + * Hides Inline Toolbar + */ + value: function close() { + this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed); + this.tools.forEach(function (toolInstance) { + if (typeof toolInstance.clear === 'function') { + toolInstance.clear(); + } + }); + this.opened = false; + + if (this.focusedButtonIndex !== -1) { + this.visibleButtonsList[this.focusedButtonIndex].classList.remove(this.CSS.focusedButton); + this.focusedButtonIndex = -1; + } + } + /** + * Shows Inline Toolbar + */ + + }, { + key: "open", + value: function open() { + /** + * Filter inline-tools and show only allowed by Block's Tool + */ + this.filterTools(); + /** + * Show Inline Toolbar + */ + + this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed); + /** + * Call 'clear' method for Inline Tools (for example, 'link' want to clear input) + */ + + this.tools.forEach(function (toolInstance) { + if (typeof toolInstance.clear === 'function') { + toolInstance.clear(); + } + }); + this.buttonsList = this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton)); + this.opened = true; + } + /** + * Need to show Inline Toolbar or not + */ + + }, { + key: "allowedToShow", + value: function allowedToShow() { + /** + * Tags conflicts with window.selection function. + * Ex. IMG tag returns null (Firefox) or Redactors wrapper (Chrome) + */ + var tagsConflictsWithSelection = ['IMG', 'INPUT']; + + var currentSelection = _selection.default.get(); + + var selectedText = _selection.default.text; // old browsers + + if (!currentSelection || !currentSelection.anchorNode) { + return false; + } // empty selection + + + if (currentSelection.isCollapsed || selectedText.length < 1) { + return false; + } + + var target = !_dom.default.isElement(currentSelection.anchorNode) ? currentSelection.anchorNode.parentElement : currentSelection.anchorNode; + + if (currentSelection && tagsConflictsWithSelection.includes(target.tagName)) { + return false; + } // The selection of the element only in contenteditable + + + var contenteditable = target.closest('[contenteditable="true"]'); + + if (contenteditable === null) { + return false; + } // is enabled by current Block's Tool + + + var currentBlock = this.Editor.BlockManager.getBlock(currentSelection.anchorNode); + + if (!currentBlock) { + return false; + } + + var toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name); + return toolSettings && toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]; + } + /** + * Show only allowed Tools + */ + + }, { + key: "filterTools", + value: function filterTools() { + var _this3 = this; + + var currentSelection = _selection.default.get(), + currentBlock = this.Editor.BlockManager.getBlock(currentSelection.anchorNode); + + var toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name), + inlineToolbarSettings = toolSettings && toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]; + /** + * All Inline Toolbar buttons + * @type {HTMLElement[]} + */ + + var buttons = Array.from(this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton))); + /** + * Show previously hided + */ + + buttons.forEach(function (button) { + button.hidden = false; + button.classList.remove(_this3.CSS.inlineToolButtonLast); + }); + /** + * Filter buttons if Block Tool pass config like inlineToolbar=['link'] + */ + + if (Array.isArray(inlineToolbarSettings)) { + buttons.forEach(function (button) { + button.hidden = !inlineToolbarSettings.includes(button.dataset.tool); + }); + } + /** + * Tick for removing right-margin from last visible button. + * Current generation of CSS does not allow to filter :visible elements + */ + + + var lastVisibleButton = buttons.filter(function (button) { + return !button.hidden; + }).pop(); + + if (lastVisibleButton) { + lastVisibleButton.classList.add(this.CSS.inlineToolButtonLast); + } + /** + * Recalculate width because some buttons can be hidden + */ + + + this.recalculateWidth(); + } + /** + * Recalculate inline toolbar width + */ + + }, { + key: "recalculateWidth", + value: function recalculateWidth() { + this.width = this.nodes.wrapper.offsetWidth; + } + /** + * Working with Tools + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + + /** + * Fill Inline Toolbar with Tools + */ + + }, { + key: "addTools", + value: function addTools() { + var _this4 = this; + + this.tools.forEach(function (toolInstance, toolName) { + _this4.addTool(toolName, toolInstance); + }); + } + /** + * Add tool button and activate clicks + */ + + }, { + key: "addTool", + value: function addTool(toolName, tool) { + var _this5 = this; + + var _this$Editor = this.Editor, + Listeners = _this$Editor.Listeners, + Tools = _this$Editor.Tools; + var button = tool.render(); + + if (!button) { + _utils.default.log('Render method must return an instance of Node', 'warn', toolName); + + return; + } + + button.dataset.tool = toolName; + this.nodes.buttons.appendChild(button); + + if (typeof tool.renderActions === 'function') { + var actions = tool.renderActions(); + this.nodes.actions.appendChild(actions); + } + + Listeners.on(button, 'click', function (event) { + _this5.toolClicked(tool); + + event.preventDefault(); + }); + /** + * Enable shortcuts + * Ignore tool that doesn't have shortcut or empty string + */ + + var toolSettings = Tools.getToolSettings(toolName); + var shortcut = null; + /** + * Get internal inline tools + */ + + var internalTools = Object.entries(Tools.internalTools).filter(function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + name = _ref2[0], + toolClass = _ref2[1]; + + if (_utils.default.isFunction(toolClass)) { + return toolClass[Tools.apiSettings.IS_INLINE]; + } + + return toolClass.class[Tools.apiSettings.IS_INLINE]; + }).map(function (_ref3) { + var _ref4 = (0, _slicedToArray2.default)(_ref3, 1), + name = _ref4[0]; + + return name; + }); + /** + * 1) For internal tools, check public getter 'shortcut' + * 2) For external tools, check tool's settings + */ + + if (internalTools.includes(toolName)) { + shortcut = this.inlineTools[toolName].shortcut; + } else if (toolSettings && toolSettings[Tools.apiSettings.SHORTCUT]) { + shortcut = toolSettings[Tools.apiSettings.SHORTCUT]; + } + + if (shortcut) { + this.enableShortcuts(tool, shortcut); + } + } + /** + * Enable Tool shortcut with Editor Shortcuts Module + * @param {InlineTool} tool - Tool instance + * @param {string} shortcut - shortcut according to the ShortcutData Module format + */ + + }, { + key: "enableShortcuts", + value: function enableShortcuts(tool, shortcut) { + var _this6 = this; + + this.Editor.Shortcuts.add({ + name: shortcut, + handler: function handler(event) { + var currentBlock = _this6.Editor.BlockManager.currentBlock; + /** + * Editor is not focused + */ + + if (!currentBlock) { + return; + } + /** + * We allow to fire shortcut with empty selection (isCollapsed=true) + * it can be used by tools like «Mention» that works without selection: + * Example: by SHIFT+@ show dropdown and insert selected username + */ + // if (SelectionUtils.isCollapsed) return; + + + var toolSettings = _this6.Editor.Tools.getToolSettings(currentBlock.name); + + if (!toolSettings || !toolSettings[_this6.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]) { + return; + } + + event.preventDefault(); + + _this6.toolClicked(tool); + } + }); + } + /** + * Inline Tool button clicks + * @param {InlineTool} tool - Tool's instance + */ + + }, { + key: "toolClicked", + value: function toolClicked(tool) { + var range = _selection.default.range; + tool.surround(range); + this.checkToolsState(); + } + /** + * Check Tools` state by selection + */ + + }, { + key: "checkToolsState", + value: function checkToolsState() { + this.tools.forEach(function (toolInstance) { + toolInstance.checkState(_selection.default.get()); + }); + } + /** + * Get inline tools tools + * Tools that has isInline is true + */ + + }, { + key: "tools", + get: function get() { + if (!this.toolsInstances || this.toolsInstances.size === 0) { + var allTools = this.inlineTools; + var orderedTools = new Map(); // get the user order specifications + + var order = this.config.tools.header.inlineToolbar; // iterate through the list of user specified tools + + order.map(function (tool) { + orderedTools.set(tool, allTools[tool]); + }); + this.toolsInstances = new Map([].concat((0, _toConsumableArray2.default)(orderedTools), (0, _toConsumableArray2.default)(Object.entries(allTools)))); + } + + return this.toolsInstances; + } + }, { + key: "focusedButton", + get: function get() { + if (this.focusedButtonIndex === -1) { + return null; + } + + return this.visibleButtonsList[this.focusedButtonIndex]; + } + }, { + key: "inlineTools", + get: function get() { + var result = {}; + + for (var tool in this.Editor.Tools.inline) { + if (this.Editor.Tools.inline.hasOwnProperty(tool)) { + var toolSettings = this.Editor.Tools.getToolSettings(tool); + result[tool] = this.Editor.Tools.constructInline(this.Editor.Tools.inline[tool], toolSettings); + } + } + + return result; + } + }]); + return InlineToolbar; + }(_module.default); + + _exports.default = InlineToolbar; + InlineToolbar.displayName = "InlineToolbar"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/toolbar/toolbox.ts": +/*!***************************************************!*\ + !*** ./src/components/modules/toolbar/toolbox.ts ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../../utils */ "./src/components/utils.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _module, _dom, _utils) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + + /** + * @class Toolbox + * @classdesc Holder for Tools + * + * @typedef {Toolbox} Toolbox + * @property {Boolean} opened - opening state + * @property {Object} nodes - Toolbox nodes + * @property {Object} CSS - CSS class names + * + */ + var Toolbox = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Toolbox, _Module); + + function Toolbox() { + var _this; + + (0, _classCallCheck2.default)(this, Toolbox); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Toolbox).apply(this, arguments)); + /** + * Opening state + * @type {boolean} + */ + + _this.opened = false; + /** + * HTMLElements used for Toolbox UI + */ + + _this.nodes = { + toolbox: null, + tooltip: null, + buttons: [] + }; + /** + * Active button index + * -1 equals no chosen Tool + * @type {number} + */ + + _this.activeButtonIndex = -1; + /** + * How many tools displayed in Toolbox + * @type {number} + */ + + _this.displayedToolsCount = 0; + return _this; + } + /** + * CSS styles + * @return {{toolbox: string, toolboxButton string, toolboxButtonActive: string, + * toolboxOpened: string, tooltip: string, tooltipShown: string, tooltipShortcut: string}} + */ + + + (0, _createClass2.default)(Toolbox, [{ + key: "make", + + /** + * Makes the Toolbox + */ + value: function make() { + this.nodes.toolbox = _dom.default.make('div', this.CSS.toolbox); + + _dom.default.append(this.Editor.Toolbar.nodes.content, this.nodes.toolbox); + + this.addTools(); + this.addTooltip(); + } + /** + * Toolbox Tool's button click handler + * + * @param {MouseEvent|KeyboardEvent} event + * @param {string} toolName + */ + + }, { + key: "toolButtonActivate", + value: function toolButtonActivate(event, toolName) { + var tool = this.Editor.Tools.toolsClasses[toolName]; + this.insertNewBlock(tool, toolName); + } + /** + * Open Toolbox with Tools + */ + + }, { + key: "open", + value: function open() { + if (this.isEmpty) { + return; + } + + this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolbarHolderModifier); + this.nodes.toolbox.classList.add(this.CSS.toolboxOpened); + this.opened = true; + } + /** + * Close Toolbox + */ + + }, { + key: "close", + value: function close() { + this.hideTooltip(); + this.nodes.toolbox.classList.remove(this.CSS.toolboxOpened); + this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolbarHolderModifier); + this.opened = false; + /** + * Remove active item pointer + */ + + if (this.activeButtonIndex !== -1) { + this.nodes.toolbox.childNodes[this.activeButtonIndex].classList.remove(this.CSS.toolboxButtonActive); + this.activeButtonIndex = -1; + } + } + /** + * Close Toolbox + */ + + }, { + key: "toggle", + value: function toggle() { + if (!this.opened) { + this.open(); + } else { + this.close(); + } + } + /** + * Leaf + * flip through the toolbox items + * @param {String} direction - leaf direction, right is default + */ + + }, { + key: "leaf", + value: function leaf() { + var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Toolbox.LEAF_DIRECTIONS.RIGHT; + var childNodes = Array.from(this.nodes.toolbox.childNodes); + this.activeButtonIndex = _dom.default.leafNodesAndReturnIndex(childNodes, this.activeButtonIndex, direction, this.CSS.toolboxButtonActive); + } + /** + * Hide toolbox tooltip + */ + + }, { + key: "hideTooltip", + value: function hideTooltip() { + this.nodes.tooltip.classList.remove(this.CSS.tooltipShown); + } + /** + * Iterates available tools and appends them to the Toolbox + */ + + }, { + key: "addTools", + value: function addTools() { + var tools = this.Editor.Tools.available; + + for (var toolName in tools) { + if (tools.hasOwnProperty(toolName)) { + this.addTool(toolName, tools[toolName]); + } + } + } + /** + * Append Tool to the Toolbox + * + * @param {string} toolName - tool name + * @param {BlockToolConstructable} tool - tool class + */ + + }, { + key: "addTool", + value: function addTool(toolName, tool) { + var _this2 = this; + + var api = this.Editor.Tools.apiSettings; + var toolToolboxSettings = tool[api.TOOLBOX]; + /** + * Skip tools that don't pass 'toolbox' property + */ + + if (_utils.default.isEmpty(toolToolboxSettings)) { + return; + } + + if (toolToolboxSettings && !toolToolboxSettings.icon) { + _utils.default.log('Toolbar icon is missed. Tool %o skipped', 'warn', toolName); + + return; + } + /** + * @todo Add checkup for the render method + */ + // if (typeof tool.render !== 'function') { + // _.log('render method missed. Tool %o skipped', 'warn', tool); + // return; + // } + + + var _this$Editor$Tools$ge = this.Editor.Tools.getToolSettings(toolName), + _this$Editor$Tools$ge2 = _this$Editor$Tools$ge.toolbox, + userToolboxSettings = _this$Editor$Tools$ge2 === void 0 ? {} : _this$Editor$Tools$ge2; + + var button = _dom.default.make('li', [this.CSS.toolboxButton]); + + button.dataset.tool = toolName; + button.innerHTML = userToolboxSettings.icon || toolToolboxSettings.icon; + + _dom.default.append(this.nodes.toolbox, button); + + this.nodes.toolbox.appendChild(button); + this.nodes.buttons.push(button); + /** + * Add click listener + */ + + this.Editor.Listeners.on(button, 'click', function (event) { + _this2.toolButtonActivate(event, toolName); + }); + /** + * Add listeners to show/hide toolbox tooltip + */ + + this.Editor.Listeners.on(button, 'mouseenter', function () { + _this2.showTooltip(button, toolName); + }); + this.Editor.Listeners.on(button, 'mouseleave', function () { + _this2.hideTooltip(); + }); + /** + * Enable shortcut + */ + + var toolSettings = this.Editor.Tools.getToolSettings(toolName); + + if (toolSettings && toolSettings[this.Editor.Tools.apiSettings.SHORTCUT]) { + this.enableShortcut(tool, toolName, toolSettings[this.Editor.Tools.apiSettings.SHORTCUT]); + } + /** Increment Tools count */ + + + this.displayedToolsCount++; + } + /** + * Add toolbox tooltip to page + */ + + }, { + key: "addTooltip", + value: function addTooltip() { + this.nodes.tooltip = _dom.default.make('div', this.CSS.tooltip, { + innerHTML: '' + }); + + _dom.default.append(this.Editor.Toolbar.nodes.content, this.nodes.tooltip); + } + /** + * Show tooltip for toolbox button + * @param {HTMLElement} button + * @param {string} toolName + */ + + }, { + key: "showTooltip", + value: function showTooltip(button, toolName) { + var toolSettings = this.Editor.Tools.getToolSettings(toolName); + var toolboxSettings = this.Editor.Tools.available[toolName][this.Editor.Tools.apiSettings.TOOLBOX] || {}; + var userToolboxSettings = toolSettings.toolbox || {}; + var name = userToolboxSettings.title || toolboxSettings.title || toolName; + var shortcut = toolSettings[this.Editor.Tools.apiSettings.SHORTCUT]; + var fragment = document.createDocumentFragment(); + var hint = document.createTextNode(_utils.default.capitalize(name)); + fragment.appendChild(hint); + + if (shortcut) { + var OS = _utils.default.getUserOS(); + + shortcut = shortcut.replace(/shift/gi, '⇧').replace(/backspace/gi, '⌫').replace(/enter/gi, '⏎').replace(/up/gi, '↑').replace(/left/gi, '→').replace(/down/gi, '↓').replace(/right/gi, '←').replace(/escape/gi, '⎋').replace(/insert/gi, 'Ins').replace(/delete/gi, '␡').replace(/\+/gi, ' + '); + + if (OS.mac) { + shortcut = shortcut.replace(/ctrl|cmd/gi, '⌘').replace(/alt/gi, '⌥'); + } else { + shortcut = shortcut.replace(/cmd/gi, 'Ctrl').replace(/windows/gi, 'WIN'); + } + + fragment.appendChild(_dom.default.make('div', this.CSS.tooltipShortcut, { + textContent: shortcut + })); + } + + var leftOffset = 16; + var coordinate = button.offsetLeft; + var topOffset = Math.floor(this.Editor.BlockManager.currentBlock.holder.offsetHeight / 2); + this.nodes.tooltip.innerHTML = ''; + this.nodes.tooltip.appendChild(fragment); + this.nodes.tooltip.style.left = "".concat(coordinate + leftOffset, "px"); + this.nodes.tooltip.style.transform = "translate3d(-50%, ".concat(topOffset, "px, 0)"); + this.nodes.tooltip.classList.add(this.CSS.tooltipShown); + } + /** + * Enable shortcut Block Tool implemented shortcut + * @param {BlockToolConstructable} tool - Tool class + * @param {String} toolName - Tool name + * @param {String} shortcut - shortcut according to the ShortcutData Module format + */ + + }, { + key: "enableShortcut", + value: function enableShortcut(tool, toolName, shortcut) { + var _this3 = this; + + this.Editor.Shortcuts.add({ + name: shortcut, + handler: function handler(event) { + event.preventDefault(); + + _this3.insertNewBlock(tool, toolName); + } + }); + } + /** + * Inserts new block + * Can be called when button clicked on Toolbox or by ShortcutData + * + * @param {BlockToolConstructable} tool - Tool Class + * @param {String} toolName - Tool name + */ + + }, { + key: "insertNewBlock", + value: function insertNewBlock(tool, toolName) { + var _this$Editor = this.Editor, + BlockManager = _this$Editor.BlockManager, + Caret = _this$Editor.Caret; + /** + * @type {Block} + */ + + var currentBlock = BlockManager.currentBlock; + var newBlock; + + if (currentBlock.isEmpty) { + newBlock = BlockManager.replace(toolName); + } else { + newBlock = BlockManager.insert(toolName); + } + /** + * Apply callback before inserting html + */ + + + newBlock.call('appendCallback', {}); + this.Editor.Caret.setToBlock(newBlock); + /** If new block doesn't contain inpus, insert new paragraph above */ + + if (newBlock.inputs.length === 0) { + if (newBlock === BlockManager.lastBlock) { + BlockManager.insertAtEnd(); + Caret.setToBlock(BlockManager.lastBlock); + } else { + Caret.setToBlock(BlockManager.nextBlock); + } + } + /** + * close toolbar when node is changed + */ + + + this.Editor.Toolbar.close(); + } + }, { + key: "CSS", + get: function get() { + return { + toolbox: 'ce-toolbox', + toolboxButton: 'ce-toolbox__button', + toolboxButtonActive: 'ce-toolbox__button--active', + toolboxOpened: 'ce-toolbox--opened', + tooltip: 'ce-toolbox__tooltip', + tooltipShown: 'ce-toolbox__tooltip--shown', + tooltipShortcut: 'ce-toolbox__tooltip-shortcut', + openedToolbarHolderModifier: 'codex-editor--toolbox-opened' + }; + } + /** + * get tool name when it is selected + * In case when nothing selected returns null + * + * @return {String|null} + */ + + }, { + key: "getActiveTool", + get: function get() { + var childNodes = this.nodes.toolbox.childNodes; + + if (this.activeButtonIndex === -1) { + return null; + } + + return childNodes[this.activeButtonIndex].dataset.tool; + } + /** + * Returns True if Toolbox is Empty and nothing to show + * @return {boolean} + */ + + }, { + key: "isEmpty", + get: function get() { + return this.displayedToolsCount === 0; + } + }]); + return Toolbox; + }(_module.default); + + _exports.default = Toolbox; + Toolbox.displayName = "Toolbox"; + Toolbox.LEAF_DIRECTIONS = { + RIGHT: 'right', + LEFT: 'left' + }; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/tools.ts": +/*!*****************************************!*\ + !*** ./src/components/modules/tools.ts ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"), __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../tools/paragraph/dist/bundle */ "./src/components/tools/paragraph/dist/bundle.js"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts"), __webpack_require__(/*! ../inline-tools/inline-tool-bold */ "./src/components/inline-tools/inline-tool-bold.ts"), __webpack_require__(/*! ../inline-tools/inline-tool-italic */ "./src/components/inline-tools/inline-tool-italic.ts"), __webpack_require__(/*! ../inline-tools/inline-tool-link */ "./src/components/inline-tools/inline-tool-link.ts"), __webpack_require__(/*! ../tools/stub */ "./src/components/tools/stub/index.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _slicedToArray2, _typeof2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _bundle, _module, _utils, _inlineToolBold, _inlineToolItalic, _inlineToolLink, _stub) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _slicedToArray2 = _interopRequireDefault(_slicedToArray2); + _typeof2 = _interopRequireDefault(_typeof2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _bundle = _interopRequireDefault(_bundle); + _module = _interopRequireDefault(_module); + _utils = _interopRequireDefault(_utils); + _inlineToolBold = _interopRequireDefault(_inlineToolBold); + _inlineToolItalic = _interopRequireDefault(_inlineToolItalic); + _inlineToolLink = _interopRequireDefault(_inlineToolLink); + _stub = _interopRequireDefault(_stub); + + /** + * @module Editor.js Tools Submodule + * + * Creates Instances from Plugins and binds external config to the instances + */ + + /** + * Class properties: + * + * @typedef {Tools} Tools + * @property {Tools[]} toolsAvailable - available Tools + * @property {Tools[]} toolsUnavailable - unavailable Tools + * @property {object} toolsClasses - all classes + * @property {object} toolsSettings - Tools settings + * @property {EditorConfig} config - Editor config + */ + var Tools = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(Tools, _Module); + + /** + * @constructor + * + * @param {EditorConfig} config + */ + function Tools(_ref) { + var _this; + + var config = _ref.config; + (0, _classCallCheck2.default)(this, Tools); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Tools).call(this, { + config: config + })); + /** + * Name of Stub Tool + * Stub Tool is used to substitute unavailable block Tools and store their data + * @type {string} + */ + + _this.stubTool = 'stub'; + /** + * Map {name: Class, ...} where: + * name — block type name in JSON. Got from EditorConfig.tools keys + * @type {Object} + */ + + _this.toolsClasses = {}; + /** + * Tools` classes available to use + */ + + _this.toolsAvailable = {}; + /** + * Tools` classes not available to use because of preparation failure + */ + + _this.toolsUnavailable = {}; + /** + * Tools settings in a map {name: settings, ...} + * @type {Object} + */ + + _this.toolsSettings = {}; + /** + * Cache for the prepared inline tools + * @type {null|object} + * @private + */ + + _this._inlineTools = {}; + _this.toolsClasses = {}; + _this.toolsSettings = {}; + /** + * Available tools list + * {name: Class, ...} + * @type {Object} + */ + + _this.toolsAvailable = {}; + /** + * Tools that rejected a prepare method + * {name: Class, ... } + * @type {Object} + */ + + _this.toolsUnavailable = {}; + _this._inlineTools = null; + return _this; + } + /** + * Returns available Tools + * @return {Tool[]} + */ + + + (0, _createClass2.default)(Tools, [{ + key: "prepare", + + /** + * Creates instances via passed or default configuration + * @return {Promise} + */ + value: function prepare() { + var _this2 = this; + + this.validateTools(); + /** + * Assign internal tools + */ + + this.config.tools = _utils.default.deepMerge({}, this.internalTools, this.config.tools); + + if (!this.config.hasOwnProperty('tools') || Object.keys(this.config.tools).length === 0) { + throw Error('Can\'t start without tools'); + } + /** + * Save Tools settings to a map + */ + + + for (var toolName in this.config.tools) { + /** + * If Tool is an object not a Tool's class then + * save class and settings separately + */ + if ((0, _typeof2.default)(this.config.tools[toolName]) === 'object') { + /** + * Save Tool's class from 'class' field + * @type {Tool} + */ + this.toolsClasses[toolName] = this.config.tools[toolName].class; + /** + * Save Tool's settings + * @type {ToolSettings} + */ + + this.toolsSettings[toolName] = this.config.tools[toolName]; + /** + * Remove Tool's class from settings + */ + + delete this.toolsSettings[toolName].class; + } else { + /** + * Save Tool's class + * @type {Tool} + */ + this.toolsClasses[toolName] = this.config.tools[toolName]; + /** + * Set empty settings for Block by default + * @type {{}} + */ + + this.toolsSettings[toolName] = { + class: this.config.tools[toolName] + }; + } + } + /** + * getting classes that has prepare method + */ + + + var sequenceData = this.getListOfPrepareFunctions(); + /** + * if sequence data contains nothing then resolve current chain and run other module prepare + */ + + if (sequenceData.length === 0) { + return Promise.resolve(); + } + /** + * to see how it works {@link Util#sequence} + */ + + + return _utils.default.sequence(sequenceData, function (data) { + _this2.success(data); + }, function (data) { + _this2.fallback(data); + }); + } + /** + * @param {ChainData.data} data - append tool to available list + */ + + }, { + key: "success", + value: function success(data) { + this.toolsAvailable[data.toolName] = this.toolsClasses[data.toolName]; + } + /** + * @param {ChainData.data} data - append tool to unavailable list + */ + + }, { + key: "fallback", + value: function fallback(data) { + this.toolsUnavailable[data.toolName] = this.toolsClasses[data.toolName]; + } + /** + * Return Tool`s instance + * + * @param {String} tool — tool name + * @param {BlockToolData} data — initial data + * @return {BlockTool} + */ + + }, { + key: "construct", + value: function construct(tool, data) { + var plugin = this.toolsClasses[tool]; + /** + * Configuration to be passed to the Tool's constructor + */ + + var config = this.toolsSettings[tool][this.apiSettings.CONFIG] || {}; // Pass placeholder to initial Block config + + if (tool === this.config.initialBlock && !config.placeholder) { + config.placeholder = this.config.placeholder; + } + /** + * @type {{api: API, config: ({}), data: BlockToolData}} + */ + + + var constructorOptions = { + api: this.Editor.API.methods, + config: config, + data: data + }; + return new plugin(constructorOptions); + } + /** + * Return Inline Tool's instance + * + * @param {InlineTool} tool + * @param {ToolSettings} toolSettings + * @return {InlineTool} — instance + */ + + }, { + key: "constructInline", + value: function constructInline(tool) { + var toolSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + /** + * @type {{api: API}} + */ + var constructorOptions = { + api: this.Editor.API.methods, + config: toolSettings[this.apiSettings.CONFIG] || {} + }; + return new tool(constructorOptions); + } + /** + * Check if passed Tool is an instance of Initial Block Tool + * @param {Tool} tool - Tool to check + * @return {Boolean} + */ + + }, { + key: "isInitial", + value: function isInitial(tool) { + return tool instanceof this.available[this.config.initialBlock]; + } + /** + * Return Tool's config by name + * @param {string} toolName + * @return {ToolSettings} + */ + + }, { + key: "getToolSettings", + value: function getToolSettings(toolName) { + return this.toolsSettings[toolName]; + } + /** + * Binds prepare function of plugins with user or default config + * @return {Array} list of functions that needs to be fired sequentially + */ + + }, { + key: "getListOfPrepareFunctions", + value: function getListOfPrepareFunctions() { + var toolPreparationList = []; + + for (var toolName in this.toolsClasses) { + if (this.toolsClasses.hasOwnProperty(toolName)) { + var toolClass = this.toolsClasses[toolName]; + + if (typeof toolClass.prepare === 'function') { + toolPreparationList.push({ + function: toolClass.prepare, + data: { + toolName: toolName, + config: this.toolsSettings[toolName][this.apiSettings.CONFIG] + } + }); + } else { + /** + * If Tool hasn't a prepare method, mark it as available + */ + this.toolsAvailable[toolName] = toolClass; + } + } + } + + return toolPreparationList; + } + /** + * Validate Tools configuration objects and throw Error for user if it is invalid + */ + + }, { + key: "validateTools", + value: function validateTools() { + /** + * Check Tools for a class containing + */ + for (var toolName in this.config.tools) { + if (this.config.tools.hasOwnProperty(toolName)) { + if (toolName in this.internalTools) { + return; + } + + var tool = this.config.tools[toolName]; + + if (!_utils.default.isFunction(tool) && !_utils.default.isFunction(tool.class)) { + throw Error("Tool \xAB".concat(toolName, "\xBB must be a constructor function or an object with function in the \xABclass\xBB property")); + } + } + } + } + /** + * Returns internal tools + * Includes Bold, Italic, Link and Paragraph + */ + + }, { + key: "available", + get: function get() { + return this.toolsAvailable; + } + /** + * Returns unavailable Tools + * @return {Tool[]} + */ + + }, { + key: "unavailable", + get: function get() { + return this.toolsUnavailable; + } + /** + * Return Tools for the Inline Toolbar + * @return {Object} - object of Inline Tool's classes + */ + + }, { + key: "inline", + get: function get() { + var _this3 = this; + + if (this._inlineTools) { + return this._inlineTools; + } + + var tools = Object.entries(this.available).filter(function (_ref2) { + var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), + name = _ref3[0], + tool = _ref3[1]; + + if (!tool[_this3.apiSettings.IS_INLINE]) { + return false; + } + /** + * Some Tools validation + */ + + + var inlineToolRequiredMethods = ['render', 'surround', 'checkState']; + var notImplementedMethods = inlineToolRequiredMethods.filter(function (method) { + return !_this3.constructInline(tool)[method]; + }); + + if (notImplementedMethods.length) { + _utils.default.log("Incorrect Inline Tool: ".concat(tool.name, ". Some of required methods is not implemented %o"), 'warn', notImplementedMethods); + + return false; + } + + return true; + }); + /** + * collected inline tools with key of tool name + */ + + var result = {}; + tools.forEach(function (_ref4) { + var _ref5 = (0, _slicedToArray2.default)(_ref4, 2), + name = _ref5[0], + tool = _ref5[1]; + + return result[name] = tool; + }); + /** + * Cache prepared Tools + */ + + this._inlineTools = result; + return this._inlineTools; + } + /** + * Return editor block tools + */ + + }, { + key: "blockTools", + get: function get() { + var _this4 = this; + + // eslint-disable-next-line no-unused-vars + var tools = Object.entries(this.available).filter(function (_ref6) { + var _ref7 = (0, _slicedToArray2.default)(_ref6, 2), + name = _ref7[0], + tool = _ref7[1]; + + return !tool[_this4.apiSettings.IS_INLINE]; + }); + /** + * collected block tools with key of tool name + */ + + var result = {}; + tools.forEach(function (_ref8) { + var _ref9 = (0, _slicedToArray2.default)(_ref8, 2), + name = _ref9[0], + tool = _ref9[1]; + + return result[name] = tool; + }); + return result; + } + /** + * Constant for available Tools Settings + * @todo separate internal and external options + * @return {object} + */ + + }, { + key: "apiSettings", + get: function get() { + return { + CONFIG: 'config', + IS_ENABLED_INLINE_TOOLBAR: 'inlineToolbar', + IS_ENABLED_LINE_BREAKS: 'enableLineBreaks', + IS_INLINE: 'isInline', + IS_PASTE_DISALLOWED: 'disallowPaste', + SHORTCUT: 'shortcut', + TOOLBOX: 'toolbox', + SANITIZE_CONFIG: 'sanitize', + CONVERSION_CONFIG: 'conversionConfig' + }; + } + }, { + key: "internalTools", + get: function get() { + return { + bold: { + class: _inlineToolBold.default + }, + italic: { + class: _inlineToolItalic.default + }, + link: { + class: _inlineToolLink.default + }, + paragraph: { + class: _bundle.default, + inlineToolbar: true + }, + stub: { + class: _stub.default + } + }; + } + }]); + return Tools; + }(_module.default); + + _exports.default = Tools; + Tools.displayName = "Tools"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/modules/ui.ts": +/*!**************************************!*\ + !*** ./src/components/modules/ui.ts ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"), __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"), __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"), __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js"), __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js"), __webpack_require__(/*! ../../../dist/sprite.svg */ "./dist/sprite.svg"), __webpack_require__(/*! ../__module */ "./src/components/__module.ts"), __webpack_require__(/*! ../dom */ "./src/components/dom.ts"), __webpack_require__(/*! ../utils */ "./src/components/utils.ts"), __webpack_require__(/*! ../selection */ "./src/components/selection.ts"), __webpack_require__(/*! ../block */ "./src/components/block.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _regenerator, _asyncToGenerator2, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _getPrototypeOf2, _inherits2, _sprite, _module, _dom, _utils, _selection, _block) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _regenerator = _interopRequireDefault(_regenerator); + _asyncToGenerator2 = _interopRequireDefault(_asyncToGenerator2); + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _possibleConstructorReturn2 = _interopRequireDefault(_possibleConstructorReturn2); + _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf2); + _inherits2 = _interopRequireDefault(_inherits2); + _sprite = _interopRequireDefault(_sprite); + _module = _interopRequireDefault(_module); + _dom = _interopRequireDefault(_dom); + _utils = _interopRequireDefault(_utils); + _selection = _interopRequireDefault(_selection); + _block = _interopRequireDefault(_block); + + /** + * Prebuilded sprite of SVG icons + */ + + /** + * Module UI + * + * @type {UI} + */ + + /** + * @class + * + * @classdesc Makes Editor.js UI: + * + * + * + * + * + * + * @typedef {UI} UI + * @property {EditorConfig} config - editor configuration {@link EditorJS#configuration} + * @property {Object} Editor - available editor modules {@link EditorJS#moduleInstances} + * @property {Object} nodes - + * @property {Element} nodes.holder - element where we need to append redactor + * @property {Element} nodes.wrapper - + * @property {Element} nodes.redactor - + */ + var UI = + /*#__PURE__*/ + function (_Module) { + (0, _inherits2.default)(UI, _Module); + + function UI() { + var _this; + + (0, _classCallCheck2.default)(this, UI); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(UI).apply(this, arguments)); + /** + * Flag that became true on mobile viewport + * @type {boolean} + */ + + _this.isMobile = false; + /** + * HTML Elements used for UI + */ + + _this.nodes = { + holder: null, + wrapper: null, + redactor: null + }; + /** + * Cache for center column rectangle info + * Invalidates on window resize + * @type {DOMRect} + */ + + _this.contentRectCache = undefined; + /** + * Handle window resize only when it finished + * @type {() => void} + */ + + _this.resizeDebouncer = _utils.default.debounce(function () { + _this.windowResize(); + }, 200); + return _this; + } + /** + * Editor.js UI CSS class names + * @return {{editorWrapper: string, editorZone: string}} + */ + + + (0, _createClass2.default)(UI, [{ + key: "addLoader", + + /** + * Adds loader to editor while content is not ready + */ + value: function addLoader() { + this.nodes.loader = _dom.default.make('div', this.CSS.editorLoader); + this.nodes.wrapper.prepend(this.nodes.loader); + this.nodes.redactor.classList.add(this.CSS.editorZoneHidden); + } + /** + * Removes loader when content has loaded + */ + + }, { + key: "removeLoader", + value: function removeLoader() { + this.nodes.loader.remove(); + this.nodes.redactor.classList.remove(this.CSS.editorZoneHidden); + } + /** + * Making main interface + */ + + }, { + key: "prepare", + value: function () { + var _prepare = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee() { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + /** + * Detect mobile version + */ + this.checkIsMobile(); + /** + * Make main UI elements + */ + + _context.next = 3; + return this.make(); + + case 3: + /** + * Loader for rendering process + */ + this.addLoader(); + /** + * Append SVG sprite + */ + + _context.next = 6; + return this.appendSVGSprite(); + + case 6: + _context.next = 8; + return this.Editor.Toolbar.make(); + + case 8: + _context.next = 10; + return this.Editor.InlineToolbar.make(); + + case 10: + _context.next = 12; + return this.Editor.ConversionToolbar.make(); + + case 12: + _context.next = 14; + return this.loadStyles(); + + case 14: + _context.next = 16; + return this.bindEvents(); + + case 16: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + return function prepare() { + return _prepare.apply(this, arguments); + }; + }() + /** + * Check if Editor is empty and set CSS class to wrapper + */ + + }, { + key: "checkEmptiness", + value: function checkEmptiness() { + var BlockManager = this.Editor.BlockManager; + this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty, BlockManager.isEditorEmpty); + } + /** + * Clean editor`s UI + */ + + }, { + key: "destroy", + value: function destroy() { + this.nodes.holder.innerHTML = ''; + } + /** + * Check for mobile mode and cache a result + */ + + }, { + key: "checkIsMobile", + value: function checkIsMobile() { + this.isMobile = window.innerWidth < 650; + } + /** + * Makes Editor.js interface + * @return {Promise} + */ + + }, { + key: "make", + value: function () { + var _make = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2() { + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + /** + * Element where we need to append Editor.js + * @type {Element} + */ + this.nodes.holder = _dom.default.getHolder(this.config.holder); + /** + * Create and save main UI elements + */ + + this.nodes.wrapper = _dom.default.make('div', this.CSS.editorWrapper); + this.nodes.redactor = _dom.default.make('div', this.CSS.editorZone); + /** + * If Editor has injected into the narrow container, enable Narrow Mode + */ + + if (this.nodes.holder.offsetWidth < this.contentRect.width) { + this.nodes.wrapper.classList.add(this.CSS.editorWrapperNarrow); + } + /** + * Set customizable bottom zone height + */ + + + this.nodes.redactor.style.paddingBottom = this.config.minHeight + 'px'; + this.nodes.wrapper.appendChild(this.nodes.redactor); + this.nodes.holder.appendChild(this.nodes.wrapper); + + case 7: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function make() { + return _make.apply(this, arguments); + }; + }() + /** + * Appends CSS + */ + + }, { + key: "loadStyles", + value: function loadStyles() { + /** + * Load CSS + */ + var styles = __webpack_require__(/*! ../../styles/main.css */ "./src/styles/main.css"); + /** + * Make tag + */ + + + var tag = _dom.default.make('style', null, { + textContent: styles.toString() + }); + /** + * Append styles at the top of HEAD tag + */ + + + _dom.default.prepend(document.head, tag); + } + /** + * Bind events on the Editor.js interface + */ + + }, { + key: "bindEvents", + value: function bindEvents() { + var _this2 = this; + + this.Editor.Listeners.on(this.nodes.redactor, 'click', function (event) { + return _this2.redactorClicked(event); + }, false); + this.Editor.Listeners.on(document, 'keydown', function (event) { + return _this2.documentKeydown(event); + }, true); + this.Editor.Listeners.on(document, 'click', function (event) { + return _this2.documentClicked(event); + }, true); + /** + * Handle selection change on mobile devices for the Inline Toolbar support + */ + + if (_utils.default.isTouchSupported()) { + this.Editor.Listeners.on(document, 'selectionchange', function (event) { + _this2.selectionChanged(event); + }, true); + } + + this.Editor.Listeners.on(window, 'resize', function () { + _this2.resizeDebouncer(); + }, { + passive: true + }); + } + /** + * Resize window handler + */ + + }, { + key: "windowResize", + value: function windowResize() { + /** + * Invalidate content zone size cached, because it may be changed + */ + this.contentRectCache = null; + /** + * Detect mobile version + */ + + this.checkIsMobile(); + } + /** + * All keydowns on document + * @param {Event} event + */ + + }, { + key: "documentKeydown", + value: function documentKeydown(event) { + switch (event.keyCode) { + case _utils.default.keyCodes.ENTER: + this.enterPressed(event); + break; + + case _utils.default.keyCodes.BACKSPACE: + this.backspacePressed(event); + break; + + default: + this.defaultBehaviour(event); + break; + } + } + /** + * Ignore all other document's keydown events + * @param {KeyboardEvent} event + */ + + }, { + key: "defaultBehaviour", + value: function defaultBehaviour(event) { + var keyDownOnEditor = event.target.closest(".".concat(this.CSS.editorWrapper)); + var currentBlock = this.Editor.BlockManager.currentBlock; + var isMetaKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; + /** + * Ignore keydowns on editor and meta keys + */ + + if (keyDownOnEditor || currentBlock && isMetaKey) { + return; + } + /** + * Remove all highlights and remove caret + */ + + + this.Editor.BlockManager.dropPointer(); + /** + * Close Toolbar + */ + + this.Editor.Toolbar.close(); + } + /** + * @param {KeyboardEvent} event + */ + + }, { + key: "backspacePressed", + value: function backspacePressed(event) { + var _this$Editor = this.Editor, + BlockManager = _this$Editor.BlockManager, + BlockSelection = _this$Editor.BlockSelection, + Caret = _this$Editor.Caret; + + if (BlockSelection.anyBlockSelected) { + var selectionPositionIndex = BlockManager.removeSelectedBlocks(); + Caret.setToBlock(BlockManager.insertInitialBlockAtIndex(selectionPositionIndex, true), Caret.positions.START); + /** Clear selection */ + + BlockSelection.clearSelection(event); + /** + * Stop propagations + * Manipulation with BlockSelections is handled in global backspacePress because they may occur + * with CMD+A or RectangleSelection and they can be handled on document event + */ + + event.stopPropagation(); + event.stopImmediatePropagation(); + } + } + /** + * Enter pressed on document + * @param event + */ + + }, { + key: "enterPressed", + value: function enterPressed(event) { + var _this$Editor2 = this.Editor, + BlockManager = _this$Editor2.BlockManager, + BlockSelection = _this$Editor2.BlockSelection, + Caret = _this$Editor2.Caret, + BlockSettings = _this$Editor2.BlockSettings, + ConversionToolbar = _this$Editor2.ConversionToolbar; + var hasPointerToBlock = BlockManager.currentBlockIndex >= 0; + /** + * If Block Settings is opened and have some active button + * Enter press is fired as out of the Block and that's why + * we handle it here + */ + + if (BlockSettings.opened && BlockSettings.focusedButton) { + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + /** Click on settings button */ + + BlockSettings.focusedButton.click(); + /** + * Focused button can be deleted by click, for example with 'Remove Block' api + */ + + if (BlockSettings.focusedButton) { + /** + * Add animation on click + */ + BlockSettings.focusedButton.classList.add(BlockSettings.CSS.focusedButtonAnimated); + /** + * Remove animation class + */ + + _utils.default.delay(function () { + if (BlockSettings.focusedButton) { + BlockSettings.focusedButton.classList.remove(BlockSettings.CSS.focusedButtonAnimated); + } + }, 280)(); + } + /** + * Restoring focus on current Block + * + * After changing Block state (when settings clicked, for example) + * Block's content points to the Node that is not in DOM, that's why we can not + * set caret and leaf next (via Tab) + * + * For that set cursor via Caret module to the current Block's content + * after some timeout + */ + + + _utils.default.delay(function () { + Caret.setToBlock(BlockManager.currentBlock); + }, 10)(); + + return; + } + + if (ConversionToolbar.opened && ConversionToolbar.focusedButton) { + event.preventDefault(); + event.stopPropagation(); + event.stopImmediatePropagation(); + ConversionToolbar.focusedButton.click(); + return; + } + + if (BlockSelection.anyBlockSelected) { + var selectionPositionIndex = BlockManager.removeSelectedBlocks(); + Caret.setToBlock(BlockManager.insertInitialBlockAtIndex(selectionPositionIndex, true), Caret.positions.START); + /** Clear selection */ + + BlockSelection.clearSelection(event); + /** + * Stop propagations + * Manipulation with BlockSelections is handled in global enterPress because they may occur + * with CMD+A or RectangleSelection + */ + + event.preventDefault(); + event.stopImmediatePropagation(); + event.stopPropagation(); + return; + } + /** + * If Caret is not set anywhere, event target on Enter is always Element that we handle + * In our case it is document.body + * + * So, BlockManager points some Block and Enter press is on Body + * We can create a new block + */ + + + if (hasPointerToBlock && event.target.tagName === 'BODY') { + /** + * Insert initial typed Block + */ + var newBlock = this.Editor.BlockManager.insert(); + this.Editor.Caret.setToBlock(newBlock); + /** + * And highlight + */ + + this.Editor.BlockManager.highlightCurrentNode(); + /** + * Move toolbar and show plus button because new Block is empty + */ + + this.Editor.Toolbar.move(); + this.Editor.Toolbar.plusButton.show(); + } + + this.Editor.BlockSelection.clearSelection(event); + } + /** + * All clicks on document + * @param {MouseEvent} event - Click + */ + + }, { + key: "documentClicked", + value: function documentClicked(event) { + /** + * Close Inline Toolbar when nothing selected + * Do not fire check on clicks at the Inline Toolbar buttons + */ + var target = event.target; + + var clickedInsideOfEditor = this.nodes.holder.contains(target) || _selection.default.isAtEditor; + + if (!clickedInsideOfEditor) { + /** + * Clear highlightings and pointer on BlockManager + * + * Current page might contain several instances + * Click between instances MUST clear focus, pointers and close toolbars + */ + this.Editor.BlockManager.dropPointer(); + this.Editor.InlineToolbar.close(); + this.Editor.Toolbar.close(); + this.Editor.BlockSelection.clearSelection(event); + this.Editor.ConversionToolbar.close(); + } + + if (_selection.default.isAtEditor) { + /** + * Focus clicked Block. + * Workaround case when user clicks on the bottom of editor + */ + if (_selection.default.anchorNode === this.nodes.redactor) { + this.Editor.Caret.setToTheLastBlock(); + } else { + this.Editor.BlockManager.setCurrentBlockByChildNode(_selection.default.anchorNode); + } + } + } + /** + * All clicks on the redactor zone + * + * @param {MouseEvent} event + * + * @description + * 1. Save clicked Block as a current {@link BlockManager#currentNode} + * it uses for the following: + * - add CSS modifier for the selected Block + * - on Enter press, we make a new Block under that + * + * 2. Move and show the Toolbar + * + * 3. Set a Caret + * + * 4. By clicks on the Editor's bottom zone: + * - if last Block is empty, set a Caret to this + * - otherwise, add a new empty Block and set a Caret to that + * + * 5. Hide the Inline Toolbar + * + * @see selectClickedBlock + * + */ + + }, { + key: "redactorClicked", + value: function redactorClicked(event) { + if (!_selection.default.isCollapsed) { + return; + } + + var clickedNode = event.target; + /** + * If click was fired is on Editor`s wrapper, try to get clicked node by elementFromPoint method + */ + + if (clickedNode === this.nodes.redactor) { + clickedNode = document.elementFromPoint(event.clientX, event.clientY); + } + /** + * Select clicked Block as Current + */ + + + try { + /** + * Renew Current Block + */ + this.Editor.BlockManager.setCurrentBlockByChildNode(clickedNode); + /** + * Highlight Current Node + */ + + this.Editor.BlockManager.highlightCurrentNode(); + } catch (e) { + /** + * If clicked outside first-level Blocks and it is not RectSelection, set Caret to the last empty Block + */ + if (!this.Editor.RectangleSelection.isRectActivated()) { + this.Editor.Caret.setToTheLastBlock(); + } + } + + event.stopImmediatePropagation(); + event.stopPropagation(); + /** + * Move and open toolbar + */ + + this.Editor.Toolbar.open(); + /** + * Hide the Plus Button + */ + + this.Editor.Toolbar.plusButton.hide(); + + if (!this.Editor.BlockManager.currentBlock) { + this.Editor.BlockManager.insert(); + } + /** + * Show the Plus Button if: + * - Block is an initial-block (Text) + * - Block is empty + */ + + + var isInitialBlock = this.Editor.Tools.isInitial(this.Editor.BlockManager.currentBlock.tool); + + if (isInitialBlock) { + /** + * Check isEmpty only for paragraphs to prevent unnecessary tree-walking on Tools with many nodes (for ex. Table) + */ + var isEmptyBlock = this.Editor.BlockManager.currentBlock.isEmpty; + + if (isEmptyBlock) { + this.Editor.Toolbar.plusButton.show(); + } + } + } + /** + * Handle selection changes on mobile devices + * Uses for showing the Inline Toolbar + * @param {Event} event + */ + + }, { + key: "selectionChanged", + value: function selectionChanged(event) { + var focusedElement = _selection.default.anchorElement; + /** + * Event can be fired on clicks at the Editor elements, for example, at the Inline Toolbar + * We need to skip such firings + */ + + if (!focusedElement || !focusedElement.closest(".".concat(_block.default.CSS.content))) { + return; + } + + this.Editor.InlineToolbar.tryToShow(); + } + /** + * Append prebuilt sprite with SVG icons + */ + + }, { + key: "appendSVGSprite", + value: function appendSVGSprite() { + var spriteHolder = _dom.default.make('div'); + + spriteHolder.hidden = true; + spriteHolder.style.display = 'none'; + spriteHolder.innerHTML = _sprite.default; + + _dom.default.append(this.nodes.wrapper, spriteHolder); + } + }, { + key: "CSS", + get: function get() { + return { + editorWrapper: 'codex-editor', + editorWrapperNarrow: 'codex-editor--narrow', + editorZone: 'codex-editor__redactor', + editorZoneHidden: 'codex-editor__redactor--hidden', + editorLoader: 'codex-editor__loader', + editorEmpty: 'codex-editor--empty' + }; + } + /** + * Return Width of center column of Editor + * @return {DOMRect} + */ + + }, { + key: "contentRect", + get: function get() { + if (this.contentRectCache) { + return this.contentRectCache; + } + + var someBlock = this.nodes.wrapper.querySelector(".".concat(_block.default.CSS.content)); + /** + * When Editor is not ready, there is no Blocks, so return the default value + */ + + if (!someBlock) { + return { + width: 650, + left: 0, + right: 0 + }; + } + + this.contentRectCache = someBlock.getBoundingClientRect(); + return this.contentRectCache; + } + }]); + return UI; + }(_module.default); + + _exports.default = UI; + UI.displayName = "UI"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/polyfills.ts": +/*!*************************************!*\ + !*** ./src/components/polyfills.ts ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function () { + 'use strict'; + /** + * The Element.matches() method returns true if the element + * would be selected by the specified selector string; + * otherwise, returns false. + * + * {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill} + */ + + if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) { + var matches = (this.document || this.ownerDocument).querySelectorAll(s); + var i = matches.length; + + while (--i >= 0 && matches.item(i) !== this) {} + + return i > -1; + }; + } + /** + * The Element.closest() method returns the closest ancestor + * of the current element (or the current element itself) which + * matches the selectors given in parameter. + * If there isn't such an ancestor, it returns null. + * + * {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill} + */ + + + if (!Element.prototype.closest) { + Element.prototype.closest = function (s) { + var el = this; + + if (!document.documentElement.contains(el)) { + return null; + } + + do { + if (el.matches(s)) { + return el; + } + + el = el.parentElement || el.parentNode; + } while (el !== null); + + return null; + }; + } + /** + * The ParentNode.prepend method inserts a set of Node objects + * or DOMString objects before the first child of the ParentNode. + * DOMString objects are inserted as equivalent Text nodes. + * + * {@link https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend#Polyfill} + */ + + + if (!Element.prototype.prepend) { + Element.prototype.prepend = function prepend(nodes) { + var docFrag = document.createDocumentFragment(); + + if (!Array.isArray(nodes)) { + nodes = [nodes]; + } + + nodes.forEach(function (node) { + var isNode = node instanceof Node; + docFrag.appendChild(isNode ? node : document.createTextNode(String(node))); + }); + this.insertBefore(docFrag, this.firstChild); + }; + } +}); + +/***/ }), + +/***/ "./src/components/selection.ts": +/*!*************************************!*\ + !*** ./src/components/selection.ts ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"), __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"), __webpack_require__(/*! ./utils */ "./src/components/utils.ts"), __webpack_require__(/*! ./dom */ "./src/components/dom.ts")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { var mod; } +})(this, function (_exports, _classCallCheck2, _createClass2, _utils, _dom) { + "use strict"; + + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + _classCallCheck2 = _interopRequireDefault(_classCallCheck2); + _createClass2 = _interopRequireDefault(_createClass2); + _utils = _interopRequireDefault(_utils); + _dom = _interopRequireDefault(_dom); + + /** + * TextRange interface fot IE9- + */ + + /** + * Working with selection + * @typedef {SelectionUtils} SelectionUtils + */ + var SelectionUtils = + /*#__PURE__*/ + function () { + function SelectionUtils() { + (0, _classCallCheck2.default)(this, SelectionUtils); + this.instance = null; + this.selection = null; + /** + * This property can store SelectionUtils's range for restoring later + * @type {Range|null} + */ + + this.savedSelectionRange = null; + /** + * Fake background is active + * + * @return {boolean} + */ + + this.isFakeBackgroundEnabled = false; + /** + * Native Document's commands for fake background + */ + + this.commandBackground = 'backColor'; + this.commandRemoveFormat = 'removeFormat'; + } + /** + * Editor styles + * @return {{editorWrapper: string, editorZone: string}} + */ + + + (0, _createClass2.default)(SelectionUtils, [{ + key: "removeFakeBackground", + + /** + * Removes fake background + */ + value: function removeFakeBackground() { + if (!this.isFakeBackgroundEnabled) { + return; + } + + this.isFakeBackgroundEnabled = false; + document.execCommand(this.commandRemoveFormat); + } + /** + * Sets fake background + */ + + }, { + key: "setFakeBackground", + value: function setFakeBackground() { + document.execCommand(this.commandBackground, false, '#a8d6ff'); + this.isFakeBackgroundEnabled = true; + } + /** + * Save SelectionUtils's range + */ + + }, { + key: "save", + value: function save() { + this.savedSelectionRange = SelectionUtils.range; + } + /** + * Restore saved SelectionUtils's range + */ + + }, { + key: "restore", + value: function restore() { + if (!this.savedSelectionRange) { + return; + } + + var sel = window.getSelection(); + sel.removeAllRanges(); + sel.addRange(this.savedSelectionRange); + } + /** + * Clears saved selection + */ + + }, { + key: "clearSaved", + value: function clearSaved() { + this.savedSelectionRange = null; + } + /** + * Collapse current selection + */ + + }, { + key: "collapseToEnd", + value: function collapseToEnd() { + var sel = window.getSelection(); + var range = document.createRange(); + range.selectNodeContents(sel.focusNode); + range.collapse(false); + sel.removeAllRanges(); + sel.addRange(range); + } + /** + * Looks ahead to find passed tag from current selection + * + * @param {String} tagName - tag to found + * @param {String} [className] - tag's class name + * @param {Number} [searchDepth] - count of tags that can be included. For better performance. + * @return {HTMLElement|null} + */ + + }, { + key: "findParentTag", + value: function findParentTag(tagName, className) { + var searchDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10; + var selection = window.getSelection(); + var parentTag = null; + /** + * If selection is missing or no anchorNode or focusNode were found then return null + */ + + if (!selection || !selection.anchorNode || !selection.focusNode) { + return null; + } + /** + * Define Nodes for start and end of selection + */ + + + var boundNodes = [ + /** the Node in which the selection begins */ + selection.anchorNode, + /** the Node in which the selection ends */ + selection.focusNode]; + /** + * For each selection parent Nodes we try to find target tag [with target class name] + * It would be saved in parentTag variable + */ + + boundNodes.forEach(function (parent) { + /** Reset tags limit */ + var searchDepthIterable = searchDepth; + + while (searchDepthIterable > 0 && parent.parentNode) { + /** + * Check tag's name + */ + if (parent.tagName === tagName) { + /** + * Save the result + */ + parentTag = parent; + /** + * Optional additional check for class-name mismatching + */ + + if (className && parent.classList && !parent.classList.contains(className)) { + parentTag = null; + } + /** + * If we have found required tag with class then go out from the cycle + */ + + + if (parentTag) { + break; + } + } + /** + * Target tag was not found. Go up to the parent and check it + */ + + + parent = parent.parentNode; + searchDepthIterable--; + } + }); + /** + * Return found tag or null + */ + + return parentTag; + } + /** + * Expands selection range to the passed parent node + * + * @param {HTMLElement} element + */ + + }, { + key: "expandToTag", + value: function expandToTag(element) { + var selection = window.getSelection(); + selection.removeAllRanges(); + var range = document.createRange(); + range.selectNodeContents(element); + selection.addRange(range); + } + }], [{ + key: "almostAllSelected", + + /** + * Returns true if 85% of text content is selected + * @return {boolean} + */ + value: function almostAllSelected(targetText) { + var range = SelectionUtils.range; + + if (!range) { + return false; + } + + var copiedFragment = range.cloneContents(); + var lengthOfWholeText = targetText.length; + var lengthOfCopiedText = copiedFragment.textContent.length; + return lengthOfCopiedText / lengthOfWholeText > 0.85; + } + /** + * Check current selection if it is at Editor's zone + * @return {boolean} + */ + + }, { + key: "get", + + /** + * Returns window SelectionUtils + * {@link https://developer.mozilla.org/ru/docs/Web/API/Window/getSelection} + * @return {Selection} + */ + value: function get() { + return window.getSelection(); + } + }, { + key: "CSS", + get: function get() { + return { + editorWrapper: 'codex-editor', + editorZone: 'codex-editor__redactor' + }; + } + /** + * Returns selected anchor + * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorNode} + * @return {Node|null} + */ + + }, { + key: "anchorNode", + get: function get() { + var selection = window.getSelection(); + return selection ? selection.anchorNode : null; + } + /** + * Returns selected anchor element + * @return {Element|null} + */ + + }, { + key: "anchorElement", + get: function get() { + var selection = window.getSelection(); + + if (!selection) { + return null; + } + + var anchorNode = selection.anchorNode; + + if (!anchorNode) { + return null; + } + + if (!_dom.default.isElement(anchorNode)) { + return anchorNode.parentElement; + } else { + return anchorNode; + } + } + /** + * Returns selection offset according to the anchor node + * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorOffset} + * @return {Number|null} + */ + + }, { + key: "anchorOffset", + get: function get() { + var selection = window.getSelection(); + return selection ? selection.anchorOffset : null; + } + /** + * Is current selection range collapsed + * @return {boolean|null} + */ + + }, { + key: "isCollapsed", + get: function get() { + var selection = window.getSelection(); + return selection ? selection.isCollapsed : null; + } + }, { + key: "isAtEditor", + get: function get() { + var selection = SelectionUtils.get(); + /** + * Something selected on document + */ + + var selectedNode = selection.anchorNode || selection.focusNode; + + if (selectedNode && selectedNode.nodeType === Node.TEXT_NODE) { + selectedNode = selectedNode.parentNode; + } + + var editorZone = null; + + if (selectedNode) { + editorZone = selectedNode.closest(".".concat(SelectionUtils.CSS.editorZone)); + } + /** + * SelectionUtils is not out of Editor because Editor's wrapper was found + */ + + + return editorZone && editorZone.nodeType === Node.ELEMENT_NODE; + } + /** + * Return first range + * @return {Range|null} + */ + + }, { + key: "range", + get: function get() { + var selection = window.getSelection(); + return selection && selection.rangeCount ? selection.getRangeAt(0) : null; + } + /** + * Calculates position and size of selected text + * @return {{x, y, width, height, top?, left?, bottom?, right?}} + */ + + }, { + key: "rect", + get: function get() { + var sel = document.selection, + range; + var rect = { + x: 0, + y: 0, + width: 0, + height: 0 + }; + + if (sel && sel.type !== 'Control') { + sel = sel; + range = sel.createRange(); + rect.x = range.boundingLeft; + rect.y = range.boundingTop; + rect.width = range.boundingWidth; + rect.height = range.boundingHeight; + return rect; + } + + if (!window.getSelection) { + _utils.default.log('Method window.getSelection is not supported', 'warn'); + + return rect; + } + + sel = window.getSelection(); + + if (sel.rangeCount === null || isNaN(sel.rangeCount)) { + _utils.default.log('Method SelectionUtils.rangeCount is not supported', 'warn'); + + return rect; + } + + range = sel.getRangeAt(0).cloneRange(); + + if (range.getBoundingClientRect) { + rect = range.getBoundingClientRect(); + } // Fall back to inserting a temporary element + + + if (rect.x === 0 && rect.y === 0) { + var span = document.createElement('span'); + + if (span.getBoundingClientRect) { + // Ensure span has dimensions and position by + // adding a zero-width space character + span.appendChild(document.createTextNode("\u200B")); + range.insertNode(span); + rect = span.getBoundingClientRect(); + var spanParent = span.parentNode; + spanParent.removeChild(span); // Glue any broken text nodes back together + + spanParent.normalize(); + } + } + + return rect; + } + /** + * Returns selected text as String + * @returns {string} + */ + + }, { + key: "text", + get: function get() { + return window.getSelection ? window.getSelection().toString() : ''; + } + }]); + return SelectionUtils; + }(); + + _exports.default = SelectionUtils; + SelectionUtils.displayName = "SelectionUtils"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/components/tools/paragraph/dist/bundle.js": +/*!*******************************************************!*\ + !*** ./src/components/tools/paragraph/dist/bundle.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +!function(e,t){ true?module.exports=t():undefined}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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="/",n(n.s=0)}([function(e,t,n){function r(e,t){for(var n=0;n=0&&u.splice(e,1)}function g(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),h(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function b(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var a=l++;n=c||(c=g(e)),o=x.bind(null,n,a,!1),r=x.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),h(t,e),e}(e),o=function(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(e),o=function(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){v(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var o=[],r=0;r0&&void 0!==arguments[0]&&arguments[0];this.nodes.input.classList.add(this.CSS.inputShowed),t&&this.nodes.input.focus(),this.inputOpened=!0}},{key:"closeActions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.selection.isFakeBackgroundEnabled){var e=new a.default;e.save(),this.selection.restore(),this.selection.removeFakeBackground(),e.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",t&&this.selection.clearSaved(),this.inputOpened=!1}},{key:"enterPressed",value:function(t){var e=this.nodes.input.value||"";if(e.trim()||(this.selection.restore(),this.unlink(),t.preventDefault(),this.closeActions()),!this.validateURL(e))return this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void c.default.log("Incorrect Link pasted","warn",e);e=this.prepareLink(e),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(e),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}},{key:"validateURL",value:function(t){return!/\s/.test(t)}},{key:"prepareLink",value:function(t){return t=t.trim(),t=this.addProtocol(t)}},{key:"addProtocol",value:function(t){if(/^(\w+):(\/\/)?/.test(t))return t;var e=/^\/[^\/\s]/.test(t),n="#"===t.substring(0,1),o=/^\/\/[^\/\s]/.test(t);return e||n||o||(t="http://"+t),t}},{key:"insertLink",value:function(t){var e=this.selection.findParentTag("A");e&&this.selection.expandToTag(e),document.execCommand(this.commandLink,!1,t)}},{key:"unlink",value:function(){document.execCommand(this.commandUnlink)}},{key:"shortcut",get:function(){return"CMD+K"}}],[{key:"sanitize",get:function(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}}]),t}();o.default=u,u.displayName="LinkInlineTool",u.isInline=!0,t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e,n){var o,r,i;r=[e,n(1),n(2),n(13)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(3);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var c=function(){function t(e){var n=e.data;e.config,e.api,(0,r.default)(this,t),this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.title=n.title||"Error",this.subtitle="The block can not be displayed correctly.",this.savedData=n.savedData,this.wrapper=this.make()}return(0,i.default)(t,[{key:"render",value:function(){return this.wrapper}},{key:"save",value:function(){return this.savedData}},{key:"make",value:function(){var t=a.default.make("div",this.CSS.wrapper),e=a.default.svg("sad-face",52,52),n=a.default.make("div",this.CSS.info),o=a.default.make("div",this.CSS.title,{textContent:this.title}),r=a.default.make("div",this.CSS.subtitle,{textContent:this.subtitle});return t.appendChild(e),n.appendChild(o),n.appendChild(r),t.appendChild(n),t}}]),t}();o.default=c,c.displayName="Stub",t.exports=e.default})?o.apply(e,r):o)||(t.exports=i)},function(t,e){t.exports='\n\n\r\n \r\n\n\n\r\n \r\n\n\n\n\n\r\n \r\n\n\n\r\n \r\n \r\n \r\n \r\n \r\n\n\n\r\n \r\n\n\n\n\n\r\n \r\n\n\n\r\n \r\n\n\n\r\n \r\n\n'},function(t,e){t.exports='.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide,.codex-editor__redactor--hidden{display:none}@media (min-width:651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor__loader{position:relative;height:30vh}.codex-editor__loader:before{content:"";position:absolute;left:50%;top:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:2px solid rgba(201,201,204,.48);border-top-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:editor-loader-spin .8s linear infinite;animation:editor-loader-spin .8s linear infinite;will-change:transform}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:rgba(46,170,220,.2);border:1px solid transparent}.codex-editor svg{fill:currentColor;vertical-align:middle;max-height:100%}::selection{background-color:#a8d6ff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}@-webkit-keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,transform;display:none}@media (max-width:650px){.ce-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}}@media (max-width:650px) and (max-width:650px){.ce-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}@media (max-width:650px){.ce-toolbar:before{content:"";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-toolbar{padding:3px;margin-top:5px}.ce-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar--opened{display:block}@media (max-width:650px){.ce-toolbar--opened{display:-webkit-box;display:-ms-flexbox;display:flex}}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}@media (max-width:650px){.ce-toolbar__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin:0;max-width:calc(100% - 40px)}}.ce-toolbar__plus{color:#707684;cursor:pointer;width:34px;height:34px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;left:-34px;-ms-flex-negative:0;flex-shrink:0}.ce-toolbar__plus--active,.ce-toolbar__plus:hover{color:#388ae5}.ce-toolbar__plus--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus--hidden{display:none}@media (max-width:650px){.ce-toolbar__plus{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;position:static;-webkit-transform:none!important;transform:none!important}}.ce-toolbar .ce-toolbox,.ce-toolbar__plus{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ce-toolbar__actions{position:absolute;right:0;top:10px;padding-right:16px;opacity:0}@media (max-width:650px){.ce-toolbar__actions{position:static;margin-left:auto;padding-right:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.ce-toolbar__actions--opened{opacity:1}.ce-toolbar__actions-buttons{text-align:right}.ce-toolbar__settings-btn{display:inline-block;width:24px;height:24px;color:#707684;cursor:pointer}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{position:absolute;visibility:hidden;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}@media (max-width:650px){.ce-toolbox{position:static;-webkit-transform:none!important;transform:none!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow-x:auto}}.ce-toolbox--opened{opacity:1;visibility:visible}.ce-toolbox__button{color:#707684;cursor:pointer;width:34px;height:34px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0}.ce-toolbox__button--active,.ce-toolbox__button:hover{color:#388ae5}.ce-toolbox__button--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbox__tooltip{position:absolute;top:25px;padding:6px 10px;border-radius:5px;opacity:0;background:#eff2f5;-webkit-box-shadow:0 10px 12px -9px rgba(26,39,54,.32),0 3px 2px -2px rgba(33,48,73,.05);box-shadow:0 10px 12px -9px rgba(26,39,54,.32),0 3px 2px -2px rgba(33,48,73,.05);color:#5c6174;font-size:12px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity .15s ease-in,left .1s linear;transition:opacity .15s ease-in,left .1s linear;will-change:opacity,left;letter-spacing:.02em;line-height:1em}@media (max-width:650px){.ce-toolbox__tooltip{display:none}}.ce-toolbox__tooltip-shortcut{color:rgba(100,105,122,.6);word-spacing:-2px;margin-top:5px}.ce-toolbox__tooltip--shown{opacity:1;-webkit-transition-delay:.1s,0s;transition-delay:.1s,0s}.ce-toolbox__tooltip:before{content:"";width:10px;height:10px;position:absolute;top:-5px;left:50%;margin-left:-5px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#eff2f5;z-index:-1}@media (min-width:651px){.codex-editor--narrow .ce-toolbox{background:#fff;z-index:2}}.ce-inline-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-inline-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-inline-toolbar:before{content:"";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-inline-toolbar{padding:3px;-webkit-transform:translateX(-50%) translateY(8px) scale(.9);transform:translateX(-50%) translateY(8px) scale(.9);-webkit-box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.9);transform:translateX(-23px) translateY(8px) scale(.9)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translateX(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.9);transform:translateX(-100%) translateY(8px) scale(.9);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-inline-tool:hover{background-color:#eff2f5}.ce-inline-tool{line-height:normal}.ce-inline-tool .icon,.ce-inline-tool>svg{margin:auto}.ce-inline-tool--active{color:#388ae5}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool:not(:last-of-type){margin-right:2px}.ce-inline-tool--last{margin-right:0!important}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block}.ce-inline-tool-input{background-color:#eff2f5;outline:none;border:0;border-radius:3px;margin:3px 0 0;font-size:13px;padding:8px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-conversion-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-conversion-toolbar:before{content:"";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-conversion-toolbar{padding:3px;-webkit-box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;-webkit-transform:translateY(8px) scale(.9);transform:translateY(8px) scale(.9)}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar:before{left:20px}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-conversion-tool:hover{background-color:#eff2f5}.ce-conversion-tool{line-height:normal}.ce-conversion-tool .icon,.ce-conversion-tool>svg{margin:auto}.ce-conversion-tool--active{color:#388ae5}.ce-conversion-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:not(:last-of-type){margin-right:2px}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active,.ce-conversion-tool:hover{color:#388ae5!important}.ce-conversion-tool--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-settings{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-settings:before{content:"";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-settings{right:5px;top:35px;min-width:114px}.ce-settings--left-oriented:before{left:15px;margin-left:0}.ce-settings--right-oriented:before{left:auto;right:15px;margin-left:0}@media (max-width:650px){.ce-settings{bottom:50px;top:auto}}.ce-settings:before{left:auto;right:12px}@media (max-width:650px){.ce-settings:before{bottom:-5px;top:auto}}.ce-settings{display:none}.ce-settings--opened{display:block;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-name:panelShowing;animation-name:panelShowing}.ce-settings__plugin-zone:not(:empty){padding:3px 3px 0}.ce-settings__default-zone:not(:empty){padding:3px}.ce-settings__button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-settings__button:hover{background-color:#eff2f5}.ce-settings__button .icon,.ce-settings__button>svg{margin:auto}.ce-settings__button--active{color:#388ae5}.ce-settings__button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button{line-height:32px}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#388ae5}.ce-settings__button--delete{-webkit-transition:background-color .3s ease;transition:background-color .3s ease;will-change:background-color}.ce-settings__button--delete .icon{-webkit-transition:-webkit-transform .2s ease-out;transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out;transition:transform .2s ease-out,-webkit-transform .2s ease-out;will-change:transform}.ce-settings__button--confirm{background-color:#e24a4a!important;color:#fff}.ce-settings__button--confirm:hover{background-color:#d54a4a!important}.ce-settings__button--confirm .icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-block:first-of-type{margin-top:0}.ce-block--focused{background-image:linear-gradient(17deg,rgba(243,248,255,.03) 63.45%,rgba(207,214,229,.27) 98%);border-radius:3px}@media (max-width:650px){.ce-block--focused{background-image:none;background-color:rgba(200,199,219,.17);margin:0 -10px;padding:0 10px}}.ce-block--selected .ce-block__content{background:#a8d6ff;-webkit-box-shadow:0 31px 23px -22px #afdcff;box-shadow:0 31px 23px -22px #afdcff;-webkit-animation:selectionBounce .2s 1;animation:selectionBounce .2s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content .ce-stub,.ce-block--selected .ce-block__content img{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388ae5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388ae5,#388ae5 1px,#fff 0,#fff 6px)}.ce-block a{cursor:pointer;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@media (min-width:651px){.codex-editor--narrow .ce-block--focused{margin-right:-50px;padding-right:50px}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cdx-block{padding:.7em 0}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.cdx-settings-button:hover{background-color:#eff2f5}.cdx-settings-button .icon,.cdx-settings-button>svg{margin:auto}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button:not(:nth-child(3n+3)){margin-right:3px}.cdx-settings-button:nth-child(n+4){margin-top:3px}.cdx-settings-button--active{color:#388ae5}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s linear infinite;animation:cdxRotation 1.2s linear infinite}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px 0 rgba(18,30,57,.04);color:#707684;text-align:center;cursor:pointer}.cdx-button:hover{background:#fbfcfe;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px 0 rgba(18,30,57,.08)}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:3.5em 0;margin:17px 0;border-radius:3px;background:#fcf7f7;color:#b46262}.ce-stub__info{margin-left:20px}.ce-stub__title{margin-bottom:3px;font-weight:600;font-size:18px;text-transform:capitalize}.ce-stub__subtitle{font-size:16px}'}])}); \ No newline at end of file +var i=function(){function e(t){var n=t.data,r=t.config,o=t.api;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.api=o,this._CSS={block:this.api.styles.block,wrapper:"ce-paragraph"},this.onKeyUp=this.onKeyUp.bind(this),this._placeholder=r.placeholder?r.placeholder:e.DEFAULT_PLACEHOLDER,this._data={},this._element=this.drawView(),this.data=n}return o(e,null,[{key:"DEFAULT_PLACEHOLDER",get:function(){return""}}]),o(e,[{key:"onKeyUp",value:function(e){"Backspace"!==e.code&&"Delete"!==e.code||""===this._element.textContent&&(this._element.innerHTML="")}},{key:"drawView",value:function(){var e=document.createElement("DIV");return e.classList.add(this._CSS.wrapper,this._CSS.block),e.contentEditable=!0,e.dataset.placeholder=this._placeholder,e.addEventListener("keyup",this.onKeyUp),e}},{key:"render",value:function(){return this._element}},{key:"merge",value:function(e){var t={text:this.data.text+e.text};this.data=t}},{key:"validate",value:function(e){return""!==e.text.trim()}},{key:"save",value:function(e){return{text:e.innerHTML}}},{key:"onPaste",value:function(e){var t={text:e.detail.data.innerHTML};this.data=t}},{key:"data",get:function(){var e=this._element.innerHTML;return this._data.text=e,this._data},set:function(e){this._data=e||{},this._element.innerHTML=this._data.text||""}}],[{key:"conversionConfig",get:function(){return{export:"text",import:"text"}}},{key:"sanitize",get:function(){return{text:{br:!0}}}},{key:"pasteConfig",get:function(){return{tags:["P"]}}}]),e}();e.exports=i},function(e,t,n){var r=n(2);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(4)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,".ce-paragraph {\n line-height: 1.6em;\n outline: none;\n}\n\n.ce-paragraph[data-placeholder]:empty::before{\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n opacity: 0;\n}\n\n/** Show placeholder at the first paragraph if Editor is empty */\n.codex-editor--empty .ce-block:first-child .ce-paragraph[data-placeholder]:empty::before {\n opacity: 1;\n}\n\n.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph[data-placeholder]:empty::before,\n.codex-editor--empty .ce-block:first-child .ce-paragraph[data-placeholder]:empty:focus::before {\n opacity: 0;\n}\n\n.ce-paragraph p:first-of-type{\n margin-top: 0;\n}\n\n.ce-paragraph p:last-of-type{\n margin-bottom: 0;\n}\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&f.splice(t,1)}function v(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),b(t,e.attrs),h(e,t),t}function b(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=c||(c=v(t)),r=w.bind(null,n,a,!1),o=w.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",b(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=l(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return p(n,t),function(e){for(var r=[],o=0;o 1 && arguments[1] !== undefined ? arguments[1] : 'log'; + var args = arguments.length > 2 ? arguments[2] : undefined; + var style = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'color: inherit'; + + if (!('console' in window) || !window.console[type]) { + return; + } + + var editorLabelText = "Editor.js ".concat("2.15.0"); + var editorLabelStyle = "line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;"; + + try { + if (['time', 'timeEnd'].includes(type)) { + console[type]("( ".concat(editorLabelText, " ) ").concat(msg)); + } else if (args) { + console[type]("%c".concat(editorLabelText, "%c ").concat(msg, " %o"), editorLabelStyle, style, args); + } else { + console[type]("%c".concat(editorLabelText, "%c ").concat(msg), editorLabelStyle, style); + } + } catch (ignored) {} + } + /** + * Returns basic keycodes as constants + * @return {{}} + */ + + }, { + key: "isPrintableKey", + + /** + * Returns true if passed key code is printable (a-Z, 0-9, etc) character. + * @param {number} keyCode + * @return {boolean} + */ + value: function isPrintableKey(keyCode) { + return keyCode > 47 && keyCode < 58 || // number keys + keyCode === 32 || keyCode === 13 || // Spacebar & return key(s) + keyCode > 64 && keyCode < 91 || // letter keys + keyCode > 95 && keyCode < 112 || // Numpad keys + keyCode > 185 && keyCode < 193 || // ;=,-./` (in order) + keyCode > 218 && keyCode < 223; // [\]' (in order) + } + /** + * Fires a promise sequence asyncronically + * + * @param {ChainData[]} chains - list or ChainData's + * @param {Function} success - success callback + * @param {Function} fallback - callback that fires in case of errors + * + * @return {Promise} + */ + + }, { + key: "sequence", + value: function () { + var _sequence = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee3(chains) { + var success, + fallback, + waitNextBlock, + _waitNextBlock, + _args3 = arguments; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _waitNextBlock = function _ref3() { + _waitNextBlock = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2(chainData, successCallback, fallbackCallback) { + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.prev = 0; + _context2.next = 3; + return chainData.function(chainData.data); + + case 3: + _context2.next = 5; + return successCallback(typeof chainData.data !== 'undefined' ? chainData.data : {}); + + case 5: + _context2.next = 10; + break; + + case 7: + _context2.prev = 7; + _context2.t0 = _context2["catch"](0); + fallbackCallback(typeof chainData.data !== 'undefined' ? chainData.data : {}); + + case 10: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[0, 7]]); + })); + return _waitNextBlock.apply(this, arguments); + }; + + waitNextBlock = function _ref2(_x2, _x3, _x4) { + return _waitNextBlock.apply(this, arguments); + }; + + success = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : function () {}; + fallback = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : function () {}; + _context3.next = 6; + return chains.reduce( + /*#__PURE__*/ + function () { + var _ref = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(previousValue, currentValue) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return previousValue; + + case 2: + return _context.abrupt("return", waitNextBlock(currentValue, success, fallback)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x5, _x6) { + return _ref.apply(this, arguments); + }; + }(), Promise.resolve()); + + case 6: + return _context3.abrupt("return", _context3.sent); + + case 7: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function sequence(_x) { + return _sequence.apply(this, arguments); + }; + }() + /** + * Make array from array-like collection + * + * @param {ArrayLike} collection + * + * @return {Array} + */ + + }, { + key: "array", + value: function array(collection) { + return Array.prototype.slice.call(collection); + } + /** + * Check if passed variable is a function + * @param {*} fn + * @return {boolean} + */ + + }, { + key: "isFunction", + value: function isFunction(fn) { + return typeof fn === 'function'; + } + /** + * Check if passed function is a class + * @param {function} fn + * @return {boolean} + */ + + }, { + key: "isClass", + value: function isClass(fn) { + return typeof fn === 'function' && /^\s*class\s+/.test(fn.toString()); + } + /** + * Checks if object is empty + * + * @param {Object} object + * @return {boolean} + */ + + }, { + key: "isEmpty", + value: function isEmpty(object) { + if (!object) { + return true; + } + + return Object.keys(object).length === 0 && object.constructor === Object; + } + /** + * Check if passed object is a Promise + * @param {*} object - object to check + * @return {Boolean} + */ + + }, { + key: "isPromise", + value: function isPromise(object) { + return Promise.resolve(object) === object; + } + /** + * Delays method execution + * + * @param {Function} method + * @param {Number} timeout + */ + + }, { + key: "delay", + value: function delay(method, timeout) { + return function () { + var context = this, + args = arguments; + window.setTimeout(function () { + return method.apply(context, args); + }, timeout); + }; + } + /** + * Get file extension + * + * @param {File} file + * @return string + */ + + }, { + key: "getFileExtension", + value: function getFileExtension(file) { + return file.name.split('.').pop(); + } + /** + * Check if string is MIME type + * + * @param {string} type + * @return boolean + */ + + }, { + key: "isValidMimeType", + value: function isValidMimeType(type) { + return /^[-\w]+\/([-+\w]+|\*)$/.test(type); + } + /** + * Debouncing method + * Call method after passed time + * + * Note that this method returns Function and declared variable need to be called + * + * @param {Function} func - function that we're throttling + * @param {Number} wait - time in milliseconds + * @param {Boolean} immediate - call now + * @return {Function} + */ + + }, { + key: "debounce", + value: function debounce(func, wait, immediate) { + var _this = this, + _arguments = arguments; + + var timeout; + return function () { + var context = _this, + args = _arguments; + + var later = function later() { + timeout = null; + + if (!immediate) { + func.apply(context, args); + } + }; + + var callNow = immediate && !timeout; + window.clearTimeout(timeout); + timeout = window.setTimeout(later, wait); + + if (callNow) { + func.apply(context, args); + } + }; + } + /** + * Copies passed text to the clipboard + * @param text + */ + + }, { + key: "copyTextToClipboard", + value: function copyTextToClipboard(text) { + var el = _dom.default.make('div', 'codex-editor-clipboard', { + innerHTML: text + }); + + document.body.appendChild(el); + var selection = window.getSelection(); + var range = document.createRange(); + range.selectNode(el); + window.getSelection().removeAllRanges(); + selection.addRange(range); + document.execCommand('copy'); + document.body.removeChild(el); + } + /** + * Returns object with os name as key and boolean as value. Shows current user OS + * + * @return {[key: string]: boolean} + */ + + }, { + key: "getUserOS", + value: function getUserOS() { + var OS = { + win: false, + mac: false, + x11: false, + linux: false + }; + var userOS = Object.keys(OS).find(function (os) { + return navigator.appVersion.toLowerCase().indexOf(os) !== -1; + }); + + if (userOS) { + OS[userOS] = true; + return OS; + } + + return OS; + } + /** + * Capitalizes first letter of the string + * @param {string} text + * @return {string} + */ + + }, { + key: "capitalize", + value: function capitalize(text) { + return text[0].toUpperCase() + text.slice(1); + } + /** + * Merge to objects recursively + * @param {object} target + * @param {object[]} sources + * @return {object} + */ + + }, { + key: "deepMerge", + value: function deepMerge(target) { + var isObject = function isObject(item) { + return item && Util.typeof(item) === 'object'; + }; + + for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + sources[_key - 1] = arguments[_key]; + } + + if (!sources.length) { + return target; + } + + var source = sources.shift(); + + if (isObject(target) && isObject(source)) { + for (var key in source) { + if (isObject(source[key])) { + if (!target[key]) { + Object.assign(target, (0, _defineProperty2.default)({}, key, {})); + } + + Util.deepMerge(target[key], source[key]); + } else { + Object.assign(target, (0, _defineProperty2.default)({}, key, source[key])); + } + } + } + + return Util.deepMerge.apply(Util, [target].concat(sources)); + } + /** + * Return true if current device supports touch events + * + * Note! This is a simple solution, it can give false-positive results. + * To detect touch devices more carefully, use 'touchstart' event listener + * @see http://www.stucox.com/blog/you-cant-detect-a-touchscreen/ + * + * @return {boolean} + */ + + }, { + key: "isTouchSupported", + value: function isTouchSupported() { + return 'ontouchstart' in document.documentElement; + } + /** + * Return string representation of the object type + * + * @param {any} object + */ + + }, { + key: "typeof", + value: function _typeof(object) { + return Object.prototype.toString.call(object).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); + } + }, { + key: "keyCodes", + get: function get() { + return { + BACKSPACE: 8, + TAB: 9, + ENTER: 13, + SHIFT: 16, + CTRL: 17, + ALT: 18, + ESC: 27, + SPACE: 32, + LEFT: 37, + UP: 38, + DOWN: 40, + RIGHT: 39, + DELETE: 46, + META: 91 + }; + } + /** + * Return mouse buttons codes + */ + + }, { + key: "mouseButtons", + get: function get() { + return { + LEFT: 0, + WHEEL: 1, + RIGHT: 2, + BACKWARD: 3, + FORWARD: 4 + }; + } + }]); + return Util; + }(); + + _exports.default = Util; + Util.displayName = "Util"; + module.exports = exports.default; +}); + +/***/ }), + +/***/ "./src/styles/main.css": +/*!*****************************!*\ + !*** ./src/styles/main.css ***! + \*****************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide,.codex-editor__redactor--hidden{display:none}@media (min-width:651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor__loader{position:relative;height:30vh}.codex-editor__loader:before{content:\"\";position:absolute;left:50%;top:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:2px solid rgba(201,201,204,.48);border-top-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:editor-loader-spin .8s linear infinite;animation:editor-loader-spin .8s linear infinite;will-change:transform}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:rgba(46,170,220,.2);border:1px solid transparent}.codex-editor svg{fill:currentColor;vertical-align:middle;max-height:100%}::selection{background-color:#a8d6ff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}@-webkit-keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,transform;display:none}@media (max-width:650px){.ce-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}}@media (max-width:650px) and (max-width:650px){.ce-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}@media (max-width:650px){.ce-toolbar:before{content:\"\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-toolbar{padding:3px;margin-top:5px}.ce-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar--opened{display:block}@media (max-width:650px){.ce-toolbar--opened{display:-webkit-box;display:-ms-flexbox;display:flex}}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}@media (max-width:650px){.ce-toolbar__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin:0;max-width:calc(100% - 40px)}}.ce-toolbar__plus{color:#707684;cursor:pointer;width:34px;height:34px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;left:-34px;-ms-flex-negative:0;flex-shrink:0}.ce-toolbar__plus--active,.ce-toolbar__plus:hover{color:#388ae5}.ce-toolbar__plus--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus--hidden{display:none}@media (max-width:650px){.ce-toolbar__plus{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;position:static;-webkit-transform:none!important;transform:none!important}}.ce-toolbar .ce-toolbox,.ce-toolbar__plus{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ce-toolbar__actions{position:absolute;right:0;top:10px;padding-right:16px;opacity:0}@media (max-width:650px){.ce-toolbar__actions{position:static;margin-left:auto;padding-right:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.ce-toolbar__actions--opened{opacity:1}.ce-toolbar__actions-buttons{text-align:right}.ce-toolbar__settings-btn{display:inline-block;width:24px;height:24px;color:#707684;cursor:pointer}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{position:absolute;visibility:hidden;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}@media (max-width:650px){.ce-toolbox{position:static;-webkit-transform:none!important;transform:none!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow-x:auto}}.ce-toolbox--opened{opacity:1;visibility:visible}.ce-toolbox__button{color:#707684;cursor:pointer;width:34px;height:34px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0}.ce-toolbox__button--active,.ce-toolbox__button:hover{color:#388ae5}.ce-toolbox__button--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbox__tooltip{position:absolute;top:25px;padding:6px 10px;border-radius:5px;opacity:0;background:#eff2f5;-webkit-box-shadow:0 10px 12px -9px rgba(26,39,54,.32),0 3px 2px -2px rgba(33,48,73,.05);box-shadow:0 10px 12px -9px rgba(26,39,54,.32),0 3px 2px -2px rgba(33,48,73,.05);color:#5c6174;font-size:12px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity .15s ease-in,left .1s linear;transition:opacity .15s ease-in,left .1s linear;will-change:opacity,left;letter-spacing:.02em;line-height:1em}@media (max-width:650px){.ce-toolbox__tooltip{display:none}}.ce-toolbox__tooltip-shortcut{color:rgba(100,105,122,.6);word-spacing:-2px;margin-top:5px}.ce-toolbox__tooltip--shown{opacity:1;-webkit-transition-delay:.1s,0s;transition-delay:.1s,0s}.ce-toolbox__tooltip:before{content:\"\";width:10px;height:10px;position:absolute;top:-5px;left:50%;margin-left:-5px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#eff2f5;z-index:-1}@media (min-width:651px){.codex-editor--narrow .ce-toolbox{background:#fff;z-index:2}}.ce-inline-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-inline-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-inline-toolbar:before{content:\"\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-inline-toolbar{padding:3px;-webkit-transform:translateX(-50%) translateY(8px) scale(.9);transform:translateX(-50%) translateY(8px) scale(.9);-webkit-box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.9);transform:translateX(-23px) translateY(8px) scale(.9)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translateX(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.9);transform:translateX(-100%) translateY(8px) scale(.9);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-inline-tool:hover{background-color:#eff2f5}.ce-inline-tool{line-height:normal}.ce-inline-tool .icon,.ce-inline-tool>svg{margin:auto}.ce-inline-tool--active{color:#388ae5}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool:not(:last-of-type){margin-right:2px}.ce-inline-tool--last{margin-right:0!important}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block}.ce-inline-tool-input{background-color:#eff2f5;outline:none;border:0;border-radius:3px;margin:3px 0 0;font-size:13px;padding:8px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-conversion-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-conversion-toolbar:before{content:\"\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-conversion-toolbar{padding:3px;-webkit-box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;-webkit-transform:translateY(8px) scale(.9);transform:translateY(8px) scale(.9)}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar:before{left:20px}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-conversion-tool:hover{background-color:#eff2f5}.ce-conversion-tool{line-height:normal}.ce-conversion-tool .icon,.ce-conversion-tool>svg{margin:auto}.ce-conversion-tool--active{color:#388ae5}.ce-conversion-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:not(:last-of-type){margin-right:2px}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active,.ce-conversion-tool:hover{color:#388ae5!important}.ce-conversion-tool--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-settings{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-settings:before{content:\"\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-settings{right:5px;top:35px;min-width:114px}.ce-settings--left-oriented:before{left:15px;margin-left:0}.ce-settings--right-oriented:before{left:auto;right:15px;margin-left:0}@media (max-width:650px){.ce-settings{bottom:50px;top:auto}}.ce-settings:before{left:auto;right:12px}@media (max-width:650px){.ce-settings:before{bottom:-5px;top:auto}}.ce-settings{display:none}.ce-settings--opened{display:block;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-name:panelShowing;animation-name:panelShowing}.ce-settings__plugin-zone:not(:empty){padding:3px 3px 0}.ce-settings__default-zone:not(:empty){padding:3px}.ce-settings__button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-settings__button:hover{background-color:#eff2f5}.ce-settings__button .icon,.ce-settings__button>svg{margin:auto}.ce-settings__button--active{color:#388ae5}.ce-settings__button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button{line-height:32px}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#388ae5}.ce-settings__button--delete{-webkit-transition:background-color .3s ease;transition:background-color .3s ease;will-change:background-color}.ce-settings__button--delete .icon{-webkit-transition:-webkit-transform .2s ease-out;transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out;transition:transform .2s ease-out,-webkit-transform .2s ease-out;will-change:transform}.ce-settings__button--confirm{background-color:#e24a4a!important;color:#fff}.ce-settings__button--confirm:hover{background-color:#d54a4a!important}.ce-settings__button--confirm .icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-block:first-of-type{margin-top:0}.ce-block--focused{background-image:linear-gradient(17deg,rgba(243,248,255,.03) 63.45%,rgba(207,214,229,.27) 98%);border-radius:3px}@media (max-width:650px){.ce-block--focused{background-image:none;background-color:rgba(200,199,219,.17);margin:0 -10px;padding:0 10px}}.ce-block--selected .ce-block__content{background:#a8d6ff;-webkit-box-shadow:0 31px 23px -22px #afdcff;box-shadow:0 31px 23px -22px #afdcff;-webkit-animation:selectionBounce .2s 1;animation:selectionBounce .2s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content .ce-stub,.ce-block--selected .ce-block__content img{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto}.ce-block--drop-target .ce-block__content:before{content:\"\";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388ae5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:\"\";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388ae5,#388ae5 1px,#fff 0,#fff 6px)}.ce-block a{cursor:pointer;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@media (min-width:651px){.codex-editor--narrow .ce-block--focused{margin-right:-50px;padding-right:50px}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cdx-block{padding:.7em 0}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.cdx-settings-button:hover{background-color:#eff2f5}.cdx-settings-button .icon,.cdx-settings-button>svg{margin:auto}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button:not(:nth-child(3n+3)){margin-right:3px}.cdx-settings-button:nth-child(n+4){margin-top:3px}.cdx-settings-button--active{color:#388ae5}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:\"\";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s linear infinite;animation:cdxRotation 1.2s linear infinite}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px 0 rgba(18,30,57,.04);color:#707684;text-align:center;cursor:pointer}.cdx-button:hover{background:#fbfcfe;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px 0 rgba(18,30,57,.08)}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:3.5em 0;margin:17px 0;border-radius:3px;background:#fcf7f7;color:#b46262}.ce-stub__info{margin-left:20px}.ce-stub__title{margin-bottom:3px;font-weight:600;font-size:18px;text-transform:capitalize}.ce-stub__subtitle{font-size:16px}" + +/***/ }), + +/***/ 0: +/*!*******************************************************!*\ + !*** multi @babel/polyfill/noConflict ./src/codex.ts ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! @babel/polyfill/noConflict */"./node_modules/@babel/polyfill/noConflict.js"); +module.exports = __webpack_require__(/*! ./src/codex.ts */"./src/codex.ts"); + + +/***/ }) + +/******/ }); +}); +//# sourceMappingURL=editor.js.map \ No newline at end of file diff --git a/dist/editor.js.map b/dist/editor.js.map new file mode 100644 index 00000000..d7f6c66e --- /dev/null +++ b/dist/editor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://EditorJS/webpack/universalModuleDefinition","webpack://EditorJS/webpack/bootstrap","webpack://EditorJS/./dist/sprite.svg","webpack://EditorJS/./node_modules/@babel/polyfill/lib/noConflict.js","webpack://EditorJS/./node_modules/@babel/polyfill/noConflict.js","webpack://EditorJS/./node_modules/@babel/register/lib/browser.js","webpack://EditorJS/./node_modules/@babel/register/lib/index.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/createClass.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/inherits.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://EditorJS/./node_modules/@babel/runtime/helpers/typeof.js","webpack://EditorJS/./node_modules/@babel/runtime/regenerator/index.js","webpack://EditorJS/./node_modules/@codexteam/shortcuts/dist/shortcuts.js","webpack://EditorJS/./node_modules/codex-notifier/dist/bundle.js","webpack://EditorJS/./node_modules/core-js/es6/index.js","webpack://EditorJS/./node_modules/core-js/fn/array/includes.js","webpack://EditorJS/./node_modules/core-js/fn/object/entries.js","webpack://EditorJS/./node_modules/core-js/fn/object/get-own-property-descriptors.js","webpack://EditorJS/./node_modules/core-js/fn/object/values.js","webpack://EditorJS/./node_modules/core-js/fn/promise/finally.js","webpack://EditorJS/./node_modules/core-js/fn/string/pad-end.js","webpack://EditorJS/./node_modules/core-js/fn/string/pad-start.js","webpack://EditorJS/./node_modules/core-js/fn/symbol/async-iterator.js","webpack://EditorJS/./node_modules/core-js/modules/_a-function.js","webpack://EditorJS/./node_modules/core-js/modules/_a-number-value.js","webpack://EditorJS/./node_modules/core-js/modules/_add-to-unscopables.js","webpack://EditorJS/./node_modules/core-js/modules/_an-instance.js","webpack://EditorJS/./node_modules/core-js/modules/_an-object.js","webpack://EditorJS/./node_modules/core-js/modules/_array-copy-within.js","webpack://EditorJS/./node_modules/core-js/modules/_array-fill.js","webpack://EditorJS/./node_modules/core-js/modules/_array-includes.js","webpack://EditorJS/./node_modules/core-js/modules/_array-methods.js","webpack://EditorJS/./node_modules/core-js/modules/_array-reduce.js","webpack://EditorJS/./node_modules/core-js/modules/_array-species-constructor.js","webpack://EditorJS/./node_modules/core-js/modules/_array-species-create.js","webpack://EditorJS/./node_modules/core-js/modules/_bind.js","webpack://EditorJS/./node_modules/core-js/modules/_classof.js","webpack://EditorJS/./node_modules/core-js/modules/_cof.js","webpack://EditorJS/./node_modules/core-js/modules/_collection-strong.js","webpack://EditorJS/./node_modules/core-js/modules/_collection-weak.js","webpack://EditorJS/./node_modules/core-js/modules/_collection.js","webpack://EditorJS/./node_modules/core-js/modules/_core.js","webpack://EditorJS/./node_modules/core-js/modules/_create-property.js","webpack://EditorJS/./node_modules/core-js/modules/_ctx.js","webpack://EditorJS/./node_modules/core-js/modules/_date-to-iso-string.js","webpack://EditorJS/./node_modules/core-js/modules/_date-to-primitive.js","webpack://EditorJS/./node_modules/core-js/modules/_defined.js","webpack://EditorJS/./node_modules/core-js/modules/_descriptors.js","webpack://EditorJS/./node_modules/core-js/modules/_dom-create.js","webpack://EditorJS/./node_modules/core-js/modules/_enum-bug-keys.js","webpack://EditorJS/./node_modules/core-js/modules/_enum-keys.js","webpack://EditorJS/./node_modules/core-js/modules/_export.js","webpack://EditorJS/./node_modules/core-js/modules/_fails-is-regexp.js","webpack://EditorJS/./node_modules/core-js/modules/_fails.js","webpack://EditorJS/./node_modules/core-js/modules/_fix-re-wks.js","webpack://EditorJS/./node_modules/core-js/modules/_flags.js","webpack://EditorJS/./node_modules/core-js/modules/_for-of.js","webpack://EditorJS/./node_modules/core-js/modules/_global.js","webpack://EditorJS/./node_modules/core-js/modules/_has.js","webpack://EditorJS/./node_modules/core-js/modules/_hide.js","webpack://EditorJS/./node_modules/core-js/modules/_html.js","webpack://EditorJS/./node_modules/core-js/modules/_ie8-dom-define.js","webpack://EditorJS/./node_modules/core-js/modules/_inherit-if-required.js","webpack://EditorJS/./node_modules/core-js/modules/_invoke.js","webpack://EditorJS/./node_modules/core-js/modules/_iobject.js","webpack://EditorJS/./node_modules/core-js/modules/_is-array-iter.js","webpack://EditorJS/./node_modules/core-js/modules/_is-array.js","webpack://EditorJS/./node_modules/core-js/modules/_is-integer.js","webpack://EditorJS/./node_modules/core-js/modules/_is-object.js","webpack://EditorJS/./node_modules/core-js/modules/_is-regexp.js","webpack://EditorJS/./node_modules/core-js/modules/_iter-call.js","webpack://EditorJS/./node_modules/core-js/modules/_iter-create.js","webpack://EditorJS/./node_modules/core-js/modules/_iter-define.js","webpack://EditorJS/./node_modules/core-js/modules/_iter-detect.js","webpack://EditorJS/./node_modules/core-js/modules/_iter-step.js","webpack://EditorJS/./node_modules/core-js/modules/_iterators.js","webpack://EditorJS/./node_modules/core-js/modules/_library.js","webpack://EditorJS/./node_modules/core-js/modules/_math-expm1.js","webpack://EditorJS/./node_modules/core-js/modules/_math-fround.js","webpack://EditorJS/./node_modules/core-js/modules/_math-log1p.js","webpack://EditorJS/./node_modules/core-js/modules/_math-sign.js","webpack://EditorJS/./node_modules/core-js/modules/_meta.js","webpack://EditorJS/./node_modules/core-js/modules/_microtask.js","webpack://EditorJS/./node_modules/core-js/modules/_new-promise-capability.js","webpack://EditorJS/./node_modules/core-js/modules/_object-assign.js","webpack://EditorJS/./node_modules/core-js/modules/_object-create.js","webpack://EditorJS/./node_modules/core-js/modules/_object-dp.js","webpack://EditorJS/./node_modules/core-js/modules/_object-dps.js","webpack://EditorJS/./node_modules/core-js/modules/_object-gopd.js","webpack://EditorJS/./node_modules/core-js/modules/_object-gopn-ext.js","webpack://EditorJS/./node_modules/core-js/modules/_object-gopn.js","webpack://EditorJS/./node_modules/core-js/modules/_object-gops.js","webpack://EditorJS/./node_modules/core-js/modules/_object-gpo.js","webpack://EditorJS/./node_modules/core-js/modules/_object-keys-internal.js","webpack://EditorJS/./node_modules/core-js/modules/_object-keys.js","webpack://EditorJS/./node_modules/core-js/modules/_object-pie.js","webpack://EditorJS/./node_modules/core-js/modules/_object-sap.js","webpack://EditorJS/./node_modules/core-js/modules/_object-to-array.js","webpack://EditorJS/./node_modules/core-js/modules/_own-keys.js","webpack://EditorJS/./node_modules/core-js/modules/_parse-float.js","webpack://EditorJS/./node_modules/core-js/modules/_parse-int.js","webpack://EditorJS/./node_modules/core-js/modules/_perform.js","webpack://EditorJS/./node_modules/core-js/modules/_promise-resolve.js","webpack://EditorJS/./node_modules/core-js/modules/_property-desc.js","webpack://EditorJS/./node_modules/core-js/modules/_redefine-all.js","webpack://EditorJS/./node_modules/core-js/modules/_redefine.js","webpack://EditorJS/./node_modules/core-js/modules/_same-value.js","webpack://EditorJS/./node_modules/core-js/modules/_set-proto.js","webpack://EditorJS/./node_modules/core-js/modules/_set-species.js","webpack://EditorJS/./node_modules/core-js/modules/_set-to-string-tag.js","webpack://EditorJS/./node_modules/core-js/modules/_shared-key.js","webpack://EditorJS/./node_modules/core-js/modules/_shared.js","webpack://EditorJS/./node_modules/core-js/modules/_species-constructor.js","webpack://EditorJS/./node_modules/core-js/modules/_strict-method.js","webpack://EditorJS/./node_modules/core-js/modules/_string-at.js","webpack://EditorJS/./node_modules/core-js/modules/_string-context.js","webpack://EditorJS/./node_modules/core-js/modules/_string-html.js","webpack://EditorJS/./node_modules/core-js/modules/_string-pad.js","webpack://EditorJS/./node_modules/core-js/modules/_string-repeat.js","webpack://EditorJS/./node_modules/core-js/modules/_string-trim.js","webpack://EditorJS/./node_modules/core-js/modules/_string-ws.js","webpack://EditorJS/./node_modules/core-js/modules/_task.js","webpack://EditorJS/./node_modules/core-js/modules/_to-absolute-index.js","webpack://EditorJS/./node_modules/core-js/modules/_to-index.js","webpack://EditorJS/./node_modules/core-js/modules/_to-integer.js","webpack://EditorJS/./node_modules/core-js/modules/_to-iobject.js","webpack://EditorJS/./node_modules/core-js/modules/_to-length.js","webpack://EditorJS/./node_modules/core-js/modules/_to-object.js","webpack://EditorJS/./node_modules/core-js/modules/_to-primitive.js","webpack://EditorJS/./node_modules/core-js/modules/_typed-array.js","webpack://EditorJS/./node_modules/core-js/modules/_typed-buffer.js","webpack://EditorJS/./node_modules/core-js/modules/_typed.js","webpack://EditorJS/./node_modules/core-js/modules/_uid.js","webpack://EditorJS/./node_modules/core-js/modules/_user-agent.js","webpack://EditorJS/./node_modules/core-js/modules/_validate-collection.js","webpack://EditorJS/./node_modules/core-js/modules/_wks-define.js","webpack://EditorJS/./node_modules/core-js/modules/_wks-ext.js","webpack://EditorJS/./node_modules/core-js/modules/_wks.js","webpack://EditorJS/./node_modules/core-js/modules/core.get-iterator-method.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.copy-within.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.every.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.fill.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.filter.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.find-index.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.find.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.for-each.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.from.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.index-of.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.is-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.iterator.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.join.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.last-index-of.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.map.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.of.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.reduce-right.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.reduce.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.slice.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.some.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.sort.js","webpack://EditorJS/./node_modules/core-js/modules/es6.array.species.js","webpack://EditorJS/./node_modules/core-js/modules/es6.date.now.js","webpack://EditorJS/./node_modules/core-js/modules/es6.date.to-iso-string.js","webpack://EditorJS/./node_modules/core-js/modules/es6.date.to-json.js","webpack://EditorJS/./node_modules/core-js/modules/es6.date.to-primitive.js","webpack://EditorJS/./node_modules/core-js/modules/es6.date.to-string.js","webpack://EditorJS/./node_modules/core-js/modules/es6.function.bind.js","webpack://EditorJS/./node_modules/core-js/modules/es6.function.has-instance.js","webpack://EditorJS/./node_modules/core-js/modules/es6.function.name.js","webpack://EditorJS/./node_modules/core-js/modules/es6.map.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.acosh.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.asinh.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.atanh.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.cbrt.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.clz32.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.cosh.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.expm1.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.fround.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.hypot.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.imul.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.log10.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.log1p.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.log2.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.sign.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.sinh.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.tanh.js","webpack://EditorJS/./node_modules/core-js/modules/es6.math.trunc.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.constructor.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.epsilon.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.is-finite.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.is-integer.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.is-nan.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.is-safe-integer.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.max-safe-integer.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.min-safe-integer.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.parse-float.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.parse-int.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.to-fixed.js","webpack://EditorJS/./node_modules/core-js/modules/es6.number.to-precision.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.assign.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.create.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.define-properties.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.define-property.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.freeze.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.get-own-property-names.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.get-prototype-of.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.is-extensible.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.is-frozen.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.is-sealed.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.is.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.keys.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.prevent-extensions.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.seal.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.set-prototype-of.js","webpack://EditorJS/./node_modules/core-js/modules/es6.object.to-string.js","webpack://EditorJS/./node_modules/core-js/modules/es6.parse-float.js","webpack://EditorJS/./node_modules/core-js/modules/es6.parse-int.js","webpack://EditorJS/./node_modules/core-js/modules/es6.promise.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.apply.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.construct.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.define-property.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.delete-property.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.enumerate.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.get-prototype-of.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.get.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.has.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.is-extensible.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.own-keys.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.prevent-extensions.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.set-prototype-of.js","webpack://EditorJS/./node_modules/core-js/modules/es6.reflect.set.js","webpack://EditorJS/./node_modules/core-js/modules/es6.regexp.constructor.js","webpack://EditorJS/./node_modules/core-js/modules/es6.regexp.flags.js","webpack://EditorJS/./node_modules/core-js/modules/es6.regexp.match.js","webpack://EditorJS/./node_modules/core-js/modules/es6.regexp.replace.js","webpack://EditorJS/./node_modules/core-js/modules/es6.regexp.search.js","webpack://EditorJS/./node_modules/core-js/modules/es6.regexp.split.js","webpack://EditorJS/./node_modules/core-js/modules/es6.regexp.to-string.js","webpack://EditorJS/./node_modules/core-js/modules/es6.set.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.anchor.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.big.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.blink.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.bold.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.code-point-at.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.ends-with.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.fixed.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.fontcolor.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.fontsize.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.from-code-point.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.includes.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.italics.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.iterator.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.link.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.raw.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.repeat.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.small.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.starts-with.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.strike.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.sub.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.sup.js","webpack://EditorJS/./node_modules/core-js/modules/es6.string.trim.js","webpack://EditorJS/./node_modules/core-js/modules/es6.symbol.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.array-buffer.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.data-view.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.float32-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.float64-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.int16-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.int32-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.int8-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.uint16-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.uint32-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.uint8-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js","webpack://EditorJS/./node_modules/core-js/modules/es6.weak-map.js","webpack://EditorJS/./node_modules/core-js/modules/es6.weak-set.js","webpack://EditorJS/./node_modules/core-js/modules/es7.array.includes.js","webpack://EditorJS/./node_modules/core-js/modules/es7.object.entries.js","webpack://EditorJS/./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js","webpack://EditorJS/./node_modules/core-js/modules/es7.object.values.js","webpack://EditorJS/./node_modules/core-js/modules/es7.promise.finally.js","webpack://EditorJS/./node_modules/core-js/modules/es7.string.pad-end.js","webpack://EditorJS/./node_modules/core-js/modules/es7.string.pad-start.js","webpack://EditorJS/./node_modules/core-js/modules/es7.symbol.async-iterator.js","webpack://EditorJS/./node_modules/core-js/modules/web.dom.iterable.js","webpack://EditorJS/./node_modules/core-js/modules/web.immediate.js","webpack://EditorJS/./node_modules/core-js/modules/web.timers.js","webpack://EditorJS/./node_modules/core-js/web/index.js","webpack://EditorJS/./node_modules/html-janitor/src/html-janitor.js","webpack://EditorJS/./node_modules/regenerator-runtime/runtime-module.js","webpack://EditorJS/./node_modules/regenerator-runtime/runtime.js","webpack://EditorJS/./src/codex.ts","webpack://EditorJS/./src/components/__module.ts","webpack://EditorJS/./src/components/block-tunes/block-tune-delete.ts","webpack://EditorJS/./src/components/block-tunes/block-tune-move-down.ts","webpack://EditorJS/./src/components/block-tunes/block-tune-move-up.ts","webpack://EditorJS/./src/components/block.ts","webpack://EditorJS/./src/components/blocks.ts","webpack://EditorJS/./src/components/core.ts","webpack://EditorJS/./src/components/dom.ts","webpack://EditorJS/./src/components/inline-tools/inline-tool-bold.ts","webpack://EditorJS/./src/components/inline-tools/inline-tool-italic.ts","webpack://EditorJS/./src/components/inline-tools/inline-tool-link.ts","webpack://EditorJS/./src/components/modules sync ^\\.\\/.*$","webpack://EditorJS/./src/components/modules/api/blocks.ts","webpack://EditorJS/./src/components/modules/api/caret.ts","webpack://EditorJS/./src/components/modules/api/events.ts","webpack://EditorJS/./src/components/modules/api/index.ts","webpack://EditorJS/./src/components/modules/api/inlineToolbar.ts","webpack://EditorJS/./src/components/modules/api/listeners.ts","webpack://EditorJS/./src/components/modules/api/notifier.ts","webpack://EditorJS/./src/components/modules/api/sanitizer.ts","webpack://EditorJS/./src/components/modules/api/saver.ts","webpack://EditorJS/./src/components/modules/api/selection.ts","webpack://EditorJS/./src/components/modules/api/styles.ts","webpack://EditorJS/./src/components/modules/api/toolbar.ts","webpack://EditorJS/./src/components/modules/blockEvents.ts","webpack://EditorJS/./src/components/modules/blockManager.ts","webpack://EditorJS/./src/components/modules/blockSelection.ts","webpack://EditorJS/./src/components/modules/caret.ts","webpack://EditorJS/./src/components/modules/crossBlockSelection.ts","webpack://EditorJS/./src/components/modules/dragNDrop.ts","webpack://EditorJS/./src/components/modules/events.ts","webpack://EditorJS/./src/components/modules/listeners.ts","webpack://EditorJS/./src/components/modules/modificationsObserver.ts","webpack://EditorJS/./src/components/modules/notifier.ts","webpack://EditorJS/./src/components/modules/paste.ts","webpack://EditorJS/./src/components/modules/rectangleSelection.ts","webpack://EditorJS/./src/components/modules/renderer.ts","webpack://EditorJS/./src/components/modules/sanitizer.ts","webpack://EditorJS/./src/components/modules/saver.ts","webpack://EditorJS/./src/components/modules/shortcuts.ts","webpack://EditorJS/./src/components/modules/toolbar/blockSettings.ts","webpack://EditorJS/./src/components/modules/toolbar/conversion.ts","webpack://EditorJS/./src/components/modules/toolbar/index.ts","webpack://EditorJS/./src/components/modules/toolbar/inline.ts","webpack://EditorJS/./src/components/modules/toolbar/toolbox.ts","webpack://EditorJS/./src/components/modules/tools.ts","webpack://EditorJS/./src/components/modules/ui.ts","webpack://EditorJS/./src/components/polyfills.ts","webpack://EditorJS/./src/components/selection.ts","webpack://EditorJS/./src/components/tools/paragraph/dist/bundle.js","webpack://EditorJS/./src/components/tools/stub/index.ts","webpack://EditorJS/./src/components/utils.ts","webpack://EditorJS/./src/styles/main.css"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,0iJ;;;;;;;;;;;;ACA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;AACA,GAAG;AACH;;;;;;;;;;;;ACJA,eAAe,mBAAO,CAAC,kEAAc;AACrC;AACA;AACA;AACA;;;;;;;;;;;;;ACJA;AACa;AACb,eAAe,mBAAO,CAAC,kEAAc;AACrC,sBAAsB,mBAAO,CAAC,kFAAsB;AACpD,eAAe,mBAAO,CAAC,kEAAc;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACzBA;AACa;AACb,eAAe,mBAAO,CAAC,kEAAc;AACrC,sBAAsB,mBAAO,CAAC,kFAAsB;AACpD,eAAe,mBAAO,CAAC,kEAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC,sBAAsB,mBAAO,CAAC,kFAAsB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY,eAAe;AAChC;AACA,KAAK;AACL;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,cAAc,mBAAO,CAAC,8DAAY;AAClC,eAAe,mBAAO,CAAC,kEAAc;AACrC,eAAe,mBAAO,CAAC,kEAAc;AACrC,UAAU,mBAAO,CAAC,wFAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA,wCAAwC;AACxC;AACA,8BAA8B;AAC9B,6BAA6B;AAC7B,+BAA+B;AAC/B,mCAAmC;AACnC,SAAS,iCAAiC;AAC1C;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3CA,gBAAgB,mBAAO,CAAC,oEAAe;AAC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B,mBAAO,CAAC,sEAAgB;AAC1C,WAAW,mBAAO,CAAC,kEAAc;AACjC,iBAAiB,mBAAO,CAAC,sEAAgB;AACzC,kBAAkB,mBAAO,CAAC,sEAAgB;AAC1C,cAAc,mBAAO,CAAC,wDAAS;AAC/B,eAAe,mBAAO,CAAC,sFAAwB;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,6BAA6B;AAC7B,0BAA0B;AAC1B,0BAA0B;AAC1B,qBAAqB;AACrB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,qBAAqB;AACrB,0BAA0B;AAC1B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;;;;;;;;;;;;AC/Ia;AACb,kBAAkB,mBAAO,CAAC,wEAAiB;AAC3C,cAAc,mBAAO,CAAC,wDAAS;AAC/B,eAAe,mBAAO,CAAC,kEAAc;AACrC,eAAe,mBAAO,CAAC,kEAAc;AACrC,iBAAiB,mBAAO,CAAC,sEAAgB;AACzC,YAAY,mBAAO,CAAC,4DAAW;AAC/B,wBAAwB,mBAAO,CAAC,0EAAkB;AAClD,WAAW,mBAAO,CAAC,sDAAQ;AAC3B,eAAe,mBAAO,CAAC,sFAAwB;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,0BAA0B;AAC1B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;ACpFa;AACb,aAAa,mBAAO,CAAC,4DAAW;AAChC,cAAc,mBAAO,CAAC,4DAAW;AACjC,eAAe,mBAAO,CAAC,gEAAa;AACpC,kBAAkB,mBAAO,CAAC,wEAAiB;AAC3C,WAAW,mBAAO,CAAC,wDAAS;AAC5B,YAAY,mBAAO,CAAC,4DAAW;AAC/B,iBAAiB,mBAAO,CAAC,sEAAgB;AACzC,eAAe,mBAAO,CAAC,kEAAc;AACrC,YAAY,mBAAO,CAAC,0DAAU;AAC9B,kBAAkB,mBAAO,CAAC,sEAAgB;AAC1C,qBAAqB,mBAAO,CAAC,kFAAsB;AACnD,wBAAwB,mBAAO,CAAC,sFAAwB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO,mCAAmC,gCAAgC,aAAa;AACvF,8BAA8B,mCAAmC,aAAa;AAC9E;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,qDAAq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mBAAmB;AACnC;AACA;AACA,kCAAkC,2BAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;;ACpEA,eAAe,mBAAO,CAAC,sDAAQ;AAC/B;;AAEA;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA,iCAAiC,SAAS,EAAE;AAC5C,CAAC,YAAY;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,SAAS,qBAAqB;AAC3D,iCAAiC,aAAa;AAC9C;AACA,GAAG,YAAY;AACf;AACA;;;;;;;;;;;;ACrBA;AACA,UAAU;AACV;;;;;;;;;;;;ACFA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACTD;AACA,WAAW,mBAAO,CAAC,kEAAc;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA,WAAW,mBAAO,CAAC,sDAAQ;AAC3B,eAAe,mBAAO,CAAC,kEAAc;AACrC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,cAAc,mBAAO,CAAC,kEAAc;AACpC;AACA;AACA;AACA;AACA,cAAc,mBAAO,CAAC,0DAAU;AAChC,iDAAiD;AACjD,CAAC;AACD;AACA,qBAAqB;AACrB;AACA,SAAS;AACT,GAAG,EAAE;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA,aAAa,mBAAO,CAAC,4DAAW;AAChC,gBAAgB,mBAAO,CAAC,wDAAS;AACjC;AACA;AACA;AACA,aAAa,mBAAO,CAAC,sDAAQ;;AAE7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uCAAuC,sBAAsB,EAAE;AAC/D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;ACpEa;AACb;AACA,gBAAgB,mBAAO,CAAC,oEAAe;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACjBa;AACb;AACA,cAAc,mBAAO,CAAC,sEAAgB;AACtC,WAAW,mBAAO,CAAC,sEAAgB;AACnC,UAAU,mBAAO,CAAC,oEAAe;AACjC,eAAe,mBAAO,CAAC,kEAAc;AACrC,cAAc,mBAAO,CAAC,8DAAY;AAClC;;AAEA;AACA,6BAA6B,mBAAO,CAAC,0DAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,UAAU,EAAE;AAChD,mBAAmB,sCAAsC;AACzD,CAAC,qCAAqC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;;ACjCD;AACA,eAAe,mBAAO,CAAC,kEAAc;AACrC,UAAU,mBAAO,CAAC,oEAAe;AACjC,kBAAkB,mBAAO,CAAC,0EAAkB;AAC5C,eAAe,mBAAO,CAAC,oEAAe;AACtC,yBAAyB;AACzB;;AAEA;AAC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;AClBA;AACA,eAAe,mBAAO,CAAC,kEAAc;AACrC,aAAa,mBAAO,CAAC,0EAAkB;AACvC,cAAc,mBAAO,CAAC,8DAAY;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACfa;AACb,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,cAAc,mBAAO,CAAC,8DAAY;;AAElC;AACA;AACA;AACA;AACA;AACA,QAAQ,MAAM;AACd;AACA;;;;;;;;;;;;ACXA,cAAc,mBAAO,CAAC,4DAAW;AACjC,cAAc,mBAAO,CAAC,8DAAY;AAClC,YAAY,mBAAO,CAAC,0DAAU;AAC9B,aAAa,mBAAO,CAAC,kEAAc;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;;;;;;;;;;;;ACDA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,UAAU,mBAAO,CAAC,oEAAe;AACjC,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAO,CAAC,sDAAQ;AACtB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;A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0BAA0B,EAAE,EAAE;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,gCAAgC;AACzF;AACA,OAAO;AACP;AACA;AACA,6EAA6E,YAAY;AACzF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,6CAA6C,EAAE;;AAExG;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,mDAAmD;AACnD;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,oCAAoC;AACpC;AACA,KAAK;AACL,wEAAwE;AACxE;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,8DAA8D;AAC9D;AACA,KAAK;AACL,wEAAwE;AACxE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH,yBAAyB,sBAAsB,EAAE,EAAE;AACnD;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,sBAAsB,0BAA0B;AAChD,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,yBAAyB;AACzB,KAAK;AACL,uBAAuB;AACvB,2BAA2B;AAC3B,0BAA0B;AAC1B,2BAA2B;AAC3B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B,aAAa;AACvC,OAAO;AACP;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL,uDAAuD,6BAA6B,EAAE;AACtF;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA,uDAAuD,YAAY;;AAEnE;;AAEA;;AAEA;AACA;AACA,KAAK,UAAU,gBAAgB;;AAE/B;AACA;AACA,KAAK;AACL;AACA,KAAK,WAAW,kCAAkC;;AAElD;AACA;AACA;AACA,CAAC,oCAAoC;;;;;;;;;;;;;AC/dxB;AACb,aAAa,mBAAO,CAAC,4DAAW;AAChC,kBAAkB,mBAAO,CAAC,sEAAgB;AAC1C,cAAc,mBAAO,CAAC,8DAAY;AAClC,aAAa,mBAAO,CAAC,0DAAU;AAC/B,WAAW,mBAAO,CAAC,wDAAS;AAC5B,kBAAkB,mBAAO,CAAC,wEAAiB;AAC3C,YAAY,mBAAO,CAAC,0DAAU;AAC9B,iBAAiB,mBAAO,CAAC,sEAAgB;AACzC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC,cAAc,mBAAO,CAAC,gEAAa;AACnC,WAAW,mBAAO,CAAC,sEAAgB;AACnC,SAAS,mBAAO,CAAC,kEAAc;AAC/B,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,qBAAqB,mBAAO,CAAC,kFAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA;AACA,QAAQ,UAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,mBAAmB,uBAAuB,EAAE,EAAE;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA,GAAG;AACH,yBAAyB;AACzB,GAAG;AACH,uBAAuB;AACvB,0BAA0B;AAC1B,0BAA0B;AAC1B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnRA,aAAa,mBAAO,CAAC,4DAAW;AAChC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,UAAU,mBAAO,CAAC,sDAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA,aAAa,mBAAO,CAAC,4DAAW;AAChC;;AAEA;;;;;;;;;;;;ACHA,eAAe,mBAAO,CAAC,kEAAc;AACrC;AACA;AACA;AACA;;;;;;;;;;;;ACJA,aAAa,mBAAO,CAAC,4DAAW;AAChC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,cAAc,mBAAO,CAAC,8DAAY;AAClC,aAAa,mBAAO,CA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gB,mBAAO,CAAC,kEAAc;AACtC;AACA,2EAA2E,sBAAsB;;;;;;;;;;;;;ACHpF;AACb,cAAc,mBAAO,CAAC,4DAAW;AACjC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,mBAAmB,mBAAO,CAAC,4EAAmB;AAC9C,aAAa,mBAAO,CAAC,0EAAkB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAO,CAAC,0DAAU;AACxB;AACA,kBAAkB;AAClB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,CAAC;;;;;;;;;;;;;ACjHY;AACb,cAAc,mBAAO,CAAC,4DAAW;AACjC,aAAa,mBAAO,CAAC,0DAAU;AAC/B,mBAAmB,mBAAO,CAAC,4EAAmB;AAC9C;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA,sBAAsB;AACtB,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACjBD;AACA,cAAc,mBAAO,CAAC,4DAAW;;AAEjC,0CAA0C,SAAS,mBAAO,CAAC,0EAAkB,GAAG;;;;;;;;;;;;ACHhF,cAAc,mBAAO,CAAC,4DAAW;AACjC;AACA,8BAA8B,SAAS,mBAAO,CAAC,0EAAkB,GAAG;;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;AAC5B,gBAAgB,mBAAO,CAAC,kEAAc;AACtC,iCAAiC,mBAAO,CAAC,4FAA2B;AACpE,cAAc,mBAAO,CAAC,8DAAY;AAClC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,qBAAqB,mBAAO,CAAC,8EAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,EAAE,mBAAO,CAAC,sDAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB,kCAAkC;AACrD,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,uCAAuC;AACtD;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,yBAAyB,KAAK;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB,wBAAwB;AACxB,gBAAgB;AAChB,oBAAoB;AACpB;AACA,uBAAuB,mBAAO,CAAC,wEAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0DAA0D,oBAAoB;AAC9E,mBAAO,CAAC,kFAAsB;AAC9B,mBAAO,CAAC,sEAAgB;AACxB,UAAU,mBAAO,CAAC,wDAAS;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gDAAgD,mBAAO,CAAC,sEAAgB;AACxE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC7RD;AACA,cAAc,mBAAO,CAAC,4DAAW;AACjC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC,cAAc,mBAAO,CAAC,4DAAW,eAAe;AAChD;AACA;AACA,iCAAiC,mBAAO,CAAC,0DAAU;AACnD,sBAAsB,cAAc;AACpC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACfD;AACA,cAAc,mBAAO,CAAC,4DAAW;AACjC,aAAa,mBAAO,CAAC,0EAAkB;AACvC,gBAAgB,mBAAO,CAAC,oEAAe;AACvC,eAAe,mBAAO,CAAC,kEAAc;AACrC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CAAC;;;;;;;;;;;;ACXD;AACA,mBAAO,CAAC,oEAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;;ACTD;AACA,mBAAO,CAAC,oEAAe;AACvB;AACA,iBAAiB,mBAAO,CAAC,kEAAc;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;;;ACtEY;AACb,mBAAO,CAAC,8EAAoB;AAC5B,eAAe,mBAAO,CAAC,kEAAc;AACrC,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,sEAAgB;AAC1C;AACA;;AAEA;AACA,EAAE,mBAAO,CAAC,gEAAa;AACvB;;AAEA;AACA,IAAI,mBAAO,CAAC,0DAAU,eAAe,wBAAwB,0BAA0B,YAAY,EAAE;AACrG;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACxBa;AACb,aAAa,mBAAO,CAAC,kFAAsB;AAC3C,eAAe,mBAAO,CAAC,sFAAwB;AAC/C;;AAEA;AACA,iBAAiB,mBAAO,CAAC,oEAAe;AACxC,yBAAyB,mEAAmE;AAC5F,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;ACbY;AACb;AACA,mBAAO,CAAC,sEAAgB;AACxB;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;ACNY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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,EAAE,mBAAO,CAAC,sEAAgB;AAC1B,EAAE,mBAAO,CAAC,oEAAe;AACzB,EAAE,mBAAO,CAAC,sEAAgB;;AAE1B,sBAAsB,mBAAO,CAAC,8DAAY;AAC1C;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0DAA0D,kBAAkB;;AAE5E;AACA;AACA;AACA,oBAAoB,uBAAuB;;AAE3C,oDAAoD,6BAA6B;;AAEjF;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,0BAA0B,eAAe,EAAE;AAC3C,0BAA0B,gBAAgB;AAC1C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO,QAAQ,iCAAiC;AACpG,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,oCAAoC,mBAAO,CAAC,wDAAS;AACrD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzOa;AACb,cAAc,mBAAO,CAAC,4DAAW;AACjC,aAAa,mBAAO,CAAC,0DAAU;AAC/B,aAAa,mBAAO,CAAC,wEAAiB;AACtC,eAAe,mBAAO,CAAC,kEAAc;AACrC,sBAAsB,mBAAO,CAAC,kFAAsB;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,4BAA4B;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;;;;;;;;;;;ACnLD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,gEAAW;;AAEpC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,KAAK;AACL,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;;AAEA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,cAAc;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,kBAAkB;AACnD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;;AAEA,WAAW;AACX;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;A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BAAgB,kBAAkB,gBAAgB,eAAe,0BAA0B,mBAAmB,eAAe,C","file":"editor.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"EditorJS\"] = factory();\n\telse\n\t\troot[\"EditorJS\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","module.exports = \"\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n \\n \\n \\n \\n \\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\\n\\n \\n\\n\"","\"use strict\";\n\nrequire(\"core-js/es6\");\n\nrequire(\"core-js/fn/array/includes\");\n\nrequire(\"core-js/fn/string/pad-start\");\n\nrequire(\"core-js/fn/string/pad-end\");\n\nrequire(\"core-js/fn/symbol/async-iterator\");\n\nrequire(\"core-js/fn/object/get-own-property-descriptors\");\n\nrequire(\"core-js/fn/object/values\");\n\nrequire(\"core-js/fn/object/entries\");\n\nrequire(\"core-js/fn/promise/finally\");\n\nrequire(\"core-js/web\");\n\nrequire(\"regenerator-runtime/runtime\");","require(\"./lib/noConflict\");\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = register;\nexports.revert = revert;\n\nfunction register() {}\n\nfunction revert() {}","exports = module.exports = function (...args) {\n return register(...args);\n};\n\nexports.__esModule = true;\n\nconst node = require(\"./node\");\n\nconst register = node.default;\nObject.assign(exports, node);","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nmodule.exports = _arrayWithoutHoles;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nmodule.exports = _nonIterableSpread;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","module.exports = require(\"regenerator-runtime\");\n","/*!\n * Library for handling keyboard shortcuts\n * @copyright CodeX (https://codex.so)\n * @license MIT\n * @author CodeX (https://codex.so)\n * @version 1.1.1\n */\n!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Shortcut=t():e.Shortcut=t()}(window,function(){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,\"a\",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p=\"\",o(o.s=0)}([function(e,t,n){\"use strict\";function r(e,t){for(var n=0;n=0&&d.splice(e,1)}function x(t){var e=document.createElement(\"style\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),y(e,t.attrs),b(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function h(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var a=f++;n=s||(s=x(e)),o=_.bind(null,n,a,!1),r=_.bind(null,n,a,!0)}else t.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(t){var e=document.createElement(\"link\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),t.attrs.rel=\"stylesheet\",y(e,t.attrs),b(t,e),e}(e),o=function(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=u(o));r&&(o+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+\" */\");var a=new Blob([o],{type:\"text/css\"}),c=t.href;t.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}.bind(null,n,e),r=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=x(e),o=function(t,e){var n=e.css,o=e.media;o&&t.setAttribute(\"media\",o);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){m(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(e=e||{}).attrs=\"object\"==typeof e.attrs?e.attrs:{},e.singleton||\"boolean\"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto=\"head\"),e.insertAt||(e.insertAt=\"bottom\");var n=p(t,e);return l(n,e),function(t){for(var o=[],r=0;r 2 ? arguments[2] : undefined;\n var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","var aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar toLength = require('./_to-length');\n\nmodule.exports = function (that, callbackfn, aLen, memo, isRight) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IObject(O);\n var length = toLength(O.length);\n var index = isRight ? length - 1 : 0;\n var i = isRight ? -1 : 1;\n if (aLen < 2) for (;;) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (isRight ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n};\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","'use strict';\nvar aFunction = require('./_a-function');\nvar isObject = require('./_is-object');\nvar invoke = require('./_invoke');\nvar arraySlice = [].slice;\nvar factories = {};\n\nvar construct = function (F, len, args) {\n if (!(len in factories)) {\n for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func\n factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');\n } return factories[len](F, args);\n};\n\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = arraySlice.call(arguments, 1);\n var bound = function (/* args... */) {\n var args = partArgs.concat(arraySlice.call(arguments));\n return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);\n };\n if (isObject(fn.prototype)) bound.prototype = fn.prototype;\n return bound;\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n","'use strict';\nvar redefineAll = require('./_redefine-all');\nvar getWeak = require('./_meta').getWeak;\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar createArrayMethod = require('./_array-methods');\nvar $has = require('./_has');\nvar validate = require('./_validate-collection');\nvar arrayFind = createArrayMethod(5);\nvar arrayFindIndex = createArrayMethod(6);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (that) {\n return that._l || (that._l = new UncaughtFrozenStore());\n};\nvar UncaughtFrozenStore = function () {\n this.a = [];\n};\nvar findUncaughtFrozen = function (store, key) {\n return arrayFind(store.a, function (it) {\n return it[0] === key;\n });\n};\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.a.push([key, value]);\n },\n 'delete': function (key) {\n var index = arrayFindIndex(this.a, function (it) {\n return it[0] === key;\n });\n if (~index) this.a.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = id++; // collection id\n that._l = undefined; // leak store for uncaught frozen objects\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);\n return data && $has(data, this._i) && delete data[this._i];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n if (!isObject(key)) return false;\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);\n return data && $has(data, this._i);\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var data = getWeak(anObject(key), true);\n if (data === true) uncaughtFrozenStore(that).set(key, value);\n else data[that._i] = value;\n return that;\n },\n ufstore: uncaughtFrozenStore\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","'use strict';\nvar $defineProperty = require('./_object-dp');\nvar createDesc = require('./_property-desc');\n\nmodule.exports = function (object, index, value) {\n if (index in object) $defineProperty.f(object, index, createDesc(0, value));\n else object[index] = value;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","'use strict';\n// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar fails = require('./_fails');\nvar getTime = Date.prototype.getTime;\nvar $toISOString = Date.prototype.toISOString;\n\nvar lz = function (num) {\n return num > 9 ? num : '0' + num;\n};\n\n// PhantomJS / old WebKit has a broken implementations\nmodule.exports = (fails(function () {\n return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n $toISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');\n var d = this;\n var y = d.getUTCFullYear();\n var m = d.getUTCMilliseconds();\n var s = y < 0 ? '-' : y > 9999 ? '+' : '';\n return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +\n '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +\n 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +\n ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';\n} : $toISOString;\n","'use strict';\nvar anObject = require('./_an-object');\nvar toPrimitive = require('./_to-primitive');\nvar NUMBER = 'number';\n\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');\n return toPrimitive(anObject(this), hint != NUMBER);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var MATCH = require('./_wks')('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function (fn, args, that) {\n var un = that === undefined;\n switch (args.length) {\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// 20.1.2.3 Number.isInteger(number)\nvar isObject = require('./_is-object');\nvar floor = Math.floor;\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","module.exports = false;\n","// 20.2.2.14 Math.expm1(x)\nvar $expm1 = Math.expm1;\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;\n} : $expm1;\n","// 20.2.2.16 Math.fround(x)\nvar sign = require('./_math-sign');\nvar pow = Math.pow;\nvar EPSILON = pow(2, -52);\nvar EPSILON32 = pow(2, -23);\nvar MAX32 = pow(2, 127) * (2 - EPSILON32);\nvar MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function (n) {\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\nmodule.exports = Math.fround || function fround(x) {\n var $abs = Math.abs(x);\n var $sign = sign(x);\n var a, result;\n if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n // eslint-disable-next-line no-self-compare\n if (result > MAX32 || result != result) return $sign * Infinity;\n return $sign * result;\n};\n","// 20.2.2.20 Math.log1p(x)\nmodule.exports = Math.log1p || function log1p(x) {\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);\n};\n","// 20.2.2.28 Math.sign(x)\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function () {\n var head, last, notify;\n\n var flush = function () {\n var parent, fn;\n if (isNode && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (e) {\n if (head) notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (isNode) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339\n } else if (Observer && !(global.navigator && global.navigator.standalone)) {\n var toggle = true;\n var node = document.createTextNode('');\n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n var promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = {}.propertyIsEnumerable;\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","var getKeys = require('./_object-keys');\nvar toIObject = require('./_to-iobject');\nvar isEnum = require('./_object-pie').f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) if (isEnum.call(O, key = keys[i++])) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};\n","// all object keys, includes non-enumerable and symbols\nvar gOPN = require('./_object-gopn');\nvar gOPS = require('./_object-gops');\nvar anObject = require('./_an-object');\nvar Reflect = require('./_global').Reflect;\nmodule.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {\n var keys = gOPN.f(anObject(it));\n var getSymbols = gOPS.f;\n return getSymbols ? keys.concat(getSymbols(it)) : keys;\n};\n","var $parseFloat = require('./_global').parseFloat;\nvar $trim = require('./_string-trim').trim;\n\nmodule.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) {\n var string = $trim(String(str), 3);\n var result = $parseFloat(string);\n return result === 0 && string.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n","var $parseInt = require('./_global').parseInt;\nvar $trim = require('./_string-trim').trim;\nvar ws = require('./_string-ws');\nvar hex = /^[-+]?0[xX]/;\n\nmodule.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {\n var string = $trim(String(str), 3);\n return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));\n} : $parseInt;\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = require('./_is-regexp');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n","var $export = require('./_export');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar quot = /\"/g;\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\nvar createHTML = function (string, tag, attribute, value) {\n var S = String(defined(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '';\n};\nmodule.exports = function (NAME, exec) {\n var O = {};\n O[NAME] = exec(createHTML);\n $export($export.P + $export.F * fails(function () {\n var test = ''[NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n }), 'String', O);\n};\n","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('./_to-length');\nvar repeat = require('./_string-repeat');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, maxLength, fillString, left) {\n var S = String(defined(that));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n if (intMaxLength <= stringLength || fillStr == '') return S;\n var fillLen = intMaxLength - stringLength;\n var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n","'use strict';\nvar toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n\nmodule.exports = function repeat(count) {\n var str = String(defined(this));\n var res = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError(\"Count can't be negative\");\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;\n return res;\n};\n","var $export = require('./_export');\nvar defined = require('./_defined');\nvar fails = require('./_fails');\nvar spaces = require('./_string-ws');\nvar space = '[' + spaces + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = fails(function () {\n return !!spaces[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n $export($export.P + $export.F * FORCE, 'String', exp);\n};\n\n// 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nmodule.exports = exporter;\n","module.exports = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' +\n '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function (event) {\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!setTask || !clearTask) {\n setTask = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (require('./_cof')(process) == 'process') {\n defer = function (id) {\n process.nextTick(ctx(run, id, 1));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {\n defer = function (id) {\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in cel('script')) {\n defer = function (id) {\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// https://tc39.github.io/ecma262/#sec-toindex\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length!');\n return length;\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","'use strict';\nif (require('./_descriptors')) {\n var LIBRARY = require('./_library');\n var global = require('./_global');\n var fails = require('./_fails');\n var $export = require('./_export');\n var $typed = require('./_typed');\n var $buffer = require('./_typed-buffer');\n var ctx = require('./_ctx');\n var anInstance = require('./_an-instance');\n var propertyDesc = require('./_property-desc');\n var hide = require('./_hide');\n var redefineAll = require('./_redefine-all');\n var toInteger = require('./_to-integer');\n var toLength = require('./_to-length');\n var toIndex = require('./_to-index');\n var toAbsoluteIndex = require('./_to-absolute-index');\n var toPrimitive = require('./_to-primitive');\n var has = require('./_has');\n var classof = require('./_classof');\n var isObject = require('./_is-object');\n var toObject = require('./_to-object');\n var isArrayIter = require('./_is-array-iter');\n var create = require('./_object-create');\n var getPrototypeOf = require('./_object-gpo');\n var gOPN = require('./_object-gopn').f;\n var getIterFn = require('./core.get-iterator-method');\n var uid = require('./_uid');\n var wks = require('./_wks');\n var createArrayMethod = require('./_array-methods');\n var createArrayIncludes = require('./_array-includes');\n var speciesConstructor = require('./_species-constructor');\n var ArrayIterators = require('./es6.array.iterator');\n var Iterators = require('./_iterators');\n var $iterDetect = require('./_iter-detect');\n var setSpecies = require('./_set-species');\n var arrayFill = require('./_array-fill');\n var arrayCopyWithin = require('./_array-copy-within');\n var $DP = require('./_object-dp');\n var $GOPD = require('./_object-gopd');\n var dP = $DP.f;\n var gOPD = $GOPD.f;\n var RangeError = global.RangeError;\n var TypeError = global.TypeError;\n var Uint8Array = global.Uint8Array;\n var ARRAY_BUFFER = 'ArrayBuffer';\n var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;\n var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\n var PROTOTYPE = 'prototype';\n var ArrayProto = Array[PROTOTYPE];\n var $ArrayBuffer = $buffer.ArrayBuffer;\n var $DataView = $buffer.DataView;\n var arrayForEach = createArrayMethod(0);\n var arrayFilter = createArrayMethod(2);\n var arraySome = createArrayMethod(3);\n var arrayEvery = createArrayMethod(4);\n var arrayFind = createArrayMethod(5);\n var arrayFindIndex = createArrayMethod(6);\n var arrayIncludes = createArrayIncludes(true);\n var arrayIndexOf = createArrayIncludes(false);\n var arrayValues = ArrayIterators.values;\n var arrayKeys = ArrayIterators.keys;\n var arrayEntries = ArrayIterators.entries;\n var arrayLastIndexOf = ArrayProto.lastIndexOf;\n var arrayReduce = ArrayProto.reduce;\n var arrayReduceRight = ArrayProto.reduceRight;\n var arrayJoin = ArrayProto.join;\n var arraySort = ArrayProto.sort;\n var arraySlice = ArrayProto.slice;\n var arrayToString = ArrayProto.toString;\n var arrayToLocaleString = ArrayProto.toLocaleString;\n var ITERATOR = wks('iterator');\n var TAG = wks('toStringTag');\n var TYPED_CONSTRUCTOR = uid('typed_constructor');\n var DEF_CONSTRUCTOR = uid('def_constructor');\n var ALL_CONSTRUCTORS = $typed.CONSTR;\n var TYPED_ARRAY = $typed.TYPED;\n var VIEW = $typed.VIEW;\n var WRONG_LENGTH = 'Wrong length!';\n\n var $map = createArrayMethod(1, function (O, length) {\n return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);\n });\n\n var LITTLE_ENDIAN = fails(function () {\n // eslint-disable-next-line no-undef\n return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;\n });\n\n var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {\n new Uint8Array(1).set({});\n });\n\n var toOffset = function (it, BYTES) {\n var offset = toInteger(it);\n if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');\n return offset;\n };\n\n var validate = function (it) {\n if (isObject(it) && TYPED_ARRAY in it) return it;\n throw TypeError(it + ' is not a typed array!');\n };\n\n var allocate = function (C, length) {\n if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {\n throw TypeError('It is not a typed array constructor!');\n } return new C(length);\n };\n\n var speciesFromList = function (O, list) {\n return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);\n };\n\n var fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = allocate(C, length);\n while (length > index) result[index] = list[index++];\n return result;\n };\n\n var addGetter = function (it, key, internal) {\n dP(it, key, { get: function () { return this._d[internal]; } });\n };\n\n var $from = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iterFn = getIterFn(O);\n var i, length, values, result, step, iterator;\n if (iterFn != undefined && !isArrayIter(iterFn)) {\n for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {\n values.push(step.value);\n } O = values;\n }\n if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);\n for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n };\n\n var $of = function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = allocate(this, length);\n while (length > index) result[index] = arguments[index++];\n return result;\n };\n\n // iOS Safari 6.x fails here\n var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });\n\n var $toLocaleString = function toLocaleString() {\n return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);\n };\n\n var proto = {\n copyWithin: function copyWithin(target, start /* , end */) {\n return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n },\n every: function every(callbackfn /* , thisArg */) {\n return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars\n return arrayFill.apply(validate(this), arguments);\n },\n filter: function filter(callbackfn /* , thisArg */) {\n return speciesFromList(this, arrayFilter(validate(this), callbackfn,\n arguments.length > 1 ? arguments[1] : undefined));\n },\n find: function find(predicate /* , thisArg */) {\n return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n findIndex: function findIndex(predicate /* , thisArg */) {\n return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n },\n forEach: function forEach(callbackfn /* , thisArg */) {\n arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n indexOf: function indexOf(searchElement /* , fromIndex */) {\n return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n includes: function includes(searchElement /* , fromIndex */) {\n return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n },\n join: function join(separator) { // eslint-disable-line no-unused-vars\n return arrayJoin.apply(validate(this), arguments);\n },\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars\n return arrayLastIndexOf.apply(validate(this), arguments);\n },\n map: function map(mapfn /* , thisArg */) {\n return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduce.apply(validate(this), arguments);\n },\n reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars\n return arrayReduceRight.apply(validate(this), arguments);\n },\n reverse: function reverse() {\n var that = this;\n var length = validate(that).length;\n var middle = Math.floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n },\n some: function some(callbackfn /* , thisArg */) {\n return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n },\n sort: function sort(comparefn) {\n return arraySort.call(validate(this), comparefn);\n },\n subarray: function subarray(begin, end) {\n var O = validate(this);\n var length = O.length;\n var $begin = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(\n O.buffer,\n O.byteOffset + $begin * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)\n );\n }\n };\n\n var $slice = function slice(start, end) {\n return speciesFromList(this, arraySlice.call(validate(this), start, end));\n };\n\n var $set = function set(arrayLike /* , offset */) {\n validate(this);\n var offset = toOffset(arguments[1], 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError(WRONG_LENGTH);\n while (index < len) this[offset + index] = src[index++];\n };\n\n var $iterators = {\n entries: function entries() {\n return arrayEntries.call(validate(this));\n },\n keys: function keys() {\n return arrayKeys.call(validate(this));\n },\n values: function values() {\n return arrayValues.call(validate(this));\n }\n };\n\n var isTAIndex = function (target, key) {\n return isObject(target)\n && target[TYPED_ARRAY]\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n };\n var $getDesc = function getOwnPropertyDescriptor(target, key) {\n return isTAIndex(target, key = toPrimitive(key, true))\n ? propertyDesc(2, target[key])\n : gOPD(target, key);\n };\n var $setDesc = function defineProperty(target, key, desc) {\n if (isTAIndex(target, key = toPrimitive(key, true))\n && isObject(desc)\n && has(desc, 'value')\n && !has(desc, 'get')\n && !has(desc, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !desc.configurable\n && (!has(desc, 'writable') || desc.writable)\n && (!has(desc, 'enumerable') || desc.enumerable)\n ) {\n target[key] = desc.value;\n return target;\n } return dP(target, key, desc);\n };\n\n if (!ALL_CONSTRUCTORS) {\n $GOPD.f = $getDesc;\n $DP.f = $setDesc;\n }\n\n $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {\n getOwnPropertyDescriptor: $getDesc,\n defineProperty: $setDesc\n });\n\n if (fails(function () { arrayToString.call({}); })) {\n arrayToString = arrayToLocaleString = function toString() {\n return arrayJoin.call(this);\n };\n }\n\n var $TypedArrayPrototype$ = redefineAll({}, proto);\n redefineAll($TypedArrayPrototype$, $iterators);\n hide($TypedArrayPrototype$, ITERATOR, $iterators.values);\n redefineAll($TypedArrayPrototype$, {\n slice: $slice,\n set: $set,\n constructor: function () { /* noop */ },\n toString: arrayToString,\n toLocaleString: $toLocaleString\n });\n addGetter($TypedArrayPrototype$, 'buffer', 'b');\n addGetter($TypedArrayPrototype$, 'byteOffset', 'o');\n addGetter($TypedArrayPrototype$, 'byteLength', 'l');\n addGetter($TypedArrayPrototype$, 'length', 'e');\n dP($TypedArrayPrototype$, TAG, {\n get: function () { return this[TYPED_ARRAY]; }\n });\n\n // eslint-disable-next-line max-statements\n module.exports = function (KEY, BYTES, wrapper, CLAMPED) {\n CLAMPED = !!CLAMPED;\n var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + KEY;\n var SETTER = 'set' + KEY;\n var TypedArray = global[NAME];\n var Base = TypedArray || {};\n var TAC = TypedArray && getPrototypeOf(TypedArray);\n var FORCED = !TypedArray || !$typed.ABV;\n var O = {};\n var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];\n var getter = function (that, index) {\n var data = that._d;\n return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);\n };\n var setter = function (that, index, value) {\n var data = that._d;\n if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;\n data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);\n };\n var addElement = function (that, index) {\n dP(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n if (FORCED) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME, '_d');\n var index = 0;\n var offset = 0;\n var buffer, byteLength, length, klass;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new $ArrayBuffer(byteLength);\n } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n buffer = data;\n offset = toOffset($offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - offset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (TYPED_ARRAY in data) {\n return fromList(TypedArray, data);\n } else {\n return $from.call(TypedArray, data);\n }\n hide(that, '_d', {\n b: buffer,\n o: offset,\n l: byteLength,\n e: length,\n v: new $DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);\n hide(TypedArrayPrototype, 'constructor', TypedArray);\n } else if (!fails(function () {\n TypedArray(1);\n }) || !fails(function () {\n new TypedArray(-1); // eslint-disable-line no-new\n }) || !$iterDetect(function (iter) {\n new TypedArray(); // eslint-disable-line no-new\n new TypedArray(null); // eslint-disable-line no-new\n new TypedArray(1.5); // eslint-disable-line no-new\n new TypedArray(iter); // eslint-disable-line no-new\n }, true)) {\n TypedArray = wrapper(function (that, data, $offset, $length) {\n anInstance(that, TypedArray, NAME);\n var klass;\n // `ws` module bug, temporarily remove validation length for Uint8Array\n // https://github.com/websockets/ws/pull/645\n if (!isObject(data)) return new Base(toIndex(data));\n if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {\n return $length !== undefined\n ? new Base(data, toOffset($offset, BYTES), $length)\n : $offset !== undefined\n ? new Base(data, toOffset($offset, BYTES))\n : new Base(data);\n }\n if (TYPED_ARRAY in data) return fromList(TypedArray, data);\n return $from.call(TypedArray, data);\n });\n arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {\n if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);\n });\n TypedArray[PROTOTYPE] = TypedArrayPrototype;\n if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;\n }\n var $nativeIterator = TypedArrayPrototype[ITERATOR];\n var CORRECT_ITER_NAME = !!$nativeIterator\n && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);\n var $iterator = $iterators.values;\n hide(TypedArray, TYPED_CONSTRUCTOR, true);\n hide(TypedArrayPrototype, TYPED_ARRAY, NAME);\n hide(TypedArrayPrototype, VIEW, true);\n hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);\n\n if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {\n dP(TypedArrayPrototype, TAG, {\n get: function () { return NAME; }\n });\n }\n\n O[NAME] = TypedArray;\n\n $export($export.G + $export.W + $export.F * (TypedArray != Base), O);\n\n $export($export.S, NAME, {\n BYTES_PER_ELEMENT: BYTES\n });\n\n $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {\n from: $from,\n of: $of\n });\n\n if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);\n\n $export($export.P, NAME, proto);\n\n setSpecies(NAME);\n\n $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });\n\n $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);\n\n if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;\n\n $export($export.P + $export.F * fails(function () {\n new TypedArray(1).slice();\n }), NAME, { slice: $slice });\n\n $export($export.P + $export.F * (fails(function () {\n return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();\n }) || !fails(function () {\n TypedArrayPrototype.toLocaleString.call([1, 2]);\n })), NAME, { toLocaleString: $toLocaleString });\n\n Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;\n if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);\n };\n} else module.exports = function () { /* empty */ };\n","'use strict';\nvar global = require('./_global');\nvar DESCRIPTORS = require('./_descriptors');\nvar LIBRARY = require('./_library');\nvar $typed = require('./_typed');\nvar hide = require('./_hide');\nvar redefineAll = require('./_redefine-all');\nvar fails = require('./_fails');\nvar anInstance = require('./_an-instance');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar toIndex = require('./_to-index');\nvar gOPN = require('./_object-gopn').f;\nvar dP = require('./_object-dp').f;\nvar arrayFill = require('./_array-fill');\nvar setToStringTag = require('./_set-to-string-tag');\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length!';\nvar WRONG_INDEX = 'Wrong index!';\nvar $ArrayBuffer = global[ARRAY_BUFFER];\nvar $DataView = global[DATA_VIEW];\nvar Math = global.Math;\nvar RangeError = global.RangeError;\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = global.Infinity;\nvar BaseBuffer = $ArrayBuffer;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\nvar BUFFER = 'buffer';\nvar BYTE_LENGTH = 'byteLength';\nvar BYTE_OFFSET = 'byteOffset';\nvar $BUFFER = DESCRIPTORS ? '_b' : BUFFER;\nvar $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;\nvar $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nfunction packIEEE754(value, mLen, nBytes) {\n var buffer = new Array(nBytes);\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var i = 0;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n var e, m, c;\n value = abs(value);\n // eslint-disable-next-line no-self-compare\n if (value != value || value === Infinity) {\n // eslint-disable-next-line no-self-compare\n m = value != value ? 1 : 0;\n e = eMax;\n } else {\n e = floor(log(value) / LN2);\n if (value * (c = pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * pow(2, eBias - 1) * pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);\n buffer[--i] |= s * 128;\n return buffer;\n}\nfunction unpackIEEE754(buffer, mLen, nBytes) {\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = eLen - 7;\n var i = nBytes - 1;\n var s = buffer[i--];\n var e = s & 127;\n var m;\n s >>= 7;\n for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : s ? -Infinity : Infinity;\n } else {\n m = m + pow(2, mLen);\n e = e - eBias;\n } return (s ? -1 : 1) * m * pow(2, e - mLen);\n}\n\nfunction unpackI32(bytes) {\n return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];\n}\nfunction packI8(it) {\n return [it & 0xff];\n}\nfunction packI16(it) {\n return [it & 0xff, it >> 8 & 0xff];\n}\nfunction packI32(it) {\n return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];\n}\nfunction packF64(it) {\n return packIEEE754(it, 52, 8);\n}\nfunction packF32(it) {\n return packIEEE754(it, 23, 4);\n}\n\nfunction addGetter(C, key, internal) {\n dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });\n}\n\nfunction get(view, bytes, index, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = store.slice(start, start + bytes);\n return isLittleEndian ? pack : pack.reverse();\n}\nfunction set(view, bytes, index, conversion, value, isLittleEndian) {\n var numIndex = +index;\n var intIndex = toIndex(numIndex);\n if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);\n var store = view[$BUFFER]._b;\n var start = intIndex + view[$OFFSET];\n var pack = conversion(+value);\n for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];\n}\n\nif (!$typed.ABV) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n this._b = arrayFill.call(new Array(byteLength), 0);\n this[$LENGTH] = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = buffer[$LENGTH];\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n this[$BUFFER] = buffer;\n this[$OFFSET] = offset;\n this[$LENGTH] = byteLength;\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, BYTE_LENGTH, '_l');\n addGetter($DataView, BUFFER, '_b');\n addGetter($DataView, BYTE_LENGTH, '_l');\n addGetter($DataView, BYTE_OFFSET, '_o');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments[1]);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1]));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packI8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packI16, value, arguments[2]);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packI32, value, arguments[2]);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packF32, value, arguments[2]);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packF64, value, arguments[2]);\n }\n });\n} else {\n if (!fails(function () {\n $ArrayBuffer(1);\n }) || !fails(function () {\n new $ArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new $ArrayBuffer(); // eslint-disable-line no-new\n new $ArrayBuffer(1.5); // eslint-disable-line no-new\n new $ArrayBuffer(NaN); // eslint-disable-line no-new\n return $ArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new BaseBuffer(toIndex(length));\n };\n var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];\n for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);\n }\n if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;\n }\n // iOS Safari 7.x bug\n var view = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataView[PROTOTYPE].setInt8;\n view.setInt8(0, 2147483648);\n view.setInt8(1, 2147483649);\n if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, true);\n}\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\nhide($DataView[PROTOTYPE], $typed.VIEW, true);\nexports[ARRAY_BUFFER] = $ArrayBuffer;\nexports[DATA_VIEW] = $DataView;\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar uid = require('./_uid');\nvar TYPED = uid('typed_array');\nvar VIEW = uid('view');\nvar ABV = !!(global.ArrayBuffer && global.DataView);\nvar CONSTR = ABV;\nvar i = 0;\nvar l = 9;\nvar Typed;\n\nvar TypedArrayConstructors = (\n 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'\n).split(',');\n\nwhile (i < l) {\n if (Typed = global[TypedArrayConstructors[i++]]) {\n hide(Typed.prototype, TYPED, true);\n hide(Typed.prototype, VIEW, true);\n } else CONSTR = false;\n}\n\nmodule.exports = {\n ABV: ABV,\n CONSTR: CONSTR,\n TYPED: TYPED,\n VIEW: VIEW\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar navigator = global.navigator;\n\nmodule.exports = navigator && navigator.userAgent || '';\n","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","exports.f = require('./_wks');\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', { copyWithin: require('./_array-copy-within') });\n\nrequire('./_add-to-unscopables')('copyWithin');\n","'use strict';\nvar $export = require('./_export');\nvar $every = require('./_array-methods')(4);\n\n$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', {\n // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])\n every: function every(callbackfn /* , thisArg */) {\n return $every(this, callbackfn, arguments[1]);\n }\n});\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', { fill: require('./_array-fill') });\n\nrequire('./_add-to-unscopables')('fill');\n","'use strict';\nvar $export = require('./_export');\nvar $filter = require('./_array-methods')(2);\n\n$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {\n // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\n// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(6);\nvar KEY = 'findIndex';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","'use strict';\nvar $export = require('./_export');\nvar $forEach = require('./_array-methods')(0);\nvar STRICT = require('./_strict-method')([].forEach, true);\n\n$export($export.P + $export.F * !STRICT, 'Array', {\n // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])\n forEach: function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\nvar ctx = require('./_ctx');\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar toLength = require('./_to-length');\nvar createProperty = require('./_create-property');\nvar getIterFn = require('./core.get-iterator-method');\n\n$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var aLen = arguments.length;\n var mapfn = aLen > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iterFn = getIterFn(O);\n var length, result, step, iterator;\n if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $indexOf = require('./_array-includes')(false);\nvar $native = [].indexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {\n // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? $native.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments[1]);\n }\n});\n","// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)\nvar $export = require('./_export');\n\n$export($export.S, 'Array', { isArray: require('./_is-array') });\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\n// 22.1.3.13 Array.prototype.join(separator)\nvar $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar arrayJoin = [].join;\n\n// fallback for not array-like strings\n$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', {\n join: function join(separator) {\n return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar $native = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {\n // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;\n var O = toIObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;\n return -1;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $map = require('./_array-methods')(1);\n\n$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', {\n // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar createProperty = require('./_create-property');\n\n// WebKit Array.of isn't generic\n$export($export.S + $export.F * require('./_fails')(function () {\n function F() { /* empty */ }\n return !(Array.of.call(F) instanceof F);\n}), 'Array', {\n // 22.1.2.3 Array.of( ...items)\n of: function of(/* ...args */) {\n var index = 0;\n var aLen = arguments.length;\n var result = new (typeof this == 'function' ? this : Array)(aLen);\n while (aLen > index) createProperty(result, index, arguments[index++]);\n result.length = aLen;\n return result;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $reduce = require('./_array-reduce');\n\n$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', {\n // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])\n reduceRight: function reduceRight(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], true);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $reduce = require('./_array-reduce');\n\n$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {\n // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments[1], false);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar html = require('./_html');\nvar cof = require('./_cof');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nvar arraySlice = [].slice;\n\n// fallback for not array-like ES3 strings and DOM objects\n$export($export.P + $export.F * require('./_fails')(function () {\n if (html) arraySlice.call(html);\n}), 'Array', {\n slice: function slice(begin, end) {\n var len = toLength(this.length);\n var klass = cof(this);\n end = end === undefined ? len : end;\n if (klass == 'Array') return arraySlice.call(this, begin, end);\n var start = toAbsoluteIndex(begin, len);\n var upTo = toAbsoluteIndex(end, len);\n var size = toLength(upTo - start);\n var cloned = new Array(size);\n var i = 0;\n for (; i < size; i++) cloned[i] = klass == 'String'\n ? this.charAt(start + i)\n : this[start + i];\n return cloned;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $some = require('./_array-methods')(3);\n\n$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {\n // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments[1]);\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","require('./_set-species')('Array');\n","// 20.3.3.1 / 15.9.4.4 Date.now()\nvar $export = require('./_export');\n\n$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });\n","// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()\nvar $export = require('./_export');\nvar toISOString = require('./_date-to-iso-string');\n\n// PhantomJS / old WebKit has a broken implementations\n$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {\n toISOString: toISOString\n});\n","'use strict';\nvar $export = require('./_export');\nvar toObject = require('./_to-object');\nvar toPrimitive = require('./_to-primitive');\n\n$export($export.P + $export.F * require('./_fails')(function () {\n return new Date(NaN).toJSON() !== null\n || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;\n}), 'Date', {\n // eslint-disable-next-line no-unused-vars\n toJSON: function toJSON(key) {\n var O = toObject(this);\n var pv = toPrimitive(O);\n return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();\n }\n});\n","var TO_PRIMITIVE = require('./_wks')('toPrimitive');\nvar proto = Date.prototype;\n\nif (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive'));\n","var DateProto = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar $toString = DateProto[TO_STRING];\nvar getTime = DateProto.getTime;\nif (new Date(NaN) + '' != INVALID_DATE) {\n require('./_redefine')(DateProto, TO_STRING, function toString() {\n var value = getTime.call(this);\n // eslint-disable-next-line no-self-compare\n return value === value ? $toString.call(this) : INVALID_DATE;\n });\n}\n","// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)\nvar $export = require('./_export');\n\n$export($export.P, 'Function', { bind: require('./_bind') });\n","'use strict';\nvar isObject = require('./_is-object');\nvar getPrototypeOf = require('./_object-gpo');\nvar HAS_INSTANCE = require('./_wks')('hasInstance');\nvar FunctionProto = Function.prototype;\n// 19.2.3.6 Function.prototype[@@hasInstance](V)\nif (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, HAS_INSTANCE, { value: function (O) {\n if (typeof this != 'function' || !isObject(O)) return false;\n if (!isObject(this.prototype)) return O instanceof this;\n // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:\n while (O = getPrototypeOf(O)) if (this.prototype === O) return true;\n return false;\n} });\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar MAP = 'Map';\n\n// 23.1 Map Objects\nmodule.exports = require('./_collection')(MAP, function (get) {\n return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = strong.getEntry(validate(this, MAP), key);\n return entry && entry.v;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);\n }\n}, strong, true);\n","// 20.2.2.3 Math.acosh(x)\nvar $export = require('./_export');\nvar log1p = require('./_math-log1p');\nvar sqrt = Math.sqrt;\nvar $acosh = Math.acosh;\n\n$export($export.S + $export.F * !($acosh\n // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n && Math.floor($acosh(Number.MAX_VALUE)) == 710\n // Tor Browser bug: Math.acosh(Infinity) -> NaN\n && $acosh(Infinity) == Infinity\n), 'Math', {\n acosh: function acosh(x) {\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? Math.log(x) + Math.LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n","// 20.2.2.5 Math.asinh(x)\nvar $export = require('./_export');\nvar $asinh = Math.asinh;\n\nfunction asinh(x) {\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));\n}\n\n// Tor Browser bug: Math.asinh(0) -> -0\n$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });\n","// 20.2.2.7 Math.atanh(x)\nvar $export = require('./_export');\nvar $atanh = Math.atanh;\n\n// Tor Browser bug: Math.atanh(-0) -> 0\n$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {\n atanh: function atanh(x) {\n return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;\n }\n});\n","// 20.2.2.9 Math.cbrt(x)\nvar $export = require('./_export');\nvar sign = require('./_math-sign');\n\n$export($export.S, 'Math', {\n cbrt: function cbrt(x) {\n return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);\n }\n});\n","// 20.2.2.11 Math.clz32(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n clz32: function clz32(x) {\n return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;\n }\n});\n","// 20.2.2.12 Math.cosh(x)\nvar $export = require('./_export');\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n cosh: function cosh(x) {\n return (exp(x = +x) + exp(-x)) / 2;\n }\n});\n","// 20.2.2.14 Math.expm1(x)\nvar $export = require('./_export');\nvar $expm1 = require('./_math-expm1');\n\n$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });\n","// 20.2.2.16 Math.fround(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { fround: require('./_math-fround') });\n","// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])\nvar $export = require('./_export');\nvar abs = Math.abs;\n\n$export($export.S, 'Math', {\n hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * Math.sqrt(sum);\n }\n});\n","// 20.2.2.18 Math.imul(x, y)\nvar $export = require('./_export');\nvar $imul = Math.imul;\n\n// some WebKit versions fails with big numbers, some has wrong arity\n$export($export.S + $export.F * require('./_fails')(function () {\n return $imul(0xffffffff, 5) != -5 || $imul.length != 2;\n}), 'Math', {\n imul: function imul(x, y) {\n var UINT16 = 0xffff;\n var xn = +x;\n var yn = +y;\n var xl = UINT16 & xn;\n var yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n","// 20.2.2.21 Math.log10(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n log10: function log10(x) {\n return Math.log(x) * Math.LOG10E;\n }\n});\n","// 20.2.2.20 Math.log1p(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { log1p: require('./_math-log1p') });\n","// 20.2.2.22 Math.log2(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n log2: function log2(x) {\n return Math.log(x) / Math.LN2;\n }\n});\n","// 20.2.2.28 Math.sign(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', { sign: require('./_math-sign') });\n","// 20.2.2.30 Math.sinh(x)\nvar $export = require('./_export');\nvar expm1 = require('./_math-expm1');\nvar exp = Math.exp;\n\n// V8 near Chromium 38 has a problem with very small numbers\n$export($export.S + $export.F * require('./_fails')(function () {\n return !Math.sinh(-2e-17) != -2e-17;\n}), 'Math', {\n sinh: function sinh(x) {\n return Math.abs(x = +x) < 1\n ? (expm1(x) - expm1(-x)) / 2\n : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);\n }\n});\n","// 20.2.2.33 Math.tanh(x)\nvar $export = require('./_export');\nvar expm1 = require('./_math-expm1');\nvar exp = Math.exp;\n\n$export($export.S, 'Math', {\n tanh: function tanh(x) {\n var a = expm1(x = +x);\n var b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n","// 20.2.2.34 Math.trunc(x)\nvar $export = require('./_export');\n\n$export($export.S, 'Math', {\n trunc: function trunc(it) {\n return (it > 0 ? Math.floor : Math.ceil)(it);\n }\n});\n","'use strict';\nvar global = require('./_global');\nvar has = require('./_has');\nvar cof = require('./_cof');\nvar inheritIfRequired = require('./_inherit-if-required');\nvar toPrimitive = require('./_to-primitive');\nvar fails = require('./_fails');\nvar gOPN = require('./_object-gopn').f;\nvar gOPD = require('./_object-gopd').f;\nvar dP = require('./_object-dp').f;\nvar $trim = require('./_string-trim').trim;\nvar NUMBER = 'Number';\nvar $Number = global[NUMBER];\nvar Base = $Number;\nvar proto = $Number.prototype;\n// Opera ~12 has broken Object#toString\nvar BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER;\nvar TRIM = 'trim' in String.prototype;\n\n// 7.1.3 ToNumber(argument)\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i\n default: return +it;\n }\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number\n // check on 1..constructor(foo) case\n && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)\n ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n for (var keys = require('./_descriptors') ? gOPN(Base) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(Base, key = keys[j]) && !has($Number, key)) {\n dP($Number, key, gOPD(Base, key));\n }\n }\n $Number.prototype = proto;\n proto.constructor = $Number;\n require('./_redefine')(global, NUMBER, $Number);\n}\n","// 20.1.2.1 Number.EPSILON\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });\n","// 20.1.2.2 Number.isFinite(number)\nvar $export = require('./_export');\nvar _isFinite = require('./_global').isFinite;\n\n$export($export.S, 'Number', {\n isFinite: function isFinite(it) {\n return typeof it == 'number' && _isFinite(it);\n }\n});\n","// 20.1.2.3 Number.isInteger(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { isInteger: require('./_is-integer') });\n","// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n","// 20.1.2.5 Number.isSafeInteger(number)\nvar $export = require('./_export');\nvar isInteger = require('./_is-integer');\nvar abs = Math.abs;\n\n$export($export.S, 'Number', {\n isSafeInteger: function isSafeInteger(number) {\n return isInteger(number) && abs(number) <= 0x1fffffffffffff;\n }\n});\n","// 20.1.2.6 Number.MAX_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });\n","// 20.1.2.10 Number.MIN_SAFE_INTEGER\nvar $export = require('./_export');\n\n$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });\n","var $export = require('./_export');\nvar $parseFloat = require('./_parse-float');\n// 20.1.2.12 Number.parseFloat(string)\n$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });\n","var $export = require('./_export');\nvar $parseInt = require('./_parse-int');\n// 20.1.2.13 Number.parseInt(string, radix)\n$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });\n","'use strict';\nvar $export = require('./_export');\nvar toInteger = require('./_to-integer');\nvar aNumberValue = require('./_a-number-value');\nvar repeat = require('./_string-repeat');\nvar $toFixed = 1.0.toFixed;\nvar floor = Math.floor;\nvar data = [0, 0, 0, 0, 0, 0];\nvar ERROR = 'Number.toFixed: incorrect invocation!';\nvar ZERO = '0';\n\nvar multiply = function (n, c) {\n var i = -1;\n var c2 = c;\n while (++i < 6) {\n c2 += n * data[i];\n data[i] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\nvar divide = function (n) {\n var i = 6;\n var c = 0;\n while (--i >= 0) {\n c += data[i];\n data[i] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\nvar numToString = function () {\n var i = 6;\n var s = '';\n while (--i >= 0) {\n if (s !== '' || i === 0 || data[i] !== 0) {\n var t = String(data[i]);\n s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;\n }\n } return s;\n};\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\n$export($export.P + $export.F * (!!$toFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !require('./_fails')(function () {\n // V8 ~ Android 4.3-\n $toFixed.call({});\n})), 'Number', {\n toFixed: function toFixed(fractionDigits) {\n var x = aNumberValue(this, ERROR);\n var f = toInteger(fractionDigits);\n var s = '';\n var m = ZERO;\n var e, z, j, k;\n if (f < 0 || f > 20) throw RangeError(ERROR);\n // eslint-disable-next-line no-self-compare\n if (x != x) return 'NaN';\n if (x <= -1e21 || x >= 1e21) return String(x);\n if (x < 0) {\n s = '-';\n x = -x;\n }\n if (x > 1e-21) {\n e = log(x * pow(2, 69, 1)) - 69;\n z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = f;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n m = numToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n m = numToString() + repeat.call(ZERO, f);\n }\n }\n if (f > 0) {\n k = m.length;\n m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));\n } else {\n m = s + m;\n } return m;\n }\n});\n","'use strict';\nvar $export = require('./_export');\nvar $fails = require('./_fails');\nvar aNumberValue = require('./_a-number-value');\nvar $toPrecision = 1.0.toPrecision;\n\n$export($export.P + $export.F * ($fails(function () {\n // IE7-\n return $toPrecision.call(1, undefined) !== '1';\n}) || !$fails(function () {\n // V8 ~ Android 4.3-\n $toPrecision.call({});\n})), 'Number', {\n toPrecision: function toPrecision(precision) {\n var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');\n return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);\n }\n});\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","var $export = require('./_export');\n// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') });\n","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n","// 19.1.2.5 Object.freeze(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('freeze', function ($freeze) {\n return function freeze(it) {\n return $freeze && isObject(it) ? $freeze(meta(it)) : it;\n };\n});\n","// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\nvar toIObject = require('./_to-iobject');\nvar $getOwnPropertyDescriptor = require('./_object-gopd').f;\n\nrequire('./_object-sap')('getOwnPropertyDescriptor', function () {\n return function getOwnPropertyDescriptor(it, key) {\n return $getOwnPropertyDescriptor(toIObject(it), key);\n };\n});\n","// 19.1.2.7 Object.getOwnPropertyNames(O)\nrequire('./_object-sap')('getOwnPropertyNames', function () {\n return require('./_object-gopn-ext').f;\n});\n","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./_to-object');\nvar $getPrototypeOf = require('./_object-gpo');\n\nrequire('./_object-sap')('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n","// 19.1.2.11 Object.isExtensible(O)\nvar isObject = require('./_is-object');\n\nrequire('./_object-sap')('isExtensible', function ($isExtensible) {\n return function isExtensible(it) {\n return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;\n };\n});\n","// 19.1.2.12 Object.isFrozen(O)\nvar isObject = require('./_is-object');\n\nrequire('./_object-sap')('isFrozen', function ($isFrozen) {\n return function isFrozen(it) {\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n };\n});\n","// 19.1.2.13 Object.isSealed(O)\nvar isObject = require('./_is-object');\n\nrequire('./_object-sap')('isSealed', function ($isSealed) {\n return function isSealed(it) {\n return isObject(it) ? $isSealed ? $isSealed(it) : false : true;\n };\n});\n","// 19.1.3.10 Object.is(value1, value2)\nvar $export = require('./_export');\n$export($export.S, 'Object', { is: require('./_same-value') });\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","// 19.1.2.15 Object.preventExtensions(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('preventExtensions', function ($preventExtensions) {\n return function preventExtensions(it) {\n return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;\n };\n});\n","// 19.1.2.17 Object.seal(O)\nvar isObject = require('./_is-object');\nvar meta = require('./_meta').onFreeze;\n\nrequire('./_object-sap')('seal', function ($seal) {\n return function seal(it) {\n return $seal && isObject(it) ? $seal(meta(it)) : it;\n };\n});\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","'use strict';\n// 19.1.3.6 Object.prototype.toString()\nvar classof = require('./_classof');\nvar test = {};\ntest[require('./_wks')('toStringTag')] = 'z';\nif (test + '' != '[object z]') {\n require('./_redefine')(Object.prototype, 'toString', function toString() {\n return '[object ' + classof(this) + ']';\n }, true);\n}\n","var $export = require('./_export');\nvar $parseFloat = require('./_parse-float');\n// 18.2.4 parseFloat(string)\n$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });\n","var $export = require('./_export');\nvar $parseInt = require('./_parse-int');\n// 18.2.5 parseInt(string, radix)\n$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar userAgent = require('./_user-agent');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function')\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1;\n } catch (e) { /* empty */ }\n}();\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function (promise, isReject) {\n if (promise._n) return;\n promise._n = true;\n var chain = promise._c;\n microtask(function () {\n var value = promise._v;\n var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (promise._h == 2) onHandleUnhandled(promise);\n promise._h = 1;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // may throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (e) {\n if (domain && !exited) domain.exit();\n reject(e);\n }\n };\n while (chain.length > i) run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if (isReject && !promise._h) onUnhandled(promise);\n });\n};\nvar onUnhandled = function (promise) {\n task.call(global, function () {\n var value = promise._v;\n var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = perform(function () {\n if (isNode) {\n process.emit('unhandledRejection', value, promise);\n } else if (handler = global.onunhandledrejection) {\n handler({ promise: promise, reason: value });\n } else if ((console = global.console) && console.error) {\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n return promise._h !== 1 && (promise._a || promise._c).length === 0;\n};\nvar onHandleUnhandled = function (promise) {\n task.call(global, function () {\n var handler;\n if (isNode) {\n process.emit('rejectionHandled', promise);\n } else if (handler = global.onrejectionhandled) {\n handler({ promise: promise, reason: promise._v });\n }\n });\n};\nvar $reject = function (value) {\n var promise = this;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if (!promise._a) promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function (value) {\n var promise = this;\n var then;\n if (promise._d) return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n if (then = isThenable(value)) {\n microtask(function () {\n var wrapper = { _w: promise, _d: false }; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch (e) {\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch (e) {\n $reject.call({ _w: promise, _d: false }, e); // wrap\n }\n};\n\n// constructor polyfill\nif (!USE_NATIVE) {\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor) {\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch (err) {\n $reject.call(this, err);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected) {\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if (this._a) this._a.push(reaction);\n if (this._s) notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n var $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x) {\n return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\n","// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar anObject = require('./_an-object');\nvar rApply = (require('./_global').Reflect || {}).apply;\nvar fApply = Function.apply;\n// MS Edge argumentsList argument is optional\n$export($export.S + $export.F * !require('./_fails')(function () {\n rApply(function () { /* empty */ });\n}), 'Reflect', {\n apply: function apply(target, thisArgument, argumentsList) {\n var T = aFunction(target);\n var L = anObject(argumentsList);\n return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);\n }\n});\n","// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])\nvar $export = require('./_export');\nvar create = require('./_object-create');\nvar aFunction = require('./_a-function');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar bind = require('./_bind');\nvar rConstruct = (require('./_global').Reflect || {}).construct;\n\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n rConstruct(function () { /* empty */ });\n});\n\n$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n","// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)\nvar dP = require('./_object-dp');\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar toPrimitive = require('./_to-primitive');\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\n$export($export.S + $export.F * require('./_fails')(function () {\n // eslint-disable-next-line no-undef\n Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });\n}), 'Reflect', {\n defineProperty: function defineProperty(target, propertyKey, attributes) {\n anObject(target);\n propertyKey = toPrimitive(propertyKey, true);\n anObject(attributes);\n try {\n dP.f(target, propertyKey, attributes);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n","// 26.1.4 Reflect.deleteProperty(target, propertyKey)\nvar $export = require('./_export');\nvar gOPD = require('./_object-gopd').f;\nvar anObject = require('./_an-object');\n\n$export($export.S, 'Reflect', {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var desc = gOPD(anObject(target), propertyKey);\n return desc && !desc.configurable ? false : delete target[propertyKey];\n }\n});\n","'use strict';\n// 26.1.5 Reflect.enumerate(target)\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar Enumerate = function (iterated) {\n this._t = anObject(iterated); // target\n this._i = 0; // next index\n var keys = this._k = []; // keys\n var key;\n for (key in iterated) keys.push(key);\n};\nrequire('./_iter-create')(Enumerate, 'Object', function () {\n var that = this;\n var keys = that._k;\n var key;\n do {\n if (that._i >= keys.length) return { value: undefined, done: true };\n } while (!((key = keys[that._i++]) in that._t));\n return { value: key, done: false };\n});\n\n$export($export.S, 'Reflect', {\n enumerate: function enumerate(target) {\n return new Enumerate(target);\n }\n});\n","// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)\nvar gOPD = require('./_object-gopd');\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\n\n$export($export.S, 'Reflect', {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {\n return gOPD.f(anObject(target), propertyKey);\n }\n});\n","// 26.1.8 Reflect.getPrototypeOf(target)\nvar $export = require('./_export');\nvar getProto = require('./_object-gpo');\nvar anObject = require('./_an-object');\n\n$export($export.S, 'Reflect', {\n getPrototypeOf: function getPrototypeOf(target) {\n return getProto(anObject(target));\n }\n});\n","// 26.1.6 Reflect.get(target, propertyKey [, receiver])\nvar gOPD = require('./_object-gopd');\nvar getPrototypeOf = require('./_object-gpo');\nvar has = require('./_has');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\n\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var desc, proto;\n if (anObject(target) === receiver) return target[propertyKey];\n if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')\n ? desc.value\n : desc.get !== undefined\n ? desc.get.call(receiver)\n : undefined;\n if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);\n}\n\n$export($export.S, 'Reflect', { get: get });\n","// 26.1.9 Reflect.has(target, propertyKey)\nvar $export = require('./_export');\n\n$export($export.S, 'Reflect', {\n has: function has(target, propertyKey) {\n return propertyKey in target;\n }\n});\n","// 26.1.10 Reflect.isExtensible(target)\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar $isExtensible = Object.isExtensible;\n\n$export($export.S, 'Reflect', {\n isExtensible: function isExtensible(target) {\n anObject(target);\n return $isExtensible ? $isExtensible(target) : true;\n }\n});\n","// 26.1.11 Reflect.ownKeys(target)\nvar $export = require('./_export');\n\n$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') });\n","// 26.1.12 Reflect.preventExtensions(target)\nvar $export = require('./_export');\nvar anObject = require('./_an-object');\nvar $preventExtensions = Object.preventExtensions;\n\n$export($export.S, 'Reflect', {\n preventExtensions: function preventExtensions(target) {\n anObject(target);\n try {\n if ($preventExtensions) $preventExtensions(target);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n","// 26.1.14 Reflect.setPrototypeOf(target, proto)\nvar $export = require('./_export');\nvar setProto = require('./_set-proto');\n\nif (setProto) $export($export.S, 'Reflect', {\n setPrototypeOf: function setPrototypeOf(target, proto) {\n setProto.check(target, proto);\n try {\n setProto.set(target, proto);\n return true;\n } catch (e) {\n return false;\n }\n }\n});\n","// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])\nvar dP = require('./_object-dp');\nvar gOPD = require('./_object-gopd');\nvar getPrototypeOf = require('./_object-gpo');\nvar has = require('./_has');\nvar $export = require('./_export');\nvar createDesc = require('./_property-desc');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\n\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDesc = gOPD.f(anObject(target), propertyKey);\n var existingDescriptor, proto;\n if (!ownDesc) {\n if (isObject(proto = getPrototypeOf(target))) {\n return set(proto, propertyKey, V, receiver);\n }\n ownDesc = createDesc(0);\n }\n if (has(ownDesc, 'value')) {\n if (ownDesc.writable === false || !isObject(receiver)) return false;\n if (existingDescriptor = gOPD.f(receiver, propertyKey)) {\n if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;\n existingDescriptor.value = V;\n dP.f(receiver, propertyKey, existingDescriptor);\n } else dP.f(receiver, propertyKey, createDesc(0, V));\n return true;\n }\n return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);\n}\n\n$export($export.S, 'Reflect', { set: set });\n","var global = require('./_global');\nvar inheritIfRequired = require('./_inherit-if-required');\nvar dP = require('./_object-dp').f;\nvar gOPN = require('./_object-gopn').f;\nvar isRegExp = require('./_is-regexp');\nvar $flags = require('./_flags');\nvar $RegExp = global.RegExp;\nvar Base = $RegExp;\nvar proto = $RegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n// \"new\" creates a new object, old webkit buggy here\nvar CORRECT_NEW = new $RegExp(re1) !== re1;\n\nif (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () {\n re2[require('./_wks')('match')] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';\n}))) {\n $RegExp = function RegExp(p, f) {\n var tiRE = this instanceof $RegExp;\n var piRE = isRegExp(p);\n var fiU = f === undefined;\n return !tiRE && piRE && p.constructor === $RegExp && fiU ? p\n : inheritIfRequired(CORRECT_NEW\n ? new Base(piRE && !fiU ? p.source : p, f)\n : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)\n , tiRE ? this : proto, $RegExp);\n };\n var proxy = function (key) {\n key in $RegExp || dP($RegExp, key, {\n configurable: true,\n get: function () { return Base[key]; },\n set: function (it) { Base[key] = it; }\n });\n };\n for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);\n proto.constructor = $RegExp;\n $RegExp.prototype = proto;\n require('./_redefine')(global, 'RegExp', $RegExp);\n}\n\nrequire('./_set-species')('RegExp');\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n","// @@search logic\nrequire('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search) {\n // 21.1.3.15 String.prototype.search(regexp)\n return [function search(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n }, $search];\n});\n","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = require('./_is-regexp');\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n","'use strict';\n// B.2.3.2 String.prototype.anchor(name)\nrequire('./_string-html')('anchor', function (createHTML) {\n return function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n };\n});\n","'use strict';\n// B.2.3.3 String.prototype.big()\nrequire('./_string-html')('big', function (createHTML) {\n return function big() {\n return createHTML(this, 'big', '', '');\n };\n});\n","'use strict';\n// B.2.3.4 String.prototype.blink()\nrequire('./_string-html')('blink', function (createHTML) {\n return function blink() {\n return createHTML(this, 'blink', '', '');\n };\n});\n","'use strict';\n// B.2.3.5 String.prototype.bold()\nrequire('./_string-html')('bold', function (createHTML) {\n return function bold() {\n return createHTML(this, 'b', '', '');\n };\n});\n","'use strict';\nvar $export = require('./_export');\nvar $at = require('./_string-at')(false);\n$export($export.P, 'String', {\n // 21.1.3.3 String.prototype.codePointAt(pos)\n codePointAt: function codePointAt(pos) {\n return $at(this, pos);\n }\n});\n","// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])\n'use strict';\nvar $export = require('./_export');\nvar toLength = require('./_to-length');\nvar context = require('./_string-context');\nvar ENDS_WITH = 'endsWith';\nvar $endsWith = ''[ENDS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = context(this, searchString, ENDS_WITH);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);\n var search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n","'use strict';\n// B.2.3.6 String.prototype.fixed()\nrequire('./_string-html')('fixed', function (createHTML) {\n return function fixed() {\n return createHTML(this, 'tt', '', '');\n };\n});\n","'use strict';\n// B.2.3.7 String.prototype.fontcolor(color)\nrequire('./_string-html')('fontcolor', function (createHTML) {\n return function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n };\n});\n","'use strict';\n// B.2.3.8 String.prototype.fontsize(size)\nrequire('./_string-html')('fontsize', function (createHTML) {\n return function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n };\n});\n","var $export = require('./_export');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar fromCharCode = String.fromCharCode;\nvar $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\n$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {\n // 21.1.2.2 String.fromCodePoint(...codePoints)\n fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars\n var res = [];\n var aLen = arguments.length;\n var i = 0;\n var code;\n while (aLen > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');\n res.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)\n );\n } return res.join('');\n }\n});\n","// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n'use strict';\nvar $export = require('./_export');\nvar context = require('./_string-context');\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\n// B.2.3.9 String.prototype.italics()\nrequire('./_string-html')('italics', function (createHTML) {\n return function italics() {\n return createHTML(this, 'i', '', '');\n };\n});\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","'use strict';\n// B.2.3.10 String.prototype.link(url)\nrequire('./_string-html')('link', function (createHTML) {\n return function link(url) {\n return createHTML(this, 'a', 'href', url);\n };\n});\n","var $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\n\n$export($export.S, 'String', {\n // 21.1.2.4 String.raw(callSite, ...substitutions)\n raw: function raw(callSite) {\n var tpl = toIObject(callSite.raw);\n var len = toLength(tpl.length);\n var aLen = arguments.length;\n var res = [];\n var i = 0;\n while (len > i) {\n res.push(String(tpl[i++]));\n if (i < aLen) res.push(String(arguments[i]));\n } return res.join('');\n }\n});\n","var $export = require('./_export');\n\n$export($export.P, 'String', {\n // 21.1.3.13 String.prototype.repeat(count)\n repeat: require('./_string-repeat')\n});\n","'use strict';\n// B.2.3.11 String.prototype.small()\nrequire('./_string-html')('small', function (createHTML) {\n return function small() {\n return createHTML(this, 'small', '', '');\n };\n});\n","// 21.1.3.18 String.prototype.startsWith(searchString [, position ])\n'use strict';\nvar $export = require('./_export');\nvar toLength = require('./_to-length');\nvar context = require('./_string-context');\nvar STARTS_WITH = 'startsWith';\nvar $startsWith = ''[STARTS_WITH];\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = context(this, searchString, STARTS_WITH);\n var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","'use strict';\n// B.2.3.12 String.prototype.strike()\nrequire('./_string-html')('strike', function (createHTML) {\n return function strike() {\n return createHTML(this, 'strike', '', '');\n };\n});\n","'use strict';\n// B.2.3.13 String.prototype.sub()\nrequire('./_string-html')('sub', function (createHTML) {\n return function sub() {\n return createHTML(this, 'sub', '', '');\n };\n});\n","'use strict';\n// B.2.3.14 String.prototype.sup()\nrequire('./_string-html')('sup', function (createHTML) {\n return function sup() {\n return createHTML(this, 'sup', '', '');\n };\n});\n","'use strict';\n// 21.1.3.25 String.prototype.trim()\nrequire('./_string-trim')('trim', function ($trim) {\n return function trim() {\n return $trim(this, 3);\n };\n});\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","'use strict';\nvar $export = require('./_export');\nvar $typed = require('./_typed');\nvar buffer = require('./_typed-buffer');\nvar anObject = require('./_an-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nvar isObject = require('./_is-object');\nvar ArrayBuffer = require('./_global').ArrayBuffer;\nvar speciesConstructor = require('./_species-constructor');\nvar $ArrayBuffer = buffer.ArrayBuffer;\nvar $DataView = buffer.DataView;\nvar $isView = $typed.ABV && ArrayBuffer.isView;\nvar $slice = $ArrayBuffer.prototype.slice;\nvar VIEW = $typed.VIEW;\nvar ARRAY_BUFFER = 'ArrayBuffer';\n\n$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });\n\n$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {\n // 24.1.3.1 ArrayBuffer.isView(arg)\n isView: function isView(it) {\n return $isView && $isView(it) || isObject(it) && VIEW in it;\n }\n});\n\n$export($export.P + $export.U + $export.F * require('./_fails')(function () {\n return !new $ArrayBuffer(2).slice(1, undefined).byteLength;\n}), ARRAY_BUFFER, {\n // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)\n slice: function slice(start, end) {\n if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix\n var len = anObject(this).byteLength;\n var first = toAbsoluteIndex(start, len);\n var fin = toAbsoluteIndex(end === undefined ? len : end, len);\n var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));\n var viewS = new $DataView(this);\n var viewT = new $DataView(result);\n var index = 0;\n while (first < fin) {\n viewT.setUint8(index++, viewS.getUint8(first++));\n } return result;\n }\n});\n\nrequire('./_set-species')(ARRAY_BUFFER);\n","var $export = require('./_export');\n$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {\n DataView: require('./_typed-buffer').DataView\n});\n","require('./_typed-array')('Float32', 4, function (init) {\n return function Float32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Float64', 8, function (init) {\n return function Float64Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Int16', 2, function (init) {\n return function Int16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Int32', 4, function (init) {\n return function Int32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Int8', 1, function (init) {\n return function Int8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint16', 2, function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint32', 4, function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint8', 1, function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","require('./_typed-array')('Uint8', 1, function (init) {\n return function Uint8ClampedArray(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n}, true);\n","'use strict';\nvar each = require('./_array-methods')(0);\nvar redefine = require('./_redefine');\nvar meta = require('./_meta');\nvar assign = require('./_object-assign');\nvar weak = require('./_collection-weak');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar validate = require('./_validate-collection');\nvar WEAK_MAP = 'WeakMap';\nvar getWeak = meta.getWeak;\nvar isExtensible = Object.isExtensible;\nvar uncaughtFrozenStore = weak.ufstore;\nvar tmp = {};\nvar InternalMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length > 0 ? arguments[0] : undefined);\n };\n};\n\nvar methods = {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n if (isObject(key)) {\n var data = getWeak(key);\n if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);\n return data ? data[this._i] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return weak.def(validate(this, WEAK_MAP), key, value);\n }\n};\n\n// 23.3 WeakMap Objects\nvar $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true);\n\n// IE11 WeakMap frozen keys fix\nif (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {\n InternalMap = weak.getConstructor(wrapper, WEAK_MAP);\n assign(InternalMap.prototype, methods);\n meta.NEED = true;\n each(['delete', 'has', 'get', 'set'], function (key) {\n var proto = $WeakMap.prototype;\n var method = proto[key];\n redefine(proto, key, function (a, b) {\n // store frozen objects on internal weakmap shim\n if (isObject(a) && !isExtensible(a)) {\n if (!this._f) this._f = new InternalMap();\n var result = this._f[key](a, b);\n return key == 'set' ? this : result;\n // store all the rest on native weakmap\n } return method.call(this, a, b);\n });\n });\n}\n","'use strict';\nvar weak = require('./_collection-weak');\nvar validate = require('./_validate-collection');\nvar WEAK_SET = 'WeakSet';\n\n// 23.4 WeakSet Objects\nrequire('./_collection')(WEAK_SET, function (get) {\n return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return weak.def(validate(this, WEAK_SET), value, true);\n }\n}, weak, false, true);\n","'use strict';\n// https://github.com/tc39/Array.prototype.includes\nvar $export = require('./_export');\nvar $includes = require('./_array-includes')(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nrequire('./_add-to-unscopables')('includes');\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n","// https://github.com/tc39/proposal-object-getownpropertydescriptors\nvar $export = require('./_export');\nvar ownKeys = require('./_own-keys');\nvar toIObject = require('./_to-iobject');\nvar gOPD = require('./_object-gopd');\nvar createProperty = require('./_create-property');\n\n$export($export.S, 'Object', {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIObject(object);\n var getDesc = gOPD.f;\n var keys = ownKeys(O);\n var result = {};\n var i = 0;\n var key, desc;\n while (keys.length > i) {\n desc = getDesc(O, key = keys[i++]);\n if (desc !== undefined) createProperty(result, key, desc);\n }\n return result;\n }\n});\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $values = require('./_object-to-array')(false);\n\n$export($export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export');\nvar $pad = require('./_string-pad');\nvar userAgent = require('./_user-agent');\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);\n }\n});\n","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export');\nvar $pad = require('./_string-pad');\nvar userAgent = require('./_user-agent');\n\n// https://github.com/zloirock/core-js/issues/280\n$export($export.P + $export.F * /Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(userAgent), 'String', {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n","require('./_wks-define')('asyncIterator');\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","var $export = require('./_export');\nvar $task = require('./_task');\n$export($export.G + $export.B, {\n setImmediate: $task.set,\n clearImmediate: $task.clear\n});\n","// ie9- setTimeout & setInterval additional parameters fix\nvar global = require('./_global');\nvar $export = require('./_export');\nvar userAgent = require('./_user-agent');\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\nvar wrap = function (set) {\n return function (fn, time /* , ...args */) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice.call(arguments, 2) : false;\n return set(boundArgs ? function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);\n } : fn, time);\n };\n};\n$export($export.G + $export.B + $export.F * MSIE, {\n setTimeout: wrap(global.setTimeout),\n setInterval: wrap(global.setInterval)\n});\n","require('../modules/web.timers');\nrequire('../modules/web.immediate');\nrequire('../modules/web.dom.iterable');\nmodule.exports = require('../modules/_core');\n","(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define('html-janitor', factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.HTMLJanitor = factory();\n }\n}(this, function () {\n\n /**\n * @param {Object} config.tags Dictionary of allowed tags.\n * @param {boolean} config.keepNestedBlockElements Default false.\n */\n function HTMLJanitor(config) {\n\n var tagDefinitions = config['tags'];\n var tags = Object.keys(tagDefinitions);\n\n var validConfigValues = tags\n .map(function(k) { return typeof tagDefinitions[k]; })\n .every(function(type) { return type === 'object' || type === 'boolean' || type === 'function'; });\n\n if(!validConfigValues) {\n throw new Error(\"The configuration was invalid\");\n }\n\n this.config = config;\n }\n\n // TODO: not exhaustive?\n var blockElementNames = ['P', 'LI', 'TD', 'TH', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'PRE'];\n function isBlockElement(node) {\n return blockElementNames.indexOf(node.nodeName) !== -1;\n }\n\n var inlineElementNames = ['A', 'B', 'STRONG', 'I', 'EM', 'SUB', 'SUP', 'U', 'STRIKE'];\n function isInlineElement(node) {\n return inlineElementNames.indexOf(node.nodeName) !== -1;\n }\n\n HTMLJanitor.prototype.clean = function (html) {\n const sandbox = document.implementation.createHTMLDocument();\n const root = sandbox.createElement(\"div\");\n root.innerHTML = html;\n\n this._sanitize(sandbox, root);\n\n return root.innerHTML;\n };\n\n HTMLJanitor.prototype._sanitize = function (document, parentNode) {\n var treeWalker = createTreeWalker(document, parentNode);\n var node = treeWalker.firstChild();\n\n if (!node) { return; }\n\n do {\n if (node.nodeType === Node.TEXT_NODE) {\n // If this text node is just whitespace and the previous or next element\n // sibling is a block element, remove it\n // N.B.: This heuristic could change. Very specific to a bug with\n // `contenteditable` in Firefox: http://jsbin.com/EyuKase/1/edit?js,output\n // FIXME: make this an option?\n if (node.data.trim() === ''\n && ((node.previousElementSibling && isBlockElement(node.previousElementSibling))\n || (node.nextElementSibling && isBlockElement(node.nextElementSibling)))) {\n parentNode.removeChild(node);\n this._sanitize(document, parentNode);\n break;\n } else {\n continue;\n }\n }\n\n // Remove all comments\n if (node.nodeType === Node.COMMENT_NODE) {\n parentNode.removeChild(node);\n this._sanitize(document, parentNode);\n break;\n }\n\n var isInline = isInlineElement(node);\n var containsBlockElement;\n if (isInline) {\n containsBlockElement = Array.prototype.some.call(node.childNodes, isBlockElement);\n }\n\n // Block elements should not be nested (e.g.
  • ...); if\n // they are, we want to unwrap the inner block element.\n var isNotTopContainer = !! parentNode.parentNode;\n var isNestedBlockElement =\n isBlockElement(parentNode) &&\n isBlockElement(node) &&\n isNotTopContainer;\n\n var nodeName = node.nodeName.toLowerCase();\n\n var allowedAttrs = getAllowedAttrs(this.config, nodeName, node);\n\n var isInvalid = isInline && containsBlockElement;\n\n // Drop tag entirely according to the whitelist *and* if the markup\n // is invalid.\n if (isInvalid || shouldRejectNode(node, allowedAttrs)\n || (!this.config.keepNestedBlockElements && isNestedBlockElement)) {\n // Do not keep the inner text of SCRIPT/STYLE elements.\n if (! (node.nodeName === 'SCRIPT' || node.nodeName === 'STYLE')) {\n while (node.childNodes.length > 0) {\n parentNode.insertBefore(node.childNodes[0], node);\n }\n }\n parentNode.removeChild(node);\n\n this._sanitize(document, parentNode);\n break;\n }\n\n // Sanitize attributes\n for (var a = 0; a < node.attributes.length; a += 1) {\n var attr = node.attributes[a];\n\n if (shouldRejectAttr(attr, allowedAttrs, node)) {\n node.removeAttribute(attr.name);\n // Shift the array to continue looping.\n a = a - 1;\n }\n }\n\n // Sanitize children\n this._sanitize(document, node);\n\n } while ((node = treeWalker.nextSibling()));\n };\n\n function createTreeWalker(document, node) {\n return document.createTreeWalker(node,\n NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT,\n null, false);\n }\n\n function getAllowedAttrs(config, nodeName, node){\n if (typeof config.tags[nodeName] === 'function') {\n return config.tags[nodeName](node);\n } else {\n return config.tags[nodeName];\n }\n }\n\n function shouldRejectNode(node, allowedAttrs){\n if (typeof allowedAttrs === 'undefined') {\n return true;\n } else if (typeof allowedAttrs === 'boolean') {\n return !allowedAttrs;\n }\n\n return false;\n }\n\n function shouldRejectAttr(attr, allowedAttrs, node){\n var attrName = attr.name.toLowerCase();\n\n if (allowedAttrs === true){\n return false;\n } else if (typeof allowedAttrs[attrName] === 'function'){\n return !allowedAttrs[attrName](attr.value, node);\n } else if (typeof allowedAttrs[attrName] === 'undefined'){\n return true;\n } else if (allowedAttrs[attrName] === false) {\n return true;\n } else if (typeof allowedAttrs[attrName] === 'string') {\n return (allowedAttrs[attrName] !== attr.value);\n }\n\n return false;\n }\n\n return HTMLJanitor;\n\n}));\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// This method of obtaining a reference to the global object needs to be\n// kept identical to the way it is obtained in runtime.js\nvar g = (function() {\n return this || (typeof self === \"object\" && self);\n})() || Function(\"return this\")();\n\n// Use `getOwnPropertyNames` because not all browsers support calling\n// `hasOwnProperty` on the global `self` object in a worker. See #183.\nvar hadRuntime = g.regeneratorRuntime &&\n Object.getOwnPropertyNames(g).indexOf(\"regeneratorRuntime\") >= 0;\n\n// Save the old regeneratorRuntime in case it needs to be restored later.\nvar oldRuntime = hadRuntime && g.regeneratorRuntime;\n\n// Force reevalutation of runtime.js.\ng.regeneratorRuntime = undefined;\n\nmodule.exports = require(\"./runtime\");\n\nif (hadRuntime) {\n // Restore the original runtime.\n g.regeneratorRuntime = oldRuntime;\n} else {\n // Remove the global property added by runtime.js.\n try {\n delete g.regeneratorRuntime;\n } catch(e) {\n g.regeneratorRuntime = undefined;\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() {\n return this || (typeof self === \"object\" && self);\n })() || Function(\"return this\")()\n);\n","'use strict';\nimport {EditorConfig} from '../types';\n\ndeclare const VERSION: string;\n\n/**\n * Apply polyfills\n */\nimport '@babel/register';\n\nimport 'components/polyfills';\nimport Core from './components/core';\n\n/**\n * Editor.js\n *\n * Short Description (눈_눈;)\n * @version 2.0\n *\n * @licence Apache-2.0\n * @author CodeX-Team \n */\nexport default class EditorJS {\n /**\n * Promise that resolves when core modules are ready and UI is rendered on the page\n */\n public isReady: Promise;\n\n /**\n * Stores destroy method implementation.\n * Clear heap occupied by Editor and remove UI components from the DOM.\n */\n public destroy: () => void;\n\n /** Editor version */\n static get version(): string {\n return VERSION;\n }\n\n /**\n * @constructor\n *\n * @param {EditorConfig|String|undefined} [configuration] - user configuration\n */\n public constructor(configuration?: EditorConfig|string) {\n /**\n * Set default onReady function\n */\n let onReady = () => {};\n\n /**\n * If `onReady` was passed in `configuration` then redefine onReady function\n */\n if (typeof configuration === 'object' && typeof configuration.onReady === 'function') {\n onReady = configuration.onReady;\n }\n\n /**\n * Create a Editor.js instance\n */\n const editor = new Core(configuration);\n\n /**\n * We need to export isReady promise in the constructor\n * as it can be used before other API methods are exported\n * @type {Promise}\n */\n this.isReady = editor.isReady.then(() => {\n this.exportAPI(editor);\n onReady();\n });\n }\n\n /**\n * Export external API methods\n *\n * @param editor\n */\n public exportAPI(editor: Core): void {\n const fieldsToExport = [ 'configuration' ];\n const destroy = () => {\n editor.moduleInstances.Listeners.removeAll();\n editor.moduleInstances.UI.destroy();\n editor.moduleInstances.ModificationsObserver.destroy();\n editor = null;\n\n for (const field in this) {\n if (this.hasOwnProperty(field)) {\n delete this[field];\n }\n }\n\n Object.setPrototypeOf(this, null);\n };\n\n fieldsToExport.forEach((field) => {\n this[field] = editor[field];\n });\n\n this.destroy = destroy;\n\n Object.setPrototypeOf(this, editor.moduleInstances.API.methods);\n\n delete this.exportAPI;\n\n const shorthands = {\n blocks: {\n clear: 'clear',\n render: 'render',\n },\n caret: {\n focus: 'focus',\n },\n events: {\n on: 'on',\n off: 'off',\n emit: 'emit',\n },\n saver: {\n save: 'save',\n },\n };\n\n Object.entries(shorthands)\n .forEach(([key, methods]) => {\n Object.entries(methods)\n .forEach(([name, alias]) => {\n this[alias] = editor.moduleInstances.API.methods[key][name];\n });\n });\n }\n}\n","import {EditorModules} from '../types-internal/editor-modules';\nimport {EditorConfig} from '../../types';\nimport {ModuleConfig} from '../types-internal/module-config';\n\n/**\n * @abstract\n * @class Module\n * @classdesc All modules inherits from this class.\n *\n * @typedef {Module} Module\n * @property {Object} config - Editor user settings\n * @property {EditorModules} Editor - List of Editor modules\n */\nexport default class Module {\n\n /**\n * Editor modules list\n * @type {EditorModules}\n */\n protected Editor: EditorModules;\n\n /**\n * Editor configuration object\n * @type {EditorConfig}\n */\n protected config: EditorConfig;\n\n /**\n * @constructor\n * @param {EditorConfig}\n */\n constructor({config}: ModuleConfig) {\n if (new.target === Module) {\n throw new TypeError('Constructors for abstract class Module are not allowed.');\n }\n\n this.config = config;\n }\n\n /**\n * Editor modules setter\n * @param {EditorModules} Editor\n */\n set state(Editor: EditorModules) {\n this.Editor = Editor;\n }\n}\n","/**\n * @class DeleteTune\n * @classdesc Editor's default tune that moves up selected block\n *\n * @copyright 2018\n */\nimport {API, BlockTune} from '../../../types';\nimport $ from '../dom';\n\nexport default class DeleteTune implements BlockTune {\n\n /**\n * Property that contains Editor.js API methods\n * @see {docs/api.md}\n */\n private readonly api: API;\n\n /**\n * Styles\n * @type {{wrapper: string}}\n */\n private CSS = {\n wrapper: 'ass',\n button: 'ce-settings__button',\n buttonDelete: 'ce-settings__button--delete',\n buttonConfirm: 'ce-settings__button--confirm',\n };\n\n /**\n * Delete confirmation\n */\n private needConfirmation: boolean;\n\n /**\n * set false confirmation state\n */\n private resetConfirmation: () => void;\n\n /**\n * Tune nodes\n */\n private nodes: {button: HTMLElement} = {\n button: null,\n };\n\n /**\n * DeleteTune constructor\n *\n * @param {{api: API}} api\n */\n constructor({api}) {\n this.api = api;\n\n this.resetConfirmation = () => {\n this.setConfirmation(false);\n };\n }\n\n /**\n * Create \"Delete\" button and add click event listener\n * @returns [Element}\n */\n public render() {\n this.nodes.button = $.make('div', [this.CSS.button, this.CSS.buttonDelete], {});\n this.nodes.button.appendChild($.svg('cross', 12, 12));\n this.api.listeners.on(this.nodes.button, 'click', (event: MouseEvent) => this.handleClick(event), false);\n return this.nodes.button;\n }\n\n /**\n * Delete block conditions passed\n * @param {MouseEvent} event\n */\n public handleClick(event: MouseEvent): void {\n\n /**\n * if block is not waiting the confirmation, subscribe on block-settings-closing event to reset\n * otherwise delete block\n */\n if (!this.needConfirmation) {\n this.setConfirmation(true);\n\n /**\n * Subscribe on event.\n * When toolbar block settings is closed but block deletion is not confirmed,\n * then reset confirmation state\n */\n this.api.events.on('block-settings-closed', this.resetConfirmation);\n\n } else {\n\n /**\n * Unsubscribe from block-settings closing event\n */\n this.api.events.off('block-settings-closed', this.resetConfirmation);\n\n this.api.blocks.delete();\n\n this.api.toolbar.close();\n\n /**\n * Prevent firing ui~documentClicked that can drop currentBlock pointer\n */\n event.stopPropagation();\n }\n }\n\n /**\n * change tune state\n */\n private setConfirmation(state): void {\n this.needConfirmation = state;\n this.nodes.button.classList.add(this.CSS.buttonConfirm);\n }\n\n}\n","/**\n * @class MoveDownTune\n * @classdesc Editor's default tune - Moves down highlighted block\n *\n * @copyright 2018\n */\n\nimport $ from '../dom';\nimport {API, BlockTune} from '../../../types';\n\nexport default class MoveDownTune implements BlockTune {\n /**\n * Property that contains Editor.js API methods\n * @see {api.md}\n */\n private readonly api: API;\n\n /**\n * Styles\n * @type {{wrapper: string}}\n */\n private CSS = {\n button: 'ce-settings__button',\n wrapper: 'ce-tune-move-down',\n animation: 'wobble',\n };\n\n /**\n * MoveDownTune constructor\n *\n * @param {{api: API}} api\n */\n public constructor({api}) {\n this.api = api;\n }\n\n /**\n * Return 'move down' button\n */\n public render() {\n const moveDownButton = $.make('div', [this.CSS.button, this.CSS.wrapper], {});\n moveDownButton.appendChild($.svg('arrow-down', 14, 14));\n this.api.listeners.on(\n moveDownButton,\n 'click',\n (event) => this.handleClick(event as MouseEvent, moveDownButton),\n false,\n );\n return moveDownButton;\n }\n\n /**\n * Handle clicks on 'move down' button\n * @param {MouseEvent} event\n * @param {HTMLElement} button\n */\n public handleClick(event: MouseEvent, button: HTMLElement) {\n\n const currentBlockIndex = this.api.blocks.getCurrentBlockIndex();\n\n // If Block is last do nothing\n if (currentBlockIndex === this.api.blocks.getBlocksCount() - 1) {\n button.classList.add(this.CSS.animation);\n\n window.setTimeout( () => {\n button.classList.remove(this.CSS.animation);\n }, 500);\n return;\n }\n\n const nextBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex + 1);\n const nextBlockCoords = nextBlockElement.getBoundingClientRect();\n\n let scrollOffset = Math.abs(window.innerHeight - nextBlockElement.offsetHeight);\n\n /**\n * Next block ends on screen.\n * Increment scroll by next block's height to save element onscreen-position\n */\n if (nextBlockCoords.top < window.innerHeight) {\n\n scrollOffset = window.scrollY + nextBlockElement.offsetHeight;\n\n }\n\n window.scrollTo(0, scrollOffset);\n\n /** Change blocks positions */\n this.api.blocks.swap(currentBlockIndex, currentBlockIndex + 1);\n\n }\n}\n","/**\n * @class MoveUpTune\n * @classdesc Editor's default tune that moves up selected block\n *\n * @copyright 2018\n */\nimport $ from '../dom';\nimport {API, BlockTune} from '../../../types';\n\nexport default class MoveUpTune implements BlockTune {\n\n /**\n * Property that contains Editor.js API methods\n * @see {api.md}\n */\n private readonly api: API;\n\n /**\n * Styles\n * @type {{wrapper: string}}\n */\n private CSS = {\n button: 'ce-settings__button',\n wrapper: 'ce-tune-move-up',\n animation: 'wobble',\n };\n\n /**\n * MoveUpTune constructor\n *\n * @param {{api: API}} api\n */\n public constructor({api}) {\n this.api = api;\n }\n\n /**\n * Create \"MoveUp\" button and add click event listener\n * @returns [HTMLElement}\n */\n public render(): HTMLElement {\n const moveUpButton = $.make('div', [this.CSS.button, this.CSS.wrapper], {});\n moveUpButton.appendChild($.svg('arrow-up', 14, 14));\n this.api.listeners.on(\n moveUpButton,\n 'click',\n (event) => this.handleClick(event as MouseEvent, moveUpButton),\n false,\n );\n return moveUpButton;\n }\n\n /**\n * Move current block up\n * @param {MouseEvent} event\n * @param {HTMLElement} button\n */\n public handleClick(event: MouseEvent, button: HTMLElement): void {\n\n const currentBlockIndex = this.api.blocks.getCurrentBlockIndex();\n\n if (currentBlockIndex === 0) {\n button.classList.add(this.CSS.animation);\n\n window.setTimeout( () => {\n button.classList.remove(this.CSS.animation);\n }, 500);\n return;\n }\n\n const currentBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex);\n const previousBlockElement = this.api.blocks.getBlockByIndex(currentBlockIndex - 1);\n\n /**\n * Here is two cases:\n * - when previous block has negative offset and part of it is visible on window, then we scroll\n * by window's height and add offset which is mathematically difference between two blocks\n *\n * - when previous block is visible and has offset from the window,\n * than we scroll window to the difference between this offsets.\n */\n const currentBlockCoords = currentBlockElement.getBoundingClientRect(),\n previousBlockCoords = previousBlockElement.getBoundingClientRect();\n\n let scrollUpOffset;\n\n if (previousBlockCoords.top > 0) {\n scrollUpOffset = Math.abs(currentBlockCoords.top) - Math.abs(previousBlockCoords.top);\n } else {\n scrollUpOffset = window.innerHeight - Math.abs(currentBlockCoords.top) + Math.abs(previousBlockCoords.top);\n }\n\n window.scrollBy(0, -1 * scrollUpOffset);\n\n /** Change blocks positions */\n this.api.blocks.swap(currentBlockIndex, currentBlockIndex - 1);\n }\n}\n","import {\n API,\n BlockTool,\n BlockToolConstructable,\n BlockToolData,\n BlockTune,\n BlockTuneConstructable,\n SanitizerConfig,\n ToolConfig,\n} from '../../types';\n\nimport {SavedData} from '../types-internal/block-data';\nimport $ from './dom';\nimport _ from './utils';\n\n/**\n * @class Block\n * @classdesc This class describes editor`s block, including block`s HTMLElement, data and tool\n *\n * @property {BlockTool} tool — current block tool (Paragraph, for example)\n * @property {Object} CSS — block`s css classes\n *\n */\n\n/** Import default tunes */\nimport MoveUpTune from './block-tunes/block-tune-move-up';\nimport DeleteTune from './block-tunes/block-tune-delete';\nimport MoveDownTune from './block-tunes/block-tune-move-down';\nimport SelectionUtils from './selection';\n\n/**\n * @classdesc Abstract Block class that contains Block information, Tool name and Tool class instance\n *\n * @property tool - Tool instance\n * @property html - Returns HTML content of plugin\n * @property holder - Div element that wraps block content with Tool's content. Has `ce-block` CSS class\n * @property pluginsContent - HTML content that returns by Tool's render function\n */\nexport default class Block {\n\n /**\n * CSS classes for the Block\n * @return {{wrapper: string, content: string}}\n */\n static get CSS() {\n return {\n wrapper: 'ce-block',\n wrapperStretched: 'ce-block--stretched',\n content: 'ce-block__content',\n focused: 'ce-block--focused',\n selected: 'ce-block--selected',\n dropTarget: 'ce-block--drop-target',\n };\n }\n\n /**\n * Find and return all editable elements (contenteditables and native inputs) in the Tool HTML\n *\n * @returns {HTMLElement[]}\n */\n get inputs(): HTMLElement[] {\n /**\n * Return from cache if existed\n */\n if (this.cachedInputs.length !== 0) {\n return this.cachedInputs;\n }\n\n const content = this.holder;\n const allowedInputTypes = ['text', 'password', 'email', 'number', 'search', 'tel', 'url'];\n\n const selector = '[contenteditable], textarea, input:not([type]), '\n + allowedInputTypes.map((type) => `input[type=\"${type}\"]`).join(', ');\n\n let inputs = _.array(content.querySelectorAll(selector));\n\n /**\n * If contenteditable element contains block elements, treat them as inputs.\n */\n inputs = inputs.reduce((result, input) => {\n if ($.isNativeInput(input) || $.containsOnlyInlineElements(input)) {\n return [...result, input];\n }\n\n return [...result, ...$.getDeepestBlockElements(input)];\n }, []);\n\n /**\n * If inputs amount was changed we need to check if input index is bigger then inputs array length\n */\n if (this.inputIndex > inputs.length - 1) {\n this.inputIndex = inputs.length - 1;\n }\n\n /**\n * Cache inputs\n */\n this.cachedInputs = inputs;\n\n return inputs;\n }\n\n /**\n * Return current Tool`s input\n *\n * @returns {HTMLElement}\n */\n get currentInput(): HTMLElement | Node {\n return this.inputs[this.inputIndex];\n }\n\n /**\n * Set input index to the passed element\n *\n * @param {HTMLElement} element\n */\n set currentInput(element: HTMLElement | Node) {\n const index = this.inputs.findIndex((input) => input === element || input.contains(element));\n\n if (index !== -1) {\n this.inputIndex = index;\n }\n }\n\n /**\n * Return first Tool`s input\n *\n * @returns {HTMLElement}\n */\n get firstInput(): HTMLElement {\n return this.inputs[0];\n }\n\n /**\n * Return first Tool`s input\n *\n * @returns {HTMLElement}\n */\n get lastInput(): HTMLElement {\n const inputs = this.inputs;\n\n return inputs[inputs.length - 1];\n }\n\n /**\n * Return next Tool`s input or undefined if it doesn't exist\n *\n * @returns {HTMLElement}\n */\n get nextInput(): HTMLElement {\n return this.inputs[this.inputIndex + 1];\n }\n\n /**\n * Return previous Tool`s input or undefined if it doesn't exist\n *\n * @returns {HTMLElement}\n */\n get previousInput(): HTMLElement {\n return this.inputs[this.inputIndex - 1];\n }\n\n /**\n * Returns Plugins content\n * @return {HTMLElement}\n */\n get pluginsContent(): HTMLElement {\n const pluginsContent = this.holder.querySelector(`.${Block.CSS.content}`);\n\n if (pluginsContent && pluginsContent.childNodes.length) {\n return pluginsContent.childNodes[0] as HTMLElement;\n }\n\n return null;\n }\n\n /**\n * Get Block's JSON data\n * @return {Object}\n */\n get data(): BlockToolData {\n return this.save().then((savedObject) => {\n if (savedObject && !_.isEmpty(savedObject.data)) {\n return savedObject.data;\n } else {\n return {};\n }\n });\n }\n\n /**\n * Returns tool's sanitizer config\n * @return {object}\n */\n get sanitize(): SanitizerConfig {\n return this.tool.sanitize;\n }\n\n /**\n * is block mergeable\n * We plugin have merge function then we call it mergable\n * @return {boolean}\n */\n get mergeable(): boolean {\n return typeof this.tool.merge === 'function';\n }\n\n /**\n * Check block for emptiness\n * @return {Boolean}\n */\n get isEmpty(): boolean {\n const emptyText = $.isEmpty(this.pluginsContent);\n const emptyMedia = !this.hasMedia;\n\n return emptyText && emptyMedia;\n }\n\n /**\n * Check if block has a media content such as images, iframes and other\n * @return {Boolean}\n */\n get hasMedia(): boolean {\n /**\n * This tags represents media-content\n * @type {string[]}\n */\n const mediaTags = [\n 'img',\n 'iframe',\n 'video',\n 'audio',\n 'source',\n 'input',\n 'textarea',\n 'twitterwidget',\n ];\n\n return !!this.holder.querySelector(mediaTags.join(','));\n }\n\n /**\n * Set focused state\n * @param {Boolean} state - 'true' to select, 'false' to remove selection\n */\n set focused(state: boolean) {\n this.holder.classList.toggle(Block.CSS.focused, state);\n }\n\n /**\n * Set selected state\n * We don't need to mark Block as Selected when it is empty\n * @param {Boolean} state - 'true' to select, 'false' to remove selection\n */\n set selected(state: boolean) {\n if (state) {\n this.holder.classList.add(Block.CSS.selected);\n } else {\n this.holder.classList.remove(Block.CSS.selected);\n }\n }\n\n /**\n * Returns True if it is Selected\n * @return {boolean}\n */\n get selected(): boolean {\n return this.holder.classList.contains(Block.CSS.selected);\n }\n\n /**\n * Set stretched state\n * @param {Boolean} state - 'true' to enable, 'false' to disable stretched statte\n */\n set stretched(state: boolean) {\n this.holder.classList.toggle(Block.CSS.wrapperStretched, state);\n }\n\n /**\n * Toggle drop target state\n * @param {boolean} state\n */\n public set dropTarget(state) {\n this.holder.classList.toggle(Block.CSS.dropTarget, state);\n }\n\n /**\n * Block Tool`s name\n */\n public name: string;\n\n /**\n * Instance of the Tool Block represents\n */\n public tool: BlockTool;\n\n /**\n * Class blueprint of the ool Block represents\n */\n public class: BlockToolConstructable;\n\n /**\n * User Tool configuration\n */\n public settings: ToolConfig;\n\n /**\n * Wrapper for Block`s content\n */\n public holder: HTMLDivElement;\n\n /**\n * Tunes used by Tool\n */\n public tunes: BlockTune[];\n\n /**\n * Cached inputs\n * @type {HTMLElement[]}\n */\n private cachedInputs: HTMLElement[] = [];\n\n /**\n * Editor`s API\n */\n private readonly api: API;\n\n /**\n * Focused input index\n * @type {number}\n */\n private inputIndex = 0;\n\n /**\n * Mutation observer to handle DOM mutations\n * @type {MutationObserver}\n */\n private mutationObserver: MutationObserver;\n\n /**\n * @constructor\n * @param {String} toolName - Tool name that passed on initialization\n * @param {Object} toolInstance — passed Tool`s instance that rendered the Block\n * @param {Object} toolClass — Tool's class\n * @param {Object} settings - default settings\n * @param {Object} apiMethods - Editor API\n */\n constructor(\n toolName: string,\n toolInstance: BlockTool,\n toolClass: BlockToolConstructable,\n settings: ToolConfig,\n apiMethods: API,\n ) {\n this.name = toolName;\n this.tool = toolInstance;\n this.class = toolClass;\n this.settings = settings;\n this.api = apiMethods;\n this.holder = this.compose();\n\n this.mutationObserver = new MutationObserver(this.didMutated);\n\n /**\n * @type {BlockTune[]}\n */\n this.tunes = this.makeTunes();\n }\n\n /**\n * Calls Tool's method\n *\n * Method checks tool property {MethodName}. Fires method with passes params If it is instance of Function\n *\n * @param {String} methodName\n * @param {Object} params\n */\n public call(methodName: string, params: object) {\n /**\n * call Tool's method with the instance context\n */\n if (this.tool[methodName] && this.tool[methodName] instanceof Function) {\n this.tool[methodName].call(this.tool, params);\n }\n }\n\n /**\n * Call plugins merge method\n * @param {Object} data\n */\n public async mergeWith(data: BlockToolData): Promise {\n await this.tool.merge(data);\n }\n /**\n * Extracts data from Block\n * Groups Tool's save processing time\n * @return {Object}\n */\n public async save(): Promise {\n const extractedBlock = await this.tool.save(this.pluginsContent as HTMLElement);\n\n /**\n * Measuring execution time\n */\n const measuringStart = window.performance.now();\n let measuringEnd;\n\n return Promise.resolve(extractedBlock)\n .then((finishedExtraction) => {\n /** measure promise execution */\n measuringEnd = window.performance.now();\n\n return {\n tool: this.name,\n data: finishedExtraction,\n time : measuringEnd - measuringStart,\n };\n })\n .catch((error) => {\n _.log(`Saving proccess for ${this.name} tool failed due to the ${error}`, 'log', 'red');\n });\n }\n\n /**\n * Uses Tool's validation method to check the correctness of output data\n * Tool's validation method is optional\n *\n * @description Method returns true|false whether data passed the validation or not\n *\n * @param {BlockToolData} data\n * @returns {Promise} valid\n */\n public async validate(data: BlockToolData): Promise {\n let isValid = true;\n\n if (this.tool.validate instanceof Function) {\n isValid = await this.tool.validate(data);\n }\n\n return isValid;\n }\n\n /**\n * Make an array with default settings\n * Each block has default tune instance that have states\n * @return {BlockTune[]}\n */\n public makeTunes(): BlockTune[] {\n const tunesList = [MoveUpTune, DeleteTune, MoveDownTune];\n\n // Pluck tunes list and return tune instances with passed Editor API and settings\n return tunesList.map( (tune: BlockTuneConstructable) => {\n return new tune({\n api: this.api,\n settings: this.settings,\n });\n });\n }\n\n /**\n * Enumerates initialized tunes and returns fragment that can be appended to the toolbars area\n * @return {DocumentFragment}\n */\n public renderTunes(): DocumentFragment {\n const tunesElement = document.createDocumentFragment();\n\n this.tunes.forEach( (tune) => {\n $.append(tunesElement, tune.render());\n });\n\n return tunesElement;\n }\n\n /**\n * Update current input index with selection anchor node\n */\n public updateCurrentInput(): void {\n this.currentInput = SelectionUtils.anchorNode;\n }\n\n /**\n * Is fired when Block will be selected as current\n */\n public willSelect(): void {\n /**\n * Observe DOM mutations to update Block inputs\n */\n this.mutationObserver.observe(this.holder, {childList: true, subtree: true});\n }\n\n /**\n * Is fired when Block will be unselected\n */\n public willUnselect() {\n this.mutationObserver.disconnect();\n }\n\n /**\n * Is fired when DOM mutation has been happened\n */\n private didMutated = (): void => {\n /**\n * Drop cache\n */\n this.cachedInputs = [];\n\n /**\n * Update current input\n */\n this.updateCurrentInput();\n }\n\n /**\n * Make default Block wrappers and put Tool`s content there\n * @returns {HTMLDivElement}\n */\n private compose(): HTMLDivElement {\n const wrapper = $.make('div', Block.CSS.wrapper) as HTMLDivElement,\n contentNode = $.make('div', Block.CSS.content),\n pluginsContent = this.tool.render();\n\n contentNode.appendChild(pluginsContent);\n wrapper.appendChild(contentNode);\n return wrapper;\n }\n}\n","import _ from './utils';\nimport $ from './dom';\nimport Block from './block';\n\n/**\n * @class Blocks\n * @classdesc Class to work with Block instances array\n *\n * @private\n *\n * @property {HTMLElement} workingArea — editor`s working node\n *\n */\nexport default class Blocks {\n\n /**\n * Get length of Block instances array\n *\n * @returns {Number}\n */\n public get length(): number {\n return this.blocks.length;\n }\n\n /**\n * Get Block instances array\n *\n * @returns {Block[]}\n */\n public get array(): Block[] {\n return this.blocks;\n }\n\n /**\n * Get blocks html elements array\n *\n * @returns {HTMLElement[]}\n */\n public get nodes(): HTMLElement[] {\n return _.array(this.workingArea.children);\n }\n\n /**\n * Proxy trap to implement array-like setter\n *\n * @example\n * blocks[0] = new Block(...)\n *\n * @param {Blocks} instance — Blocks instance\n * @param {Number|String} index — block index\n * @param {Block} block — Block to set\n * @returns {Boolean}\n */\n public static set(instance: Blocks, index: number, block: Block) {\n if (isNaN(Number(index))) {\n return false;\n }\n\n instance.insert(+index, block);\n\n return true;\n }\n\n /**\n * Proxy trap to implement array-like getter\n *\n * @param {Blocks} instance — Blocks instance\n * @param {Number|String} index — Block index\n * @returns {Block|*}\n */\n public static get(instance: Blocks, index: number) {\n if (isNaN(Number(index))) {\n return instance[index];\n }\n\n return instance.get(+index);\n }\n\n /**\n * Array of Block instances in order of addition\n */\n public blocks: Block[];\n\n /**\n * Editor`s area where to add Block`s HTML\n */\n public workingArea: HTMLElement;\n\n /**\n * @constructor\n *\n * @param {HTMLElement} workingArea — editor`s working node\n */\n constructor(workingArea: HTMLElement) {\n this.blocks = [];\n this.workingArea = workingArea;\n }\n\n /**\n * Push new Block to the blocks array and append it to working area\n *\n * @param {Block} block\n */\n public push(block: Block): void {\n this.blocks.push(block);\n this.workingArea.appendChild(block.holder);\n }\n\n /**\n * Swaps blocks with indexes first and second\n * @param {Number} first - first block index\n * @param {Number} second - second block index\n */\n public swap(first: number, second: number): void {\n const secondBlock = this.blocks[second];\n\n /**\n * Change in DOM\n */\n $.swap(this.blocks[first].holder, secondBlock.holder);\n\n /**\n * Change in array\n */\n this.blocks[second] = this.blocks[first];\n this.blocks[first] = secondBlock;\n }\n\n /**\n * Insert new Block at passed index\n *\n * @param {Number} index — index to insert Block\n * @param {Block} block — Block to insert\n * @param {Boolean} replace — it true, replace block on given index\n */\n public insert(index: number, block: Block, replace: boolean = false): void {\n if (!this.length) {\n this.push(block);\n return;\n }\n\n if (index > this.length) {\n index = this.length;\n }\n\n if (replace) {\n this.blocks[index].holder.remove();\n }\n\n const deleteCount = replace ? 1 : 0;\n\n this.blocks.splice(index, deleteCount, block);\n\n if (index > 0) {\n const previousBlock = this.blocks[index - 1];\n\n previousBlock.holder.insertAdjacentElement('afterend', block.holder);\n } else {\n const nextBlock = this.blocks[index + 1];\n\n if (nextBlock) {\n nextBlock.holder.insertAdjacentElement('beforebegin', block.holder);\n } else {\n this.workingArea.appendChild(block.holder);\n }\n }\n }\n\n /**\n * Remove block\n * @param {Number|null} index\n */\n public remove(index: number): void {\n if (isNaN(index)) {\n index = this.length - 1;\n }\n\n this.blocks[index].holder.remove();\n this.blocks.splice(index, 1);\n }\n\n /**\n * Remove all blocks\n */\n public removeAll(): void {\n this.workingArea.innerHTML = '';\n this.blocks.length = 0;\n }\n\n /**\n * Insert Block after passed target\n *\n * @todo decide if this method is necessary\n *\n * @param {Block} targetBlock — target after wich Block should be inserted\n * @param {Block} newBlock — Block to insert\n */\n public insertAfter(targetBlock: Block, newBlock: Block): void {\n const index = this.blocks.indexOf(targetBlock);\n\n this.insert(index + 1, newBlock);\n }\n\n /**\n * Get Block by index\n *\n * @param {Number} index — Block index\n * @returns {Block}\n */\n public get(index: number): Block {\n return this.blocks[index];\n }\n\n /**\n * Return index of passed Block\n *\n * @param {Block} block\n * @returns {Number}\n */\n public indexOf(block: Block): number {\n return this.blocks.indexOf(block);\n }\n}\n","import $ from './dom';\nimport _ from './utils';\nimport {EditorConfig, OutputData, SanitizerConfig} from '../../types';\nimport {EditorModules} from '../types-internal/editor-modules';\n\n/**\n * @typedef {Core} Core - editor core class\n */\n\n/**\n * Require Editor modules places in components/modules dir\n */\nconst contextRequire = require.context('./modules', true);\n\nconst modules = [];\n\ncontextRequire.keys().forEach((filename) => {\n /**\n * Include files if:\n * - extension is .js or .ts\n * - does not starts with _\n */\n if (filename.match(/^\\.\\/[^_][\\w/]*\\.([tj])s$/)) {\n modules.push(contextRequire(filename));\n }\n});\n\n/**\n * @class Core\n *\n * @classdesc Editor.js core class\n *\n * @property this.config - all settings\n * @property this.moduleInstances - constructed editor components\n *\n * @type {Core}\n */\nexport default class Core {\n\n /**\n * Editor configuration passed by user to the constructor\n */\n public config: EditorConfig;\n\n /**\n * Object with core modules instances\n */\n public moduleInstances: EditorModules = {} as EditorModules;\n\n /**\n * Promise that resolves when all core modules are prepared and UI is rendered on the page\n */\n public isReady: Promise;\n\n /**\n * @param {EditorConfig} config - user configuration\n *\n */\n constructor(config?: EditorConfig|string) {\n /**\n * Ready promise. Resolved if Editor.js is ready to work, rejected otherwise\n */\n let onReady, onFail;\n\n this.isReady = new Promise((resolve, reject) => {\n onReady = resolve;\n onFail = reject;\n });\n\n Promise.resolve()\n .then(async () => {\n this.configuration = config;\n\n await this.validate();\n await this.init();\n await this.start();\n\n _.log('I\\'m ready! (ノ◕ヮ◕)ノ*:・゚✧', 'log', '', 'color: #E24A75');\n\n setTimeout(() => {\n if ((this.configuration as EditorConfig).autofocus) {\n const {BlockManager, Caret} = this.moduleInstances;\n\n Caret.setToBlock(BlockManager.blocks[0], Caret.positions.START);\n }\n\n /**\n * Remove loader, show content\n */\n this.moduleInstances.UI.removeLoader();\n\n /**\n * Resolve this.isReady promise\n */\n onReady();\n }, 500);\n })\n .catch((error) => {\n _.log(`Editor.js is not ready because of ${error}`, 'error');\n\n /**\n * Reject this.isReady promise\n */\n onFail(error);\n });\n }\n\n /**\n * Setting for configuration\n * @param {EditorConfig|string|undefined} config\n */\n set configuration(config: EditorConfig|string) {\n /**\n * Process zero-configuration or with only holderId\n * Make config object\n */\n if (typeof config !== 'object') {\n config = {\n holder: config,\n };\n }\n\n /**\n * If holderId is preset, assign him to holder property and work next only with holder\n */\n if (config.holderId && !config.holder) {\n config.holder = config.holderId;\n config.holderId = null;\n _.log('holderId property will deprecated in next major release, use holder property instead.', 'warn');\n }\n\n /**\n * Place config into the class property\n * @type {EditorConfig}\n */\n this.config = config;\n\n /**\n * If holder is empty then set a default value\n */\n if (this.config.holder == null) {\n this.config.holder = 'editorjs';\n }\n\n /**\n * If initial Block's Tool was not passed, use the Paragraph Tool\n */\n this.config.initialBlock = this.config.initialBlock || 'paragraph';\n\n /**\n * Height of Editor's bottom area that allows to set focus on the last Block\n * @type {number}\n */\n this.config.minHeight = this.config.minHeight || 300;\n\n /**\n * Initial block type\n * Uses in case when there is no blocks passed\n * @type {{type: (*), data: {text: null}}}\n */\n const initialBlockData = {\n type : this.config.initialBlock,\n data : {},\n };\n\n this.config.placeholder = this.config.placeholder || false;\n this.config.sanitizer = this.config.sanitizer || {\n p: true,\n b: true,\n a: true,\n } as SanitizerConfig;\n\n this.config.hideToolbar = this.config.hideToolbar ? this.config.hideToolbar : false;\n this.config.tools = this.config.tools || {};\n this.config.data = this.config.data || {} as OutputData;\n this.config.onReady = this.config.onReady || (() => {});\n this.config.onChange = this.config.onChange || (() => {});\n\n /**\n * Initialize Blocks to pass data to the Renderer\n */\n if (_.isEmpty(this.config.data)) {\n this.config.data = {} as OutputData;\n this.config.data.blocks = [ initialBlockData ];\n } else {\n if (!this.config.data.blocks || this.config.data.blocks.length === 0) {\n this.config.data.blocks = [ initialBlockData ];\n }\n }\n }\n\n /**\n * Returns private property\n * @returns {EditorConfig}\n */\n get configuration(): EditorConfig|string {\n return this.config;\n }\n\n /**\n * Checks for required fields in Editor's config\n * @returns {Promise}\n */\n public async validate(): Promise {\n const { holderId, holder } = this.config;\n\n if (holderId && holder) {\n throw Error('«holderId» and «holder» param can\\'t assign at the same time.');\n }\n\n /**\n * Check for a holder element's existence\n */\n if (typeof holder === 'string' && !$.get(holder)) {\n throw Error(`element with ID «${holder}» is missing. Pass correct holder's ID.`);\n }\n\n if (holder && typeof holder === 'object' && !$.isElement(holder)) {\n throw Error('holder as HTMLElement if provided must be inherit from Element class.');\n }\n }\n\n /**\n * Initializes modules:\n * - make and save instances\n * - configure\n */\n public init() {\n /**\n * Make modules instances and save it to the @property this.moduleInstances\n */\n this.constructModules();\n\n /**\n * Modules configuration\n */\n this.configureModules();\n }\n\n /**\n * Start Editor!\n *\n * Get list of modules that needs to be prepared and return a sequence (Promise)\n * @return {Promise}\n */\n public async start() {\n const modulesToPrepare = [\n 'Tools',\n 'UI',\n 'BlockManager',\n 'Paste',\n 'DragNDrop',\n 'ModificationsObserver',\n 'BlockSelection',\n 'RectangleSelection',\n ];\n\n await modulesToPrepare.reduce(\n (promise, module) => promise.then(async () => {\n // _.log(`Preparing ${module} module`, 'time');\n\n try {\n await this.moduleInstances[module].prepare();\n } catch (e) {\n _.log(`Module ${module} was skipped because of %o`, 'warn', e);\n }\n // _.log(`Preparing ${module} module`, 'timeEnd');\n }),\n Promise.resolve(),\n );\n\n return this.moduleInstances.Renderer.render(this.config.data.blocks);\n }\n\n /**\n * Make modules instances and save it to the @property this.moduleInstances\n */\n private constructModules(): void {\n modules.forEach( (Module) => {\n try {\n /**\n * We use class name provided by displayName property\n *\n * On build, Babel will transform all Classes to the Functions so, name will always be 'Function'\n * To prevent this, we use 'babel-plugin-class-display-name' plugin\n * @see https://www.npmjs.com/package/babel-plugin-class-display-name\n */\n this.moduleInstances[Module.displayName] = new Module({\n config : this.configuration,\n });\n } catch ( e ) {\n _.log(`Module ${Module.displayName} skipped because`, 'warn', e);\n }\n });\n }\n\n /**\n * Modules instances configuration:\n * - pass other modules to the 'state' property\n * - ...\n */\n private configureModules(): void {\n for (const name in this.moduleInstances) {\n if (this.moduleInstances.hasOwnProperty(name)) {\n /**\n * Module does not need self-instance\n */\n this.moduleInstances[name].state = this.getModulesDiff(name);\n }\n }\n }\n\n /**\n * Return modules without passed name\n * @param {string} name - module for witch modules difference should be calculated\n */\n private getModulesDiff(name: string): EditorModules {\n const diff = {} as EditorModules;\n\n for (const moduleName in this.moduleInstances) {\n /**\n * Skip module with passed name\n */\n if (moduleName === name) {\n continue;\n }\n diff[moduleName] = this.moduleInstances[moduleName];\n }\n\n return diff;\n }\n}\n","/**\n * DOM manipulations helper\n */\nexport default class Dom {\n /**\n * Check if passed tag has no closed tag\n * @param {HTMLElement} tag\n * @return {Boolean}\n */\n public static isSingleTag(tag: HTMLElement): boolean {\n return tag.tagName && [\n 'AREA',\n 'BASE',\n 'BR',\n 'COL',\n 'COMMAND',\n 'EMBED',\n 'HR',\n 'IMG',\n 'INPUT',\n 'KEYGEN',\n 'LINK',\n 'META',\n 'PARAM',\n 'SOURCE',\n 'TRACK',\n 'WBR',\n ].includes(tag.tagName);\n }\n\n /**\n * Check if element is BR or WBR\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\n public static isLineBreakTag(element: HTMLElement) {\n return element && element.tagName && [\n 'BR',\n 'WBR',\n ].includes(element.tagName);\n }\n\n /**\n * Helper for making Elements with classname and attributes\n *\n * @param {string} tagName - new Element tag name\n * @param {array|string} classNames - list or name of CSS classname(s)\n * @param {Object} attributes - any attributes\n * @return {HTMLElement}\n */\n public static make(tagName: string, classNames: string|string[] = null, attributes: object = {}): HTMLElement {\n const el = document.createElement(tagName);\n\n if ( Array.isArray(classNames) ) {\n el.classList.add(...classNames);\n } else if ( classNames ) {\n el.classList.add(classNames);\n }\n\n for (const attrName in attributes) {\n if (attributes.hasOwnProperty(attrName)) {\n el[attrName] = attributes[attrName];\n }\n }\n\n return el;\n }\n\n /**\n * Creates Text Node with the passed content\n * @param {String} content - text content\n * @return {Text}\n */\n public static text(content: string): Text {\n return document.createTextNode(content);\n }\n\n /**\n * Creates SVG icon linked to the sprite\n * @param {string} name - name (id) of icon from sprite\n * @param {number} width\n * @param {number} height\n * @return {SVGElement}\n */\n public static svg(name: string, width: number = 14, height: number = 14): SVGElement {\n const icon = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n icon.classList.add('icon', 'icon--' + name);\n icon.setAttribute('width', width + 'px');\n icon.setAttribute('height', height + 'px');\n icon.innerHTML = ``;\n\n return icon;\n }\n\n /**\n * Append one or several elements to the parent\n *\n * @param {Element|DocumentFragment} parent - where to append\n * @param {Element|Element[]} elements - element or elements list\n */\n public static append(parent: Element|DocumentFragment, elements: Element|Element[]|DocumentFragment): void {\n if ( Array.isArray(elements) ) {\n elements.forEach( (el) => parent.appendChild(el) );\n } else {\n parent.appendChild(elements);\n }\n }\n\n /**\n * Append element or a couple to the beginning of the parent elements\n *\n * @param {Element} parent - where to append\n * @param {Element|Element[]} elements - element or elements list\n */\n public static prepend(parent: Element, elements: Element|Element[]): void {\n if ( Array.isArray(elements) ) {\n elements = elements.reverse();\n elements.forEach( (el) => parent.prepend(el) );\n } else {\n parent.prepend(elements);\n }\n }\n\n /**\n * Swap two elements in parent\n * @param {HTMLElement} el1 - from\n * @param {HTMLElement} el2 - to\n */\n public static swap(el1: HTMLElement, el2: HTMLElement): void {\n // create marker element and insert it where el1 is\n const temp = document.createElement('div'),\n parent = el1.parentNode;\n\n parent.insertBefore(temp, el1);\n\n // move el1 to right before el2\n parent.insertBefore(el1, el2);\n\n // move el2 to right before where el1 used to be\n parent.insertBefore(el2, temp);\n\n // remove temporary marker node\n parent.removeChild(temp);\n }\n\n /**\n * Selector Decorator\n *\n * Returns first match\n *\n * @param {Element} el - element we searching inside. Default - DOM Document\n * @param {String} selector - searching string\n *\n * @returns {Element}\n */\n public static find(el: Element|Document = document, selector: string): Element {\n return el.querySelector(selector);\n }\n\n /**\n * Get Element by Id\n *\n * @param {string} id\n * @returns {HTMLElement | null}\n */\n public static get(id: string): HTMLElement {\n return document.getElementById(id);\n }\n\n /**\n * Selector Decorator.\n *\n * Returns all matches\n *\n * @param {Element} el - element we searching inside. Default - DOM Document\n * @param {String} selector - searching string\n * @returns {NodeList}\n */\n public static findAll(el: Element|Document = document, selector: string): NodeList {\n return el.querySelectorAll(selector);\n }\n\n /**\n * Search for deepest node which is Leaf.\n * Leaf is the vertex that doesn't have any child nodes\n *\n * @description Method recursively goes throw the all Node until it finds the Leaf\n *\n * @param {Node} node - root Node. From this vertex we start Deep-first search\n * {@link https://en.wikipedia.org/wiki/Depth-first_search}\n * @param {Boolean} atLast - find last text node\n * @return {Node} - it can be text Node or Element Node, so that caret will able to work with it\n */\n public static getDeepestNode(node: Node, atLast: boolean = false): Node {\n /**\n * Current function have two directions:\n * - starts from first child and every time gets first or nextSibling in special cases\n * - starts from last child and gets last or previousSibling\n * @type {string}\n */\n const child = atLast ? 'lastChild' : 'firstChild',\n sibling = atLast ? 'previousSibling' : 'nextSibling';\n\n if (node && node.nodeType === Node.ELEMENT_NODE && node[child]) {\n let nodeChild = node[child] as Node;\n\n /**\n * special case when child is single tag that can't contain any content\n */\n if (\n Dom.isSingleTag(nodeChild as HTMLElement) &&\n !Dom.isNativeInput(nodeChild) &&\n !Dom.isLineBreakTag(nodeChild as HTMLElement)\n ) {\n /**\n * 1) We need to check the next sibling. If it is Node Element then continue searching for deepest\n * from sibling\n *\n * 2) If single tag's next sibling is null, then go back to parent and check his sibling\n * In case of Node Element continue searching\n *\n * 3) If none of conditions above happened return parent Node Element\n */\n if (nodeChild[sibling]) {\n nodeChild = nodeChild[sibling];\n } else if (nodeChild.parentNode[sibling]) {\n nodeChild = nodeChild.parentNode[sibling];\n } else {\n return nodeChild.parentNode;\n }\n }\n\n return this.getDeepestNode(nodeChild, atLast);\n }\n\n return node;\n }\n\n /**\n * Check if object is DOM node\n *\n * @param {Object} node\n * @returns {boolean}\n */\n public static isElement(node: any): node is Element {\n return node && typeof node === 'object' && node.nodeType && node.nodeType === Node.ELEMENT_NODE;\n }\n\n /**\n * Check if object is DocumentFragmemt node\n *\n * @param {Object} node\n * @returns {boolean}\n */\n public static isFragment(node: any): boolean {\n return node && typeof node === 'object' && node.nodeType && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;\n }\n\n /**\n * Check if passed element is contenteditable\n * @param {HTMLElement} element\n * @return {boolean}\n */\n public static isContentEditable(element: HTMLElement): boolean {\n return element.contentEditable === 'true';\n }\n\n /**\n * Checks target if it is native input\n * @param {Element|String|Node} target - HTML element or string\n * @return {Boolean}\n */\n public static isNativeInput(target: any): boolean {\n const nativeInputs = [\n 'INPUT',\n 'TEXTAREA',\n ];\n\n return target && target.tagName ? nativeInputs.includes(target.tagName) : false;\n }\n\n /**\n * Checks if we can set caret\n * @param {HTMLElement} target\n * @return {boolean}\n */\n public static canSetCaret(target: HTMLElement): boolean {\n let result = true;\n if (Dom.isNativeInput(target)) {\n const inputElement = target as HTMLInputElement;\n switch (inputElement.type) {\n case 'file':\n case 'checkbox':\n case 'radio':\n case 'hidden':\n case 'submit':\n case 'button':\n case 'image':\n case 'reset':\n result = false;\n break;\n }\n } else {\n result = Dom.isContentEditable(target);\n }\n return result;\n }\n\n /**\n * Checks node if it is empty\n *\n * @description Method checks simple Node without any childs for emptiness\n * If you have Node with 2 or more children id depth, you better use {@link Dom#isEmpty} method\n *\n * @param {Node} node\n * @return {Boolean} true if it is empty\n */\n public static isNodeEmpty(node: Node): boolean {\n let nodeText;\n\n if (this.isSingleTag(node as HTMLElement) && !this.isLineBreakTag(node as HTMLElement)) {\n return false;\n }\n\n if ( this.isElement(node) && this.isNativeInput(node) ) {\n nodeText = (node as HTMLInputElement).value;\n } else {\n nodeText = node.textContent.replace('\\u200B', '');\n }\n\n return nodeText.trim().length === 0;\n }\n\n /**\n * checks node if it is doesn't have any child nodes\n * @param {Node} node\n * @return {boolean}\n */\n public static isLeaf(node: Node): boolean {\n if (!node) {\n return false;\n }\n\n return node.childNodes.length === 0;\n }\n\n /**\n * breadth-first search (BFS)\n * {@link https://en.wikipedia.org/wiki/Breadth-first_search}\n *\n * @description Pushes to stack all DOM leafs and checks for emptiness\n *\n * @param {Node} node\n * @return {boolean}\n */\n public static isEmpty(node: Node): boolean {\n const treeWalker = [],\n leafs = [];\n\n if (!node) {\n return true;\n }\n\n if (!node.childNodes.length) {\n return this.isNodeEmpty(node);\n }\n\n treeWalker.push(node.firstChild);\n\n while ( treeWalker.length > 0 ) {\n node = treeWalker.shift();\n\n if (!node) { continue; }\n\n if ( this.isLeaf(node) ) {\n leafs.push(node);\n } else {\n treeWalker.push(node.firstChild);\n }\n\n while ( node && node.nextSibling ) {\n node = node.nextSibling;\n\n if (!node) { continue; }\n\n treeWalker.push(node);\n }\n\n /**\n * If one of childs is not empty, checked Node is not empty too\n */\n if (node && !this.isNodeEmpty(node)) {\n return false;\n }\n }\n\n return leafs.every( (leaf) => this.isNodeEmpty(leaf) );\n }\n\n /**\n * Check if string contains html elements\n *\n * @returns {boolean}\n * @param {String} str\n */\n public static isHTMLString(str: string): boolean {\n const wrapper = Dom.make('div');\n\n wrapper.innerHTML = str;\n\n return wrapper.childElementCount > 0;\n }\n\n /**\n * Return length of node`s text content\n *\n * @param {Node} node\n * @returns {number}\n */\n public static getContentLength(node: Node): number {\n if (Dom.isNativeInput(node)) {\n return (node as HTMLInputElement).value.length;\n }\n\n if (node.nodeType === Node.TEXT_NODE) {\n return (node as Text).length;\n }\n\n return node.textContent.length;\n }\n\n /**\n * Return array of names of block html elements\n *\n * @returns {string[]}\n */\n static get blockElements(): string[] {\n return [\n 'address',\n 'article',\n 'aside',\n 'blockquote',\n 'canvas',\n 'div',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'li',\n 'main',\n 'nav',\n 'noscript',\n 'ol',\n 'output',\n 'p',\n 'pre',\n 'ruby',\n 'section',\n 'table',\n 'tr',\n 'tfoot',\n 'ul',\n 'video',\n ];\n }\n\n /**\n * Check if passed content includes only inline elements\n *\n * @param {string|HTMLElement} data - element or html string\n * @return {boolean}\n */\n public static containsOnlyInlineElements(data: string | HTMLElement): boolean {\n let wrapper: HTMLElement;\n\n if (typeof data === 'string') {\n wrapper = document.createElement('div');\n wrapper.innerHTML = data;\n } else {\n wrapper = data;\n }\n\n const check = (element: HTMLElement) => {\n return !Dom.blockElements.includes(element.tagName.toLowerCase())\n && Array.from(element.children).every(check);\n };\n\n return Array.from(wrapper.children).every(check);\n }\n\n /**\n * Find and return all block elements in the passed parent (including subtree)\n *\n * @param {HTMLElement} parent\n *\n * @return {HTMLElement[]}\n */\n public static getDeepestBlockElements(parent: HTMLElement): HTMLElement[] {\n if (Dom.containsOnlyInlineElements(parent)) {\n return [parent];\n }\n\n return Array.from(parent.children).reduce((result, element) => {\n return [...result, ...Dom.getDeepestBlockElements(element as HTMLElement)];\n }, []);\n }\n\n /**\n * Leafs nodes inside the target list from active element\n *\n * @param {HTMLElement[]} nodeList - target list of nodes\n * @param {number} activeIndex — index of active node. By default it must be -1\n * @param {string} direction - leaf direction. Can be 'left' or 'right'\n * @param {string} activeCSSClass - css class that will be added\n *\n * @return {Number} index of active node\n */\n public static leafNodesAndReturnIndex(\n nodeList: HTMLElement[],\n activeIndex: number,\n direction: string,\n activeCSSClass: string,\n ): number {\n /**\n * If activeButtonIndex === -1 then we have no chosen Tool in Toolbox\n */\n if (activeIndex === -1) {\n /**\n * Normalize \"previous\" Tool index depending on direction.\n * We need to do this to highlight \"first\" Tool correctly\n *\n * Order of Tools: [0] [1] ... [n - 1]\n * [0 = n] because of: n % n = 0 % n\n *\n * Direction 'right': for [0] the [n - 1] is a previous index\n * [n - 1] -> [0]\n *\n * Direction 'left': for [n - 1] the [0] is a previous index\n * [n - 1] <- [0]\n *\n * @type {number}\n */\n activeIndex = direction === 'right' ? -1 : 0;\n } else {\n /**\n * If we have chosen Tool then remove highlighting\n */\n nodeList[activeIndex].classList.remove(activeCSSClass);\n }\n\n /**\n * Count index for next Tool\n */\n if (direction === 'right') {\n /**\n * If we go right then choose next (+1) Tool\n * @type {number}\n */\n activeIndex = (activeIndex + 1) % nodeList.length;\n } else {\n /**\n * If we go left then choose previous (-1) Tool\n * Before counting module we need to add length before because of \"The JavaScript Modulo Bug\"\n * @type {number}\n */\n activeIndex = (nodeList.length + activeIndex - 1) % nodeList.length;\n }\n\n if (Dom.isNativeInput(nodeList[activeIndex])) {\n /**\n * Focus input\n */\n nodeList[activeIndex].focus();\n }\n\n /**\n * Highlight new chosen Tool\n */\n nodeList[activeIndex].classList.add(activeCSSClass);\n\n /**\n * Return Active index\n */\n return activeIndex;\n }\n\n /*\n * Helper for get holder from {string} or return HTMLElement\n * @param element\n */\n public static getHolder(element: string | HTMLElement): HTMLElement {\n if (typeof element === 'string') { return document.getElementById(element); }\n return element;\n }\n}\n","import $ from '../dom';\nimport {API, InlineTool, SanitizerConfig} from '../../../types';\n\n/**\n * Bold Tool\n *\n * Inline Toolbar Tool\n *\n * Makes selected text bolder\n */\nexport default class BoldInlineTool implements InlineTool {\n\n /**\n * Specifies Tool as Inline Toolbar Tool\n *\n * @return {boolean}\n */\n public static isInline = true;\n\n /**\n * Sanitizer Rule\n * Leave tags\n * @return {object}\n */\n static get sanitize(): SanitizerConfig {\n return {\n b: {},\n } as SanitizerConfig;\n }\n\n /**\n * Native Document's command that uses for Bold\n */\n private readonly commandName: string = 'bold';\n\n /**\n * Styles\n */\n private readonly CSS = {\n button: 'ce-inline-tool',\n buttonActive: 'ce-inline-tool--active',\n buttonModifier: 'ce-inline-tool--bold',\n };\n\n /**\n * Elements\n */\n private nodes: {button: HTMLButtonElement} = {\n button: undefined,\n };\n\n /**\n * Create button for Inline Toolbar\n */\n public render(): HTMLElement {\n this.nodes.button = document.createElement('button') as HTMLButtonElement;\n this.nodes.button.type = 'button';\n this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n this.nodes.button.appendChild($.svg('bold', 12, 14));\n return this.nodes.button;\n }\n\n /**\n * Wrap range with tag\n * @param {Range} range\n */\n public surround(range: Range): void {\n document.execCommand(this.commandName);\n }\n\n /**\n * Check selection and set activated state to button if there are tag\n * @param {Selection} selection\n */\n public checkState(selection: Selection): boolean {\n const isActive = document.queryCommandState(this.commandName);\n\n this.nodes.button.classList.toggle(this.CSS.buttonActive, isActive);\n return isActive;\n }\n\n /**\n * Set a shortcut\n */\n public get shortcut(): string {\n return 'CMD+B';\n }\n}\n","import $ from '../dom';\nimport {InlineTool, SanitizerConfig} from '../../../types';\n\n/**\n * Italic Tool\n *\n * Inline Toolbar Tool\n *\n * Style selected text with italic\n */\nexport default class ItalicInlineTool implements InlineTool {\n\n /**\n * Specifies Tool as Inline Toolbar Tool\n *\n * @return {boolean}\n */\n public static isInline = true;\n\n /**\n * Sanitizer Rule\n * Leave tags\n * @return {object}\n */\n static get sanitize(): SanitizerConfig {\n return {\n i: {},\n } as SanitizerConfig;\n }\n\n /**\n * Native Document's command that uses for Italic\n */\n private readonly commandName: string = 'italic';\n\n /**\n * Styles\n */\n private readonly CSS = {\n button: 'ce-inline-tool',\n buttonActive: 'ce-inline-tool--active',\n buttonModifier: 'ce-inline-tool--italic',\n };\n\n /**\n * Elements\n */\n private nodes: {button: HTMLButtonElement} = {\n button: null,\n };\n\n /**\n * Create button for Inline Toolbar\n */\n public render(): HTMLElement {\n this.nodes.button = document.createElement('button') as HTMLButtonElement;\n this.nodes.button.type = 'button';\n this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n this.nodes.button.appendChild($.svg('italic', 34, 34));\n return this.nodes.button;\n }\n\n /**\n * Wrap range with tag\n * @param {Range} range\n */\n public surround(range: Range): void {\n document.execCommand(this.commandName);\n }\n\n /**\n * Check selection and set activated state to button if there are tag\n * @param {Selection} selection\n */\n public checkState(selection: Selection): boolean {\n const isActive = document.queryCommandState(this.commandName);\n\n this.nodes.button.classList.toggle(this.CSS.buttonActive, isActive);\n return isActive;\n }\n\n /**\n * Set a shortcut\n */\n public get shortcut(): string {\n return 'CMD+I';\n }\n}\n","import SelectionUtils from '../selection';\n\nimport $ from '../dom';\nimport _ from '../utils';\nimport {API, InlineTool, SanitizerConfig} from '../../../types';\nimport {Notifier, Toolbar} from '../../../types/api';\n\n/**\n * Link Tool\n *\n * Inline Toolbar Tool\n *\n * Wrap selected text with tag\n */\nexport default class LinkInlineTool implements InlineTool {\n\n /**\n * Specifies Tool as Inline Toolbar Tool\n *\n * @return {boolean}\n */\n public static isInline = true;\n\n /**\n * Sanitizer Rule\n * Leave tags\n * @return {object}\n */\n static get sanitize(): SanitizerConfig {\n return {\n a: {\n href: true,\n target: '_blank',\n rel: 'nofollow',\n },\n } as SanitizerConfig;\n }\n\n /**\n * Native Document's commands for link/unlink\n */\n private readonly commandLink: string = 'createLink';\n private readonly commandUnlink: string = 'unlink';\n\n /**\n * Enter key code\n */\n private readonly ENTER_KEY: number = 13;\n\n /**\n * Styles\n */\n private readonly CSS = {\n button: 'ce-inline-tool',\n buttonActive: 'ce-inline-tool--active',\n buttonModifier: 'ce-inline-tool--link',\n buttonUnlink: 'ce-inline-tool--unlink',\n input: 'ce-inline-tool-input',\n inputShowed: 'ce-inline-tool-input--showed',\n };\n\n /**\n * Elements\n */\n private nodes: {\n button: HTMLButtonElement;\n input: HTMLInputElement;\n } = {\n button: null,\n input: null,\n };\n\n /**\n * SelectionUtils instance\n */\n private selection: SelectionUtils;\n\n /**\n * Input opening state\n */\n private inputOpened: boolean = false;\n\n /**\n * Available Toolbar methods (open/close)\n */\n private toolbar: Toolbar;\n\n /**\n * Available inline toolbar methods (open/close)\n */\n private inlineToolbar: Toolbar;\n\n /**\n * Notifier API methods\n */\n private notifier: Notifier;\n\n /**\n * @param {{api: API}} - Editor.js API\n */\n constructor({api}) {\n this.toolbar = api.toolbar;\n this.inlineToolbar = api.inlineToolbar;\n this.notifier = api.notifier;\n this.selection = new SelectionUtils();\n }\n\n /**\n * Create button for Inline Toolbar\n */\n public render(): HTMLElement {\n this.nodes.button = document.createElement('button') as HTMLButtonElement;\n this.nodes.button.type = 'button';\n this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n this.nodes.button.appendChild($.svg('link', 34, 34));\n this.nodes.button.appendChild($.svg('unlink', 16, 18));\n return this.nodes.button;\n }\n\n /**\n * Input for the link\n */\n public renderActions(): HTMLElement {\n this.nodes.input = document.createElement('input') as HTMLInputElement;\n this.nodes.input.placeholder = 'Add a link';\n this.nodes.input.classList.add(this.CSS.input);\n this.nodes.input.addEventListener('keydown', (event: KeyboardEvent) => {\n if (event.keyCode === this.ENTER_KEY) {\n this.enterPressed(event);\n }\n });\n return this.nodes.input;\n }\n\n /**\n * Handle clicks on the Inline Toolbar icon\n * @param {Range} range\n */\n public surround(range: Range): void {\n /**\n * Range will be null when user makes second click on the 'link icon' to close opened input\n */\n if (range) {\n /**\n * Save selection before change focus to the input\n */\n if (!this.inputOpened) {\n /** Create blue background instead of selection */\n this.selection.setFakeBackground();\n this.selection.save();\n } else {\n this.selection.restore();\n this.selection.removeFakeBackground();\n }\n const parentAnchor = this.selection.findParentTag('A');\n\n /**\n * Unlink icon pressed\n */\n if (parentAnchor) {\n this.selection.expandToTag(parentAnchor);\n this.unlink();\n this.closeActions();\n this.checkState();\n this.toolbar.close();\n return;\n }\n }\n\n this.toggleActions();\n }\n\n /**\n * Check selection and set activated state to button if there are tag\n * @param {Selection} selection\n */\n public checkState(selection?: Selection): boolean {\n const anchorTag = this.selection.findParentTag('A');\n\n if (anchorTag) {\n this.nodes.button.classList.add(this.CSS.buttonUnlink);\n this.nodes.button.classList.add(this.CSS.buttonActive);\n this.openActions();\n\n /**\n * Fill input value with link href\n */\n const hrefAttr = anchorTag.getAttribute('href');\n this.nodes.input.value = hrefAttr !== 'null' ? hrefAttr : '';\n\n this.selection.save();\n } else {\n this.nodes.button.classList.remove(this.CSS.buttonUnlink);\n this.nodes.button.classList.remove(this.CSS.buttonActive);\n }\n\n return !!anchorTag;\n }\n\n /**\n * Function called with Inline Toolbar closing\n */\n public clear(): void {\n this.closeActions();\n }\n\n /**\n * Set a shortcut\n */\n public get shortcut(): string {\n return 'CMD+K';\n }\n\n private toggleActions(): void {\n if (!this.inputOpened) {\n this.openActions(true);\n } else {\n this.closeActions(false);\n }\n }\n\n /**\n * @param {boolean} needFocus - on link creation we need to focus input. On editing - nope.\n */\n private openActions(needFocus: boolean = false): void {\n this.nodes.input.classList.add(this.CSS.inputShowed);\n if (needFocus) {\n this.nodes.input.focus();\n }\n this.inputOpened = true;\n }\n\n /**\n * Close input\n * @param {boolean} clearSavedSelection — we don't need to clear saved selection\n * on toggle-clicks on the icon of opened Toolbar\n */\n private closeActions(clearSavedSelection: boolean = true): void {\n if (this.selection.isFakeBackgroundEnabled) {\n // if actions is broken by other selection We need to save new selection\n const currentSelection = new SelectionUtils();\n currentSelection.save();\n\n this.selection.restore();\n this.selection.removeFakeBackground();\n\n // and recover new selection after removing fake background\n currentSelection.restore();\n }\n\n this.nodes.input.classList.remove(this.CSS.inputShowed);\n this.nodes.input.value = '';\n if (clearSavedSelection) {\n this.selection.clearSaved();\n }\n this.inputOpened = false;\n }\n\n /**\n * Enter pressed on input\n * @param {KeyboardEvent} event\n */\n private enterPressed(event: KeyboardEvent): void {\n let value = this.nodes.input.value || '';\n\n if (!value.trim()) {\n this.selection.restore();\n this.unlink();\n event.preventDefault();\n this.closeActions();\n }\n\n if (!this.validateURL(value)) {\n\n this.notifier.show({\n message: 'Pasted link is not valid.',\n style: 'error',\n });\n\n _.log('Incorrect Link pasted', 'warn', value);\n return;\n }\n\n value = this.prepareLink(value);\n\n this.selection.restore();\n this.selection.removeFakeBackground();\n\n this.insertLink(value);\n\n /**\n * Preventing events that will be able to happen\n */\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n this.selection.collapseToEnd();\n this.inlineToolbar.close();\n }\n\n /**\n * Detects if passed string is URL\n * @param {string} str\n * @return {Boolean}\n */\n private validateURL(str: string): boolean {\n /**\n * Don't allow spaces\n */\n return !/\\s/.test(str);\n }\n\n /**\n * Process link before injection\n * - sanitize\n * - add protocol for links like 'google.com'\n * @param {string} link - raw user input\n */\n private prepareLink(link: string): string {\n link = link.trim();\n link = this.addProtocol(link);\n return link;\n }\n\n /**\n * Add 'http' protocol to the links like 'vc.ru', 'google.com'\n * @param {String} link\n */\n private addProtocol(link: string): string {\n /**\n * If protocol already exists, do nothing\n */\n if (/^(\\w+):(\\/\\/)?/.test(link)) {\n return link;\n }\n\n /**\n * We need to add missed HTTP protocol to the link, but skip 2 cases:\n * 1) Internal links like \"/general\"\n * 2) Anchors looks like \"#results\"\n * 3) Protocol-relative URLs like \"//google.com\"\n */\n const isInternal = /^\\/[^\\/\\s]/.test(link),\n isAnchor = link.substring(0, 1) === '#',\n isProtocolRelative = /^\\/\\/[^\\/\\s]/.test(link);\n\n if (!isInternal && !isAnchor && !isProtocolRelative) {\n link = 'http://' + link;\n }\n\n return link;\n }\n\n /**\n * Inserts tag with \"href\"\n * @param {string} link - \"href\" value\n */\n private insertLink(link: string): void {\n\n /**\n * Edit all link, not selected part\n */\n const anchorTag = this.selection.findParentTag('A');\n\n if (anchorTag) {\n this.selection.expandToTag(anchorTag);\n }\n\n document.execCommand(this.commandLink, false, link);\n }\n\n /**\n * Removes tag\n */\n private unlink(): void {\n document.execCommand(this.commandUnlink);\n }\n}\n","var map = {\n\t\"./api\": \"./src/components/modules/api/index.ts\",\n\t\"./api/\": \"./src/components/modules/api/index.ts\",\n\t\"./api/blocks\": \"./src/components/modules/api/blocks.ts\",\n\t\"./api/blocks.ts\": \"./src/components/modules/api/blocks.ts\",\n\t\"./api/caret\": \"./src/components/modules/api/caret.ts\",\n\t\"./api/caret.ts\": \"./src/components/modules/api/caret.ts\",\n\t\"./api/events\": \"./src/components/modules/api/events.ts\",\n\t\"./api/events.ts\": \"./src/components/modules/api/events.ts\",\n\t\"./api/index\": \"./src/components/modules/api/index.ts\",\n\t\"./api/index.ts\": \"./src/components/modules/api/index.ts\",\n\t\"./api/inlineToolbar\": \"./src/components/modules/api/inlineToolbar.ts\",\n\t\"./api/inlineToolbar.ts\": \"./src/components/modules/api/inlineToolbar.ts\",\n\t\"./api/listeners\": \"./src/components/modules/api/listeners.ts\",\n\t\"./api/listeners.ts\": \"./src/components/modules/api/listeners.ts\",\n\t\"./api/notifier\": \"./src/components/modules/api/notifier.ts\",\n\t\"./api/notifier.ts\": \"./src/components/modules/api/notifier.ts\",\n\t\"./api/sanitizer\": \"./src/components/modules/api/sanitizer.ts\",\n\t\"./api/sanitizer.ts\": \"./src/components/modules/api/sanitizer.ts\",\n\t\"./api/saver\": \"./src/components/modules/api/saver.ts\",\n\t\"./api/saver.ts\": \"./src/components/modules/api/saver.ts\",\n\t\"./api/selection\": \"./src/components/modules/api/selection.ts\",\n\t\"./api/selection.ts\": \"./src/components/modules/api/selection.ts\",\n\t\"./api/styles\": \"./src/components/modules/api/styles.ts\",\n\t\"./api/styles.ts\": \"./src/components/modules/api/styles.ts\",\n\t\"./api/toolbar\": \"./src/components/modules/api/toolbar.ts\",\n\t\"./api/toolbar.ts\": \"./src/components/modules/api/toolbar.ts\",\n\t\"./blockEvents\": \"./src/components/modules/blockEvents.ts\",\n\t\"./blockEvents.ts\": \"./src/components/modules/blockEvents.ts\",\n\t\"./blockManager\": \"./src/components/modules/blockManager.ts\",\n\t\"./blockManager.ts\": \"./src/components/modules/blockManager.ts\",\n\t\"./blockSelection\": \"./src/components/modules/blockSelection.ts\",\n\t\"./blockSelection.ts\": \"./src/components/modules/blockSelection.ts\",\n\t\"./caret\": \"./src/components/modules/caret.ts\",\n\t\"./caret.ts\": \"./src/components/modules/caret.ts\",\n\t\"./crossBlockSelection\": \"./src/components/modules/crossBlockSelection.ts\",\n\t\"./crossBlockSelection.ts\": \"./src/components/modules/crossBlockSelection.ts\",\n\t\"./dragNDrop\": \"./src/components/modules/dragNDrop.ts\",\n\t\"./dragNDrop.ts\": \"./src/components/modules/dragNDrop.ts\",\n\t\"./events\": \"./src/components/modules/events.ts\",\n\t\"./events.ts\": \"./src/components/modules/events.ts\",\n\t\"./listeners\": \"./src/components/modules/listeners.ts\",\n\t\"./listeners.ts\": \"./src/components/modules/listeners.ts\",\n\t\"./modificationsObserver\": \"./src/components/modules/modificationsObserver.ts\",\n\t\"./modificationsObserver.ts\": \"./src/components/modules/modificationsObserver.ts\",\n\t\"./notifier\": \"./src/components/modules/notifier.ts\",\n\t\"./notifier.ts\": \"./src/components/modules/notifier.ts\",\n\t\"./paste\": \"./src/components/modules/paste.ts\",\n\t\"./paste.ts\": \"./src/components/modules/paste.ts\",\n\t\"./rectangleSelection\": \"./src/components/modules/rectangleSelection.ts\",\n\t\"./rectangleSelection.ts\": \"./src/components/modules/rectangleSelection.ts\",\n\t\"./renderer\": \"./src/components/modules/renderer.ts\",\n\t\"./renderer.ts\": \"./src/components/modules/renderer.ts\",\n\t\"./sanitizer\": \"./src/components/modules/sanitizer.ts\",\n\t\"./sanitizer.ts\": \"./src/components/modules/sanitizer.ts\",\n\t\"./saver\": \"./src/components/modules/saver.ts\",\n\t\"./saver.ts\": \"./src/components/modules/saver.ts\",\n\t\"./shortcuts\": \"./src/components/modules/shortcuts.ts\",\n\t\"./shortcuts.ts\": \"./src/components/modules/shortcuts.ts\",\n\t\"./toolbar\": \"./src/components/modules/toolbar/index.ts\",\n\t\"./toolbar/\": \"./src/components/modules/toolbar/index.ts\",\n\t\"./toolbar/blockSettings\": \"./src/components/modules/toolbar/blockSettings.ts\",\n\t\"./toolbar/blockSettings.ts\": \"./src/components/modules/toolbar/blockSettings.ts\",\n\t\"./toolbar/conversion\": \"./src/components/modules/toolbar/conversion.ts\",\n\t\"./toolbar/conversion.ts\": \"./src/components/modules/toolbar/conversion.ts\",\n\t\"./toolbar/index\": \"./src/components/modules/toolbar/index.ts\",\n\t\"./toolbar/index.ts\": \"./src/components/modules/toolbar/index.ts\",\n\t\"./toolbar/inline\": \"./src/components/modules/toolbar/inline.ts\",\n\t\"./toolbar/inline.ts\": \"./src/components/modules/toolbar/inline.ts\",\n\t\"./toolbar/toolbox\": \"./src/components/modules/toolbar/toolbox.ts\",\n\t\"./toolbar/toolbox.ts\": \"./src/components/modules/toolbar/toolbox.ts\",\n\t\"./tools\": \"./src/components/modules/tools.ts\",\n\t\"./tools.ts\": \"./src/components/modules/tools.ts\",\n\t\"./ui\": \"./src/components/modules/ui.ts\",\n\t\"./ui.ts\": \"./src/components/modules/ui.ts\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/components/modules sync recursive ^\\\\.\\\\/.*$\";","import Module from '../../__module';\n\nimport {Blocks} from '../../../../types/api';\nimport {BlockToolData, OutputData, ToolConfig} from '../../../../types';\nimport _ from './../../utils';\n\n/**\n * @class BlocksAPI\n * provides with methods working with Block\n */\nexport default class BlocksAPI extends Module {\n /**\n * Available methods\n * @return {Blocks}\n */\n get methods(): Blocks {\n return {\n clear: () => this.clear(),\n render: (data: OutputData) => this.render(data),\n renderFromHTML: (data: string) => this.renderFromHTML(data),\n delete: () => this.delete(),\n swap: (fromIndex: number, toIndex: number) => this.swap(fromIndex, toIndex),\n getBlockByIndex: (index: number) => this.getBlockByIndex(index),\n getCurrentBlockIndex: () => this.getCurrentBlockIndex(),\n getBlocksCount: () => this.getBlocksCount(),\n stretchBlock: (index: number, status: boolean = true) => this.stretchBlock(index, status),\n insertNewBlock: () => this.insertNewBlock(),\n insert: this.insert,\n };\n }\n\n /**\n * Returns Blocks count\n * @return {number}\n */\n public getBlocksCount(): number {\n return this.Editor.BlockManager.blocks.length;\n }\n\n /**\n * Returns current block index\n * @return {number}\n */\n public getCurrentBlockIndex(): number {\n return this.Editor.BlockManager.currentBlockIndex;\n }\n\n /**\n * Returns Block holder by Block index\n * @param {Number} index\n *\n * @return {HTMLElement}\n */\n public getBlockByIndex(index: number): HTMLElement {\n const block = this.Editor.BlockManager.getBlockByIndex(index);\n return block.holder;\n }\n\n /**\n * Call Block Manager method that swap Blocks\n * @param {number} fromIndex - position of first Block\n * @param {number} toIndex - position of second Block\n */\n public swap(fromIndex: number, toIndex: number): void {\n this.Editor.BlockManager.swap(fromIndex, toIndex);\n\n /**\n * Move toolbar\n * DO not close the settings\n */\n this.Editor.Toolbar.move(false);\n }\n\n /**\n * Deletes Block\n * @param blockIndex\n */\n public delete(blockIndex?: number): void {\n this.Editor.BlockManager.removeBlock(blockIndex);\n\n /**\n * in case of last block deletion\n * Insert new initial empty block\n */\n if (this.Editor.BlockManager.blocks.length === 0) {\n this.Editor.BlockManager.insert();\n }\n\n /**\n * In case of deletion first block we need to set caret to the current Block\n */\n if (this.Editor.BlockManager.currentBlockIndex === 0) {\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);\n } else {\n this.Editor.Caret.navigatePrevious(true);\n }\n\n this.Editor.Toolbar.close();\n }\n\n /**\n * Clear Editor's area\n */\n public clear(): void {\n this.Editor.BlockManager.clear(true);\n this.Editor.InlineToolbar.close();\n }\n\n /**\n * Fills Editor with Blocks data\n * @param {OutputData} data — Saved Editor data\n */\n public render(data: OutputData): Promise {\n this.Editor.BlockManager.clear();\n return this.Editor.Renderer.render(data.blocks);\n }\n\n /**\n * Render passed HTML string\n * @param {string} data\n * @return {Promise}\n */\n public renderFromHTML(data: string): Promise {\n this.Editor.BlockManager.clear();\n return this.Editor.Paste.processText(data, true);\n }\n\n /**\n * Stretch Block's content\n * @param {number} index\n * @param {boolean} status - true to enable, false to disable\n */\n public stretchBlock(index: number, status: boolean = true): void {\n const block = this.Editor.BlockManager.getBlockByIndex(index);\n\n if (!block) {\n return;\n }\n\n block.stretched = status;\n }\n\n /**\n * Insert new Block\n *\n * @param {string} type — Tool name\n * @param {BlockToolData} data — Tool data to insert\n * @param {ToolConfig} config — Tool config\n * @param {number?} index — index where to insert new Block\n * @param {boolean?} needToFocus - flag to focus inserted Block\n */\n public insert = (\n type: string = this.config.initialBlock,\n data: BlockToolData = {},\n config: ToolConfig = {},\n index?: number,\n needToFocus?: boolean,\n ): void => {\n this.Editor.BlockManager.insert(\n type,\n data,\n config,\n index,\n needToFocus,\n );\n }\n\n /**\n * Insert new Block\n * After set caret to this Block\n *\n * @todo: remove in 3.0.0\n *\n * @deprecated with insert() method\n */\n public insertNewBlock(): void {\n _.log('Method blocks.insertNewBlock() is deprecated and it will be removed in next major release. ' +\n 'Use blocks.insert() instead.', 'warn');\n this.insert();\n }\n}\n","import Module from '../../__module';\nimport {Caret} from '../../../../types/api';\n\n/**\n * @class CaretAPI\n * provides with methods to work with caret\n */\nexport default class CaretAPI extends Module {\n /**\n * Available methods\n * @return {Caret}\n */\n get methods(): Caret {\n return {\n setToFirstBlock: this.setToFirstBlock,\n setToLastBlock: this.setToLastBlock,\n setToPreviousBlock: this.setToPreviousBlock,\n setToNextBlock: this.setToNextBlock,\n setToBlock: this.setToBlock,\n focus: this.focus,\n };\n }\n\n /**\n * Sets caret to the first Block\n *\n * @param {string} position - position where to set caret\n * @param {number} offset - caret offset\n *\n * @return {boolean}\n */\n private setToFirstBlock = (position: string = this.Editor.Caret.positions.DEFAULT, offset: number = 0): boolean => {\n if (!this.Editor.BlockManager.firstBlock) {\n return false;\n }\n\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.firstBlock, position, offset);\n return true;\n }\n\n /**\n * Sets caret to the last Block\n *\n * @param {string} position - position where to set caret\n * @param {number} offset - caret offset\n *\n * @return {boolean}\n */\n private setToLastBlock = (position: string = this.Editor.Caret.positions.DEFAULT, offset: number = 0): boolean => {\n if (!this.Editor.BlockManager.lastBlock) {\n return false;\n }\n\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.lastBlock, position, offset);\n return true;\n }\n\n /**\n * Sets caret to the previous Block\n *\n * @param {string} position - position where to set caret\n * @param {number} offset - caret offset\n *\n * @return {boolean}\n */\n private setToPreviousBlock = (\n position: string = this.Editor.Caret.positions.DEFAULT,\n offset: number = 0,\n ): boolean => {\n if (!this.Editor.BlockManager.previousBlock) {\n return false;\n }\n\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.previousBlock, position, offset);\n return true;\n }\n\n /**\n * Sets caret to the next Block\n *\n * @param {string} position - position where to set caret\n * @param {number} offset - caret offset\n *\n * @return {boolean}\n */\n private setToNextBlock = (position: string = this.Editor.Caret.positions.DEFAULT, offset: number = 0): boolean => {\n if (!this.Editor.BlockManager.nextBlock) {\n return false;\n }\n\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.nextBlock, position, offset);\n return true;\n }\n\n /**\n * Sets caret to the Block by passed index\n *\n * @param {number} index - index of Block where to set caret\n * @param {string} position - position where to set caret\n * @param {number} offset - caret offset\n *\n * @return {boolean}\n */\n private setToBlock = (\n index: number,\n position: string = this.Editor.Caret.positions.DEFAULT,\n offset: number = 0,\n ): boolean => {\n if (!this.Editor.BlockManager.blocks[index]) {\n return false;\n }\n\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.blocks[index], position, offset);\n return true;\n }\n\n /**\n * Sets caret to the Editor\n *\n * @param {boolean} atEnd - if true, set Caret to the end of the Editor\n *\n * @return {boolean}\n */\n private focus = (atEnd: boolean = false) => {\n if (atEnd) {\n return this.setToLastBlock(this.Editor.Caret.positions.END);\n }\n\n return this.setToFirstBlock(this.Editor.Caret.positions.START);\n }\n}\n","import Module from '../../__module';\nimport {Events} from '../../../../types/api';\n\n/**\n * @class EventsAPI\n * provides with methods working with Toolbar\n */\nexport default class EventsAPI extends Module {\n /**\n * Available methods\n * @return {Events}\n */\n get methods(): Events {\n return {\n emit: (eventName: string, data: object) => this.emit(eventName, data),\n off: (eventName: string, callback: () => void) => this.off(eventName, callback),\n on: (eventName: string, callback: () => void) => this.on(eventName, callback),\n };\n }\n\n /**\n * Subscribe on Events\n * @param {String} eventName\n * @param {Function} callback\n */\n public on(eventName, callback): void {\n this.Editor.Events.on(eventName, callback);\n }\n\n /**\n * Emit event with data\n * @param {String} eventName\n * @param {Object} data\n */\n public emit(eventName, data): void {\n this.Editor.Events.emit(eventName, data);\n }\n\n /**\n * Unsubscribe from Event\n * @param {String} eventName\n * @param {Function} callback\n */\n public off(eventName, callback): void {\n this.Editor.Events.off(eventName, callback);\n }\n\n}\n","/**\n * @module API\n * @copyright 2018\n *\n * Each block has an Editor API instance to use provided public methods\n * if you cant to read more about how API works, please see docs\n */\nimport Module from '../../__module';\nimport {API as APIInterfaces} from '../../../../types';\n\n/**\n * @class API\n */\nexport default class API extends Module {\n public get methods(): APIInterfaces {\n return {\n blocks: this.Editor.BlocksAPI.methods,\n caret: this.Editor.CaretAPI.methods,\n events: this.Editor.EventsAPI.methods,\n listeners: this.Editor.ListenersAPI.methods,\n notifier: this.Editor.NotifierAPI.methods,\n sanitizer: this.Editor.SanitizerAPI.methods,\n saver: this.Editor.SaverAPI.methods,\n selection: this.Editor.SelectionAPI.methods,\n styles: this.Editor.StylesAPI.classes,\n toolbar: this.Editor.ToolbarAPI.methods,\n inlineToolbar: this.Editor.InlineToolbarAPI.methods,\n } as APIInterfaces;\n }\n}\n","import Module from '../../__module';\nimport { InlineToolbar } from '../../../../types/api/inline-toolbar';\n\n/**\n * @class InlineToolbarAPI\n * Provides methods for working with the Inline Toolbar\n */\nexport default class InlineToolbarAPI extends Module {\n /**\n * Available methods\n * @return {InlineToolbar}\n */\n get methods(): InlineToolbar {\n return {\n close: () => this.close(),\n open: () => this.open(),\n };\n }\n\n /**\n * Open Inline Toolbar\n */\n public open(): void {\n this.Editor.InlineToolbar.tryToShow();\n }\n\n /**\n * Close Inline Toolbar\n */\n public close(): void {\n this.Editor.InlineToolbar.close();\n }\n}\n","import Module from '../../__module';\nimport {Listeners} from '../../../../types/api';\n\n/**\n * @class ListenersAPI\n * Provides with methods working with DOM Listener\n */\nexport default class ListenersAPI extends Module {\n /**\n * Available methods\n * @return {Listeners}\n */\n get methods(): Listeners {\n return {\n on: (element: HTMLElement, eventType, handler, useCapture) => this.on(element, eventType, handler, useCapture),\n off: (element, eventType, handler) => this.off(element, eventType, handler),\n };\n }\n\n /**\n * adds DOM event listener\n *\n * @param {HTMLElement} element\n * @param {string} eventType\n * @param {() => void} handler\n * @param {boolean} useCapture\n */\n public on(element: HTMLElement, eventType: string, handler: () => void, useCapture?: boolean): void {\n this.Editor.Listeners.on(element, eventType, handler, useCapture);\n }\n\n /**\n * Removes DOM listener from element\n *\n * @param element\n * @param eventType\n * @param handler\n */\n public off(element, eventType, handler): void {\n this.Editor.Listeners.off(element, eventType, handler);\n }\n}\n","import Module from '../../__module';\nimport {Notifier} from '../../../../types/api';\nimport {ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions} from 'codex-notifier';\n\nexport default class NotifierAPI extends Module {\n\n /**\n * Available methods\n */\n get methods(): Notifier {\n return {\n show: (options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) => this.show(options),\n };\n }\n\n public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) {\n return this.Editor.Notifier.show(options);\n }\n}\n","import Module from '../../__module';\nimport {Sanitizer} from '../../../../types/api';\n\n/**\n * @class SanitizerAPI\n * Provides Editor.js Sanitizer that allows developers to clean their HTML\n */\nexport default class SanitizerAPI extends Module {\n /**\n * Available methods\n * @return {Sanitizer}\n */\n get methods(): Sanitizer {\n return {\n clean: (taintString, config) => this.clean(taintString, config),\n };\n }\n\n public clean(taintString, config) {\n return this.Editor.Sanitizer.clean(taintString, config);\n }\n\n}\n","import Module from '../../__module';\nimport {Saver} from '../../../../types/api';\nimport {OutputData} from '../../../../types';\n\n/**\n * @class SaverAPI\n * provides with methods to save data\n */\nexport default class SaverAPI extends Module {\n /**\n * Available methods\n * @return {Saver}\n */\n get methods(): Saver {\n return {\n save: () => this.save(),\n };\n }\n\n /**\n * Return Editor's data\n */\n public save(): Promise {\n return this.Editor.Saver.save();\n }\n}\n","import Module from '../../__module';\nimport SelectionUtils from '../../selection';\nimport {Selection as SelectionAPIInterface} from '../../../../types/api';\n\n/**\n * @class SelectionAPI\n * Provides with methods working with SelectionUtils\n */\nexport default class SelectionAPI extends Module {\n /**\n * Available methods\n * @return {SelectionAPIInterface}\n */\n get methods(): SelectionAPIInterface {\n return {\n findParentTag: (tagName: string, className?: string) => this.findParentTag(tagName, className),\n expandToTag: (node: HTMLElement) => this.expandToTag(node),\n };\n }\n\n /**\n * Looks ahead from selection and find passed tag with class name\n * @param {string} tagName - tag to find\n * @param {string} className - tag's class name\n * @return {HTMLElement|null}\n */\n public findParentTag(tagName: string, className?: string): HTMLElement|null {\n return new SelectionUtils().findParentTag(tagName, className);\n }\n\n /**\n * Expand selection to passed tag\n * @param {HTMLElement} node - tag that should contain selection\n */\n public expandToTag(node: HTMLElement): void {\n new SelectionUtils().expandToTag(node);\n }\n\n}\n","import Module from '../../__module';\nimport {Styles} from '../../../../types/api';\n\n/**\n *\n */\nexport default class StylesAPI extends Module {\n get classes(): Styles {\n return {\n /**\n * Base Block styles\n */\n block: 'cdx-block',\n\n /**\n * Inline Tools styles\n */\n inlineToolButton: 'ce-inline-tool',\n inlineToolButtonActive: 'ce-inline-tool--active',\n\n /**\n * UI elements\n */\n input: 'cdx-input',\n loader: 'cdx-loader',\n button: 'cdx-button',\n\n /**\n * Settings styles\n */\n settingsButton: 'cdx-settings-button',\n settingsButtonActive: 'cdx-settings-button--active',\n };\n }\n}\n","import Module from '../../__module';\nimport {Toolbar} from '../../../../types/api';\n\n/**\n * @class ToolbarAPI\n * Provides methods for working with the Toolbar\n */\nexport default class ToolbarAPI extends Module {\n /**\n * Available methods\n * @return {Toolbar}\n */\n get methods(): Toolbar {\n return {\n close: () => this.close(),\n open: () => this.open(),\n };\n }\n\n /**\n * Open toolbar\n */\n public open(): void {\n this.Editor.Toolbar.open();\n }\n\n /**\n * Close toolbar and all included elements\n */\n public close(): void {\n this.Editor.Toolbar.close();\n }\n\n}\n","/**\n * Contains keyboard and mouse events binded on each Block by Block Manager\n */\nimport Module from '../__module';\nimport _ from '../utils';\nimport SelectionUtils from '../selection';\n\nexport default class BlockEvents extends Module {\n\n /**\n * All keydowns on Block\n * @param {KeyboardEvent} event - keydown\n */\n public keydown(event: KeyboardEvent): void {\n /**\n * Run common method for all keydown events\n */\n this.beforeKeydownProcessing(event);\n\n /**\n * Fire keydown processor by event.keyCode\n */\n switch (event.keyCode) {\n case _.keyCodes.BACKSPACE:\n this.backspace(event);\n break;\n\n case _.keyCodes.ENTER:\n this.enter(event);\n break;\n\n case _.keyCodes.DOWN:\n case _.keyCodes.RIGHT:\n this.arrowRightAndDown(event);\n break;\n\n case _.keyCodes.UP:\n case _.keyCodes.LEFT:\n this.arrowLeftAndUp(event);\n break;\n\n case _.keyCodes.TAB:\n this.tabPressed(event);\n break;\n\n case _.keyCodes.ESC:\n this.escapePressed(event);\n break;\n default:\n this.defaultHandler();\n break;\n }\n }\n\n /**\n * Fires on keydown before event processing\n * @param {KeyboardEvent} event - keydown\n */\n public beforeKeydownProcessing(event: KeyboardEvent): void {\n /**\n * Do not close Toolbox on Tabs or on Enter with opened Toolbox\n */\n if (!this.needToolbarClosing(event)) {\n return;\n }\n\n /**\n * When user type something:\n * - close Toolbar\n * - close Conversion Toolbar\n * - clear block highlighting\n */\n if (_.isPrintableKey(event.keyCode)) {\n this.Editor.Toolbar.close();\n this.Editor.ConversionToolbar.close();\n\n /**\n * Allow to use shortcuts with selected blocks\n * @type {boolean}\n */\n const isShortcut = event.ctrlKey || event.metaKey || event.altKey || event.shiftKey;\n\n if (!isShortcut) {\n this.Editor.BlockManager.clearFocused();\n this.Editor.BlockSelection.clearSelection(event);\n }\n }\n }\n\n /**\n * Key up on Block:\n * - shows Inline Toolbar if something selected\n * - shows conversion toolbar with 85% of block selection\n */\n public keyup(event): void {\n\n /**\n * If shift key was pressed some special shortcut is used (eg. cross block selection via shift + arrows)\n */\n if (event.shiftKey) {\n return;\n }\n\n const { InlineToolbar, ConversionToolbar, UI, BlockManager } = this.Editor;\n const block = BlockManager.getBlock(event.target);\n\n /**\n * Conversion Toolbar will be opened when user selects 85% of plugins content\n * that why we must with the length of pluginsContent\n */\n if (SelectionUtils.almostAllSelected(block.pluginsContent.textContent)) {\n InlineToolbar.close();\n ConversionToolbar.tryToShow(block);\n } else {\n ConversionToolbar.close();\n InlineToolbar.tryToShow(true);\n }\n\n /**\n * Check if editor is empty on each keyup and add special css class to wrapper\n */\n UI.checkEmptiness();\n }\n\n /**\n * Mouse up on Block:\n * - shows Inline Toolbar if something selected\n */\n public mouseUp(event): void {\n const { InlineToolbar, ConversionToolbar, BlockManager, BlockSelection } = this.Editor;\n const block = BlockManager.getBlock(event.target);\n\n /**\n * Timeout uses to wait if selection will cleared after mouse up (regular click on block)\n */\n _.delay(() => {\n /**\n * 1) selected 85% of block - open Conversion Toolbar\n * 2) select something inside block - open Inline Toolbar\n * 3) nothing selected - close Toolbars\n */\n if (SelectionUtils.almostAllSelected(block.pluginsContent.textContent)) {\n InlineToolbar.close();\n ConversionToolbar.tryToShow(block);\n } else if (!SelectionUtils.isCollapsed) {\n InlineToolbar.tryToShow();\n ConversionToolbar.close();\n } else {\n InlineToolbar.close();\n\n /**\n * Don't close Conversion toolbar when Rectangle Selection ended with one block selected\n * @see RectangleSelection#endSelection\n */\n if (BlockSelection.selectedBlocks.length !== 1) {\n ConversionToolbar.close();\n }\n }\n }, 30)();\n }\n\n /**\n * Set up mouse selection handlers\n *\n * @param {MouseEvent} event\n */\n public mouseDown(event: MouseEvent): void {\n this.Editor.CrossBlockSelection.watchSelection(event);\n }\n\n /**\n * Open Toolbox to leaf Tools\n * @param {KeyboardEvent} event\n */\n public tabPressed(event): void {\n /**\n * Clear blocks selection by tab\n */\n this.Editor.BlockSelection.clearSelection(event);\n\n const { BlockManager, Tools, ConversionToolbar, InlineToolbar } = this.Editor;\n const currentBlock = BlockManager.currentBlock;\n\n if (!currentBlock) {\n return;\n }\n\n /** Prevent Default behaviour */\n event.preventDefault();\n event.stopPropagation();\n\n /** this property defines leaf direction */\n const shiftKey = event.shiftKey,\n direction = shiftKey ? 'left' : 'right';\n\n const canLeafToolbox = Tools.isInitial(currentBlock.tool) && currentBlock.isEmpty;\n const canLeafInlineToolbar = !currentBlock.isEmpty && !SelectionUtils.isCollapsed && InlineToolbar.opened;\n const canLeafConversionToolbar = !currentBlock.isEmpty && ConversionToolbar.opened;\n\n /**\n * For empty Blocks we show Plus button via Toobox only for initial Blocks\n */\n if (canLeafToolbox) {\n this.leafToolboxTools(direction);\n } else if (canLeafInlineToolbar) {\n this.leafInlineToolbarTools(direction);\n } else if (canLeafConversionToolbar) {\n this.leafConversionToolbarTools(direction);\n } else {\n this.leafBlockSettingsTools(direction);\n }\n }\n\n /**\n * Escape pressed\n * If some of Toolbar components are opened, then close it otherwise close Toolbar\n *\n * @param {Event} event\n */\n public escapePressed(event): void {\n /**\n * Clear blocks selection by ESC\n */\n this.Editor.BlockSelection.clearSelection(event);\n\n if (this.Editor.Toolbox.opened) {\n this.Editor.Toolbox.close();\n } else if (this.Editor.BlockSettings.opened) {\n this.Editor.BlockSettings.close();\n } else if (this.Editor.InlineToolbar.opened) {\n this.Editor.InlineToolbar.close();\n } else {\n this.Editor.Toolbar.close();\n }\n }\n\n /**\n * Add drop target styles\n *\n * @param {DragEvent} e\n */\n public dragOver(e: DragEvent) {\n const block = this.Editor.BlockManager.getBlockByChildNode(e.target as Node);\n\n block.dropTarget = true;\n }\n\n /**\n * Remove drop target style\n *\n * @param {DragEvent} e\n */\n public dragLeave(e: DragEvent) {\n const block = this.Editor.BlockManager.getBlockByChildNode(e.target as Node);\n\n block.dropTarget = false;\n }\n\n /**\n * Copying selected blocks\n * Before putting to the clipboard we sanitize all blocks and then copy to the clipboard\n *\n * @param event\n */\n public handleCommandC(event): void {\n const { BlockSelection } = this.Editor;\n\n if (!BlockSelection.anyBlockSelected) {\n return;\n }\n\n /**\n * Prevent default copy\n * Remove \"decline sound\" on macOS\n */\n event.preventDefault();\n\n // Copy Selected Blocks\n BlockSelection.copySelectedBlocks();\n }\n\n /**\n * Copy and Delete selected Blocks\n * @param event\n */\n public handleCommandX(event): void {\n const { BlockSelection, BlockManager, Caret } = this.Editor;\n\n if (!BlockSelection.anyBlockSelected) {\n return;\n }\n\n /**\n * Copy Blocks before removing\n *\n * Prevent default copy\n * Remove \"decline sound\" on macOS\n */\n event.preventDefault();\n\n BlockSelection.copySelectedBlocks();\n\n const selectionPositionIndex = BlockManager.removeSelectedBlocks();\n Caret.setToBlock(BlockManager.insertInitialBlockAtIndex(selectionPositionIndex, true), Caret.positions.START);\n\n /** Clear selection */\n BlockSelection.clearSelection(event);\n }\n\n /**\n * ENTER pressed on block\n * @param {KeyboardEvent} event - keydown\n */\n private enter(event: KeyboardEvent): void {\n const { BlockManager, Toolbox, BlockSettings, InlineToolbar, ConversionToolbar, Tools } = this.Editor;\n const currentBlock = BlockManager.currentBlock;\n const tool = Tools.available[currentBlock.name];\n\n /**\n * Don't handle Enter keydowns when Tool sets enableLineBreaks to true.\n * Uses for Tools like where line breaks should be handled by default behaviour.\n */\n if (tool\n && tool[Tools.apiSettings.IS_ENABLED_LINE_BREAKS]\n && !BlockSettings.opened\n && !InlineToolbar.opened\n && !ConversionToolbar.opened) {\n return;\n }\n\n if (Toolbox.opened && Toolbox.getActiveTool) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n Toolbox.toolButtonActivate(event, Toolbox.getActiveTool);\n return;\n }\n\n if (InlineToolbar.opened && InlineToolbar.focusedButton) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n InlineToolbar.focusedButton.click();\n return;\n }\n\n /**\n * Allow to create linebreaks by Shift+Enter\n */\n if (event.shiftKey) {\n return;\n }\n\n let newCurrent = this.Editor.BlockManager.currentBlock;\n\n /**\n * If enter has been pressed at the start of the text, just insert paragraph Block above\n */\n if (this.Editor.Caret.isAtStart && !this.Editor.BlockManager.currentBlock.hasMedia) {\n this.Editor.BlockManager.insertInitialBlockAtIndex(this.Editor.BlockManager.currentBlockIndex);\n } else {\n /**\n * Split the Current Block into two blocks\n * Renew local current node after split\n */\n newCurrent = this.Editor.BlockManager.split();\n }\n\n this.Editor.Caret.setToBlock(newCurrent);\n\n /**\n * If new Block is empty\n */\n if (this.Editor.Tools.isInitial(newCurrent.tool) && newCurrent.isEmpty) {\n /**\n * Show Toolbar\n */\n this.Editor.Toolbar.open(false);\n\n /**\n * Show Plus Button\n */\n this.Editor.Toolbar.plusButton.show();\n }\n\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n }\n\n /**\n * Handle backspace keydown on Block\n * @param {KeyboardEvent} event - keydown\n */\n private backspace(event: KeyboardEvent): void {\n const { BlockManager, BlockSelection, Caret } = this.Editor;\n const currentBlock = BlockManager.currentBlock;\n const tool = this.Editor.Tools.available[currentBlock.name];\n\n /**\n * Check if Block should be removed by current Backspace keydown\n */\n if (currentBlock.selected || currentBlock.isEmpty && currentBlock.currentInput === currentBlock.firstInput) {\n event.preventDefault();\n\n const index = BlockManager.currentBlockIndex;\n\n if (BlockManager.previousBlock && BlockManager.previousBlock.inputs.length === 0) {\n /** If previous block doesn't contain inputs, remove it */\n BlockManager.removeBlock(index - 1);\n } else {\n /** If block is empty, just remove it */\n BlockManager.removeBlock();\n }\n\n Caret.setToBlock(\n BlockManager.currentBlock,\n index ? Caret.positions.END : Caret.positions.START,\n );\n\n /** Close Toolbar */\n this.Editor.Toolbar.close();\n\n /** Clear selection */\n BlockSelection.clearSelection(event);\n return;\n }\n\n /**\n * Don't handle Backspaces when Tool sets enableLineBreaks to true.\n * Uses for Tools like where line breaks should be handled by default behaviour.\n *\n * But if caret is at start of the block, we allow to remove it by backspaces\n */\n if (tool && tool[this.Editor.Tools.apiSettings.IS_ENABLED_LINE_BREAKS] && !Caret.isAtStart) {\n return;\n }\n\n const isFirstBlock = BlockManager.currentBlockIndex === 0;\n const canMergeBlocks = Caret.isAtStart && currentBlock.currentInput === currentBlock.firstInput && !isFirstBlock;\n\n if (canMergeBlocks) {\n /**\n * preventing browser default behaviour\n */\n event.preventDefault();\n\n /**\n * Merge Blocks\n */\n this.mergeBlocks();\n }\n }\n\n /**\n * Merge current and previous Blocks if they have the same type\n */\n private mergeBlocks() {\n const { BlockManager, Caret, Toolbar } = this.Editor;\n const targetBlock = BlockManager.previousBlock;\n const blockToMerge = BlockManager.currentBlock;\n\n /**\n * Blocks that can be merged:\n * 1) with the same Name\n * 2) Tool has 'merge' method\n *\n * other case will handle as usual ARROW LEFT behaviour\n */\n if (blockToMerge.name !== targetBlock.name || !targetBlock.mergeable) {\n /** If target Block doesn't contain inputs or empty, remove it */\n if (targetBlock.inputs.length === 0 || targetBlock.isEmpty) {\n BlockManager.removeBlock(BlockManager.currentBlockIndex - 1);\n\n Caret.setToBlock(BlockManager.currentBlock);\n Toolbar.close();\n return;\n }\n\n if (Caret.navigatePrevious()) {\n Toolbar.close();\n }\n\n return;\n }\n\n Caret.createShadow(targetBlock.pluginsContent);\n BlockManager.mergeBlocks(targetBlock, blockToMerge)\n .then( () => {\n /** Restore caret position after merge */\n Caret.restoreCaret(targetBlock.pluginsContent as HTMLElement);\n targetBlock.pluginsContent.normalize();\n Toolbar.close();\n });\n }\n\n /**\n * Handle right and down keyboard keys\n */\n private arrowRightAndDown(event: KeyboardEvent): void {\n const shouldEnableCBS = this.Editor.Caret.isAtEnd || this.Editor.BlockSelection.anyBlockSelected;\n\n if (event.shiftKey && event.keyCode === _.keyCodes.DOWN && shouldEnableCBS) {\n this.Editor.CrossBlockSelection.toggleBlockSelectedState();\n return;\n }\n\n if (this.Editor.Caret.navigateNext()) {\n /**\n * Default behaviour moves cursor by 1 character, we need to prevent it\n */\n event.preventDefault();\n } else {\n /**\n * After caret is set, update Block input index\n */\n _.delay(() => {\n /** Check currentBlock for case when user moves selection out of Editor */\n if (this.Editor.BlockManager.currentBlock) {\n this.Editor.BlockManager.currentBlock.updateCurrentInput();\n }\n }, 20)();\n }\n\n /**\n * Clear blocks selection by arrows\n */\n this.Editor.BlockSelection.clearSelection(event);\n }\n\n /**\n * Handle left and up keyboard keys\n */\n private arrowLeftAndUp(event: KeyboardEvent): void {\n const shouldEnableCBS = this.Editor.Caret.isAtStart || this.Editor.BlockSelection.anyBlockSelected;\n\n if (event.shiftKey && event.keyCode === _.keyCodes.UP && shouldEnableCBS) {\n this.Editor.CrossBlockSelection.toggleBlockSelectedState(false);\n return;\n }\n\n if (this.Editor.Caret.navigatePrevious()) {\n /**\n * Default behaviour moves cursor by 1 character, we need to prevent it\n */\n event.preventDefault();\n } else {\n /**\n * After caret is set, update Block input index\n */\n _.delay(() => {\n /** Check currentBlock for case when user ends selection out of Editor and then press arrow-key */\n if (this.Editor.BlockManager.currentBlock) {\n this.Editor.BlockManager.currentBlock.updateCurrentInput();\n }\n }, 20)();\n }\n\n /**\n * Clear blocks selection by arrows\n */\n this.Editor.BlockSelection.clearSelection(event);\n }\n\n /**\n * Default keydown handler\n */\n private defaultHandler(): void {}\n\n /**\n * Cases when we need to close Toolbar\n */\n private needToolbarClosing(event) {\n const toolboxItemSelected = (event.keyCode === _.keyCodes.ENTER && this.Editor.Toolbox.opened),\n blockSettingsItemSelected = (event.keyCode === _.keyCodes.ENTER && this.Editor.BlockSettings.opened),\n inlineToolbarItemSelected = (event.keyCode === _.keyCodes.ENTER && this.Editor.InlineToolbar.opened),\n conversionToolbarItemSelected = (event.keyCode === _.keyCodes.ENTER && this.Editor.ConversionToolbar.opened),\n flippingToolbarItems = event.keyCode === _.keyCodes.TAB;\n\n /**\n * Do not close Toolbar in cases:\n * 1. ShiftKey pressed (or combination with shiftKey)\n * 2. When Toolbar is opened and Tab leafs its Tools\n * 3. When Toolbar's component is opened and some its item selected\n */\n return !(event.shiftKey\n || flippingToolbarItems\n || toolboxItemSelected\n || blockSettingsItemSelected\n || inlineToolbarItemSelected\n || conversionToolbarItemSelected\n );\n }\n\n /**\n * If Toolbox is not open, then just open it and show plus button\n * Next Tab press will leaf Toolbox Tools\n *\n * @param {string} direction\n */\n private leafToolboxTools(direction: string): void {\n if (!this.Editor.Toolbar.opened) {\n this.Editor.Toolbar.open(false , false);\n this.Editor.Toolbar.plusButton.show();\n } else {\n this.Editor.Toolbox.leaf(direction);\n }\n\n this.Editor.Toolbox.open();\n }\n\n /**\n * If InlineToolbar is not open, just open it and focus first button\n * Next Tab press will leaf InlineToolbar Tools\n *\n * @param {string} direction\n */\n private leafInlineToolbarTools(direction: string): void {\n if (this.Editor.InlineToolbar.opened) {\n this.Editor.InlineToolbar.leaf(direction);\n }\n }\n\n /**\n * Leaf Conversion Toolbar Tools\n * @param {string} direction\n */\n private leafConversionToolbarTools(direction: string): void {\n this.Editor.ConversionToolbar.leaf(direction);\n }\n\n /**\n * Open Toolbar and show BlockSettings before flipping Tools\n * @param {string} direction\n */\n private leafBlockSettingsTools(direction: string): void {\n if (!this.Editor.Toolbar.opened) {\n this.Editor.BlockManager.currentBlock.focused = true;\n this.Editor.Toolbar.open(true, false);\n this.Editor.Toolbar.plusButton.hide();\n }\n\n /**\n * If BlockSettings is not open, then open BlockSettings\n * Next Tab press will leaf Settings Buttons\n */\n if (!this.Editor.BlockSettings.opened) {\n this.Editor.BlockSettings.open();\n }\n\n this.Editor.BlockSettings.leaf(direction);\n }\n}\n","/**\n * @class BlockManager\n * @classdesc Manage editor`s blocks storage and appearance\n *\n * @module BlockManager\n *\n * @version 2.0.0\n */\nimport Block from '../block';\nimport Module from '../__module';\nimport $ from '../dom';\nimport _ from '../utils';\nimport Blocks from '../blocks';\nimport {BlockTool, BlockToolConstructable, BlockToolData, PasteEvent, ToolConfig} from '../../../types';\n\n/**\n * @typedef {BlockManager} BlockManager\n * @property {Number} currentBlockIndex - Index of current working block\n * @property {Proxy} _blocks - Proxy for Blocks instance {@link Blocks}\n */\nexport default class BlockManager extends Module {\n\n /**\n * Returns current Block index\n * @return {number}\n */\n public get currentBlockIndex(): number {\n return this._currentBlockIndex;\n }\n\n /**\n * Set current Block index and fire Block lifecycle callbacks\n * @param newIndex\n */\n public set currentBlockIndex(newIndex: number) {\n if (this._blocks[this._currentBlockIndex]) {\n this._blocks[this._currentBlockIndex].willUnselect();\n }\n\n if (this._blocks[newIndex]) {\n this._blocks[newIndex].willSelect();\n }\n\n this._currentBlockIndex = newIndex;\n }\n\n /**\n * returns first Block\n * @return {Block}\n */\n public get firstBlock(): Block {\n return this._blocks[0];\n }\n\n /**\n * returns last Block\n * @return {Block}\n */\n public get lastBlock(): Block {\n return this._blocks[this._blocks.length - 1];\n }\n\n /**\n * Get current Block instance\n *\n * @return {Block}\n */\n public get currentBlock(): Block {\n return this._blocks[this.currentBlockIndex];\n }\n\n /**\n * Returns next Block instance\n * @return {Block|null}\n */\n public get nextBlock(): Block {\n const isLastBlock = this.currentBlockIndex === (this._blocks.length - 1);\n\n if (isLastBlock) {\n return null;\n }\n\n return this._blocks[this.currentBlockIndex + 1];\n }\n\n /**\n * Return first Block with inputs after current Block\n *\n * @returns {Block | undefined}\n */\n public get nextContentfulBlock(): Block {\n const nextBlocks = this.blocks.slice(this.currentBlockIndex + 1);\n\n return nextBlocks.find((block) => !!block.inputs.length);\n }\n\n /**\n * Return first Block with inputs before current Block\n *\n * @returns {Block | undefined}\n */\n public get previousContentfulBlock(): Block {\n const previousBlocks = this.blocks.slice(0, this.currentBlockIndex).reverse();\n\n return previousBlocks.find((block) => !!block.inputs.length);\n }\n\n /**\n * Returns previous Block instance\n * @return {Block|null}\n */\n public get previousBlock(): Block {\n const isFirstBlock = this.currentBlockIndex === 0;\n\n if (isFirstBlock) {\n return null;\n }\n\n return this._blocks[this.currentBlockIndex - 1];\n }\n\n /**\n * Get array of Block instances\n *\n * @returns {Block[]} {@link Blocks#array}\n */\n public get blocks(): Block[] {\n return this._blocks.array;\n }\n\n /**\n * Check if each Block is empty\n *\n * @returns {boolean}\n */\n public get isEditorEmpty(): boolean {\n return this.blocks.every((block) => block.isEmpty);\n }\n\n /**\n * Index of current working block\n *\n * @type {number}\n */\n private _currentBlockIndex: number = -1;\n\n /**\n * Proxy for Blocks instance {@link Blocks}\n *\n * @type {Proxy}\n * @private\n */\n private _blocks: Blocks = null;\n\n /**\n * Should be called after Editor.UI preparation\n * Define this._blocks property\n *\n * @returns {Promise}\n */\n public async prepare() {\n const blocks = new Blocks(this.Editor.UI.nodes.redactor);\n const { BlockEvents, Shortcuts } = this.Editor;\n\n /**\n * We need to use Proxy to overload set/get [] operator.\n * So we can use array-like syntax to access blocks\n *\n * @example\n * this._blocks[0] = new Block(...);\n *\n * block = this._blocks[0];\n *\n * @todo proxy the enumerate method\n *\n * @type {Proxy}\n * @private\n */\n this._blocks = new Proxy(blocks, {\n set: Blocks.set,\n get: Blocks.get,\n });\n\n /** Copy shortcut */\n Shortcuts.add({\n name: 'CMD+C',\n handler: (event) => {\n BlockEvents.handleCommandC(event);\n },\n });\n\n /** Copy and cut */\n Shortcuts.add({\n name: 'CMD+X',\n handler: (event) => {\n BlockEvents.handleCommandX(event);\n },\n });\n }\n\n /**\n * Creates Block instance by tool name\n *\n * @param {String} toolName - tools passed in editor config {@link EditorConfig#tools}\n * @param {Object} data - constructor params\n * @param {Object} settings - block settings\n *\n * @return {Block}\n */\n public composeBlock(toolName: string, data: BlockToolData = {}, settings: ToolConfig = {}): Block {\n const toolInstance = this.Editor.Tools.construct(toolName, data) as BlockTool;\n const toolClass = this.Editor.Tools.available[toolName] as BlockToolConstructable;\n const block = new Block(toolName, toolInstance, toolClass, settings, this.Editor.API.methods);\n\n this.bindEvents(block);\n\n return block;\n }\n\n /**\n * Insert new block into _blocks\n *\n * @param {String} toolName — plugin name, by default method inserts initial block type\n * @param {Object} data — plugin data\n * @param {Object} settings - default settings\n * @param {number} index - index where to insert new Block\n * @param {boolean} needToFocus - flag shows if needed to update current Block index\n *\n * @return {Block}\n */\n public insert(\n toolName: string = this.config.initialBlock,\n data: BlockToolData = {},\n settings: ToolConfig = {},\n index: number = this.currentBlockIndex + 1,\n needToFocus: boolean = true,\n ): Block {\n const block = this.composeBlock(toolName, data, settings);\n\n this._blocks[index] = block;\n\n if (needToFocus) {\n this.currentBlockIndex = index;\n }\n\n return block;\n }\n\n /**\n * Insert pasted content. Call onPaste callback after insert.\n *\n * @param {string} toolName\n * @param {PasteEvent} pasteEvent - pasted data\n * @param {boolean} replace - should replace current block\n */\n public paste(\n toolName: string,\n pasteEvent: PasteEvent,\n replace: boolean = false,\n ): Block {\n let block;\n\n if (replace) {\n block = this.replace(toolName);\n } else {\n block = this.insert(toolName);\n }\n\n try {\n block.call('onPaste', pasteEvent);\n } catch (e) {\n _.log(`${toolName}: onPaste callback call is failed`, 'error', e);\n }\n return block;\n }\n\n /**\n * Insert new initial block at passed index\n *\n * @param {number} index - index where Block should be inserted\n * @param {boolean} needToFocus - if true, updates current Block index\n *\n * TODO: Remove method and use insert() with index instead (?)\n *\n * @return {Block} inserted Block\n */\n public insertInitialBlockAtIndex(index: number, needToFocus: boolean = false) {\n const block = this.composeBlock(this.config.initialBlock, {}, {});\n\n this._blocks[index] = block;\n\n if (needToFocus) {\n this.currentBlockIndex = index;\n } else if (index <= this.currentBlockIndex) {\n this.currentBlockIndex++;\n }\n\n return block;\n }\n\n /**\n * Always inserts at the end\n * @return {Block}\n */\n public insertAtEnd(): Block {\n /**\n * Define new value for current block index\n */\n this.currentBlockIndex = this.blocks.length - 1;\n\n /**\n * Insert initial typed block\n */\n return this.insert();\n }\n\n /**\n * Merge two blocks\n * @param {Block} targetBlock - previous block will be append to this block\n * @param {Block} blockToMerge - block that will be merged with target block\n *\n * @return {Promise} - the sequence that can be continued\n */\n public async mergeBlocks(targetBlock: Block, blockToMerge: Block): Promise {\n const blockToMergeIndex = this._blocks.indexOf(blockToMerge);\n\n if (blockToMerge.isEmpty) {\n return;\n }\n\n const blockToMergeData = await blockToMerge.data;\n\n if (!_.isEmpty(blockToMergeData)) {\n await targetBlock.mergeWith(blockToMergeData);\n }\n\n this.removeBlock(blockToMergeIndex);\n this.currentBlockIndex = this._blocks.indexOf(targetBlock);\n }\n\n /**\n * Remove block with passed index or remove last\n * @param {Number|null} index\n */\n public removeBlock(index?: number): void {\n if (index === undefined) {\n index = this.currentBlockIndex;\n }\n this._blocks.remove(index);\n\n if (this.currentBlockIndex >= index) {\n this.currentBlockIndex--;\n }\n\n /**\n * If first Block was removed, insert new Initial Block and set focus on it`s first input\n */\n if (!this.blocks.length) {\n this.currentBlockIndex = -1;\n this.insert();\n return;\n } else if (index === 0) {\n this.currentBlockIndex = 0;\n }\n }\n\n /**\n * Remove only selected Blocks\n * and returns first Block index where started removing...\n * @return number|undefined\n */\n public removeSelectedBlocks(): number|undefined {\n let firstSelectedBlockIndex;\n\n /**\n * Remove selected Blocks from the end\n */\n for (let index = this.blocks.length - 1; index >= 0; index--) {\n if (!this.blocks[index].selected) {\n continue;\n }\n\n this.removeBlock(index);\n firstSelectedBlockIndex = index;\n }\n\n return firstSelectedBlockIndex;\n }\n\n /**\n * Attention!\n * After removing insert new initial typed Block and focus on it\n * Removes all blocks\n */\n public removeAllBlocks(): void {\n for (let index = this.blocks.length - 1; index >= 0; index--) {\n this._blocks.remove(index);\n }\n\n this.currentBlockIndex = -1;\n this.insert();\n this.currentBlock.firstInput.focus();\n }\n\n /**\n * Split current Block\n * 1. Extract content from Caret position to the Block`s end\n * 2. Insert a new Block below current one with extracted content\n *\n * @return {Block}\n */\n public split(): Block {\n const extractedFragment = this.Editor.Caret.extractFragmentFromCaretPosition();\n const wrapper = $.make('div');\n\n wrapper.appendChild(extractedFragment as DocumentFragment);\n\n /**\n * @todo make object in accordance with Tool\n */\n const data = {\n text: $.isEmpty(wrapper) ? '' : wrapper.innerHTML,\n };\n\n /**\n * Renew current Block\n * @type {Block}\n */\n return this.insert(this.config.initialBlock, data);\n }\n\n /**\n * Replace current working block\n *\n * @param {String} toolName — plugin name\n * @param {Object} data — plugin data\n *\n * @return {Block}\n */\n public replace(\n toolName: string = this.config.initialBlock,\n data: BlockToolData = {},\n ): Block {\n const block = this.composeBlock(toolName, data);\n\n this._blocks.insert(this.currentBlockIndex, block, true);\n\n return block;\n }\n\n /**\n * Returns Block by passed index\n * @param {Number} index\n * @return {Block}\n */\n public getBlockByIndex(index): Block {\n return this._blocks[index];\n }\n\n /**\n * Get Block instance by html element\n * @param {Node} element\n * @returns {Block}\n */\n public getBlock(element: HTMLElement): Block {\n if (!$.isElement(element) as boolean) {\n element = element.parentNode as HTMLElement;\n }\n\n const nodes = this._blocks.nodes,\n firstLevelBlock = element.closest(`.${Block.CSS.wrapper}`),\n index = nodes.indexOf(firstLevelBlock as HTMLElement);\n\n if (index >= 0) {\n return this._blocks[index];\n }\n }\n\n /**\n * Remove selection from all Blocks then highlight only Current Block\n */\n public highlightCurrentNode(): void {\n /**\n * Remove previous selected Block's state\n */\n this.clearFocused();\n\n /**\n * Mark current Block as selected\n * @type {boolean}\n */\n this.currentBlock.focused = true;\n }\n\n /**\n * Remove selection from all Blocks\n */\n public clearFocused(): void {\n this.blocks.forEach( (block) => block.focused = false);\n }\n\n /**\n * 1) Find first-level Block from passed child Node\n * 2) Mark it as current\n *\n * @param {Node} childNode - look ahead from this node.\n * @param {string} caretPosition - position where to set caret\n * @throws Error - when passed Node is not included at the Block\n */\n public setCurrentBlockByChildNode(childNode: Node): Block {\n /**\n * If node is Text TextNode\n */\n if (!$.isElement(childNode)) {\n childNode = childNode.parentNode;\n }\n\n const parentFirstLevelBlock = (childNode as HTMLElement).closest(`.${Block.CSS.wrapper}`);\n\n if (parentFirstLevelBlock) {\n /**\n * Update current Block's index\n * @type {number}\n */\n this.currentBlockIndex = this._blocks.nodes.indexOf(parentFirstLevelBlock as HTMLElement);\n return this.currentBlock;\n } else {\n throw new Error('Can not find a Block from this child Node');\n }\n }\n\n /**\n * Return block which contents passed node\n *\n * @param {Node} childNode\n * @return {Block}\n */\n public getBlockByChildNode(childNode: Node): Block {\n /**\n * If node is Text TextNode\n */\n if (!$.isElement(childNode)) {\n childNode = childNode.parentNode;\n }\n\n const firstLevelBlock = (childNode as HTMLElement).closest(`.${Block.CSS.wrapper}`);\n\n return this.blocks.find((block) => block.holder === firstLevelBlock);\n }\n\n /**\n * Swap Blocks Position\n * @param {Number} fromIndex\n * @param {Number} toIndex\n */\n public swap(fromIndex, toIndex): void {\n /** Move up current Block */\n this._blocks.swap(fromIndex, toIndex);\n\n /** Now actual block moved up so that current block index decreased */\n this.currentBlockIndex = toIndex;\n }\n\n /**\n * Sets current Block Index -1 which means unknown\n * and clear highlightings\n */\n public dropPointer(): void {\n this.currentBlockIndex = -1;\n this.clearFocused();\n }\n\n /**\n * Clears Editor\n * @param {boolean} needAddInitialBlock - 1) in internal calls (for example, in api.blocks.render)\n * we don't need to add empty initial block\n * 2) in api.blocks.clear we should add empty block\n */\n public clear(needAddInitialBlock: boolean = false): void {\n this._blocks.removeAll();\n this.dropPointer();\n\n if (needAddInitialBlock) {\n this.insert(this.config.initialBlock);\n }\n\n /**\n * Add empty modifier\n */\n this.Editor.UI.checkEmptiness();\n }\n\n /**\n * Bind Events\n * @param {Object} block\n */\n private bindEvents(block: Block): void {\n const {BlockEvents, Listeners} = this.Editor;\n\n Listeners.on(block.holder, 'keydown', (event) => BlockEvents.keydown(event as KeyboardEvent), true);\n Listeners.on(block.holder, 'mouseup', (event) => BlockEvents.mouseUp(event));\n Listeners.on(block.holder, 'mousedown', (event: MouseEvent) => BlockEvents.mouseDown(event));\n Listeners.on(block.holder, 'keyup', (event) => BlockEvents.keyup(event));\n Listeners.on(block.holder, 'dragover', (event) => BlockEvents.dragOver(event as DragEvent));\n Listeners.on(block.holder, 'dragleave', (event) => BlockEvents.dragLeave(event as DragEvent));\n }\n}\n","/**\n * @class BlockSelection\n * @classdesc Manages Block selection with shortcut CMD+A\n *\n * @module BlockSelection\n * @version 1.0.0\n */\nimport Module from '../__module';\nimport Block from '../block';\nimport _ from '../utils';\nimport $ from '../dom';\n\nimport SelectionUtils from '../selection';\n\nexport default class BlockSelection extends Module {\n\n /**\n * Sanitizer Config\n * @return {SanitizerConfig}\n */\n private get sanitizerConfig() {\n return {\n p: {},\n h1: {},\n h2: {},\n h3: {},\n h4: {},\n h5: {},\n h6: {},\n ol: {},\n ul: {},\n li: {},\n br: true,\n img: {\n src: true,\n width: true,\n height: true,\n },\n a: {\n href: true,\n },\n b: {},\n i: {},\n u: {},\n };\n }\n\n /**\n * Flag that identifies all Blocks selection\n * @return {boolean}\n */\n public get allBlocksSelected(): boolean {\n const {BlockManager} = this.Editor;\n\n return BlockManager.blocks.every((block) => block.selected === true);\n }\n\n /**\n * Set selected all blocks\n * @param {boolean} state\n */\n public set allBlocksSelected(state: boolean) {\n const {BlockManager} = this.Editor;\n\n BlockManager.blocks.forEach((block) => block.selected = state);\n }\n\n /**\n * Flag that identifies any Block selection\n * @return {boolean}\n */\n public get anyBlockSelected(): boolean {\n const {BlockManager} = this.Editor;\n\n return BlockManager.blocks.some((block) => block.selected === true);\n }\n\n /**\n * Return selected Blocks array\n * @return {Block[]}\n */\n public get selectedBlocks(): Block[] {\n return this.Editor.BlockManager.blocks.filter((block: Block) => block.selected);\n }\n\n /**\n * Flag used to define block selection\n * First CMD+A defines it as true and then second CMD+A selects all Blocks\n * @type {boolean}\n */\n private needToSelectAll: boolean = false;\n\n /**\n * Flag used to define native input selection\n * In this case we allow double CMD+A to select Block\n * @type {boolean}\n */\n private nativeInputSelected: boolean = false;\n\n /**\n * Flag identifies any input selection\n * That means we can select whole Block\n * @type {boolean}\n */\n private readyToBlockSelection: boolean = false;\n\n /**\n * SelectionUtils instance\n * @type {SelectionUtils}\n */\n private selection: SelectionUtils;\n\n /**\n * Module Preparation\n * Registers Shortcuts CMD+A and CMD+C\n * to select all and copy them\n */\n public prepare(): void {\n const {Shortcuts} = this.Editor;\n\n /** Selection shortcut */\n Shortcuts.add({\n name: 'CMD+A',\n handler: (event) => {\n const {BlockManager} = this.Editor;\n /**\n * When one page consist of two or more EditorJS instances\n * Shortcut module tries to handle all events. Thats why Editor's selection works inside the target Editor, but\n * for others error occurs because nothing to select.\n *\n * Prevent such actions if focus is not inside the Editor\n */\n if (!BlockManager.currentBlock) {\n return;\n }\n\n this.handleCommandA(event);\n },\n });\n\n this.selection = new SelectionUtils();\n }\n\n /**\n * Remove selection of Block\n * @param {number?} index - Block index according to the BlockManager's indexes\n */\n public unSelectBlockByIndex(index?) {\n const {BlockManager} = this.Editor;\n\n let block;\n\n if (isNaN(index)) {\n block = BlockManager.currentBlock;\n } else {\n block = BlockManager.getBlockByIndex(index);\n }\n\n block.selected = false;\n }\n\n /**\n * Clear selection from Blocks\n *\n * @param {Event} reason - event caused clear of selection\n * @param {boolean} restoreSelection - if true, restore saved selection\n */\n public clearSelection(reason?: Event, restoreSelection = false) {\n const {BlockManager, Caret, RectangleSelection} = this.Editor;\n\n this.needToSelectAll = false;\n this.nativeInputSelected = false;\n this.readyToBlockSelection = false;\n\n /**\n * If reason caused clear of the selection was printable key and any block is selected,\n * remove selected blocks and insert pressed key\n */\n if (this.anyBlockSelected && reason && reason instanceof KeyboardEvent && _.isPrintableKey(reason.keyCode)) {\n const indexToInsert = BlockManager.removeSelectedBlocks();\n\n BlockManager.insertInitialBlockAtIndex(indexToInsert, true);\n Caret.setToBlock(BlockManager.currentBlock);\n _.delay(() => {\n Caret.insertContentAtCaretPosition(reason.key);\n }, 20)();\n }\n\n this.Editor.CrossBlockSelection.clear(reason);\n\n if (!this.anyBlockSelected || RectangleSelection.isRectActivated()) {\n this.Editor.RectangleSelection.clearSelection();\n return;\n }\n\n /**\n * Restore selection when Block is already selected\n * but someone tries to write something.\n */\n if (restoreSelection) {\n this.selection.restore();\n }\n\n /** Now all blocks cleared */\n this.allBlocksSelected = false;\n }\n\n /**\n * Reduce each Block and copy its content\n */\n public copySelectedBlocks(): void {\n const fakeClipboard = $.make('div');\n\n this.selectedBlocks.forEach((block) => {\n /**\n * Make

    tag that holds clean HTML\n */\n const cleanHTML = this.Editor.Sanitizer.clean(block.holder.innerHTML, this.sanitizerConfig);\n const fragment = $.make('p');\n\n fragment.innerHTML = cleanHTML;\n fakeClipboard.appendChild(fragment);\n });\n\n _.copyTextToClipboard(fakeClipboard.innerHTML);\n }\n\n /**\n * select Block\n * @param {number?} index - Block index according to the BlockManager's indexes\n */\n public selectBlockByIndex(index?) {\n const {BlockManager} = this.Editor;\n\n /**\n * Remove previous focused Block's state\n */\n BlockManager.clearFocused();\n\n let block;\n\n if (isNaN(index)) {\n block = BlockManager.currentBlock;\n } else {\n block = BlockManager.getBlockByIndex(index);\n }\n\n /** Save selection */\n this.selection.save();\n SelectionUtils.get()\n .removeAllRanges();\n\n block.selected = true;\n }\n\n /**\n * First CMD+A selects all input content by native behaviour,\n * next CMD+A keypress selects all blocks\n *\n * @param {KeyboardEvent} event\n */\n private handleCommandA(event: KeyboardEvent): void {\n this.Editor.RectangleSelection.clearSelection();\n\n /** allow default selection on native inputs */\n if ($.isNativeInput(event.target) && !this.nativeInputSelected) {\n this.nativeInputSelected = true;\n return;\n }\n\n const workingBlock = this.Editor.BlockManager.getBlock(event.target as HTMLElement);\n const inputs = workingBlock.inputs;\n\n /**\n * If Block has more than one editable element allow native selection\n * Second cmd+a will select whole Block\n */\n if (inputs.length > 1 && !this.readyToBlockSelection) {\n this.readyToBlockSelection = true;\n return;\n }\n\n if (this.needToSelectAll) {\n /** Prevent default selection */\n event.preventDefault();\n\n /**\n * Save selection\n * Will be restored when closeSelection fired\n */\n this.selection.save();\n\n /**\n * Remove Ranges from Selection\n */\n SelectionUtils.get()\n .removeAllRanges();\n\n this.selectAllBlocks();\n this.needToSelectAll = false;\n\n /**\n * Close ConversionToolbar when all Blocks selected\n */\n this.Editor.ConversionToolbar.close();\n } else {\n this.needToSelectAll = true;\n }\n }\n\n /**\n * Select All Blocks\n * Each Block has selected setter that makes Block copyable\n */\n private selectAllBlocks() {\n this.allBlocksSelected = true;\n }\n}\n","/**\n * @class Caret\n * @classdesc Contains methods for working Caret\n *\n * Uses Range methods to manipulate with caret\n *\n * @module Caret\n *\n * @version 2.0.0\n */\n\nimport Selection from '../selection';\nimport Module from '../__module';\nimport Block from '../block';\nimport $ from '../dom';\nimport _ from '../utils';\n\n/**\n * @typedef {Caret} Caret\n */\nexport default class Caret extends Module {\n\n /**\n * Allowed caret positions in input\n *\n * @static\n * @returns {{START: string, END: string, DEFAULT: string}}\n */\n public get positions(): {START: string, END: string, DEFAULT: string} {\n return {\n START: 'start',\n END: 'end',\n DEFAULT: 'default',\n };\n }\n\n /**\n * Elements styles that can be useful for Caret Module\n */\n private static get CSS(): {shadowCaret: string} {\n return {\n shadowCaret: 'cdx-shadow-caret',\n };\n }\n\n /**\n * Get's deepest first node and checks if offset is zero\n * @return {boolean}\n */\n public get isAtStart(): boolean {\n const selection = Selection.get();\n const firstNode = $.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput);\n let focusNode = selection.focusNode;\n\n /** In case lastNode is native input */\n if ($.isNativeInput(firstNode)) {\n return (firstNode as HTMLInputElement).selectionEnd === 0;\n }\n\n /** Case when selection have been cleared programmatically, for example after CBS */\n if (!selection.anchorNode) {\n return false;\n }\n\n /**\n * Workaround case when caret in the text like \" |Hello!\"\n * selection.anchorOffset is 1, but real caret visible position is 0\n * @type {number}\n */\n\n let firstLetterPosition = focusNode.textContent.search(/\\S/);\n\n if (firstLetterPosition === -1) { // empty text\n firstLetterPosition = 0;\n }\n\n /**\n * If caret was set by external code, it might be set to text node wrapper.\n *

    <---- Selection references to
    instead of text node\n *\n * In this case, anchor node has ELEMENT_NODE node type.\n * Anchor offset shows amount of children between start of the element and caret position.\n *\n * So we use child with focusOffset index as new anchorNode.\n */\n let focusOffset = selection.focusOffset;\n if (focusNode.nodeType !== Node.TEXT_NODE && focusNode.childNodes.length) {\n if (focusNode.childNodes[focusOffset]) {\n focusNode = focusNode.childNodes[focusOffset];\n focusOffset = 0;\n } else {\n focusNode = focusNode.childNodes[focusOffset - 1];\n focusOffset = focusNode.textContent.length;\n }\n }\n\n /**\n * In case of\n *
    \n *

    <-- first (and deepest) node is \n * |adaddad <-- focus node\n *
    \n */\n if ($.isLineBreakTag(firstNode as HTMLElement) || $.isEmpty(firstNode)) {\n const leftSiblings = this.getHigherLevelSiblings(focusNode as HTMLElement, 'left');\n const nothingAtLeft = leftSiblings.every((node) => {\n /**\n * Workaround case when block starts with several
    's (created by SHIFT+ENTER)\n * @see https://github.com/codex-team/editor.js/issues/726\n * We need to allow to delete such linebreaks, so in this case caret IS NOT AT START\n */\n const regularLineBreak = $.isLineBreakTag(node);\n /**\n * Workaround SHIFT+ENTER in Safari, that creates

    instead of
    \n */\n const lineBreakInSafari = node.children.length === 1 && $.isLineBreakTag(node.children[0] as HTMLElement);\n const isLineBreak = regularLineBreak || lineBreakInSafari;\n\n return $.isEmpty(node) && !isLineBreak;\n });\n\n if (nothingAtLeft && focusOffset === firstLetterPosition) {\n return true;\n }\n }\n\n /**\n * We use <= comparison for case:\n * \"| Hello\" <--- selection.anchorOffset is 0, but firstLetterPosition is 1\n */\n return firstNode === null || focusNode === firstNode && focusOffset <= firstLetterPosition;\n }\n\n /**\n * Get's deepest last node and checks if offset is last node text length\n * @return {boolean}\n */\n public get isAtEnd(): boolean {\n const selection = Selection.get();\n let focusNode = selection.focusNode;\n\n const lastNode = $.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput, true);\n\n /** In case lastNode is native input */\n if ($.isNativeInput(lastNode)) {\n return (lastNode as HTMLInputElement).selectionEnd === (lastNode as HTMLInputElement).value.length;\n }\n\n /** Case when selection have been cleared programmatically, for example after CBS */\n if (!selection.focusNode) {\n return false;\n }\n\n /**\n * If caret was set by external code, it might be set to text node wrapper.\n *
    hello|
    <---- Selection references to
    instead of text node\n *\n * In this case, anchor node has ELEMENT_NODE node type.\n * Anchor offset shows amount of children between start of the element and caret position.\n *\n * So we use child with anchofocusOffset - 1 as new focusNode.\n */\n let focusOffset = selection.focusOffset;\n if (focusNode.nodeType !== Node.TEXT_NODE && focusNode.childNodes.length) {\n if (focusNode.childNodes[focusOffset - 1]) {\n focusNode = focusNode.childNodes[focusOffset - 1];\n focusOffset = focusNode.textContent.length;\n } else {\n focusNode = focusNode.childNodes[0];\n focusOffset = 0;\n }\n }\n\n /**\n * In case of\n *
    \n * adaddad| <-- anchor node\n *

    <-- first (and deepest) node is \n *
    \n */\n if ($.isLineBreakTag(lastNode as HTMLElement) || $.isEmpty(lastNode)) {\n const rightSiblings = this.getHigherLevelSiblings(focusNode as HTMLElement, 'right');\n const nothingAtRight = rightSiblings.every((node, i) => {\n /**\n * If last right sibling is BR isEmpty returns false, but there actually nothing at right\n */\n const isLastBR = i === rightSiblings.length - 1 && $.isLineBreakTag(node as HTMLElement);\n\n return (isLastBR) || $.isEmpty(node) && !$.isLineBreakTag(node);\n });\n\n if (nothingAtRight && focusOffset === focusNode.textContent.length) {\n return true;\n }\n }\n\n /**\n * Workaround case:\n * hello | <--- anchorOffset will be 5, but textContent.length will be 6.\n * Why not regular .trim():\n * in case of ' hello |' trim() will also remove space at the beginning, so length will be lower than anchorOffset\n */\n const rightTrimmedText = lastNode.textContent.replace(/\\s+$/, '');\n\n /**\n * We use >= comparison for case:\n * \"Hello |\" <--- selection.anchorOffset is 7, but rightTrimmedText is 6\n */\n return focusNode === lastNode && focusOffset >= rightTrimmedText.length;\n }\n\n /**\n * Method gets Block instance and puts caret to the text node with offset\n * There two ways that method applies caret position:\n * - first found text node: sets at the beginning, but you can pass an offset\n * - last found text node: sets at the end of the node. Also, you can customize the behaviour\n *\n * @param {Block} block - Block class\n * @param {String} position - position where to set caret.\n * If default - leave default behaviour and apply offset if it's passed\n * @param {Number} offset - caret offset regarding to the text node\n */\n public setToBlock(block: Block, position: string = this.positions.DEFAULT, offset: number = 0): void {\n const {BlockManager} = this.Editor;\n let element;\n\n switch (position) {\n case this.positions.START:\n element = block.firstInput;\n break;\n case this.positions.END:\n element = block.lastInput;\n break;\n default:\n element = block.currentInput;\n }\n\n if (!element) {\n return;\n }\n\n const nodeToSet = $.getDeepestNode(element, position === this.positions.END);\n const contentLength = $.getContentLength(nodeToSet);\n\n switch (true) {\n case position === this.positions.START:\n offset = 0;\n break;\n case position === this.positions.END:\n case offset > contentLength:\n offset = contentLength;\n break;\n }\n\n /**\n * @todo try to fix via Promises or use querySelectorAll to not to use timeout\n */\n _.delay( () => {\n this.set(nodeToSet as HTMLElement, offset);\n }, 20)();\n\n BlockManager.setCurrentBlockByChildNode(block.holder);\n BlockManager.currentBlock.currentInput = element;\n }\n\n /**\n * Set caret to the current input of current Block.\n *\n * @param {HTMLElement} input - input where caret should be set\n * @param {String} position - position of the caret.\n * If default - leave default behaviour and apply offset if it's passed\n * @param {number} offset - caret offset regarding to the text node\n */\n public setToInput(input: HTMLElement, position: string = this.positions.DEFAULT, offset: number = 0): void {\n const {currentBlock} = this.Editor.BlockManager;\n const nodeToSet = $.getDeepestNode(input);\n\n switch (position) {\n case this.positions.START:\n this.set(nodeToSet as HTMLElement, 0);\n break;\n\n case this.positions.END:\n const contentLength = $.getContentLength(nodeToSet);\n\n this.set(nodeToSet as HTMLElement, contentLength);\n break;\n\n default:\n if (offset) {\n this.set(nodeToSet as HTMLElement, offset);\n }\n }\n\n currentBlock.currentInput = input;\n }\n\n /**\n * Creates Document Range and sets caret to the element with offset\n * @param {HTMLElement} element - target node.\n * @param {Number} offset - offset\n */\n public set(element: HTMLElement, offset: number = 0): void {\n const range = document.createRange(),\n selection = Selection.get();\n\n /** if found deepest node is native input */\n if ($.isNativeInput(element)) {\n if (!$.canSetCaret(element)) {\n return;\n }\n\n element.focus();\n (element as HTMLInputElement).selectionStart = (element as HTMLInputElement).selectionEnd = offset;\n return;\n }\n\n range.setStart(element, offset);\n range.setEnd(element, offset);\n\n selection.removeAllRanges();\n selection.addRange(range);\n\n /** If new cursor position is not visible, scroll to it */\n const {top, bottom} = element.nodeType === Node.ELEMENT_NODE\n ? element.getBoundingClientRect()\n : range.getBoundingClientRect();\n const {innerHeight} = window;\n\n if (top < 0) { window.scrollBy(0, top); }\n if (bottom > innerHeight) { window.scrollBy(0, bottom - innerHeight); }\n }\n /**\n * Set Caret to the last Block\n * If last block is not empty, append another empty block\n */\n public setToTheLastBlock(): void {\n const lastBlock = this.Editor.BlockManager.lastBlock;\n\n if (!lastBlock) {\n return;\n }\n\n /**\n * If last block is empty and it is an initialBlock, set to that.\n * Otherwise, append new empty block and set to that\n */\n if (this.Editor.Tools.isInitial(lastBlock.tool) && lastBlock.isEmpty) {\n this.setToBlock(lastBlock);\n } else {\n const newBlock = this.Editor.BlockManager.insertAtEnd();\n\n this.setToBlock(newBlock);\n }\n }\n\n /**\n * Extract content fragment of current Block from Caret position to the end of the Block\n */\n public extractFragmentFromCaretPosition(): void|DocumentFragment {\n const selection = Selection.get();\n\n if (selection.rangeCount) {\n const selectRange = selection.getRangeAt(0);\n const currentBlockInput = this.Editor.BlockManager.currentBlock.currentInput;\n\n selectRange.deleteContents();\n\n if (currentBlockInput) {\n const range = selectRange.cloneRange();\n\n range.selectNodeContents(currentBlockInput);\n range.setStart(selectRange.endContainer, selectRange.endOffset);\n return range.extractContents();\n }\n }\n }\n\n /**\n * Set's caret to the next Block or Tool`s input\n * Before moving caret, we should check if caret position is at the end of Plugins node\n * Using {@link Dom#getDeepestNode} to get a last node and match with current selection\n *\n * @param {Boolean} force - force navigation even if caret is not at the end\n *\n * @return {Boolean}\n */\n public navigateNext(force: boolean = false): boolean {\n const {currentBlock, nextContentfulBlock} = this.Editor.BlockManager;\n const {nextInput} = currentBlock;\n\n if (!nextContentfulBlock && !nextInput) {\n return false;\n }\n\n if (force || this.isAtEnd) {\n /** If next Tool`s input exists, focus on it. Otherwise set caret to the next Block */\n if (!nextInput) {\n this.setToBlock(nextContentfulBlock, this.positions.START);\n } else {\n this.setToInput(nextInput, this.positions.START);\n }\n\n return true;\n }\n\n return false;\n }\n\n /**\n * Set's caret to the previous Tool`s input or Block\n * Before moving caret, we should check if caret position is start of the Plugins node\n * Using {@link Dom#getDeepestNode} to get a last node and match with current selection\n *\n * @param {Boolean} force - force navigation even if caret is not at the start\n *\n * @return {Boolean}\n */\n public navigatePrevious(force: boolean = false): boolean {\n const {currentBlock, previousContentfulBlock} = this.Editor.BlockManager;\n\n if (!currentBlock) {\n return false;\n }\n\n const {previousInput} = currentBlock;\n\n if (!previousContentfulBlock && !previousInput) {\n return false;\n }\n\n if (force || this.isAtStart) {\n /** If previous Tool`s input exists, focus on it. Otherwise set caret to the previous Block */\n if (!previousInput) {\n this.setToBlock( previousContentfulBlock, this.positions.END );\n } else {\n this.setToInput(previousInput, this.positions.END);\n }\n return true;\n }\n\n return false;\n }\n\n /**\n * Inserts shadow element after passed element where caret can be placed\n * @param {Node} element\n */\n public createShadow(element): void {\n const shadowCaret = document.createElement('span');\n\n shadowCaret.classList.add(Caret.CSS.shadowCaret);\n element.insertAdjacentElement('beforeEnd', shadowCaret);\n }\n\n /**\n * Restores caret position\n * @param {HTMLElement} element\n */\n public restoreCaret(element: HTMLElement): void {\n const shadowCaret = element.querySelector(`.${Caret.CSS.shadowCaret}`);\n\n if (!shadowCaret) {\n return;\n }\n\n /**\n * After we set the caret to the required place\n * we need to clear shadow caret\n *\n * - make new range\n * - select shadowed span\n * - use extractContent to remove it from DOM\n */\n const sel = new Selection();\n\n sel.expandToTag(shadowCaret as HTMLElement);\n\n setTimeout(() => {\n const newRange = document.createRange();\n\n newRange.selectNode(shadowCaret);\n newRange.extractContents();\n }, 50);\n }\n\n /**\n * Inserts passed content at caret position\n *\n * @param {string} content - content to insert\n */\n public insertContentAtCaretPosition(content: string): void {\n const fragment = document.createDocumentFragment();\n const wrapper = document.createElement('div');\n const selection = Selection.get();\n const range = Selection.range;\n\n wrapper.innerHTML = content;\n\n Array.from(wrapper.childNodes).forEach((child: Node) => fragment.appendChild(child));\n\n const lastChild = fragment.lastChild;\n\n range.deleteContents();\n range.insertNode(fragment);\n\n /** Cross-browser caret insertion */\n const newRange = document.createRange();\n\n newRange.setStart(lastChild, lastChild.textContent.length);\n\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n\n /**\n * Get all first-level (first child of [contenteditabel]) siblings from passed node\n * Then you can check it for emptiness\n *\n * @example\n *
    \n *\n * @return {Element[]}\n */\n private getHigherLevelSiblings(from: HTMLElement, direction?: string): HTMLElement[] {\n let current = from;\n const siblings = [];\n\n /**\n * Find passed node's firs-level parent (in example - blockquote)\n */\n while (current.parentNode && (current.parentNode as HTMLElement).contentEditable !== 'true') {\n current = current.parentNode as HTMLElement;\n }\n\n const sibling = direction === 'left' ? 'previousSibling' : 'nextSibling';\n\n /**\n * Find all left/right siblings\n */\n while (current[sibling]) {\n current = current[sibling] as HTMLElement;\n siblings.push(current);\n }\n\n return siblings;\n }\n}\n","import Module from '../__module';\nimport Block from '../block';\nimport SelectionUtils from '../selection';\nimport _ from '../utils';\n\nexport default class CrossBlockSelection extends Module {\n /**\n * Block where selection is started\n */\n private firstSelectedBlock: Block;\n\n /**\n * Last selected Block\n */\n private lastSelectedBlock: Block;\n\n /**\n * Sets up listeners\n *\n * @param {MouseEvent} event - mouse down event\n */\n public watchSelection(event: MouseEvent): void {\n if (event.button !== _.mouseButtons.LEFT) {\n return;\n }\n\n const {BlockManager, UI, Listeners} = this.Editor;\n\n this.firstSelectedBlock = BlockManager.getBlock(event.target as HTMLElement);\n this.lastSelectedBlock = this.firstSelectedBlock;\n\n Listeners.on(document, 'mouseover', this.onMouseOver);\n Listeners.on(document, 'mouseup', this.onMouseUp);\n }\n\n /**\n * Change selection state of the next Block\n * Used for CBS via Shift + arrow keys\n *\n * @param {boolean} next - if true, toggle next block. Previous otherwise\n */\n public toggleBlockSelectedState(next: boolean = true): void {\n const {BlockManager} = this.Editor;\n\n if (!this.lastSelectedBlock) {\n this.lastSelectedBlock = this.firstSelectedBlock = BlockManager.currentBlock;\n }\n\n if (this.firstSelectedBlock === this.lastSelectedBlock) {\n this.firstSelectedBlock.selected = true;\n SelectionUtils.get().removeAllRanges();\n }\n\n const nextBlockIndex = BlockManager.blocks.indexOf(this.lastSelectedBlock) + (next ? 1 : -1);\n const nextBlock = BlockManager.blocks[nextBlockIndex];\n\n if (!nextBlock) {\n return;\n }\n\n if (this.lastSelectedBlock.selected !== nextBlock.selected) {\n nextBlock.selected = true;\n } else {\n this.lastSelectedBlock.selected = false;\n }\n\n this.lastSelectedBlock = nextBlock;\n }\n\n /**\n * Clear saved state\n *\n * @param {Event} reason - event caused clear of selection\n */\n public clear(reason?: Event) {\n const {BlockManager, BlockSelection, Caret} = this.Editor;\n const fIndex = BlockManager.blocks.indexOf(this.firstSelectedBlock);\n const lIndex = BlockManager.blocks.indexOf(this.lastSelectedBlock);\n\n if (BlockSelection.anyBlockSelected && fIndex > -1 && lIndex > -1) {\n if (reason && reason instanceof KeyboardEvent) {\n /**\n * Set caret depending on pressed key if pressed key is an arrow.\n */\n switch (reason.keyCode) {\n case _.keyCodes.DOWN:\n case _.keyCodes.RIGHT:\n Caret.setToBlock(BlockManager.blocks[Math.max(fIndex, lIndex)], Caret.positions.END);\n break;\n\n case _.keyCodes.UP:\n case _.keyCodes.LEFT:\n Caret.setToBlock(BlockManager.blocks[Math.min(fIndex, lIndex)], Caret.positions.START);\n break;\n default:\n Caret.setToBlock(BlockManager.blocks[Math.max(fIndex, lIndex)], Caret.positions.END);\n }\n } else {\n /**\n * By default set caret at the end of the last selected block\n */\n Caret.setToBlock(BlockManager.blocks[Math.max(fIndex, lIndex)], Caret.positions.END);\n }\n }\n\n this.firstSelectedBlock = this.lastSelectedBlock = null;\n }\n\n /**\n * Mouse up event handler.\n * Removes the listeners\n */\n private onMouseUp = (): void => {\n const {Listeners} = this.Editor;\n\n Listeners.off(document, 'mouseover', this.onMouseOver);\n Listeners.off(document, 'mouseup', this.onMouseUp);\n }\n\n /**\n * Mouse over event handler\n * Gets target and related blocks and change selected state for blocks in between\n *\n * @param {MouseEvent} event\n */\n private onMouseOver = (event: MouseEvent): void => {\n const {BlockManager} = this.Editor;\n\n const relatedBlock = BlockManager.getBlockByChildNode(event.relatedTarget as Node) || this.lastSelectedBlock;\n const targetBlock = BlockManager.getBlockByChildNode(event.target as Node);\n\n if (!relatedBlock || !targetBlock) {\n return;\n }\n\n if (targetBlock === relatedBlock) {\n return;\n }\n\n if (relatedBlock === this.firstSelectedBlock) {\n SelectionUtils.get().removeAllRanges();\n\n relatedBlock.selected = true;\n targetBlock.selected = true;\n return;\n }\n\n if (targetBlock === this.firstSelectedBlock) {\n relatedBlock.selected = false;\n targetBlock.selected = false;\n return;\n }\n\n this.toggleBlocksSelectedState(relatedBlock, targetBlock);\n this.lastSelectedBlock = targetBlock;\n }\n\n /**\n * Change blocks selection state between passed two blocks.\n *\n * @param {Block} firstBlock\n * @param {Block} lastBlock\n */\n private toggleBlocksSelectedState(firstBlock: Block, lastBlock: Block): void {\n const {BlockManager} = this.Editor;\n const fIndex = BlockManager.blocks.indexOf(firstBlock);\n const lIndex = BlockManager.blocks.indexOf(lastBlock);\n\n /**\n * If first and last block have the different selection state\n * it means we should't toggle selection of the first selected block.\n * In the other case we shouldn't toggle the last selected block.\n */\n const shouldntSelectFirstBlock = firstBlock.selected !== lastBlock.selected;\n\n for (let i = Math.min(fIndex, lIndex); i <= Math.max(fIndex, lIndex); i++) {\n const block = BlockManager.blocks[i];\n\n if (\n block !== this.firstSelectedBlock &&\n block !== (shouldntSelectFirstBlock ? firstBlock : lastBlock)\n ) {\n BlockManager.blocks[i].selected = !BlockManager.blocks[i].selected;\n }\n }\n }\n}\n","import SelectionUtils from '../selection';\n\nimport Module from '../__module';\nexport default class DragNDrop extends Module {\n\n /**\n * If drag has been started at editor, we save it\n *\n * @type Boolean\n * @private\n */\n private isStartedAtEditor = false;\n\n /**\n * Bind events\n *\n * @private\n */\n public prepare(): void {\n this.bindEvents();\n }\n\n /**\n * Add drag events listeners to editor zone\n * @private\n */\n private bindEvents(): void {\n this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'drop', this.processDrop, true);\n\n this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'dragstart', (dragEvent: DragEvent) => {\n\n if (SelectionUtils.isAtEditor && !SelectionUtils.isCollapsed) {\n this.isStartedAtEditor = true;\n }\n\n this.Editor.InlineToolbar.close();\n });\n\n /* Prevent default browser behavior to allow drop on non-contenteditable elements */\n this.Editor.Listeners.on(this.Editor.UI.nodes.holder, 'dragover', (e) => e.preventDefault(), true);\n }\n\n /**\n * Handle drop event\n *\n * @param {DragEvent} dropEvent\n */\n private processDrop = async (dropEvent: DragEvent): Promise => {\n const {\n BlockManager,\n Caret,\n Paste,\n } = this.Editor;\n\n dropEvent.preventDefault();\n\n BlockManager.blocks.forEach((block) => block.dropTarget = false);\n\n if (SelectionUtils.isAtEditor && !SelectionUtils.isCollapsed && this.isStartedAtEditor) {\n document.execCommand('delete');\n }\n\n this.isStartedAtEditor = false;\n\n /**\n * Try to set current block by drop target.\n * If drop target (error will be thrown) is not part of the Block, set last Block as current.\n */\n try {\n const targetBlock = BlockManager.setCurrentBlockByChildNode(dropEvent.target as Node);\n\n this.Editor.Caret.setToBlock(targetBlock, Caret.positions.END);\n } catch (e) {\n const targetBlock = BlockManager.setCurrentBlockByChildNode(BlockManager.lastBlock.holder);\n\n this.Editor.Caret.setToBlock(targetBlock, Caret.positions.END);\n }\n\n Paste.processDataTransfer(dropEvent.dataTransfer, true);\n }\n}\n","import Module from '../__module';\n\n/**\n * @module eventDispatcher\n *\n * Has two important methods:\n * - {Function} on - appends subscriber to the event. If event doesn't exist - creates new one\n * - {Function} emit - fires all subscribers with data\n * - {Function off - unsubsribes callback\n *\n * @version 1.0.0\n *\n * @typedef {Events} Events\n * @property {Object} subscribers - all subscribers grouped by event name\n */\nexport default class Events extends Module {\n\n /**\n * Object with events` names as key and array of callback functions as value\n * @type {{}}\n */\n private subscribers: {[name: string]: Array<(data?: any) => any>} = {};\n\n /**\n * Subscribe any event on callback\n *\n * @param {String} eventName - event name\n * @param {Function} callback - subscriber\n */\n public on(eventName: string, callback: (data: any) => any) {\n if (!(eventName in this.subscribers)) {\n this.subscribers[eventName] = [];\n }\n\n // group by events\n this.subscribers[eventName].push(callback);\n }\n\n /**\n * Emit callbacks with passed data\n *\n * @param {String} eventName - event name\n * @param {Object} data - subscribers get this data when they were fired\n */\n public emit(eventName: string, data?: any): void {\n if (!this.subscribers[eventName]) {\n return;\n }\n\n this.subscribers[eventName].reduce((previousData, currentHandler) => {\n const newData = currentHandler(previousData);\n\n return newData ? newData : previousData;\n }, data);\n }\n\n /**\n * Unsubsribe callback from event\n *\n * @param eventName\n * @param callback\n */\n public off(eventName: string, callback: (data: any) => void): void {\n for (let i = 0; i < this.subscribers[eventName].length; i++) {\n if (this.subscribers[eventName][i] === callback) {\n delete this.subscribers[eventName][i];\n break;\n }\n }\n }\n\n /**\n * Destroyer\n * clears subsribers list\n */\n public destroy(): void {\n this.subscribers = null;\n }\n}\n","import Module from '../__module';\n\n/**\n * Event listener information\n */\nexport interface ListenerData {\n /**\n * Element where to listen to dispatched events\n */\n element: EventTarget;\n\n /**\n * Event to listen\n */\n eventType: string;\n\n /**\n * Event handler\n *\n * @param {Event} event\n */\n handler: (event: Event) => void;\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n */\n options: boolean | AddEventListenerOptions;\n}\n\n/**\n * Editor.js Listeners module\n *\n * @module Listeners\n *\n * Module-decorator for event listeners assignment\n *\n * @author Codex Team\n * @version 2.0.0\n */\n\n/**\n * @typedef {Listeners} Listeners\n * @property {Array} allListeners\n */\nexport default class Listeners extends Module {\n\n /**\n * Stores all listeners data to find/remove/process it\n * @type {ListenerData[]}\n */\n private allListeners: ListenerData[] = [];\n\n /**\n * Assigns event listener on element\n *\n * @param {EventTarget} element - DOM element that needs to be listened\n * @param {String} eventType - event type\n * @param {Function} handler - method that will be fired on event\n * @param {Boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once}\n */\n public on(\n element: EventTarget,\n eventType: string,\n handler: (event: Event) => void,\n options: boolean | AddEventListenerOptions = false,\n ): void {\n const assignedEventData = {\n element,\n eventType,\n handler,\n options,\n };\n\n const alreadyExist = this.findOne(element, eventType, handler);\n\n if (alreadyExist) { return; }\n\n this.allListeners.push(assignedEventData);\n element.addEventListener(eventType, handler, options);\n }\n\n /**\n * Removes event listener from element\n *\n * @param {EventTarget} element - DOM element that we removing listener\n * @param {String} eventType - event type\n * @param {Function} handler - remove handler, if element listens several handlers on the same event type\n * @param {Boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once}\n */\n public off(\n element: EventTarget,\n eventType: string,\n handler?: (event: Event) => void,\n options?: boolean | AddEventListenerOptions,\n ): void {\n const existingListeners = this.findAll(element, eventType, handler);\n\n existingListeners.forEach((listener, i) => {\n const index = this.allListeners.indexOf(existingListeners[i]);\n\n if (index > 0) {\n this.allListeners.splice(index, 1);\n\n listener.element.removeEventListener(listener.eventType, listener.handler, listener.options);\n }\n });\n\n }\n\n /**\n * @param {EventTarget} element\n * @param {String} eventType\n * @param {Function} handler\n * @return {ListenerData|null}\n */\n public findOne(element: EventTarget, eventType?: string, handler?: (event: Event) => void): ListenerData {\n const foundListeners = this.findAll(element, eventType, handler);\n\n return foundListeners.length > 0 ? foundListeners[0] : null;\n }\n\n /**\n * @param {EventTarget} element\n * @param {String} eventType\n * @param {Function} handler\n * @return {ListenerData[]}\n */\n public findAll(element: EventTarget, eventType?: string, handler?: (event: Event) => void): ListenerData[] {\n let found;\n const foundByEventTargets = element ? this.findByEventTarget(element) : [];\n\n if (element && eventType && handler) {\n found = foundByEventTargets.filter( (event) => event.eventType === eventType && event.handler === handler );\n } else if (element && eventType) {\n found = foundByEventTargets.filter( (event) => event.eventType === eventType);\n } else {\n found = foundByEventTargets;\n }\n\n return found;\n }\n\n /**\n * Removes all listeners\n */\n public removeAll(): void {\n this.allListeners.map( (current) => {\n current.element.removeEventListener(current.eventType, current.handler);\n });\n\n this.allListeners = [];\n }\n\n /**\n * Search method: looks for listener by passed element\n * @param {EventTarget} element - searching element\n * @returns {Array} listeners that found on element\n */\n private findByEventTarget(element: EventTarget): ListenerData[] {\n return this.allListeners.filter((listener) => {\n if (listener.element === element) {\n return listener;\n }\n });\n }\n\n /**\n * Search method: looks for listener by passed event type\n * @param {String} eventType\n * @return {Array} listeners that found on element\n */\n private findByType(eventType: string): ListenerData[] {\n return this.allListeners.filter((listener) => {\n if (listener.eventType === eventType) {\n return listener;\n }\n });\n }\n\n /**\n * Search method: looks for listener by passed handler\n * @param {Function} handler\n * @return {Array} listeners that found on element\n */\n private findByHandler(handler: (event: Event) => void): ListenerData[] {\n return this.allListeners.filter((listener) => {\n if (listener.handler === handler) {\n return listener;\n }\n });\n }\n}\n","/**\n * @module ModificationsObserver\n *\n * Handles any mutations\n * and gives opportunity to handle outside\n */\n\nimport Module from '../__module';\nimport _ from '../utils';\nimport Block from '../block';\n\nexport default class ModificationsObserver extends Module {\n\n /**\n * Debounce Timer\n * @type {number}\n */\n public static readonly DebounceTimer = 450;\n\n /**\n * MutationObserver instance\n */\n private observer: MutationObserver;\n\n /**\n * Allows to temporary disable mutations handling\n */\n private disabled: boolean;\n\n /**\n * Used to prevent several mutation callback execution\n * @type {Function}\n */\n private mutationDebouncer = _.debounce( () => {\n this.updateNativeInputs();\n this.config.onChange();\n }, ModificationsObserver.DebounceTimer);\n\n /**\n * Array of native inputs in Blocks.\n * Changes in native inputs are not handled by modification observer, so we need to set change event listeners on them\n */\n private nativeInputs: HTMLElement[] = [];\n\n /**\n * Clear timeout and set null to mutationDebouncer property\n */\n public destroy() {\n this.mutationDebouncer = null;\n this.observer.disconnect();\n this.observer = null;\n this.nativeInputs.forEach((input) => this.Editor.Listeners.off(input, 'input', this.mutationDebouncer));\n }\n\n /**\n * Preparation method\n * @return {Promise}\n */\n public async prepare(): Promise {\n /**\n * wait till Browser render Editor's Blocks\n */\n window.setTimeout( () => {\n this.setObserver();\n }, 1000);\n }\n\n /**\n * Allows to disable observer,\n * for example when Editor wants to stealthy mutate DOM\n */\n public disable() {\n this.disabled = true;\n }\n\n /**\n * Enables mutation handling\n * Should be called after .disable()\n */\n public enable() {\n this.disabled = false;\n }\n\n /**\n * setObserver\n *\n * sets 'DOMSubtreeModified' listener on Editor's UI.nodes.redactor\n * so that User can handle outside from API\n */\n private setObserver(): void {\n const {UI} = this.Editor;\n const observerOptions = {\n childList: true,\n attributes: true,\n subtree: true,\n characterData: true,\n characterDataOldValue: true,\n };\n\n this.observer = new MutationObserver((mutationList, observer) => {\n this.mutationHandler(mutationList, observer);\n });\n this.observer.observe(UI.nodes.redactor, observerOptions);\n }\n\n /**\n * MutationObserver events handler\n * @param mutationList\n * @param observer\n */\n private mutationHandler(mutationList, observer) {\n /**\n * Skip mutations in stealth mode\n */\n if (this.disabled) {\n return;\n }\n\n /**\n * We divide two Mutation types:\n * 1) mutations that concerns client changes: settings changes, symbol added, deletion, insertions and so on\n * 2) functional changes. On each client actions we set functional identifiers to interact with user\n */\n let contentMutated = false;\n\n mutationList.forEach((mutation) => {\n switch (mutation.type) {\n case 'childList':\n case 'subtree':\n case 'characterData':\n case 'characterDataOldValue':\n contentMutated = true;\n break;\n case 'attributes':\n const mutatedTarget = mutation.target as Element;\n\n /**\n * Changes on Element.ce-block usually is functional\n */\n if (!mutatedTarget.classList.contains(Block.CSS.wrapper)) {\n contentMutated = true;\n return;\n }\n break;\n }\n });\n\n /** call once */\n if (contentMutated) {\n this.mutationDebouncer();\n }\n }\n\n /**\n * Gets native inputs and set oninput event handler\n */\n private updateNativeInputs(): void {\n if (this.nativeInputs) {\n this.nativeInputs.forEach((input) => {\n this.Editor.Listeners.off(input, 'input');\n });\n }\n\n this.nativeInputs = Array.from(this.Editor.UI.nodes.redactor.querySelectorAll('textarea, input, select'));\n\n this.nativeInputs.forEach((input) => this.Editor.Listeners.on(input, 'input', this.mutationDebouncer));\n }\n}\n","import Module from '../__module';\n\n/**\n * Use external package module for notifications\n *\n * @see https://github.com/codex-team/js-notifier\n */\nimport notifier, {ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions} from 'codex-notifier';\n\n/**\n * Notifier module\n */\nexport default class Notifier extends Module {\n\n /**\n * Show web notification\n *\n * @param {NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions} options\n */\n public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) {\n notifier.show(options);\n }\n}\n","import Module from '../__module';\nimport $ from '../dom';\nimport _ from '../utils';\nimport {\n BlockTool,\n BlockToolConstructable,\n PasteConfig,\n PasteEvent,\n PasteEventDetail,\n} from '../../../types';\nimport Block from '../block';\n\n/**\n * Tag substitute object.\n */\ninterface TagSubstitute {\n /**\n * Name of related Tool\n * @type {string}\n */\n tool: string;\n}\n\n/**\n * Pattern substitute object.\n */\ninterface PatternSubstitute {\n /**\n * Pattern`s key\n * @type {string}\n */\n key: string;\n\n /**\n * Pattern regexp\n * @type {RegExp}\n */\n pattern: RegExp;\n\n /**\n * Name of related Tool\n * @type {string}\n */\n tool: string;\n}\n\n/**\n * Files` types substitutions object.\n */\ninterface FilesSubstitution {\n /**\n * Array of file extensions Tool can handle\n * @type {string[]}\n */\n extensions: string[];\n\n /**\n * Array of MIME types Tool can handle\n * @type {string[]}\n */\n mimeTypes: string[];\n}\n\n/**\n * Processed paste data object.\n */\ninterface PasteData {\n /**\n * Name of related Tool\n * @type {string}\n */\n tool: string;\n\n /**\n * Pasted data. Processed and wrapped to HTML element\n * @type {HTMLElement}\n */\n content: HTMLElement;\n\n /**\n * Pasted data\n */\n event: PasteEvent;\n\n /**\n * True if content should be inserted as new Block\n * @type {boolean}\n */\n isBlock: boolean;\n}\n\n/**\n * @class Paste\n * @classdesc Contains methods to handle paste on editor\n *\n * @module Paste\n *\n * @version 2.0.0\n */\nexport default class Paste extends Module {\n\n /** If string`s length is greater than this number we don't check paste patterns */\n public static readonly PATTERN_PROCESSING_MAX_LENGTH = 450;\n\n /**\n * Tags` substitutions parameters\n */\n private toolsTags: {[tag: string]: TagSubstitute} = {};\n\n /**\n * Store tags to substitute by tool name\n */\n private tagsByTool: {[tools: string]: string[]} = {};\n\n /** Patterns` substitutions parameters */\n private toolsPatterns: PatternSubstitute[] = [];\n\n /** Files` substitutions parameters */\n private toolsFiles: {\n [tool: string]: FilesSubstitution,\n } = {};\n\n /**\n * List of tools which do not need a paste handling\n */\n private exceptionList: string[] = [];\n\n /**\n * Set onPaste callback and collect tools` paste configurations\n *\n * @public\n */\n public async prepare(): Promise {\n this.setCallback();\n this.processTools();\n }\n\n /**\n * Handle pasted or dropped data transfer object\n *\n * @param {DataTransfer} dataTransfer - pasted or dropped data transfer object\n * @param {boolean} isDragNDrop\n */\n public async processDataTransfer(dataTransfer: DataTransfer, isDragNDrop = false): Promise {\n const { Sanitizer } = this.Editor;\n\n const types = dataTransfer.types;\n\n /**\n * In Microsoft Edge types is DOMStringList. So 'contains' is used to check if 'Files' type included\n */\n const includesFiles = types.includes ? types.includes('Files') : (types as any).contains('Files');\n\n if (includesFiles) {\n await this.processFiles(dataTransfer.files);\n return;\n }\n\n const plainData = dataTransfer.getData('text/plain');\n let htmlData = dataTransfer.getData('text/html');\n\n /**\n * If text was drag'n'dropped, wrap content with P tag to insert it as the new Block\n */\n if (isDragNDrop && plainData.trim() && htmlData.trim()) {\n htmlData = '

    ' + ( htmlData.trim() ? htmlData : plainData ) + '

    ';\n }\n\n /** Add all tags that can be substituted to sanitizer configuration */\n const toolsTags = Object.keys(this.toolsTags).reduce((result, tag) => {\n result[tag.toLowerCase()] = true;\n\n return result;\n }, {});\n\n const customConfig = Object.assign({}, toolsTags, Sanitizer.getAllInlineToolsConfig(), {br: {}});\n\n const cleanData = Sanitizer.clean(htmlData, customConfig);\n\n /** If there is no HTML or HTML string is equal to plain one, process it as plain text */\n if (!cleanData.trim() || cleanData.trim() === plainData || !$.isHTMLString(cleanData)) {\n await this.processText(plainData);\n } else {\n await this.processText(cleanData, true);\n }\n }\n\n /**\n * Process pasted text and divide them into Blocks\n *\n * @param {string} data - text to process. Can be HTML or plain.\n * @param {boolean} isHTML - if passed string is HTML, this parameter should be true\n */\n public async processText(data: string, isHTML: boolean = false) {\n const {Caret, BlockManager, Tools} = this.Editor;\n const dataToInsert = isHTML ? this.processHTML(data) : this.processPlain(data);\n\n if (!dataToInsert.length) {\n return;\n }\n\n if (dataToInsert.length === 1) {\n if (!dataToInsert[0].isBlock) {\n this.processInlinePaste(dataToInsert.pop());\n } else {\n this.processSingleBlock(dataToInsert.pop());\n }\n return;\n }\n\n const isCurrentBlockInitial = BlockManager.currentBlock && Tools.isInitial(BlockManager.currentBlock.tool);\n const needToReplaceCurrentBlock = isCurrentBlockInitial && BlockManager.currentBlock.isEmpty;\n\n await Promise.all(dataToInsert.map(\n async (content, i) => await this.insertBlock(content, i === 0 && needToReplaceCurrentBlock),\n ));\n\n if (BlockManager.currentBlock) {\n Caret.setToBlock(BlockManager.currentBlock, Caret.positions.END);\n }\n }\n\n /**\n * Set onPaste callback handler\n */\n private setCallback(): void {\n const {Listeners} = this.Editor;\n\n Listeners.on(document, 'paste', this.handlePasteEvent);\n }\n\n /**\n * Get and process tool`s paste configs\n */\n private processTools(): void {\n const tools = this.Editor.Tools.blockTools;\n\n Object.entries(tools).forEach(this.processTool);\n }\n\n /**\n * Process paste config for each tool\n *\n * @param {string} name\n * @param {Tool} tool\n */\n private processTool = ([name, tool]: [string, BlockToolConstructable]): void => {\n try {\n const toolInstance = new this.Editor.Tools.blockTools[name]({\n api: this.Editor.API.methods,\n config: {},\n data: {},\n }) as BlockTool;\n\n if (tool.pasteConfig === false) {\n this.exceptionList.push(name);\n return;\n }\n\n if (typeof toolInstance.onPaste !== 'function') {\n return;\n }\n\n const toolPasteConfig = tool.pasteConfig || {};\n\n this.getTagsConfig(name, toolPasteConfig);\n this.getFilesConfig(name, toolPasteConfig);\n this.getPatternsConfig(name, toolPasteConfig);\n } catch (e) {\n _.log(\n `Paste handling for «${name}» Tool hasn't been set up because of the error`,\n 'warn',\n e,\n );\n }\n }\n\n /**\n * Get tags to substitute by Tool\n *\n * @param {string} name - Tool name\n * @param {PasteConfig} toolPasteConfig - Tool onPaste configuration\n */\n private getTagsConfig(name: string, toolPasteConfig: PasteConfig): void {\n const tags = toolPasteConfig.tags || [];\n\n tags.forEach((tag) => {\n if (this.toolsTags.hasOwnProperty(tag)) {\n _.log(\n `Paste handler for «${name}» Tool on «${tag}» tag is skipped ` +\n `because it is already used by «${this.toolsTags[tag].tool}» Tool.`,\n 'warn',\n );\n return;\n }\n\n this.toolsTags[tag.toUpperCase()] = {\n tool: name,\n };\n });\n\n this.tagsByTool[name] = tags.map((t) => t.toUpperCase());\n }\n\n /**\n * Get files` types and extensions to substitute by Tool\n *\n * @param {string} name - Tool name\n * @param {PasteConfig} toolPasteConfig - Tool onPaste configuration\n */\n private getFilesConfig(name: string, toolPasteConfig: PasteConfig): void {\n\n const {files = {}} = toolPasteConfig;\n let {extensions, mimeTypes} = files;\n\n if (!extensions && !mimeTypes) {\n return;\n }\n\n if (extensions && !Array.isArray(extensions)) {\n _.log(`«extensions» property of the onDrop config for «${name}» Tool should be an array`);\n extensions = [];\n }\n\n if (mimeTypes && !Array.isArray(mimeTypes)) {\n _.log(`«mimeTypes» property of the onDrop config for «${name}» Tool should be an array`);\n mimeTypes = [];\n }\n\n if (mimeTypes) {\n mimeTypes = mimeTypes.filter((type) => {\n if (!_.isValidMimeType(type)) {\n _.log(`MIME type value «${type}» for the «${name}» Tool is not a valid MIME type`, 'warn');\n return false;\n }\n\n return true;\n });\n }\n\n this.toolsFiles[name] = {\n extensions: extensions || [],\n mimeTypes: mimeTypes || [],\n };\n }\n\n /**\n * Get RegExp patterns to substitute by Tool\n *\n * @param {string} name - Tool name\n * @param {PasteConfig} toolPasteConfig - Tool onPaste configuration\n */\n private getPatternsConfig(name: string, toolPasteConfig: PasteConfig): void {\n if (!toolPasteConfig.patterns || _.isEmpty(toolPasteConfig.patterns)) {\n return;\n }\n\n Object.entries(toolPasteConfig.patterns).forEach(([key, pattern]: [string, RegExp]) => {\n /** Still need to validate pattern as it provided by user */\n if (!(pattern instanceof RegExp)) {\n _.log(\n `Pattern ${pattern} for «${name}» Tool is skipped because it should be a Regexp instance.`,\n 'warn',\n );\n }\n\n this.toolsPatterns.push({\n key,\n pattern,\n tool: name,\n });\n });\n }\n\n /**\n * Check if browser behavior suits better\n *\n * @param {EventTarget} element - element where content has been pasted\n * @returns {boolean}\n */\n private isNativeBehaviour(element: EventTarget): boolean {\n return $.isNativeInput(element);\n }\n\n /**\n * Check if Editor should process pasted data and pass data transfer object to handler\n *\n * @param {ClipboardEvent} event\n */\n private handlePasteEvent = async (event: ClipboardEvent): Promise => {\n const {BlockManager, Toolbar} = this.Editor;\n\n /** If target is native input or is not Block, use browser behaviour */\n if (\n !BlockManager.currentBlock ||\n this.isNativeBehaviour(event.target) && !event.clipboardData.types.includes('Files')\n ) {\n return;\n }\n\n /**\n * If Tools is in list of exceptions, skip processing of paste event\n */\n if (BlockManager.currentBlock && this.exceptionList.includes(BlockManager.currentBlock.name)) {\n return;\n }\n\n event.preventDefault();\n this.processDataTransfer(event.clipboardData);\n\n BlockManager.clearFocused();\n Toolbar.close();\n }\n\n /**\n * Get files from data transfer object and insert related Tools\n *\n * @param {FileList} items - pasted or dropped items\n */\n private async processFiles(items: FileList) {\n const {BlockManager, Tools} = this.Editor;\n\n let dataToInsert: Array<{type: string, event: PasteEvent}>;\n\n dataToInsert = await Promise.all(\n Array\n .from(items)\n .map((item) => this.processFile(item)),\n );\n dataToInsert = dataToInsert.filter((data) => !!data);\n\n const isCurrentBlockInitial = Tools.isInitial(BlockManager.currentBlock.tool);\n const needToReplaceCurrentBlock = isCurrentBlockInitial && BlockManager.currentBlock.isEmpty;\n\n dataToInsert.forEach(\n (data, i) => {\n BlockManager.paste(data.type, data.event, i === 0 && needToReplaceCurrentBlock);\n },\n );\n }\n\n /**\n * Get information about file and find Tool to handle it\n *\n * @param {File} file\n */\n private async processFile(file: File) {\n const extension = _.getFileExtension(file);\n\n const foundConfig = Object\n .entries(this.toolsFiles)\n .find(([toolName, {mimeTypes, extensions}]) => {\n const [fileType, fileSubtype] = file.type.split('/');\n\n const foundExt = extensions.find((ext) => ext.toLowerCase() === extension.toLowerCase());\n const foundMimeType = mimeTypes.find((mime) => {\n const [type, subtype] = mime.split('/');\n\n return type === fileType && (subtype === fileSubtype || subtype === '*');\n });\n\n return !!foundExt || !!foundMimeType;\n });\n\n if (!foundConfig) {\n return;\n }\n\n const [tool] = foundConfig;\n const pasteEvent = this.composePasteEvent('file', {\n file,\n });\n\n return {\n event: pasteEvent,\n type: tool,\n };\n }\n\n /**\n * Split HTML string to blocks and return it as array of Block data\n *\n * @param {string} innerHTML\n * @returns {PasteData[]}\n */\n private processHTML(innerHTML: string): PasteData[] {\n const {Tools, Sanitizer} = this.Editor;\n const initialTool = this.config.initialBlock;\n const wrapper = $.make('DIV');\n\n wrapper.innerHTML = innerHTML;\n\n const nodes = this.getNodes(wrapper);\n\n return nodes\n .map((node) => {\n let content, tool = initialTool, isBlock = false;\n\n switch (node.nodeType) {\n /** If node is a document fragment, use temp wrapper to get innerHTML */\n case Node.DOCUMENT_FRAGMENT_NODE:\n content = $.make('div');\n content.appendChild(node);\n break;\n\n /** If node is an element, then there might be a substitution */\n case Node.ELEMENT_NODE:\n content = node as HTMLElement;\n isBlock = true;\n\n if (this.toolsTags[content.tagName]) {\n tool = this.toolsTags[content.tagName].tool;\n }\n break;\n }\n\n const {tags} = Tools.blockTools[tool].pasteConfig as PasteConfig;\n\n const toolTags = tags.reduce((result, tag) => {\n result[tag.toLowerCase()] = {};\n\n return result;\n }, {});\n const customConfig = Object.assign({}, toolTags, Sanitizer.getInlineToolsConfig(tool));\n\n content.innerHTML = Sanitizer.clean(content.innerHTML, customConfig);\n\n const event = this.composePasteEvent('tag', {\n data: content,\n });\n\n return {content, isBlock, tool, event};\n })\n .filter((data) => !$.isNodeEmpty(data.content) || $.isSingleTag(data.content));\n }\n\n /**\n * Split plain text by new line symbols and return it as array of Block data\n *\n * @param {string} plain\n * @returns {PasteData[]}\n */\n private processPlain(plain: string): PasteData[] {\n const {initialBlock} = this.config as {initialBlock: string},\n {Tools} = this.Editor;\n\n if (!plain) {\n return [];\n }\n\n const tool = initialBlock;\n\n return plain\n .split(/\\r?\\n/)\n .filter((text) => text.trim())\n .map((text) => {\n const content = $.make('div');\n\n content.innerHTML = text;\n\n const event = this.composePasteEvent('tag', {\n data: content,\n });\n\n return {content, tool, isBlock: false, event};\n });\n }\n\n /**\n * Process paste of single Block tool content\n *\n * @param {PasteData} dataToInsert\n */\n private async processSingleBlock(dataToInsert: PasteData): Promise {\n const {Caret, BlockManager, Tools} = this.Editor;\n const {currentBlock} = BlockManager;\n\n /**\n * If pasted tool isn`t equal current Block or if pasted content contains block elements, insert it as new Block\n */\n if (\n !currentBlock ||\n dataToInsert.tool !== currentBlock.name ||\n !$.containsOnlyInlineElements(dataToInsert.content.innerHTML)\n ) {\n this.insertBlock(dataToInsert, currentBlock && Tools.isInitial(currentBlock.tool) && currentBlock.isEmpty);\n return;\n }\n\n Caret.insertContentAtCaretPosition(dataToInsert.content.innerHTML);\n }\n\n /**\n * Process paste to single Block:\n * 1. Find patterns` matches\n * 2. Insert new block if it is not the same type as current one\n * 3. Just insert text if there is no substitutions\n *\n * @param {PasteData} dataToInsert\n */\n private async processInlinePaste(dataToInsert: PasteData): Promise {\n const {BlockManager, Caret, Sanitizer, Tools} = this.Editor;\n const {content, tool} = dataToInsert;\n\n const currentBlockIsInitial = BlockManager.currentBlock && Tools.isInitial(BlockManager.currentBlock.tool);\n\n if (currentBlockIsInitial && content.textContent.length < Paste.PATTERN_PROCESSING_MAX_LENGTH) {\n const blockData = await this.processPattern(content.textContent);\n\n if (blockData) {\n let insertedBlock;\n\n const needToReplaceCurrentBlock = BlockManager.currentBlock\n && Tools.isInitial(BlockManager.currentBlock.tool)\n && BlockManager.currentBlock.isEmpty;\n\n insertedBlock = BlockManager.paste(blockData.tool, blockData.event, needToReplaceCurrentBlock);\n\n Caret.setToBlock(insertedBlock, Caret.positions.END);\n return;\n }\n }\n\n /** If there is no pattern substitute - insert string as it is */\n if (BlockManager.currentBlock && BlockManager.currentBlock.currentInput) {\n const currentToolSanitizeConfig = Sanitizer.getInlineToolsConfig(BlockManager.currentBlock.name);\n\n document.execCommand('insertHTML', false, Sanitizer.clean(content.innerHTML, currentToolSanitizeConfig));\n } else {\n this.insertBlock(dataToInsert);\n }\n }\n\n /**\n * Get patterns` matches\n *\n * @param {string} text\n * @returns Promise<{data: BlockToolData, tool: string}>\n */\n private async processPattern(text: string): Promise<{event: PasteEvent, tool: string}> {\n const pattern = this.toolsPatterns.find((substitute) => {\n const execResult = substitute.pattern.exec(text);\n\n if (!execResult) {\n return false;\n }\n\n return text === execResult.shift();\n });\n\n if (!pattern) {\n return;\n }\n\n const event = this.composePasteEvent('pattern', {\n key: pattern.key,\n data: text,\n });\n\n return {\n event,\n tool: pattern.tool,\n };\n }\n\n /**\n *\n * @param {PasteData} data\n * @param {Boolean} canReplaceCurrentBlock - if true and is current Block is empty, will replace current Block\n * @returns {Promise}\n */\n private async insertBlock(data: PasteData, canReplaceCurrentBlock: boolean = false): Promise {\n const {BlockManager, Caret} = this.Editor;\n const {currentBlock} = BlockManager;\n let block: Block;\n\n if (canReplaceCurrentBlock && currentBlock && currentBlock.isEmpty) {\n block = BlockManager.paste(data.tool, data.event, true);\n Caret.setToBlock(block, Caret.positions.END);\n return;\n }\n\n block = BlockManager.paste(data.tool, data.event);\n\n Caret.setToBlock(block, Caret.positions.END);\n }\n\n /**\n * Recursively divide HTML string to two types of nodes:\n * 1. Block element\n * 2. Document Fragments contained text and markup tags like a, b, i etc.\n *\n * @param {Node} wrapper\n * @returns {Node[]}\n */\n private getNodes(wrapper: Node): Node[] {\n const children = Array.from(wrapper.childNodes),\n tags = Object.keys(this.toolsTags);\n\n const reducer = (nodes: Node[], node: Node): Node[] => {\n if ($.isEmpty(node) && !$.isSingleTag(node as HTMLElement)) {\n return nodes;\n }\n\n const lastNode = nodes[nodes.length - 1];\n\n let destNode: Node = new DocumentFragment();\n\n if (lastNode && $.isFragment(lastNode)) {\n destNode = nodes.pop();\n }\n\n switch (node.nodeType) {\n /**\n * If node is HTML element:\n * 1. Check if it is inline element\n * 2. Check if it contains another block or substitutable elements\n */\n case Node.ELEMENT_NODE:\n const element = node as HTMLElement;\n\n if (element.tagName === 'BR') {\n return [...nodes, destNode, new DocumentFragment()];\n }\n\n const {tool = ''} = this.toolsTags[element.tagName] || {};\n const toolTags = this.tagsByTool[tool] || [];\n\n const isSubstitutable = tags.includes(element.tagName);\n const isBlockElement = $.blockElements.includes(element.tagName.toLowerCase());\n const containsAnotherToolTags = Array\n .from(element.children)\n .some(\n ({tagName}) => tags.includes(tagName) && !toolTags.includes(tagName),\n );\n\n const containsBlockElements = Array.from(element.children).some(\n ({tagName}) => $.blockElements.includes(tagName.toLowerCase()),\n );\n\n /** Append inline elements to previous fragment */\n if (!isBlockElement && !isSubstitutable && !containsAnotherToolTags) {\n destNode.appendChild(element);\n return [...nodes, destNode];\n }\n\n if (\n (isSubstitutable && !containsAnotherToolTags) ||\n (isBlockElement && !containsBlockElements && !containsAnotherToolTags )\n ) {\n return [...nodes, destNode, element];\n }\n break;\n\n /**\n * If node is text node, wrap it with DocumentFragment\n */\n case Node.TEXT_NODE:\n destNode.appendChild(node);\n return [...nodes, destNode];\n\n default:\n return [...nodes, destNode];\n }\n\n return [...nodes, ...Array.from(node.childNodes).reduce(reducer, [])];\n };\n\n return children.reduce(reducer, []);\n }\n\n /**\n * Compose paste event with passed type and detail\n *\n * @param {string} type\n * @param {PasteEventDetail} detail\n */\n private composePasteEvent(type: string, detail: PasteEventDetail): PasteEvent {\n return new CustomEvent(type, {\n detail,\n }) as PasteEvent;\n }\n}\n","/**\n * @class RectangleSelection\n * @classdesc Manages Block selection with mouse\n *\n * @module RectangleSelection\n * @version 1.0.0\n */\nimport Module from '../__module';\nimport $ from '../dom';\n\nimport SelectionUtils from '../selection';\nimport Block from '../block';\n\nexport default class RectangleSelection extends Module {\n /**\n * CSS classes for the Block\n * @return {{wrapper: string, content: string}}\n */\n static get CSS() {\n return {\n overlay: 'codex-editor-overlay',\n overlayContainer: 'codex-editor-overlay__container',\n rect: 'codex-editor-overlay__rectangle',\n topScrollZone: 'codex-editor-overlay__scroll-zone--top',\n bottomScrollZone: 'codex-editor-overlay__scroll-zone--bottom',\n };\n }\n\n /**\n * Using the selection rectangle\n * @type {boolean}\n */\n private isRectSelectionActivated: boolean = false;\n\n /**\n * Speed of Scrolling\n */\n private readonly SCROLL_SPEED: number = 3;\n\n /**\n * Height of scroll zone on boundary of screen\n */\n private readonly HEIGHT_OF_SCROLL_ZONE = 40;\n\n /**\n * Scroll zone type indicators\n */\n private readonly BOTTOM_SCROLL_ZONE = 1;\n private readonly TOP_SCROLL_ZONE = 2;\n\n /**\n * Id of main button for event.button\n */\n private readonly MAIN_MOUSE_BUTTON = 0;\n\n /**\n * Mouse is clamped\n */\n private mousedown: boolean = false;\n\n /**\n * Is scrolling now\n */\n private isScrolling: boolean = false;\n\n /**\n * Mouse is in scroll zone\n */\n private inScrollZone: number | null = null;\n\n /**\n * Coords of rect\n */\n private startX: number = 0;\n private startY: number = 0;\n private mouseX: number = 0;\n private mouseY: number = 0;\n\n /**\n * Selected blocks\n */\n private stackOfSelected: number[] = [];\n\n /**\n * Does the rectangle intersect blocks\n */\n private rectCrossesBlocks: boolean;\n\n /**\n * Selection rectangle\n */\n private overlayRectangle: HTMLDivElement;\n\n /**\n * Module Preparation\n * Creating rect and hang handlers\n */\n public prepare(): void {\n const {Listeners} = this.Editor;\n const {container} = this.genHTML();\n\n Listeners.on(container, 'mousedown', (event: MouseEvent) => {\n if (event.button !== this.MAIN_MOUSE_BUTTON) {\n return;\n }\n this.startSelection(event.pageX, event.pageY);\n }, false);\n\n Listeners.on(document.body, 'mousemove', (event: MouseEvent) => {\n this.changingRectangle(event);\n this.scrollByZones(event.clientY);\n }, false);\n\n Listeners.on(document.body, 'mouseleave', () => {\n this.clearSelection();\n this.endSelection();\n });\n\n Listeners.on(window, 'scroll', (event) => {\n this.changingRectangle(event);\n }, false);\n\n Listeners.on(document.body, 'mouseup', () => {\n this.endSelection();\n }, false);\n }\n\n /**\n * Init rect params\n * @param {number} pageX - X coord of mouse\n * @param {number} pageY - Y coord of mouse\n */\n public startSelection(pageX, pageY) {\n this.Editor.BlockSelection.allBlocksSelected = false;\n this.clearSelection();\n this.stackOfSelected = [];\n\n const elemWhereSelectionStart = document.elementFromPoint(pageX - window.pageXOffset, pageY - window.pageYOffset);\n\n const selectorsToAvoid = [\n `.${Block.CSS.content}`,\n `.${this.Editor.Toolbar.CSS.toolbar}`,\n `.${this.Editor.InlineToolbar.CSS.inlineToolbar}`,\n ];\n\n const startsInsideEditor = elemWhereSelectionStart.closest('.' + this.Editor.UI.CSS.editorWrapper);\n const startsInSelectorToAvoid = selectorsToAvoid.some(((selector) => !!elemWhereSelectionStart.closest(selector)));\n\n /**\n * If selection starts outside of the editor or inside the blocks or on Editor UI elements, do not handle it\n */\n if (!startsInsideEditor || startsInSelectorToAvoid) {\n return;\n }\n\n this.mousedown = true;\n this.startX = pageX;\n this.startY = pageY;\n }\n\n /**\n * Clear all params to end selection\n */\n public endSelection() {\n this.mousedown = false;\n this.startX = 0;\n this.startY = 0;\n this.overlayRectangle.style.display = 'none';\n\n /**\n * Show Conversion Toolbar when user select one Block\n */\n const { selectedBlocks } = this.Editor.BlockSelection;\n\n if (selectedBlocks.length === 1) {\n this.Editor.ConversionToolbar.tryToShow(selectedBlocks[0]);\n }\n }\n\n /**\n * is RectSelection Activated\n */\n public isRectActivated() {\n return this.isRectSelectionActivated;\n }\n\n /**\n * Mark that selection is end\n */\n public clearSelection() {\n this.isRectSelectionActivated = false;\n }\n\n /**\n * Scroll If mouse in scroll zone\n * @param {number} clientY - Y coord of mouse\n */\n private scrollByZones(clientY) {\n this.inScrollZone = null;\n if (clientY <= this.HEIGHT_OF_SCROLL_ZONE) {\n this.inScrollZone = this.TOP_SCROLL_ZONE;\n }\n if (document.documentElement.clientHeight - clientY <= this.HEIGHT_OF_SCROLL_ZONE) {\n this.inScrollZone = this.BOTTOM_SCROLL_ZONE;\n }\n\n if (!this.inScrollZone) {\n this.isScrolling = false;\n return;\n }\n\n if (!this.isScrolling) {\n this.scrollVertical(this.inScrollZone === this.TOP_SCROLL_ZONE ? -this.SCROLL_SPEED : this.SCROLL_SPEED);\n this.isScrolling = true;\n }\n }\n\n private genHTML() {\n const {UI} = this.Editor;\n\n const container = UI.nodes.holder.querySelector('.' + UI.CSS.editorWrapper);\n const overlay = $.make('div', RectangleSelection.CSS.overlay, {});\n const overlayContainer = $.make('div', RectangleSelection.CSS.overlayContainer, {});\n const overlayRectangle = $.make('div', RectangleSelection.CSS.rect, {});\n\n overlayContainer.appendChild(overlayRectangle);\n overlay.appendChild(overlayContainer);\n container.appendChild(overlay);\n\n this.overlayRectangle = overlayRectangle as HTMLDivElement;\n return {\n container,\n overlay,\n };\n }\n\n /**\n * Activates scrolling if blockSelection is active and mouse is in scroll zone\n * @param {number} speed - speed of scrolling\n */\n private scrollVertical(speed) {\n if (!(this.inScrollZone && this.mousedown)) {\n return;\n }\n const lastOffset = window.pageYOffset;\n window.scrollBy(0, speed);\n this.mouseY += window.pageYOffset - lastOffset;\n setTimeout(() => {\n this.scrollVertical(speed);\n }, 0);\n }\n\n /**\n * Handles the change in the rectangle and its effect\n * @param {MouseEvent} event\n */\n private changingRectangle(event) {\n if (!this.mousedown) {\n return;\n }\n\n if (event.pageY !== undefined) {\n this.mouseX = event.pageX;\n this.mouseY = event.pageY;\n }\n\n const {rightPos, leftPos, index} = this.genInfoForMouseSelection();\n // There is not new block in selection\n\n const rectIsOnRighSideOfredactor = this.startX > rightPos && this.mouseX > rightPos;\n const rectISOnLeftSideOfRedactor = this.startX < leftPos && this.mouseX < leftPos;\n this.rectCrossesBlocks = !(rectIsOnRighSideOfredactor || rectISOnLeftSideOfRedactor);\n\n if (!this.isRectSelectionActivated) {\n this.rectCrossesBlocks = false;\n this.isRectSelectionActivated = true;\n this.shrinkRectangleToPoint();\n this.overlayRectangle.style.display = 'block';\n }\n\n this.updateRectangleSize();\n\n if (index === undefined) {\n return;\n }\n\n this.trySelectNextBlock(index);\n // For case, when rect is out from blocks\n this.inverseSelection();\n\n SelectionUtils.get().removeAllRanges();\n event.preventDefault();\n }\n\n /**\n * Shrink rect to singular point\n */\n private shrinkRectangleToPoint() {\n this.overlayRectangle.style.left = `${this.startX - window.pageXOffset}px`;\n this.overlayRectangle.style.top = `${this.startY - window.pageYOffset}px`;\n this.overlayRectangle.style.bottom = `calc(100% - ${this.startY - window.pageYOffset}px`;\n this.overlayRectangle.style.right = `calc(100% - ${this.startX - window.pageXOffset}px`;\n }\n\n /**\n * Select or unselect all of blocks in array if rect is out or in selectable area\n */\n private inverseSelection() {\n const firstBlockInStack = this.Editor.BlockManager.getBlockByIndex(this.stackOfSelected[0]);\n const isSelecteMode = firstBlockInStack.selected;\n\n if (this.rectCrossesBlocks && !isSelecteMode) {\n for (const it of this.stackOfSelected) {\n this.Editor.BlockSelection.selectBlockByIndex(it);\n }\n }\n\n if (!this.rectCrossesBlocks && isSelecteMode) {\n for (const it of this.stackOfSelected) {\n this.Editor.BlockSelection.unSelectBlockByIndex(it);\n }\n }\n }\n\n /**\n * Updates size of rectangle\n */\n private updateRectangleSize() {\n // Depending on the position of the mouse relative to the starting point,\n // change this.e distance from the desired edge of the screen*/\n if (this.mouseY >= this.startY) {\n this.overlayRectangle.style.top = `${this.startY - window.pageYOffset}px`;\n this.overlayRectangle.style.bottom = `calc(100% - ${this.mouseY - window.pageYOffset}px`;\n } else {\n this.overlayRectangle.style.bottom = `calc(100% - ${this.startY - window.pageYOffset}px`;\n this.overlayRectangle.style.top = `${this.mouseY - window.pageYOffset}px`;\n }\n\n if (this.mouseX >= this.startX) {\n this.overlayRectangle.style.left = `${this.startX - window.pageXOffset}px`;\n this.overlayRectangle.style.right = `calc(100% - ${this.mouseX - window.pageXOffset}px`;\n } else {\n this.overlayRectangle.style.right = `calc(100% - ${this.startX - window.pageXOffset}px`;\n this.overlayRectangle.style.left = `${this.mouseX - window.pageXOffset}px`;\n }\n }\n\n /**\n * Collects information needed to determine the behavior of the rectangle\n * @return {number} index - index next Block, leftPos - start of left border of Block, rightPos - right border\n */\n private genInfoForMouseSelection() {\n const widthOfRedactor = document.body.offsetWidth;\n const centerOfRedactor = widthOfRedactor / 2;\n const Y = this.mouseY - window.pageYOffset;\n const elementUnderMouse = document.elementFromPoint(centerOfRedactor, Y);\n const blockInCurrentPos = this.Editor.BlockManager.getBlockByChildNode(elementUnderMouse);\n let index;\n if (blockInCurrentPos !== undefined) {\n index = this.Editor.BlockManager.blocks.findIndex((block) => block.holder === blockInCurrentPos.holder);\n }\n const contentElement = this.Editor.BlockManager.lastBlock.holder.querySelector('.' + Block.CSS.content);\n const centerOfBlock = Number.parseInt(window.getComputedStyle(contentElement).width, 10) / 2;\n const leftPos = centerOfRedactor - centerOfBlock;\n const rightPos = centerOfRedactor + centerOfBlock;\n\n return {\n index,\n leftPos,\n rightPos,\n };\n }\n\n /**\n * Select block with index index\n * @param index - index of block in redactor\n */\n private addBlockInSelection(index) {\n if (this.rectCrossesBlocks) {\n this.Editor.BlockSelection.selectBlockByIndex(index);\n }\n this.stackOfSelected.push(index);\n }\n\n /**\n * Adds a block to the selection and determines which blocks should be selected\n * @param {object} index - index of new block in the reactor\n */\n private trySelectNextBlock(index) {\n const sameBlock = this.stackOfSelected[this.stackOfSelected.length - 1] === index;\n const sizeStack = this.stackOfSelected.length;\n const down = 1, up = -1, undef = 0;\n\n if (sameBlock) {\n return;\n }\n\n const blockNumbersIncrease = this.stackOfSelected[sizeStack - 1] - this.stackOfSelected[sizeStack - 2] > 0;\n const direction = sizeStack <= 1 ? undef : blockNumbersIncrease ? down : up;\n const selectionInDownDurection = index > this.stackOfSelected[sizeStack - 1] && direction === down;\n const selectionInUpDirection = index < this.stackOfSelected[sizeStack - 1] && direction === up;\n const generalSelection = selectionInDownDurection || selectionInUpDirection || direction === undef;\n const reduction = !generalSelection;\n\n // When the selection is too fast, some blocks do not have time to be noticed. Fix it.\n if (!reduction && (index > this.stackOfSelected[sizeStack - 1] ||\n this.stackOfSelected[sizeStack - 1] === undefined)) {\n let ind = this.stackOfSelected[sizeStack - 1] + 1 || index;\n\n for (ind; ind <= index; ind++) {\n this.addBlockInSelection(ind);\n }\n return;\n }\n\n // for both directions\n if (!reduction && (index < this.stackOfSelected[sizeStack - 1])) {\n for (let ind = this.stackOfSelected[sizeStack - 1] - 1; ind >= index; ind--) {\n this.addBlockInSelection(ind);\n }\n return;\n }\n\n if (!reduction) {\n return;\n }\n\n let i = sizeStack - 1;\n let cmp;\n\n // cmp for different directions\n if (index > this.stackOfSelected[sizeStack - 1]) {\n cmp = () => index > this.stackOfSelected[i];\n } else {\n cmp = () => index < this.stackOfSelected[i];\n }\n\n // Remove blocks missed due to speed.\n // cmp checks if we have removed all the necessary blocks\n while (cmp()) {\n if (this.rectCrossesBlocks) {\n this.Editor.BlockSelection.unSelectBlockByIndex(this.stackOfSelected[i]);\n }\n this.stackOfSelected.pop();\n i--;\n }\n return;\n }\n}\n","import Module from '../__module';\nimport _, {ChainData} from '../utils';\nimport {BlockToolData} from '../../../types';\nimport {BlockToolConstructable} from '../../../types/tools';\n\n/**\n * Editor.js Renderer Module\n *\n * @module Renderer\n * @author CodeX Team\n *\n * @version 2.0.0\n */\nexport default class Renderer extends Module {\n /**\n * @typedef {Object} RendererBlocks\n * @property {String} type - tool name\n * @property {Object} data - tool data\n */\n\n /**\n * @example\n *\n * blocks: [\n * {\n * type : 'paragraph',\n * data : {\n * text : 'Hello from Codex!'\n * }\n * },\n * {\n * type : 'paragraph',\n * data : {\n * text : 'Leave feedback if you like it!'\n * }\n * },\n * ]\n *\n */\n\n /**\n * Make plugin blocks from array of plugin`s data\n * @param {RendererBlocks[]} blocks\n */\n public async render(blocks: BlockToolData[]): Promise {\n const chainData = blocks.map((block) => ({function: () => this.insertBlock(block)}));\n\n const sequence = await _.sequence(chainData as ChainData[]);\n\n this.Editor.UI.checkEmptiness();\n\n return sequence;\n }\n\n /**\n * Get plugin instance\n * Add plugin instance to BlockManager\n * Insert block to working zone\n *\n * @param {Object} item\n * @returns {Promise}\n * @private\n */\n public async insertBlock(item): Promise {\n const { Tools, BlockManager } = this.Editor;\n const tool = item.type;\n const data = item.data;\n const settings = item.settings;\n\n if (tool in Tools.available) {\n try {\n BlockManager.insert(tool, data, settings);\n } catch (error) {\n _.log(`Block «${tool}» skipped because of plugins error`, 'warn', data);\n throw Error(error);\n }\n } else {\n\n /** If Tool is unavailable, create stub Block for it */\n const stubData = {\n savedData: {\n type: tool,\n data,\n },\n title: tool,\n };\n\n if (tool in Tools.unavailable) {\n const toolToolboxSettings = (Tools.unavailable[tool] as BlockToolConstructable).toolbox;\n const userToolboxSettings = Tools.getToolSettings(tool).toolbox;\n\n stubData.title = toolToolboxSettings.title || userToolboxSettings.title || stubData.title;\n }\n\n const stub = BlockManager.insert(Tools.stubTool, stubData, settings);\n\n stub.stretched = true;\n\n _.log(`Tool «${tool}» is not found. Check 'tools' property at your initial Editor.js config.`, 'warn');\n }\n }\n}\n","/**\n * CodeX Sanitizer\n *\n * @module Sanitizer\n * Clears HTML from taint tags\n *\n * @version 2.0.0\n *\n * @example\n * Module can be used within two ways:\n * 1) When you have an instance\n * - this.Editor.Sanitizer.clean(yourTaintString);\n * 2) As static method\n * - EditorJS.Sanitizer.clean(yourTaintString, yourCustomConfiguration);\n *\n * {@link SanitizerConfig}\n */\n\nimport Module from '../__module';\nimport _ from '../utils';\n\n/**\n * @typedef {Object} SanitizerConfig\n * @property {Object} tags - define tags restrictions\n *\n * @example\n *\n * tags : {\n * p: true,\n * a: {\n * href: true,\n * rel: \"nofollow\",\n * target: \"_blank\"\n * }\n * }\n */\n\nimport HTMLJanitor from 'html-janitor';\nimport {BlockToolData, InlineToolConstructable, SanitizerConfig} from '../../../types';\n\nexport default class Sanitizer extends Module {\n /**\n * Memoize tools config\n */\n private configCache: {[toolName: string]: SanitizerConfig} = {};\n\n /**\n * Cached inline tools config\n */\n private inlineToolsConfigCache: SanitizerConfig | null = null;\n\n /**\n * Sanitize Blocks\n *\n * Enumerate blocks and clean data\n *\n * @param {{tool, data: BlockToolData}[]} blocksData[]\n */\n public sanitizeBlocks(\n blocksData: Array<{tool: string, data: BlockToolData}>,\n ): Array<{tool: string, data: BlockToolData}> {\n\n return blocksData.map((block) => {\n const toolConfig = this.composeToolConfig(block.tool);\n\n if (_.isEmpty(toolConfig)) {\n return block;\n }\n\n block.data = this.deepSanitize(block.data, toolConfig);\n\n return block;\n });\n }\n\n /**\n * Method recursively reduces Block's data and cleans with passed rules\n *\n * @param {BlockToolData|object|*} dataToSanitize - taint string or object/array that contains taint string\n * @param {SanitizerConfig} rules - object with sanitizer rules\n */\n public deepSanitize(dataToSanitize: any, rules: SanitizerConfig): any {\n /**\n * BlockData It may contain 3 types:\n * - Array\n * - Object\n * - Primitive\n */\n if (Array.isArray(dataToSanitize)) {\n /**\n * Array: call sanitize for each item\n */\n return this.cleanArray(dataToSanitize, rules);\n } else if (typeof dataToSanitize === 'object') {\n /**\n * Objects: just clean object deeper.\n */\n return this.cleanObject(dataToSanitize, rules);\n } else {\n /**\n * Primitives (number|string|boolean): clean this item\n *\n * Clean only strings\n */\n if (typeof dataToSanitize === 'string') {\n return this.cleanOneItem(dataToSanitize, rules);\n }\n return dataToSanitize;\n }\n }\n\n /**\n * Cleans string from unwanted tags\n * Method allows to use default config\n *\n * @param {string} taintString - taint string\n * @param {SanitizerConfig} customConfig - allowed tags\n *\n * @return {string} clean HTML\n */\n public clean(taintString: string, customConfig: SanitizerConfig = {} as SanitizerConfig): string {\n\n const sanitizerConfig = {\n tags: customConfig,\n };\n\n /**\n * API client can use custom config to manage sanitize process\n */\n const sanitizerInstance = this.createHTMLJanitorInstance(sanitizerConfig);\n return sanitizerInstance.clean(taintString);\n }\n\n /**\n * Merge with inline tool config\n *\n * @param {string} toolName\n * @param {SanitizerConfig} toolRules\n * @return {SanitizerConfig}\n */\n public composeToolConfig(toolName: string): SanitizerConfig {\n /**\n * If cache is empty, then compose tool config and put it to the cache object\n */\n if (this.configCache[toolName]) {\n return this.configCache[toolName];\n }\n\n const sanitizeGetter = this.Editor.Tools.apiSettings.SANITIZE_CONFIG;\n const toolClass = this.Editor.Tools.available[toolName];\n const baseConfig = this.getInlineToolsConfig(toolName);\n\n /**\n * If Tools doesn't provide sanitizer config or it is empty\n */\n if (!toolClass.sanitize || (toolClass[sanitizeGetter] && _.isEmpty(toolClass[sanitizeGetter]))) {\n return baseConfig;\n }\n\n const toolRules = toolClass.sanitize;\n\n const toolConfig = {} as SanitizerConfig;\n for (const fieldName in toolRules) {\n if (toolRules.hasOwnProperty(fieldName)) {\n const rule = toolRules[fieldName];\n if (typeof rule === 'object') {\n toolConfig[fieldName] = Object.assign({}, baseConfig, rule);\n } else {\n toolConfig[fieldName] = rule;\n }\n }\n }\n this.configCache[toolName] = toolConfig;\n\n return toolConfig;\n }\n\n /**\n * Returns Sanitizer config\n * When Tool's \"inlineToolbar\" value is True, get all sanitizer rules from all tools,\n * otherwise get only enabled\n */\n public getInlineToolsConfig(name: string): SanitizerConfig {\n const {Tools} = this.Editor;\n const toolsConfig = Tools.getToolSettings(name);\n const enableInlineTools = toolsConfig.inlineToolbar || [];\n\n let config = {} as SanitizerConfig;\n\n if (typeof enableInlineTools === 'boolean' && enableInlineTools) {\n /**\n * getting all tools sanitizer rule\n */\n config = this.getAllInlineToolsConfig();\n } else {\n /**\n * getting only enabled\n */\n (enableInlineTools as string[]).map( (inlineToolName) => {\n config = Object.assign(\n config,\n Tools.inline[inlineToolName][Tools.apiSettings.SANITIZE_CONFIG],\n ) as SanitizerConfig;\n });\n }\n\n return config;\n }\n\n /**\n * Return general config for all inline tools\n */\n public getAllInlineToolsConfig(): SanitizerConfig {\n const {Tools} = this.Editor;\n\n if (this.inlineToolsConfigCache) {\n return this.inlineToolsConfigCache;\n }\n\n const config: SanitizerConfig = {} as SanitizerConfig;\n\n Object.entries(Tools.inline)\n .forEach( ([name, inlineTool]: [string, InlineToolConstructable]) => {\n Object.assign(config, inlineTool[Tools.apiSettings.SANITIZE_CONFIG]);\n });\n\n this.inlineToolsConfigCache = config;\n\n return this.inlineToolsConfigCache;\n }\n\n /**\n * Clean array\n * @param {array} array - [1, 2, {}, []]\n * @param {object} ruleForItem\n */\n private cleanArray(array: any[], ruleForItem: SanitizerConfig): any[] {\n return array.map( (arrayItem) => this.deepSanitize(arrayItem, ruleForItem));\n }\n\n /**\n * Clean object\n * @param {object} object - {level: 0, text: 'adada', items: [1,2,3]}}\n * @param {object} rules - { b: true } or true|false\n * @return {object}\n */\n private cleanObject(object: any, rules: SanitizerConfig|{[field: string]: SanitizerConfig}): any {\n const cleanData = {};\n\n for (const fieldName in object) {\n if (!object.hasOwnProperty(fieldName)) {\n continue;\n }\n\n const currentIterationItem = object[fieldName];\n\n /**\n * Get object from config by field name\n * - if it is a HTML Janitor rule, call with this rule\n * - otherwise, call with parent's config\n */\n const ruleForItem = this.isRule(rules[fieldName] as SanitizerConfig) ? rules[fieldName] : rules;\n\n cleanData[fieldName] = this.deepSanitize(currentIterationItem, ruleForItem as SanitizerConfig);\n }\n return cleanData;\n }\n\n /**\n * @param {string} taintString\n * @param {SanitizerConfig|boolean} rule\n * @return {string}\n */\n private cleanOneItem(taintString: string, rule: SanitizerConfig|boolean): string {\n if (typeof rule === 'object') {\n return this.clean(taintString, rule);\n } else if (rule === false) {\n return this.clean(taintString, {} as SanitizerConfig);\n } else {\n return taintString;\n }\n }\n\n /**\n * Check if passed item is a HTML Janitor rule:\n * { a : true }, {}, false, true, function(){} — correct rules\n * undefined, null, 0, 1, 2 — not a rules\n * @param config\n */\n private isRule(config: SanitizerConfig): boolean {\n return typeof config === 'object' || typeof config === 'boolean' || typeof config === 'function';\n }\n\n /**\n * If developer uses editor's API, then he can customize sanitize restrictions.\n * Or, sanitizing config can be defined globally in editors initialization. That config will be used everywhere\n * At least, if there is no config overrides, that API uses Default configuration\n *\n * @uses https://www.npmjs.com/package/html-janitor\n * @license https://github.com/guardian/html-janitor/blob/master/LICENSE\n *\n * @param {SanitizerConfig} config - sanitizer extension\n */\n private createHTMLJanitorInstance(config: {tags: SanitizerConfig}): HTMLJanitor|null {\n if (config) {\n return new HTMLJanitor(config);\n }\n return null;\n }\n}\n","/**\n * Editor.js Saver\n *\n * @module Saver\n * @author Codex Team\n * @version 2.0.0\n */\nimport Module from '../__module';\nimport {OutputData} from '../../../types';\nimport {ValidatedData} from '../../types-internal/block-data';\nimport Block from '../block';\n\ndeclare const VERSION: string;\n\n/**\n * @classdesc This method reduces all Blocks asyncronically and calls Block's save method to extract data\n *\n * @typedef {Saver} Saver\n * @property {Element} html - Editor HTML content\n * @property {String} json - Editor JSON output\n */\nexport default class Saver extends Module {\n /**\n * Composes new chain of Promises to fire them alternatelly\n * @return {OutputData}\n */\n public async save(): Promise {\n const {BlockManager, Sanitizer, ModificationsObserver} = this.Editor;\n const blocks = BlockManager.blocks,\n chainData = [];\n\n /**\n * Disable modifications observe while saving\n */\n ModificationsObserver.disable();\n\n blocks.forEach((block: Block) => {\n chainData.push(this.getSavedData(block));\n });\n\n const extractedData = await Promise.all(chainData);\n const sanitizedData = await Sanitizer.sanitizeBlocks(extractedData);\n\n ModificationsObserver.enable();\n\n return this.makeOutput(sanitizedData);\n }\n\n /**\n * Saves and validates\n * @param {Block} block - Editor's Tool\n * @return {ValidatedData} - Tool's validated data\n */\n private async getSavedData(block: Block): Promise {\n const blockData = await block.save();\n const isValid = blockData && await block.validate(blockData.data);\n\n return {...blockData, isValid};\n }\n\n /**\n * Creates output object with saved data, time and version of editor\n * @param {ValidatedData} allExtractedData\n * @return {OutputData}\n */\n private makeOutput(allExtractedData): OutputData {\n let totalTime = 0;\n const blocks = [];\n\n console.groupCollapsed('[Editor.js saving]:');\n\n allExtractedData.forEach(({tool, data, time, isValid}) => {\n totalTime += time;\n\n /**\n * Capitalize Tool name\n */\n console.group(`${tool.charAt(0).toUpperCase() + tool.slice(1)}`);\n\n if (isValid) {\n /** Group process info */\n console.log(data);\n console.groupEnd();\n } else {\n console.log(`Block «${tool}» skipped because saved data is invalid`);\n console.groupEnd();\n return;\n }\n\n /** If it was stub Block, get original data */\n if (tool === this.Editor.Tools.stubTool) {\n blocks.push(data);\n return;\n }\n\n blocks.push({\n type: tool,\n data,\n });\n });\n\n console.log('Total', totalTime);\n console.groupEnd();\n\n return {\n time: +new Date(),\n blocks,\n version: VERSION,\n };\n }\n}\n","import Shortcut from '@codexteam/shortcuts';\n\n/**\n * ShortcutData interface\n * Each shortcut must have name and handler\n * `name` is a shortcut, like 'CMD+K', 'CMD+B' etc\n * `handler` is a callback\n */\nexport interface ShortcutData {\n\n /**\n * Shortcut name\n * Ex. CMD+I, CMD+B ....\n */\n name: string;\n\n /**\n * Shortcut handler\n */\n handler(event): void;\n}\n\n/**\n * Contains keyboard and mouse events binded on each Block by Block Manager\n */\nimport Module from '../__module';\n\n/**\n * @class Shortcut\n * @classdesc Allows to register new shortcut\n *\n * Internal Shortcuts Module\n */\nexport default class Shortcuts extends Module {\n /**\n * All registered shortcuts\n * @type {Shortcut[]}\n */\n private registeredShortcuts: Shortcut[] = [];\n\n /**\n * Register shortcut\n * @param {ShortcutData} shortcut\n */\n public add(shortcut: ShortcutData): void {\n const { UI } = this.Editor;\n\n const newShortcut = new Shortcut({\n name: shortcut.name,\n on: document, // UI.nodes.redactor\n callback: shortcut.handler,\n });\n\n this.registeredShortcuts.push(newShortcut);\n }\n\n /**\n * Remove shortcut\n * @param {ShortcutData} shortcut\n */\n public remove(shortcut: string): void {\n const index = this.registeredShortcuts.findIndex((shc) => shc.name === shortcut);\n\n this.registeredShortcuts[index].remove();\n this.registeredShortcuts.splice(index, 1);\n }\n}\n","import Module from '../../__module';\nimport $ from '../../dom';\n\n/**\n * Block Settings\n *\n * ____ Settings Panel ____\n * | ...................... |\n * | . Tool Settings . |\n * | ...................... |\n * | . Default Settings . |\n * | ...................... |\n * |________________________|\n */\nexport default class BlockSettings extends Module {\n\n /**\n * Module Events\n * @return {{opened: string, closed: string}}\n */\n public get events(): {opened: string, closed: string} {\n return {\n opened: 'block-settings-opened',\n closed: 'block-settings-closed',\n };\n }\n\n /**\n * Block Settings CSS\n * @return {{wrapper, wrapperOpened, toolSettings, defaultSettings, button}}\n */\n public get CSS() {\n return {\n // Settings Panel\n wrapper: 'ce-settings',\n wrapperOpened: 'ce-settings--opened',\n toolSettings: 'ce-settings__plugin-zone',\n defaultSettings: 'ce-settings__default-zone',\n\n button: 'ce-settings__button',\n\n focusedButton : 'ce-settings__button--focused',\n focusedButtonAnimated: 'ce-settings__button--focused-animated',\n };\n }\n\n /**\n * Is Block Settings opened or not\n * @returns {boolean}\n */\n public get opened(): boolean {\n return this.nodes.wrapper.classList.contains(this.CSS.wrapperOpened);\n }\n\n /**\n * Block settings UI HTML elements\n */\n public nodes: {[key: string]: HTMLElement} = {\n wrapper: null,\n toolSettings: null,\n defaultSettings: null,\n };\n\n /**\n * List of buttons\n */\n private buttons: HTMLElement[] = [];\n\n /**\n * Index of active button\n */\n private focusedButtonIndex: number = -1;\n\n /**\n * Panel with block settings with 2 sections:\n * - Tool's Settings\n * - Default Settings [Move, Remove, etc]\n *\n * @return {Element}\n */\n public make(): void {\n this.nodes.wrapper = $.make('div', this.CSS.wrapper);\n\n this.nodes.toolSettings = $.make('div', this.CSS.toolSettings);\n this.nodes.defaultSettings = $.make('div', this.CSS.defaultSettings);\n\n $.append(this.nodes.wrapper, [this.nodes.toolSettings, this.nodes.defaultSettings]);\n }\n\n /**\n * Open Block Settings pane\n */\n public open(): void {\n this.nodes.wrapper.classList.add(this.CSS.wrapperOpened);\n\n /**\n * Fill Tool's settings\n */\n this.addToolSettings();\n\n /**\n * Add default settings that presents for all Blocks\n */\n this.addDefaultSettings();\n\n /** Tell to subscribers that block settings is opened */\n this.Editor.Events.emit(this.events.opened);\n }\n\n /**\n * Close Block Settings pane\n */\n public close(): void {\n this.nodes.wrapper.classList.remove(this.CSS.wrapperOpened);\n\n /** Clear settings */\n this.nodes.toolSettings.innerHTML = '';\n this.nodes.defaultSettings.innerHTML = '';\n\n /** Tell to subscribers that block settings is closed */\n this.Editor.Events.emit(this.events.closed);\n\n /** Clear cached buttons */\n this.buttons = [];\n\n /** Clear focus on active button */\n this.focusedButtonIndex = -1;\n\n }\n\n /**\n * Returns Tools Settings and Default Settings\n * @return {HTMLElement[]}\n */\n public get blockTunesButtons(): HTMLElement[] {\n /**\n * Return from cache\n * if exists\n */\n if (this.buttons.length !== 0) {\n return this.buttons;\n }\n\n const toolSettings = this.nodes.toolSettings.querySelectorAll(`.${this.Editor.StylesAPI.classes.settingsButton}`);\n const defaultSettings = this.nodes.defaultSettings.querySelectorAll(`.${this.CSS.button}`);\n\n toolSettings.forEach((item, index) => {\n this.buttons.push((item as HTMLElement));\n if (item.classList.contains(this.CSS.focusedButton)) {\n this.focusedButtonIndex = index;\n }\n });\n\n defaultSettings.forEach((item) => {\n this.buttons.push((item as HTMLElement));\n });\n\n return this.buttons;\n }\n\n /**\n * Leaf Block Tunes\n * @param {string} direction\n */\n public leaf(direction: string = 'right'): void {\n this.focusedButtonIndex = $.leafNodesAndReturnIndex(\n this.blockTunesButtons, this.focusedButtonIndex, direction, this.CSS.focusedButton,\n );\n }\n\n /**\n * Returns active button HTML element\n * @return {HTMLElement}\n */\n public get focusedButton(): HTMLElement {\n if (this.focusedButtonIndex === -1) {\n return null;\n }\n\n return (this.buttons[this.focusedButtonIndex] as HTMLElement);\n }\n /**\n * Add Tool's settings\n */\n private addToolSettings(): void {\n if (typeof this.Editor.BlockManager.currentBlock.tool.renderSettings === 'function') {\n $.append(this.nodes.toolSettings, this.Editor.BlockManager.currentBlock.tool.renderSettings());\n }\n }\n\n /**\n * Add default settings\n */\n private addDefaultSettings(): void {\n $.append(this.nodes.defaultSettings, this.Editor.BlockManager.currentBlock.renderTunes());\n }\n}\n","import Module from '../../__module';\nimport $ from '../../dom';\nimport {BlockToolConstructable} from '../../../../types';\nimport _ from '../../utils';\nimport {SavedData} from '../../../types-internal/block-data';\nimport Block from '../../block';\n\n/**\n * Block Converter\n */\nexport default class ConversionToolbar extends Module {\n /**\n * CSS getter\n */\n public static get CSS(): { [key: string]: string } {\n return {\n conversionToolbarWrapper: 'ce-conversion-toolbar',\n conversionToolbarShowed: 'ce-conversion-toolbar--showed',\n conversionToolbarTools: 'ce-conversion-toolbar__tools',\n conversionTool: 'ce-conversion-tool',\n\n conversionToolFocused : 'ce-conversion-tool--focused',\n conversionToolActive : 'ce-conversion-tool--active',\n };\n }\n\n /**\n * HTML Elements used for UI\n */\n public nodes: { [key: string]: HTMLElement } = {\n wrapper: null,\n tools: null,\n };\n\n /**\n * Conversion Toolbar open/close state\n * @type {boolean}\n */\n public opened: boolean = false;\n\n /**\n * Focused button index\n * -1 equals no chosen Tool\n * @type {number}\n */\n private focusedButtonIndex: number = -1;\n\n /**\n * Available tools\n */\n private tools: { [key: string]: HTMLElement } = {};\n\n /**\n * Create UI of Conversion Toolbar\n */\n public make(): void {\n this.nodes.wrapper = $.make('div', ConversionToolbar.CSS.conversionToolbarWrapper);\n this.nodes.tools = $.make('div', ConversionToolbar.CSS.conversionToolbarTools);\n\n /**\n * Add Tools that has 'import' method\n */\n this.addTools();\n\n $.append(this.nodes.wrapper, this.nodes.tools);\n $.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);\n }\n\n /**\n * Try to show Conversion Toolbar near passed Block\n * @param {Block} block - block to convert\n */\n public tryToShow(block: Block): void {\n const hasExportConfig = block.class.conversionConfig && block.class.conversionConfig.export;\n\n if (!hasExportConfig) {\n return;\n }\n\n const currentToolName = block.name;\n\n /**\n * Focus current tool in conversion toolbar\n */\n if (this.tools[currentToolName]) {\n /**\n * Drop previous active button before moving\n */\n if (this.focusedButton && this.focusedButton.classList.contains(ConversionToolbar.CSS.conversionToolActive)) {\n this.focusedButton.classList.remove(ConversionToolbar.CSS.conversionToolActive);\n }\n\n this.tools[currentToolName].classList.add(ConversionToolbar.CSS.conversionToolActive);\n }\n\n this.move(block);\n\n if (!this.opened) {\n this.open();\n }\n }\n\n /**\n * Shows Conversion Toolbar\n */\n public open(): void {\n this.opened = true;\n this.nodes.wrapper.classList.add(ConversionToolbar.CSS.conversionToolbarShowed);\n }\n\n /**\n * Closes Conversion Toolbar\n */\n public close(): void {\n this.opened = false;\n this.nodes.wrapper.classList.remove(ConversionToolbar.CSS.conversionToolbarShowed);\n\n this.dropFocusedButton();\n }\n\n /**\n * Leaf tools by Tab\n * @todo use class with tool iterator\n */\n public leaf(direction: string = 'right'): void {\n const toolsElements = (Array.from(this.nodes.tools.childNodes) as HTMLElement[]);\n this.focusedButtonIndex = $.leafNodesAndReturnIndex(\n toolsElements, this.focusedButtonIndex, direction, ConversionToolbar.CSS.conversionToolFocused,\n );\n }\n\n /**\n * Returns focused tool as HTML element\n * @return {HTMLElement}\n */\n public get focusedButton(): HTMLElement {\n if (this.focusedButtonIndex === -1) {\n return null;\n }\n return (this.nodes.tools.childNodes[this.focusedButtonIndex] as HTMLElement);\n }\n\n /**\n * Drops focused button\n */\n public dropFocusedButton() {\n Object.values(this.tools).forEach( (tool) => {\n (tool as HTMLElement).classList\n .remove(ConversionToolbar.CSS.conversionToolActive, ConversionToolbar.CSS.conversionToolFocused);\n });\n\n this.focusedButtonIndex = -1;\n }\n\n /**\n * Replaces one Block with another\n * For that Tools must provide import/export methods\n *\n * @param {string} replacingToolName\n */\n public async replaceWithBlock(replacingToolName: string): Promise {\n /**\n * At first, we get current Block data\n * @type {BlockToolConstructable}\n */\n const currentBlockClass = this.Editor.BlockManager.currentBlock.class;\n const currentBlockName = this.Editor.BlockManager.currentBlock.name;\n const savedBlock = await this.Editor.BlockManager.currentBlock.save() as SavedData;\n const blockData = savedBlock.data;\n\n /**\n * When current Block name is equals to the replacing tool Name,\n * than convert this Block back to the initial Block\n */\n if (currentBlockName === replacingToolName) {\n replacingToolName = this.config.initialBlock;\n }\n\n /**\n * Getting a class of replacing Tool\n * @type {BlockToolConstructable}\n */\n const replacingTool = this.Editor.Tools.toolsClasses[replacingToolName] as BlockToolConstructable;\n\n /**\n * Export property can be:\n * 1) Function — Tool defines which data to return\n * 2) String — the name of saved property\n *\n * In both cases returning value must be a string\n */\n let exportData: string = '';\n const exportProp = currentBlockClass.conversionConfig.export;\n\n if (typeof exportProp === 'function') {\n exportData = exportProp(blockData);\n } else if (typeof exportProp === 'string') {\n exportData = blockData[exportProp];\n } else {\n _.log('Conversion «export» property must be a string or function. ' +\n 'String means key of saved data object to export. Function should export processed string to export.');\n return;\n }\n\n /**\n * Clean exported data with replacing sanitizer config\n */\n const cleaned: string = this.Editor.Sanitizer.clean(\n exportData,\n replacingTool.sanitize,\n );\n\n /**\n * «import» property can be Function or String\n * function — accept imported string and compose tool data object\n * string — the name of data field to import\n */\n let newBlockData = {};\n const importProp = replacingTool.conversionConfig.import;\n\n if (typeof importProp === 'function') {\n newBlockData = importProp(cleaned);\n } else if (typeof importProp === 'string') {\n newBlockData[importProp] = cleaned;\n } else {\n _.log('Conversion «import» property must be a string or function. ' +\n 'String means key of tool data to import. Function accepts a imported string and return composed tool data.');\n return;\n }\n\n this.Editor.BlockManager.replace(replacingToolName, newBlockData);\n this.Editor.BlockSelection.clearSelection();\n\n this.close();\n\n _.delay(() => {\n this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);\n }, 10)();\n }\n\n /**\n * Move Conversion Toolbar to the working Block\n */\n private move(block: Block): void {\n const blockRect = block.pluginsContent.getBoundingClientRect();\n const wrapperRect = this.Editor.UI.nodes.wrapper.getBoundingClientRect();\n\n const newCoords = {\n x: blockRect.left - wrapperRect.left,\n y: blockRect.top + blockRect.height - wrapperRect.top,\n };\n\n this.nodes.wrapper.style.left = Math.floor(newCoords.x) + 'px';\n this.nodes.wrapper.style.top = Math.floor(newCoords.y) + 'px';\n }\n\n /**\n * Iterates existing Tools and inserts to the ConversionToolbar\n * if tools have ability to import\n */\n private addTools(): void {\n const tools = this.Editor.Tools.blockTools;\n\n for (const toolName in tools) {\n if (!tools.hasOwnProperty(toolName)) {\n continue;\n }\n\n const api = this.Editor.Tools.apiSettings;\n const toolClass = tools[toolName] as BlockToolConstructable;\n const toolToolboxSettings = toolClass[api.TOOLBOX];\n const conversionConfig = toolClass[api.CONVERSION_CONFIG];\n\n /**\n * Skip tools that don't pass 'toolbox' property\n */\n if (_.isEmpty(toolToolboxSettings) || !toolToolboxSettings.icon) {\n continue;\n }\n\n /**\n * Skip tools without «import» rule specified\n */\n if (!conversionConfig || !conversionConfig.import) {\n continue;\n }\n\n this.addTool(toolName, toolToolboxSettings.icon);\n }\n }\n\n /**\n * Add tool to the Conversion Toolbar\n */\n private addTool(toolName: string, toolIcon: string): void {\n const tool = $.make('div', [ ConversionToolbar.CSS.conversionTool ]);\n\n tool.dataset.tool = toolName;\n tool.innerHTML = toolIcon;\n\n $.append(this.nodes.tools, tool);\n this.tools[toolName] = tool;\n\n this.Editor.Listeners.on(tool, 'click', async () => {\n await this.replaceWithBlock(toolName);\n });\n }\n}\n","import Module from '../../__module';\nimport $ from '../../dom';\n\n/**\n *\n * «Toolbar» is the node that moves up/down over current block\n *\n * ______________________________________ Toolbar ____________________________________________\n * | |\n * | ..................... Content .................... ......... Block Actions .......... |\n * | . . . . |\n * | . . . [Open Settings] . |\n * | . [Plus Button] [Toolbox: {Tool1}, {Tool2}] . . . |\n * | . . . [Settings Panel] . |\n * | .................................................. .................................. |\n * | |\n * |___________________________________________________________________________________________|\n *\n *\n * Toolbox — its an Element contains tools buttons. Can be shown by Plus Button.\n *\n * _______________ Toolbox _______________\n * | |\n * | [Header] [Image] [List] [Quote] ... |\n * |_______________________________________|\n *\n *\n * Settings Panel — is an Element with block settings:\n *\n * ____ Settings Panel ____\n * | ...................... |\n * | . Tool Settings . |\n * | ...................... |\n * | . Default Settings . |\n * | ...................... |\n * |________________________|\n *\n *\n * @class\n * @classdesc Toolbar module\n *\n * @typedef {Toolbar} Toolbar\n * @property {Object} nodes\n * @property {Element} nodes.wrapper - Toolbar main element\n * @property {Element} nodes.content - Zone with Plus button and toolbox.\n * @property {Element} nodes.actions - Zone with Block Settings and Remove Button\n * @property {Element} nodes.blockActionsButtons - Zone with Block Buttons: [Settings]\n * @property {Element} nodes.plusButton - Button that opens or closes Toolbox\n * @property {Element} nodes.toolbox - Container for tools\n * @property {Element} nodes.settingsToggler - open/close Settings Panel button\n * @property {Element} nodes.settings - Settings Panel\n * @property {Element} nodes.pluginSettings - Plugin Settings section of Settings Panel\n * @property {Element} nodes.defaultSettings - Default Settings section of Settings Panel\n */\nexport default class Toolbar extends Module {\n /**\n * HTML Elements used for Toolbar UI\n */\n public nodes: {[key: string]: HTMLElement} = {\n wrapper : null,\n content : null,\n actions : null,\n\n // Content Zone\n plusButton : null,\n\n // Actions Zone\n blockActionsButtons: null,\n settingsToggler : null,\n };\n\n /**\n * CSS styles\n * @return {Object}\n */\n public get CSS() {\n return {\n toolbar: 'ce-toolbar',\n content: 'ce-toolbar__content',\n actions: 'ce-toolbar__actions',\n actionsOpened: 'ce-toolbar__actions--opened',\n\n toolbarOpened: 'ce-toolbar--opened',\n\n // Content Zone\n plusButton: 'ce-toolbar__plus',\n plusButtonHidden: 'ce-toolbar__plus--hidden',\n\n // Actions Zone\n blockActionsButtons: 'ce-toolbar__actions-buttons',\n settingsToggler: 'ce-toolbar__settings-btn',\n };\n }\n\n /**\n * Makes toolbar\n */\n public make(): void {\n this.nodes.wrapper = $.make('div', this.CSS.toolbar);\n\n /**\n * Make Content Zone and Actions Zone\n */\n ['content', 'actions'].forEach( (el) => {\n this.nodes[el] = $.make('div', this.CSS[el]);\n $.append(this.nodes.wrapper, this.nodes[el]);\n });\n\n /**\n * Fill Content Zone:\n * - Plus Button\n * - Toolbox\n */\n this.nodes.plusButton = $.make('div', this.CSS.plusButton);\n\n /**\n * Add events to show/hide tooltip for plus button\n */\n this.Editor.Listeners.on(this.nodes.plusButton, 'mouseenter', () => {\n const tooltip = this.Editor.Toolbox.nodes.tooltip;\n const fragment = document.createDocumentFragment();\n\n fragment.appendChild(document.createTextNode('Add'));\n fragment.appendChild($.make('div', this.Editor.Toolbox.CSS.tooltipShortcut, {\n textContent: '⇥ Tab',\n }));\n\n tooltip.style.left = '-17px';\n\n tooltip.innerHTML = '';\n tooltip.appendChild(fragment);\n tooltip.classList.add(this.Editor.Toolbox.CSS.tooltipShown);\n });\n\n this.Editor.Listeners.on(this.nodes.plusButton, 'mouseleave', () => {\n this.Editor.Toolbox.hideTooltip();\n });\n\n $.append(this.nodes.plusButton, $.svg('plus', 14, 14));\n $.append(this.nodes.content, this.nodes.plusButton);\n this.Editor.Listeners.on(this.nodes.plusButton, 'click', () => this.plusButtonClicked(), false);\n\n /**\n * Make a Toolbox\n */\n this.Editor.Toolbox.make();\n\n /**\n * Fill Actions Zone:\n * - Settings Toggler\n * - Remove Block Button\n * - Settings Panel\n */\n this.nodes.blockActionsButtons = $.make('div', this.CSS.blockActionsButtons);\n this.nodes.settingsToggler = $.make('span', this.CSS.settingsToggler);\n const settingsIcon = $.svg('dots', 18, 4);\n\n $.append(this.nodes.settingsToggler, settingsIcon);\n $.append(this.nodes.blockActionsButtons, this.nodes.settingsToggler);\n $.append(this.nodes.actions, this.nodes.blockActionsButtons);\n\n /**\n * Make and append Settings Panel\n */\n this.Editor.BlockSettings.make();\n $.append(this.nodes.actions, this.Editor.BlockSettings.nodes.wrapper);\n\n /**\n * Append toolbar to the Editor\n */\n $.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);\n\n /**\n * Bind events on the Toolbar elements\n */\n this.bindEvents();\n }\n\n /**\n * Move Toolbar to the Current Block\n * @param {Boolean} forceClose - force close Toolbar Settings and Toolbar\n */\n public move(forceClose: boolean = true): void {\n if (forceClose) {\n /** Close Toolbox when we move toolbar */\n this.Editor.Toolbox.close();\n this.Editor.BlockSettings.close();\n }\n\n const currentBlock = this.Editor.BlockManager.currentBlock.holder;\n\n /**\n * If no one Block selected as a Current\n */\n if (!currentBlock) {\n return;\n }\n\n const { isMobile } = this.Editor.UI;\n const blockHeight = currentBlock.offsetHeight;\n let toolbarY = currentBlock.offsetTop;\n\n /**\n * 1) On desktop — Toolbar at the top of Block, Plus/Toolbox moved the center of Block\n * 2) On mobile — Toolbar at the bottom of Block\n */\n if (!isMobile) {\n const contentOffset = Math.floor(blockHeight / 2);\n\n this.nodes.plusButton.style.transform = `translate3d(0, calc(${contentOffset}px - 50%), 0)`;\n this.Editor.Toolbox.nodes.toolbox.style.transform = `translate3d(0, calc(${contentOffset}px - 50%), 0)`;\n } else {\n toolbarY += blockHeight;\n }\n\n /**\n * Move Toolbar to the Top coordinate of Block\n */\n this.nodes.wrapper.style.transform = `translate3D(0, ${Math.floor(toolbarY)}px, 0)`;\n }\n\n /**\n * Open Toolbar with Plus Button and Actions\n * @param {boolean} withBlockActions - by default, Toolbar opens with Block Actions.\n * This flag allows to open Toolbar without Actions.\n * @param {boolean} needToCloseToolbox - by default, Toolbar will be moved with opening\n * (by click on Block, or by enter)\n * with closing Toolbox and Block Settings\n * This flag allows to open Toolbar with Toolbox\n */\n public open(withBlockActions: boolean = true, needToCloseToolbox: boolean = true): void {\n setTimeout(() => {\n this.move(needToCloseToolbox);\n this.nodes.wrapper.classList.add(this.CSS.toolbarOpened);\n\n if (withBlockActions) {\n this.blockActions.show();\n } else {\n this.blockActions.hide();\n }\n }, 50);\n }\n\n /**\n * returns toolbar opened state\n * @return {Boolean}\n */\n public get opened(): boolean {\n return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened);\n }\n\n /**\n * Close the Toolbar\n */\n public close(): void {\n this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened);\n\n /** Close components */\n this.blockActions.hide();\n this.Editor.Toolbox.close();\n this.Editor.BlockSettings.close();\n }\n\n /**\n * Plus Button public methods\n * @return {{hide: function(): void, show: function(): void}}\n */\n public get plusButton(): {hide: () => void, show: () => void} {\n return {\n hide: () => this.nodes.plusButton.classList.add(this.CSS.plusButtonHidden),\n show: () => {\n if (this.Editor.Toolbox.isEmpty) {\n return;\n }\n this.nodes.plusButton.classList.remove(this.CSS.plusButtonHidden);\n },\n };\n }\n\n /**\n * Block actions appearance manipulations\n * @return {{hide: function(): void, show: function(): void}}\n */\n private get blockActions(): {hide: () => void, show: () => void} {\n return {\n hide: () => {\n this.nodes.actions.classList.remove(this.CSS.actionsOpened);\n },\n show : () => {\n this.nodes.actions.classList.add(this.CSS.actionsOpened);\n },\n };\n }\n\n /**\n * Handler for Plus Button\n * @param {MouseEvent} event\n */\n private plusButtonClicked(): void {\n this.Editor.Toolbox.toggle();\n }\n\n /**\n * Bind events on the Toolbar Elements:\n * - Block Settings\n */\n private bindEvents(): void {\n /**\n * Settings toggler\n */\n this.Editor.Listeners.on(this.nodes.settingsToggler, 'click', () => this.settingsTogglerClicked());\n }\n\n /**\n * Clicks on the Block Settings toggler\n */\n private settingsTogglerClicked(): void {\n if (this.Editor.BlockSettings.opened) {\n this.Editor.BlockSettings.close();\n } else {\n this.Editor.BlockSettings.open();\n }\n }\n}\n","import Module from '../../__module';\nimport $ from '../../dom';\n\nimport BoldInlineTool from '../../inline-tools/inline-tool-bold';\nimport ItalicInlineTool from '../../inline-tools/inline-tool-italic';\nimport LinkInlineTool from '../../inline-tools/inline-tool-link';\nimport SelectionUtils from '../../selection';\nimport _ from '../../utils';\nimport {InlineTool, InlineToolConstructable, ToolConstructable, ToolSettings} from '../../../../types';\n\n/**\n * Inline toolbar with actions that modifies selected text fragment\n *\n * |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|\n * | B i [link] [mark] |\n * |________________________|\n */\nexport default class InlineToolbar extends Module {\n\n /**\n * CSS styles\n */\n public CSS = {\n inlineToolbar: 'ce-inline-toolbar',\n inlineToolbarShowed: 'ce-inline-toolbar--showed',\n inlineToolbarLeftOriented: 'ce-inline-toolbar--left-oriented',\n inlineToolbarRightOriented: 'ce-inline-toolbar--right-oriented',\n buttonsWrapper: 'ce-inline-toolbar__buttons',\n actionsWrapper: 'ce-inline-toolbar__actions',\n inlineToolButton: 'ce-inline-tool',\n inlineToolButtonLast: 'ce-inline-tool--last',\n inputField: 'cdx-input',\n focusedButton: 'ce-inline-tool--focused',\n };\n\n /**\n * State of inline toolbar\n * @type {boolean}\n */\n public opened: boolean = false;\n\n /**\n * Inline Toolbar elements\n */\n private nodes: { wrapper: HTMLElement, buttons: HTMLElement, actions: HTMLElement } = {\n wrapper: null,\n buttons: null,\n /**\n * Zone below the buttons where Tools can create additional actions by 'renderActions()' method\n * For example, input for the 'link' tool or textarea for the 'comment' tool\n */\n actions: null,\n };\n\n /**\n * Margin above/below the Toolbar\n */\n private readonly toolbarVerticalMargin: number = 20;\n\n /**\n * Tools instances\n */\n private toolsInstances: Map;\n\n /**\n * Buttons List\n * @type {NodeList}\n */\n private buttonsList: NodeList = null;\n\n /**\n * Visible Buttons\n * Some Blocks might disable inline tools\n * @type {HTMLElement[]}\n */\n private visibleButtonsList: HTMLElement[] = [];\n\n /**\n * Focused button index\n * @type {number}\n */\n private focusedButtonIndex: number = -1;\n\n /**\n * Cache for Inline Toolbar width\n * @type {number}\n */\n private width: number = 0;\n\n /**\n * Inline Toolbar Tools\n *\n * @returns Map\n */\n get tools(): Map {\n if (!this.toolsInstances || this.toolsInstances.size === 0) {\n const allTools = this.inlineTools;\n\n const orderedTools = new Map();\n\n // get the user order specifications\n const order = this.config.tools.header.inlineToolbar;\n\n // iterate through the list of user specified tools\n order.map((tool: string) => {\n orderedTools.set(tool, allTools[tool]);\n });\n\n this.toolsInstances = new Map([...orderedTools, ...Object.entries(allTools)]);\n }\n\n return this.toolsInstances;\n }\n\n /**\n * Making DOM\n */\n public make() {\n this.nodes.wrapper = $.make('div', this.CSS.inlineToolbar);\n this.nodes.buttons = $.make('div', this.CSS.buttonsWrapper);\n this.nodes.actions = $.make('div', this.CSS.actionsWrapper);\n\n // To prevent reset of a selection when click on the wrapper\n this.Editor.Listeners.on(this.nodes.wrapper, 'mousedown', (event) => {\n const isClickedOnActionsWrapper = (event.target as Element).closest(`.${this.CSS.actionsWrapper}`);\n\n // If click is on actions wrapper,\n // do not prevent default behaviour because actions might include interactive elements\n if (!isClickedOnActionsWrapper) {\n event.preventDefault();\n }\n });\n\n /**\n * Append Inline Toolbar to the Editor\n */\n $.append(this.nodes.wrapper, [this.nodes.buttons, this.nodes.actions]);\n $.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);\n\n /**\n * Append Inline Toolbar Tools\n */\n this.addTools();\n\n /**\n * Recalculate initial width with all buttons\n */\n this.recalculateWidth();\n }\n\n /**\n * Moving / appearance\n * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n */\n\n /**\n * Shows Inline Toolbar if something is selected\n * @param {boolean} [needToClose] - pass true to close toolbar if it is not allowed.\n * Avoid to use it just for closing IT, better call .close() clearly.\n */\n public tryToShow(needToClose: boolean = false): void {\n if (!this.allowedToShow()) {\n if (needToClose) {\n this.close();\n }\n return;\n }\n\n this.move();\n this.open();\n this.Editor.Toolbar.close();\n\n /** Check Tools state for selected fragment */\n this.checkToolsState();\n\n /** Clear selection */\n this.Editor.BlockSelection.clearSelection();\n }\n\n /**\n * Move Toolbar to the selected text\n */\n public move(): void {\n const selectionRect = SelectionUtils.rect as DOMRect;\n const wrapperOffset = this.Editor.UI.nodes.wrapper.getBoundingClientRect();\n const newCoords = {\n x: selectionRect.x - wrapperOffset.left,\n y: selectionRect.y\n + selectionRect.height\n // + window.scrollY\n - wrapperOffset.top\n + this.toolbarVerticalMargin,\n };\n\n /**\n * If we know selections width, place InlineToolbar to center\n */\n if (selectionRect.width) {\n newCoords.x += Math.floor(selectionRect.width / 2);\n }\n\n /**\n * Inline Toolbar has -50% translateX, so we need to check real coords to prevent overflowing\n */\n const realLeftCoord = newCoords.x - this.width / 2;\n const realRightCoord = newCoords.x + this.width / 2;\n\n /**\n * By default, Inline Toolbar has top-corner at the center\n * We are adding a modifiers for to move corner to the left or right\n */\n this.nodes.wrapper.classList.toggle(\n this.CSS.inlineToolbarLeftOriented,\n realLeftCoord < this.Editor.UI.contentRect.left,\n );\n\n this.nodes.wrapper.classList.toggle(\n this.CSS.inlineToolbarRightOriented,\n realRightCoord > this.Editor.UI.contentRect.right,\n );\n\n this.nodes.wrapper.style.left = Math.floor(newCoords.x) + 'px';\n this.nodes.wrapper.style.top = Math.floor(newCoords.y) + 'px';\n }\n\n /**\n * Leaf Inline Tools\n * @param {string} direction\n */\n public leaf(direction: string = 'right'): void {\n this.visibleButtonsList = (Array.from(this.buttonsList)\n .filter((tool) => !(tool as HTMLElement).hidden) as HTMLElement[]);\n\n if (this.visibleButtonsList.length === 0) {\n return;\n }\n\n this.focusedButtonIndex = $.leafNodesAndReturnIndex(\n this.visibleButtonsList, this.focusedButtonIndex, direction, this.CSS.focusedButton,\n );\n }\n\n /**\n * Drops focused button index\n */\n public dropFocusedButtonIndex(): void {\n if (this.focusedButtonIndex === -1) {\n return;\n }\n\n this.visibleButtonsList[this.focusedButtonIndex].classList.remove(this.CSS.focusedButton);\n this.focusedButtonIndex = -1;\n }\n\n /**\n * Returns Focused button Node\n * @return {HTMLElement}\n */\n public get focusedButton(): HTMLElement {\n if (this.focusedButtonIndex === -1) {\n return null;\n }\n\n return this.visibleButtonsList[this.focusedButtonIndex];\n }\n\n /**\n * Hides Inline Toolbar\n */\n public close(): void {\n this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed);\n this.tools.forEach((toolInstance) => {\n if (typeof toolInstance.clear === 'function') {\n toolInstance.clear();\n }\n });\n\n this.opened = false;\n\n if (this.focusedButtonIndex !== -1) {\n this.visibleButtonsList[this.focusedButtonIndex].classList.remove(this.CSS.focusedButton);\n this.focusedButtonIndex = -1;\n }\n }\n\n /**\n * Shows Inline Toolbar\n */\n public open(): void {\n\n /**\n * Filter inline-tools and show only allowed by Block's Tool\n */\n this.filterTools();\n\n /**\n * Show Inline Toolbar\n */\n this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed);\n\n /**\n * Call 'clear' method for Inline Tools (for example, 'link' want to clear input)\n */\n this.tools.forEach((toolInstance: InlineTool) => {\n if (typeof toolInstance.clear === 'function') {\n toolInstance.clear();\n }\n });\n\n this.buttonsList = this.nodes.buttons.querySelectorAll(`.${this.CSS.inlineToolButton}`);\n this.opened = true;\n }\n\n /**\n * Need to show Inline Toolbar or not\n */\n private allowedToShow(): boolean {\n /**\n * Tags conflicts with window.selection function.\n * Ex. IMG tag returns null (Firefox) or Redactors wrapper (Chrome)\n */\n const tagsConflictsWithSelection = ['IMG', 'INPUT'];\n const currentSelection = SelectionUtils.get();\n const selectedText = SelectionUtils.text;\n\n // old browsers\n if (!currentSelection || !currentSelection.anchorNode) {\n return false;\n }\n\n // empty selection\n if (currentSelection.isCollapsed || selectedText.length < 1) {\n return false;\n }\n\n const target = !$.isElement(currentSelection.anchorNode )\n ? currentSelection.anchorNode.parentElement\n : currentSelection.anchorNode;\n\n if (currentSelection && tagsConflictsWithSelection.includes(target.tagName)) {\n return false;\n }\n\n // The selection of the element only in contenteditable\n const contenteditable = target.closest('[contenteditable=\"true\"]');\n\n if (contenteditable === null) {\n return false;\n }\n\n // is enabled by current Block's Tool\n const currentBlock = this.Editor.BlockManager.getBlock(currentSelection.anchorNode as HTMLElement);\n\n if (!currentBlock) {\n return false;\n }\n\n const toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name);\n\n return toolSettings && toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR];\n }\n\n /**\n * Show only allowed Tools\n */\n private filterTools(): void {\n const currentSelection = SelectionUtils.get(),\n currentBlock = this.Editor.BlockManager.getBlock(currentSelection.anchorNode as HTMLElement);\n\n const toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name),\n inlineToolbarSettings = toolSettings && toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR];\n\n /**\n * All Inline Toolbar buttons\n * @type {HTMLElement[]}\n */\n const buttons = Array.from(this.nodes.buttons.querySelectorAll(`.${this.CSS.inlineToolButton}`)) as HTMLElement[];\n\n /**\n * Show previously hided\n */\n buttons.forEach((button) => {\n button.hidden = false;\n button.classList.remove(this.CSS.inlineToolButtonLast);\n });\n\n /**\n * Filter buttons if Block Tool pass config like inlineToolbar=['link']\n */\n if (Array.isArray(inlineToolbarSettings)) {\n buttons.forEach((button) => {\n button.hidden = !inlineToolbarSettings.includes(button.dataset.tool);\n });\n }\n\n /**\n * Tick for removing right-margin from last visible button.\n * Current generation of CSS does not allow to filter :visible elements\n */\n const lastVisibleButton = buttons.filter((button) => !button.hidden).pop();\n\n if (lastVisibleButton) {\n lastVisibleButton.classList.add(this.CSS.inlineToolButtonLast);\n }\n\n /**\n * Recalculate width because some buttons can be hidden\n */\n this.recalculateWidth();\n }\n\n /**\n * Recalculate inline toolbar width\n */\n private recalculateWidth(): void {\n this.width = this.nodes.wrapper.offsetWidth;\n }\n\n /**\n * Working with Tools\n * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n */\n\n /**\n * Fill Inline Toolbar with Tools\n */\n private addTools(): void {\n this.tools.forEach((toolInstance, toolName) => {\n this.addTool(toolName, toolInstance);\n });\n }\n\n /**\n * Add tool button and activate clicks\n */\n private addTool(toolName: string, tool: InlineTool): void {\n const {\n Listeners,\n Tools,\n } = this.Editor;\n\n const button = tool.render();\n\n if (!button) {\n _.log('Render method must return an instance of Node', 'warn', toolName);\n return;\n }\n\n button.dataset.tool = toolName;\n this.nodes.buttons.appendChild(button);\n\n if (typeof tool.renderActions === 'function') {\n const actions = tool.renderActions();\n this.nodes.actions.appendChild(actions);\n }\n\n Listeners.on(button, 'click', (event) => {\n this.toolClicked(tool);\n event.preventDefault();\n });\n\n /**\n * Enable shortcuts\n * Ignore tool that doesn't have shortcut or empty string\n */\n const toolSettings = Tools.getToolSettings(toolName);\n\n let shortcut = null;\n\n /**\n * Get internal inline tools\n */\n const internalTools: string[] = Object\n .entries(Tools.internalTools)\n .filter(([name, toolClass]: [string, ToolConstructable | ToolSettings]) => {\n if (_.isFunction(toolClass)) {\n return toolClass[Tools.apiSettings.IS_INLINE];\n }\n\n return (toolClass as ToolSettings).class[Tools.apiSettings.IS_INLINE];\n })\n .map(([name]: [string, InlineToolConstructable | ToolSettings]) => name);\n\n /**\n * 1) For internal tools, check public getter 'shortcut'\n * 2) For external tools, check tool's settings\n */\n if (internalTools.includes(toolName)) {\n shortcut = this.inlineTools[toolName].shortcut;\n } else if (toolSettings && toolSettings[Tools.apiSettings.SHORTCUT]) {\n shortcut = toolSettings[Tools.apiSettings.SHORTCUT];\n }\n\n if (shortcut) {\n this.enableShortcuts(tool, shortcut);\n }\n }\n\n /**\n * Enable Tool shortcut with Editor Shortcuts Module\n * @param {InlineTool} tool - Tool instance\n * @param {string} shortcut - shortcut according to the ShortcutData Module format\n */\n private enableShortcuts(tool: InlineTool, shortcut: string): void {\n this.Editor.Shortcuts.add({\n name: shortcut,\n handler: (event) => {\n const {currentBlock} = this.Editor.BlockManager;\n\n /**\n * Editor is not focused\n */\n if (!currentBlock) {\n return;\n }\n\n /**\n * We allow to fire shortcut with empty selection (isCollapsed=true)\n * it can be used by tools like «Mention» that works without selection:\n * Example: by SHIFT+@ show dropdown and insert selected username\n */\n // if (SelectionUtils.isCollapsed) return;\n\n const toolSettings = this.Editor.Tools.getToolSettings(currentBlock.name);\n\n if (!toolSettings || !toolSettings[this.Editor.Tools.apiSettings.IS_ENABLED_INLINE_TOOLBAR]) {\n return;\n }\n\n event.preventDefault();\n this.toolClicked(tool);\n },\n });\n }\n\n /**\n * Inline Tool button clicks\n * @param {InlineTool} tool - Tool's instance\n */\n private toolClicked(tool: InlineTool): void {\n const range = SelectionUtils.range;\n\n tool.surround(range);\n this.checkToolsState();\n }\n\n /**\n * Check Tools` state by selection\n */\n private checkToolsState(): void {\n this.tools.forEach((toolInstance) => {\n toolInstance.checkState(SelectionUtils.get());\n });\n }\n\n /**\n * Get inline tools tools\n * Tools that has isInline is true\n */\n private get inlineTools(): { [name: string]: InlineTool } {\n const result = {};\n\n for (const tool in this.Editor.Tools.inline) {\n if (this.Editor.Tools.inline.hasOwnProperty(tool)) {\n const toolSettings = this.Editor.Tools.getToolSettings(tool);\n\n result[tool] = this.Editor.Tools.constructInline(this.Editor.Tools.inline[tool], toolSettings);\n }\n }\n\n return result;\n }\n}\n","import Module from '../../__module';\nimport $ from '../../dom';\nimport _ from '../../utils';\nimport {BlockToolConstructable, ToolboxConfig} from '../../../../types';\n\n/**\n * @class Toolbox\n * @classdesc Holder for Tools\n *\n * @typedef {Toolbox} Toolbox\n * @property {Boolean} opened - opening state\n * @property {Object} nodes - Toolbox nodes\n * @property {Object} CSS - CSS class names\n *\n */\nexport default class Toolbox extends Module {\n\n /**\n * CSS styles\n * @return {{toolbox: string, toolboxButton string, toolboxButtonActive: string,\n * toolboxOpened: string, tooltip: string, tooltipShown: string, tooltipShortcut: string}}\n */\n get CSS() {\n return {\n toolbox: 'ce-toolbox',\n toolboxButton: 'ce-toolbox__button',\n toolboxButtonActive : 'ce-toolbox__button--active',\n toolboxOpened: 'ce-toolbox--opened',\n tooltip: 'ce-toolbox__tooltip',\n tooltipShown: 'ce-toolbox__tooltip--shown',\n tooltipShortcut: 'ce-toolbox__tooltip-shortcut',\n openedToolbarHolderModifier: 'codex-editor--toolbox-opened',\n };\n }\n\n /**\n * get tool name when it is selected\n * In case when nothing selected returns null\n *\n * @return {String|null}\n */\n public get getActiveTool(): string {\n const childNodes = this.nodes.toolbox.childNodes;\n\n if (this.activeButtonIndex === -1) {\n return null;\n }\n\n return (childNodes[this.activeButtonIndex] as HTMLElement).dataset.tool;\n }\n\n /**\n * Returns True if Toolbox is Empty and nothing to show\n * @return {boolean}\n */\n public get isEmpty(): boolean {\n return this.displayedToolsCount === 0;\n }\n\n private static LEAF_DIRECTIONS = {\n RIGHT: 'right',\n LEFT: 'left',\n };\n\n /**\n * Opening state\n * @type {boolean}\n */\n public opened: boolean = false;\n\n /**\n * HTMLElements used for Toolbox UI\n */\n public nodes: {\n toolbox: HTMLElement,\n tooltip: HTMLElement,\n buttons: HTMLElement[],\n } = {\n toolbox: null,\n tooltip: null,\n buttons: [],\n };\n\n /**\n * Active button index\n * -1 equals no chosen Tool\n * @type {number}\n */\n private activeButtonIndex: number = -1;\n\n /**\n * How many tools displayed in Toolbox\n * @type {number}\n */\n private displayedToolsCount: number = 0;\n\n /**\n * Makes the Toolbox\n */\n public make(): void {\n this.nodes.toolbox = $.make('div', this.CSS.toolbox);\n $.append(this.Editor.Toolbar.nodes.content, this.nodes.toolbox);\n\n this.addTools();\n this.addTooltip();\n }\n\n /**\n * Toolbox Tool's button click handler\n *\n * @param {MouseEvent|KeyboardEvent} event\n * @param {string} toolName\n */\n public toolButtonActivate(event: MouseEvent|KeyboardEvent, toolName: string): void {\n const tool = this.Editor.Tools.toolsClasses[toolName] as BlockToolConstructable;\n\n this.insertNewBlock(tool, toolName);\n }\n\n /**\n * Open Toolbox with Tools\n */\n public open(): void {\n if (this.isEmpty) {\n return;\n }\n\n this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolbarHolderModifier);\n this.nodes.toolbox.classList.add(this.CSS.toolboxOpened);\n\n this.opened = true;\n }\n\n /**\n * Close Toolbox\n */\n public close(): void {\n this.hideTooltip();\n\n this.nodes.toolbox.classList.remove(this.CSS.toolboxOpened);\n this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolbarHolderModifier);\n\n this.opened = false;\n\n /**\n * Remove active item pointer\n */\n if (this.activeButtonIndex !== -1) {\n (this.nodes.toolbox.childNodes[this.activeButtonIndex] as HTMLElement)\n .classList.remove(this.CSS.toolboxButtonActive);\n\n this.activeButtonIndex = -1;\n }\n }\n\n /**\n * Close Toolbox\n */\n public toggle(): void {\n if (!this.opened) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Leaf\n * flip through the toolbox items\n * @param {String} direction - leaf direction, right is default\n */\n public leaf(direction: string = Toolbox.LEAF_DIRECTIONS.RIGHT): void {\n const childNodes = (Array.from(this.nodes.toolbox.childNodes) as HTMLElement[]);\n this.activeButtonIndex = $.leafNodesAndReturnIndex(\n childNodes, this.activeButtonIndex, direction, this.CSS.toolboxButtonActive,\n );\n }\n\n /**\n * Hide toolbox tooltip\n */\n public hideTooltip(): void {\n this.nodes.tooltip.classList.remove(this.CSS.tooltipShown);\n }\n\n /**\n * Iterates available tools and appends them to the Toolbox\n */\n private addTools(): void {\n const tools = this.Editor.Tools.available;\n\n for (const toolName in tools) {\n if (tools.hasOwnProperty(toolName)) {\n this.addTool(toolName, tools[toolName] as BlockToolConstructable);\n }\n }\n }\n\n /**\n * Append Tool to the Toolbox\n *\n * @param {string} toolName - tool name\n * @param {BlockToolConstructable} tool - tool class\n */\n private addTool(toolName: string, tool: BlockToolConstructable): void {\n const api = this.Editor.Tools.apiSettings;\n\n const toolToolboxSettings = tool[api.TOOLBOX];\n\n /**\n * Skip tools that don't pass 'toolbox' property\n */\n if (_.isEmpty(toolToolboxSettings)) {\n return;\n }\n\n if (toolToolboxSettings && !toolToolboxSettings.icon) {\n _.log('Toolbar icon is missed. Tool %o skipped', 'warn', toolName);\n return;\n }\n\n /**\n * @todo Add checkup for the render method\n */\n // if (typeof tool.render !== 'function') {\n // _.log('render method missed. Tool %o skipped', 'warn', tool);\n // return;\n // }\n\n const {toolbox: userToolboxSettings = {} as ToolboxConfig} = this.Editor.Tools.getToolSettings(toolName);\n\n const button = $.make('li', [ this.CSS.toolboxButton ]);\n\n button.dataset.tool = toolName;\n button.innerHTML = userToolboxSettings.icon || toolToolboxSettings.icon;\n\n $.append(this.nodes.toolbox, button);\n\n this.nodes.toolbox.appendChild(button);\n this.nodes.buttons.push(button);\n\n /**\n * Add click listener\n */\n this.Editor.Listeners.on(button, 'click', (event: KeyboardEvent|MouseEvent) => {\n this.toolButtonActivate(event, toolName);\n });\n\n /**\n * Add listeners to show/hide toolbox tooltip\n */\n this.Editor.Listeners.on(button, 'mouseenter', () => {\n this.showTooltip(button, toolName);\n });\n\n this.Editor.Listeners.on(button, 'mouseleave', () => {\n this.hideTooltip();\n });\n\n /**\n * Enable shortcut\n */\n const toolSettings = this.Editor.Tools.getToolSettings(toolName);\n\n if (toolSettings && toolSettings[this.Editor.Tools.apiSettings.SHORTCUT]) {\n this.enableShortcut(tool, toolName, toolSettings[this.Editor.Tools.apiSettings.SHORTCUT]);\n }\n\n /** Increment Tools count */\n this.displayedToolsCount++;\n }\n\n /**\n * Add toolbox tooltip to page\n */\n private addTooltip(): void {\n this.nodes.tooltip = $.make('div', this.CSS.tooltip, {\n innerHTML: '',\n });\n\n $.append(this.Editor.Toolbar.nodes.content, this.nodes.tooltip);\n }\n\n /**\n * Show tooltip for toolbox button\n * @param {HTMLElement} button\n * @param {string} toolName\n */\n private showTooltip(button: HTMLElement, toolName: string): void {\n const toolSettings = this.Editor.Tools.getToolSettings(toolName);\n const toolboxSettings = this.Editor.Tools.available[toolName][this.Editor.Tools.apiSettings.TOOLBOX] || {};\n const userToolboxSettings = toolSettings.toolbox || {};\n const name = userToolboxSettings.title || toolboxSettings.title || toolName;\n\n let shortcut = toolSettings[this.Editor.Tools.apiSettings.SHORTCUT];\n\n const fragment = document.createDocumentFragment();\n const hint = document.createTextNode(_.capitalize(name));\n\n fragment.appendChild(hint);\n\n if (shortcut) {\n const OS = _.getUserOS();\n\n shortcut = shortcut\n .replace(/shift/gi, '⇧')\n .replace(/backspace/gi, '⌫')\n .replace(/enter/gi, '⏎')\n .replace(/up/gi, '↑')\n .replace(/left/gi, '→')\n .replace(/down/gi, '↓')\n .replace(/right/gi, '←')\n .replace(/escape/gi, '⎋')\n .replace(/insert/gi, 'Ins')\n .replace(/delete/gi, '␡')\n .replace(/\\+/gi, ' + ');\n\n if (OS.mac) {\n shortcut = shortcut.replace(/ctrl|cmd/gi, '⌘').replace(/alt/gi, '⌥');\n } else {\n shortcut = shortcut.replace(/cmd/gi, 'Ctrl').replace(/windows/gi, 'WIN');\n }\n\n fragment.appendChild($.make('div', this.CSS.tooltipShortcut, {\n textContent: shortcut,\n }));\n }\n\n const leftOffset = 16;\n const coordinate = button.offsetLeft;\n const topOffset = Math.floor(this.Editor.BlockManager.currentBlock.holder.offsetHeight / 2);\n\n this.nodes.tooltip.innerHTML = '';\n this.nodes.tooltip.appendChild(fragment);\n\n this.nodes.tooltip.style.left = `${coordinate + leftOffset}px`;\n this.nodes.tooltip.style.transform = `translate3d(-50%, ${topOffset}px, 0)`;\n this.nodes.tooltip.classList.add(this.CSS.tooltipShown);\n }\n\n /**\n * Enable shortcut Block Tool implemented shortcut\n * @param {BlockToolConstructable} tool - Tool class\n * @param {String} toolName - Tool name\n * @param {String} shortcut - shortcut according to the ShortcutData Module format\n */\n private enableShortcut(tool: BlockToolConstructable, toolName: string, shortcut: string) {\n this.Editor.Shortcuts.add({\n name: shortcut,\n handler: (event: KeyboardEvent) => {\n event.preventDefault();\n this.insertNewBlock(tool, toolName);\n },\n });\n }\n\n /**\n * Inserts new block\n * Can be called when button clicked on Toolbox or by ShortcutData\n *\n * @param {BlockToolConstructable} tool - Tool Class\n * @param {String} toolName - Tool name\n */\n private insertNewBlock(tool: BlockToolConstructable, toolName: string) {\n const {BlockManager, Caret} = this.Editor;\n /**\n * @type {Block}\n */\n const {currentBlock} = BlockManager;\n\n let newBlock;\n\n if (currentBlock.isEmpty) {\n newBlock = BlockManager.replace(toolName);\n } else {\n newBlock = BlockManager.insert(toolName);\n }\n\n /**\n * Apply callback before inserting html\n */\n newBlock.call('appendCallback', {});\n\n this.Editor.Caret.setToBlock(newBlock);\n\n /** If new block doesn't contain inpus, insert new paragraph above */\n if (newBlock.inputs.length === 0) {\n if (newBlock === BlockManager.lastBlock) {\n BlockManager.insertAtEnd();\n Caret.setToBlock(BlockManager.lastBlock);\n } else {\n Caret.setToBlock(BlockManager.nextBlock);\n }\n }\n\n /**\n * close toolbar when node is changed\n */\n this.Editor.Toolbar.close();\n }\n}\n","import Paragraph from '../tools/paragraph/dist/bundle';\nimport Module from '../__module';\nimport _ from '../utils';\nimport {\n BlockToolConstructable,\n InlineTool,\n InlineToolConstructable, Tool,\n ToolConfig,\n ToolConstructable,\n ToolSettings,\n} from '../../../types';\nimport BoldInlineTool from '../inline-tools/inline-tool-bold';\nimport ItalicInlineTool from '../inline-tools/inline-tool-italic';\nimport LinkInlineTool from '../inline-tools/inline-tool-link';\nimport Stub from '../tools/stub';\n\n/**\n * @module Editor.js Tools Submodule\n *\n * Creates Instances from Plugins and binds external config to the instances\n */\n\n/**\n * Class properties:\n *\n * @typedef {Tools} Tools\n * @property {Tools[]} toolsAvailable - available Tools\n * @property {Tools[]} toolsUnavailable - unavailable Tools\n * @property {object} toolsClasses - all classes\n * @property {object} toolsSettings - Tools settings\n * @property {EditorConfig} config - Editor config\n */\nexport default class Tools extends Module {\n\n /**\n * Name of Stub Tool\n * Stub Tool is used to substitute unavailable block Tools and store their data\n * @type {string}\n */\n public stubTool = 'stub';\n\n /**\n * Returns available Tools\n * @return {Tool[]}\n */\n public get available(): {[name: string]: ToolConstructable} {\n return this.toolsAvailable;\n }\n\n /**\n * Returns unavailable Tools\n * @return {Tool[]}\n */\n public get unavailable(): {[name: string]: ToolConstructable} {\n return this.toolsUnavailable;\n }\n\n /**\n * Return Tools for the Inline Toolbar\n * @return {Object} - object of Inline Tool's classes\n */\n public get inline(): {[name: string]: ToolConstructable} {\n if (this._inlineTools) {\n return this._inlineTools;\n }\n\n const tools = Object.entries(this.available).filter( ([name, tool]) => {\n if (!tool[this.apiSettings.IS_INLINE]) {\n return false;\n }\n\n /**\n * Some Tools validation\n */\n const inlineToolRequiredMethods = ['render', 'surround', 'checkState'];\n const notImplementedMethods = inlineToolRequiredMethods.filter( (method) => !this.constructInline(tool)[method]);\n\n if (notImplementedMethods.length) {\n _.log(\n `Incorrect Inline Tool: ${tool.name}. Some of required methods is not implemented %o`,\n 'warn',\n notImplementedMethods,\n );\n return false;\n }\n\n return true;\n });\n\n /**\n * collected inline tools with key of tool name\n */\n const result = {};\n\n tools.forEach(([name, tool]) => result[name] = tool);\n\n /**\n * Cache prepared Tools\n */\n this._inlineTools = result;\n\n return this._inlineTools;\n }\n\n /**\n * Return editor block tools\n */\n public get blockTools(): {[name: string]: BlockToolConstructable} {\n // eslint-disable-next-line no-unused-vars\n const tools = Object.entries(this.available).filter( ([name, tool]) => {\n return !tool[this.apiSettings.IS_INLINE];\n });\n\n /**\n * collected block tools with key of tool name\n */\n const result = {};\n\n tools.forEach(([name, tool]) => result[name] = tool);\n\n return result;\n }\n\n /**\n * Constant for available Tools Settings\n * @todo separate internal and external options\n * @return {object}\n */\n public get apiSettings() {\n return {\n CONFIG: 'config',\n IS_ENABLED_INLINE_TOOLBAR: 'inlineToolbar',\n IS_ENABLED_LINE_BREAKS: 'enableLineBreaks',\n IS_INLINE: 'isInline',\n IS_PASTE_DISALLOWED: 'disallowPaste',\n SHORTCUT: 'shortcut',\n TOOLBOX: 'toolbox',\n SANITIZE_CONFIG: 'sanitize',\n CONVERSION_CONFIG: 'conversionConfig',\n };\n }\n\n /**\n * Map {name: Class, ...} where:\n * name — block type name in JSON. Got from EditorConfig.tools keys\n * @type {Object}\n */\n public readonly toolsClasses: {[name: string]: ToolConstructable} = {};\n\n /**\n * Tools` classes available to use\n */\n private readonly toolsAvailable: {[name: string]: ToolConstructable} = {};\n\n /**\n * Tools` classes not available to use because of preparation failure\n */\n private readonly toolsUnavailable: {[name: string]: ToolConstructable} = {};\n\n /**\n * Tools settings in a map {name: settings, ...}\n * @type {Object}\n */\n private readonly toolsSettings: {[name: string]: ToolSettings} = {};\n\n /**\n * Cache for the prepared inline tools\n * @type {null|object}\n * @private\n */\n private _inlineTools: {[name: string]: ToolConstructable} = {};\n\n /**\n * @constructor\n *\n * @param {EditorConfig} config\n */\n constructor({config}) {\n super({config});\n\n this.toolsClasses = {};\n\n this.toolsSettings = {};\n\n /**\n * Available tools list\n * {name: Class, ...}\n * @type {Object}\n */\n this.toolsAvailable = {};\n\n /**\n * Tools that rejected a prepare method\n * {name: Class, ... }\n * @type {Object}\n */\n this.toolsUnavailable = {};\n\n this._inlineTools = null;\n }\n\n /**\n * Creates instances via passed or default configuration\n * @return {Promise}\n */\n public prepare() {\n this.validateTools();\n\n /**\n * Assign internal tools\n */\n this.config.tools = _.deepMerge({}, this.internalTools, this.config.tools);\n\n if (!this.config.hasOwnProperty('tools') || Object.keys(this.config.tools).length === 0) {\n throw Error('Can\\'t start without tools');\n }\n\n /**\n * Save Tools settings to a map\n */\n for (const toolName in this.config.tools) {\n /**\n * If Tool is an object not a Tool's class then\n * save class and settings separately\n */\n if (typeof this.config.tools[toolName] === 'object') {\n /**\n * Save Tool's class from 'class' field\n * @type {Tool}\n */\n this.toolsClasses[toolName] = (this.config.tools[toolName] as ToolSettings).class;\n\n /**\n * Save Tool's settings\n * @type {ToolSettings}\n */\n this.toolsSettings[toolName] = this.config.tools[toolName] as ToolSettings;\n\n /**\n * Remove Tool's class from settings\n */\n delete this.toolsSettings[toolName].class;\n } else {\n /**\n * Save Tool's class\n * @type {Tool}\n */\n this.toolsClasses[toolName] = this.config.tools[toolName] as ToolConstructable;\n\n /**\n * Set empty settings for Block by default\n * @type {{}}\n */\n this.toolsSettings[toolName] = {class: this.config.tools[toolName] as ToolConstructable};\n }\n }\n\n /**\n * getting classes that has prepare method\n */\n const sequenceData = this.getListOfPrepareFunctions();\n\n /**\n * if sequence data contains nothing then resolve current chain and run other module prepare\n */\n if (sequenceData.length === 0) {\n return Promise.resolve();\n }\n\n /**\n * to see how it works {@link Util#sequence}\n */\n return _.sequence(sequenceData, (data: any) => {\n this.success(data);\n }, (data) => {\n this.fallback(data);\n });\n }\n\n /**\n * @param {ChainData.data} data - append tool to available list\n */\n public success(data) {\n this.toolsAvailable[data.toolName] = this.toolsClasses[data.toolName];\n }\n\n /**\n * @param {ChainData.data} data - append tool to unavailable list\n */\n public fallback(data) {\n this.toolsUnavailable[data.toolName] = this.toolsClasses[data.toolName];\n }\n\n /**\n * Return Tool`s instance\n *\n * @param {String} tool — tool name\n * @param {BlockToolData} data — initial data\n * @return {BlockTool}\n */\n public construct(tool, data) {\n const plugin = this.toolsClasses[tool];\n\n /**\n * Configuration to be passed to the Tool's constructor\n */\n const config = this.toolsSettings[tool][this.apiSettings.CONFIG] || {};\n\n // Pass placeholder to initial Block config\n if (tool === this.config.initialBlock && !config.placeholder) {\n config.placeholder = this.config.placeholder;\n }\n\n /**\n * @type {{api: API, config: ({}), data: BlockToolData}}\n */\n const constructorOptions = {\n api: this.Editor.API.methods,\n config,\n data,\n };\n\n return new plugin(constructorOptions);\n }\n\n /**\n * Return Inline Tool's instance\n *\n * @param {InlineTool} tool\n * @param {ToolSettings} toolSettings\n * @return {InlineTool} — instance\n */\n public constructInline(tool: InlineToolConstructable, toolSettings: ToolSettings = {} as ToolSettings): InlineTool {\n /**\n * @type {{api: API}}\n */\n const constructorOptions = {\n api: this.Editor.API.methods,\n config: toolSettings[this.apiSettings.CONFIG] || {},\n };\n\n return new tool(constructorOptions) as InlineTool;\n }\n\n /**\n * Check if passed Tool is an instance of Initial Block Tool\n * @param {Tool} tool - Tool to check\n * @return {Boolean}\n */\n public isInitial(tool) {\n return tool instanceof this.available[this.config.initialBlock];\n }\n\n /**\n * Return Tool's config by name\n * @param {string} toolName\n * @return {ToolSettings}\n */\n public getToolSettings(toolName): ToolSettings {\n return this.toolsSettings[toolName];\n }\n\n /**\n * Binds prepare function of plugins with user or default config\n * @return {Array} list of functions that needs to be fired sequentially\n */\n private getListOfPrepareFunctions(): Array<{\n function: (data: {toolName: string, config: ToolConfig}) => void,\n data: {toolName: string, config: ToolConfig},\n }> {\n const toolPreparationList: Array<{\n function: (data: {toolName: string, config: ToolConfig}) => void,\n data: {toolName: string, config: ToolConfig}}\n > = [];\n\n for (const toolName in this.toolsClasses) {\n if (this.toolsClasses.hasOwnProperty(toolName)) {\n const toolClass = this.toolsClasses[toolName];\n\n if (typeof toolClass.prepare === 'function') {\n toolPreparationList.push({\n function: toolClass.prepare,\n data: {\n toolName,\n config: this.toolsSettings[toolName][this.apiSettings.CONFIG],\n },\n });\n } else {\n /**\n * If Tool hasn't a prepare method, mark it as available\n */\n this.toolsAvailable[toolName] = toolClass;\n }\n }\n }\n\n return toolPreparationList;\n }\n\n /**\n * Validate Tools configuration objects and throw Error for user if it is invalid\n */\n private validateTools() {\n /**\n * Check Tools for a class containing\n */\n for (const toolName in this.config.tools) {\n if (this.config.tools.hasOwnProperty(toolName)) {\n if (toolName in this.internalTools) {\n return;\n }\n\n const tool = this.config.tools[toolName];\n\n if (!_.isFunction(tool) && !_.isFunction((tool as ToolSettings).class)) {\n throw Error(\n `Tool «${toolName}» must be a constructor function or an object with function in the «class» property`,\n );\n }\n }\n }\n }\n\n /**\n * Returns internal tools\n * Includes Bold, Italic, Link and Paragraph\n */\n get internalTools() {\n return {\n bold: {class: BoldInlineTool},\n italic: {class: ItalicInlineTool},\n link: {class: LinkInlineTool},\n paragraph: {\n class: Paragraph,\n inlineToolbar: true,\n },\n stub: {class: Stub},\n };\n }\n}\n","/**\n * Prebuilded sprite of SVG icons\n */\nimport sprite from '../../../dist/sprite.svg';\n\n/**\n * Module UI\n *\n * @type {UI}\n */\nimport Module from '../__module';\nimport $ from '../dom';\nimport _ from '../utils';\n\nimport Selection from '../selection';\nimport Block from '../block';\n\n/**\n * @class\n *\n * @classdesc Makes Editor.js UI:\n * \n * \n * \n * \n * \n *\n * @typedef {UI} UI\n * @property {EditorConfig} config - editor configuration {@link EditorJS#configuration}\n * @property {Object} Editor - available editor modules {@link EditorJS#moduleInstances}\n * @property {Object} nodes -\n * @property {Element} nodes.holder - element where we need to append redactor\n * @property {Element} nodes.wrapper - \n * @property {Element} nodes.redactor - \n */\nexport default class UI extends Module {\n\n /**\n * Editor.js UI CSS class names\n * @return {{editorWrapper: string, editorZone: string}}\n */\n public get CSS(): {\n editorWrapper: string, editorWrapperNarrow: string, editorZone: string, editorZoneHidden: string,\n editorLoader: string, editorEmpty: string,\n } {\n return {\n editorWrapper : 'codex-editor',\n editorWrapperNarrow : 'codex-editor--narrow',\n editorZone : 'codex-editor__redactor',\n editorZoneHidden : 'codex-editor__redactor--hidden',\n editorLoader : 'codex-editor__loader',\n editorEmpty : 'codex-editor--empty',\n };\n }\n\n /**\n * Return Width of center column of Editor\n * @return {DOMRect}\n */\n public get contentRect(): DOMRect {\n if (this.contentRectCache) {\n return this.contentRectCache;\n }\n\n const someBlock = this.nodes.wrapper.querySelector(`.${Block.CSS.content}`);\n\n /**\n * When Editor is not ready, there is no Blocks, so return the default value\n */\n if (!someBlock) {\n return {\n width: 650,\n left: 0,\n right: 0,\n } as DOMRect;\n }\n\n this.contentRectCache = someBlock.getBoundingClientRect() as DOMRect;\n\n return this.contentRectCache;\n }\n\n /**\n * Flag that became true on mobile viewport\n * @type {boolean}\n */\n public isMobile: boolean = false;\n\n /**\n * HTML Elements used for UI\n */\n public nodes: { [key: string]: HTMLElement } = {\n holder: null,\n wrapper: null,\n redactor: null,\n };\n\n /**\n * Cache for center column rectangle info\n * Invalidates on window resize\n * @type {DOMRect}\n */\n private contentRectCache: DOMRect = undefined;\n\n /**\n * Handle window resize only when it finished\n * @type {() => void}\n */\n private resizeDebouncer: () => void = _.debounce(() => {\n this.windowResize();\n }, 200);\n\n /**\n * Adds loader to editor while content is not ready\n */\n public addLoader(): void {\n this.nodes.loader = $.make('div', this.CSS.editorLoader);\n this.nodes.wrapper.prepend(this.nodes.loader);\n this.nodes.redactor.classList.add(this.CSS.editorZoneHidden);\n }\n\n /**\n * Removes loader when content has loaded\n */\n public removeLoader(): void {\n this.nodes.loader.remove();\n this.nodes.redactor.classList.remove(this.CSS.editorZoneHidden);\n }\n\n /**\n * Making main interface\n */\n public async prepare(): Promise {\n /**\n * Detect mobile version\n */\n this.checkIsMobile();\n\n /**\n * Make main UI elements\n */\n await this.make();\n\n /**\n * Loader for rendering process\n */\n this.addLoader();\n\n /**\n * Append SVG sprite\n */\n await this.appendSVGSprite();\n\n /**\n * Make toolbar\n */\n await this.Editor.Toolbar.make();\n\n /**\n * Make the Inline toolbar\n */\n await this.Editor.InlineToolbar.make();\n\n /**\n * Make the Converter tool holder\n */\n await this.Editor.ConversionToolbar.make();\n\n /**\n * Load and append CSS\n */\n await this.loadStyles();\n\n /**\n * Bind events for the UI elements\n */\n await this.bindEvents();\n }\n\n /**\n * Check if Editor is empty and set CSS class to wrapper\n */\n public checkEmptiness(): void {\n const {BlockManager} = this.Editor;\n\n this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty, BlockManager.isEditorEmpty);\n }\n\n /**\n * Clean editor`s UI\n */\n public destroy(): void {\n this.nodes.holder.innerHTML = '';\n }\n\n /**\n * Check for mobile mode and cache a result\n */\n private checkIsMobile() {\n this.isMobile = window.innerWidth < 650;\n }\n\n /**\n * Makes Editor.js interface\n * @return {Promise}\n */\n private async make(): Promise {\n /**\n * Element where we need to append Editor.js\n * @type {Element}\n */\n this.nodes.holder = $.getHolder(this.config.holder);\n\n /**\n * Create and save main UI elements\n */\n this.nodes.wrapper = $.make('div', this.CSS.editorWrapper);\n this.nodes.redactor = $.make('div', this.CSS.editorZone);\n\n /**\n * If Editor has injected into the narrow container, enable Narrow Mode\n */\n if (this.nodes.holder.offsetWidth < this.contentRect.width) {\n this.nodes.wrapper.classList.add(this.CSS.editorWrapperNarrow);\n }\n\n /**\n * Set customizable bottom zone height\n */\n this.nodes.redactor.style.paddingBottom = this.config.minHeight + 'px';\n\n this.nodes.wrapper.appendChild(this.nodes.redactor);\n this.nodes.holder.appendChild(this.nodes.wrapper);\n\n }\n\n /**\n * Appends CSS\n */\n private loadStyles(): void {\n /**\n * Load CSS\n */\n const styles = require('../../styles/main.css');\n\n /**\n * Make tag\n */\n const tag = $.make('style', null, {\n textContent: styles.toString(),\n });\n\n /**\n * Append styles at the top of HEAD tag\n */\n $.prepend(document.head, tag);\n }\n\n /**\n * Bind events on the Editor.js interface\n */\n private bindEvents(): void {\n this.Editor.Listeners.on(\n this.nodes.redactor,\n 'click',\n (event) => this.redactorClicked(event as MouseEvent),\n false,\n );\n this.Editor.Listeners.on(document, 'keydown', (event) => this.documentKeydown(event as KeyboardEvent), true);\n this.Editor.Listeners.on(document, 'click', (event) => this.documentClicked(event as MouseEvent), true);\n\n /**\n * Handle selection change on mobile devices for the Inline Toolbar support\n */\n if (_.isTouchSupported()) {\n this.Editor.Listeners.on(document, 'selectionchange', (event) => {\n this.selectionChanged(event as Event);\n }, true);\n }\n\n this.Editor.Listeners.on(window, 'resize', () => {\n this.resizeDebouncer();\n }, {\n passive: true,\n });\n }\n\n /**\n * Resize window handler\n */\n private windowResize(): void {\n /**\n * Invalidate content zone size cached, because it may be changed\n */\n this.contentRectCache = null;\n\n /**\n * Detect mobile version\n */\n this.checkIsMobile();\n }\n\n /**\n * All keydowns on document\n * @param {Event} event\n */\n private documentKeydown(event: KeyboardEvent): void {\n switch (event.keyCode) {\n case _.keyCodes.ENTER:\n this.enterPressed(event);\n break;\n case _.keyCodes.BACKSPACE:\n this.backspacePressed(event);\n break;\n default:\n this.defaultBehaviour(event);\n break;\n }\n }\n\n /**\n * Ignore all other document's keydown events\n * @param {KeyboardEvent} event\n */\n private defaultBehaviour(event: KeyboardEvent): void {\n const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`);\n const {currentBlock} = this.Editor.BlockManager;\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n\n /**\n * Ignore keydowns on editor and meta keys\n */\n if (keyDownOnEditor || (currentBlock && isMetaKey)) {\n return;\n }\n\n /**\n * Remove all highlights and remove caret\n */\n this.Editor.BlockManager.dropPointer();\n\n /**\n * Close Toolbar\n */\n this.Editor.Toolbar.close();\n }\n\n /**\n * @param {KeyboardEvent} event\n */\n private backspacePressed(event: KeyboardEvent): void {\n const {BlockManager, BlockSelection, Caret} = this.Editor;\n\n if (BlockSelection.anyBlockSelected) {\n const selectionPositionIndex = BlockManager.removeSelectedBlocks();\n Caret.setToBlock(BlockManager.insertInitialBlockAtIndex(selectionPositionIndex, true), Caret.positions.START);\n\n /** Clear selection */\n BlockSelection.clearSelection(event);\n\n /**\n * Stop propagations\n * Manipulation with BlockSelections is handled in global backspacePress because they may occur\n * with CMD+A or RectangleSelection and they can be handled on document event\n */\n event.stopPropagation();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Enter pressed on document\n * @param event\n */\n private enterPressed(event: KeyboardEvent): void {\n const { BlockManager, BlockSelection, Caret, BlockSettings, ConversionToolbar } = this.Editor;\n const hasPointerToBlock = BlockManager.currentBlockIndex >= 0;\n\n /**\n * If Block Settings is opened and have some active button\n * Enter press is fired as out of the Block and that's why\n * we handle it here\n */\n if (BlockSettings.opened && BlockSettings.focusedButton) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n /** Click on settings button */\n BlockSettings.focusedButton.click();\n\n /**\n * Focused button can be deleted by click, for example with 'Remove Block' api\n */\n if (BlockSettings.focusedButton) {\n /**\n * Add animation on click\n */\n BlockSettings.focusedButton.classList.add(BlockSettings.CSS.focusedButtonAnimated);\n\n /**\n * Remove animation class\n */\n _.delay( () => {\n if (BlockSettings.focusedButton) {\n BlockSettings.focusedButton.classList.remove(BlockSettings.CSS.focusedButtonAnimated);\n }\n }, 280)();\n }\n\n /**\n * Restoring focus on current Block\n *\n * After changing Block state (when settings clicked, for example)\n * Block's content points to the Node that is not in DOM, that's why we can not\n * set caret and leaf next (via Tab)\n *\n * For that set cursor via Caret module to the current Block's content\n * after some timeout\n */\n _.delay( () => {\n Caret.setToBlock(BlockManager.currentBlock);\n }, 10)();\n\n return;\n }\n\n if (ConversionToolbar.opened && ConversionToolbar.focusedButton) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n ConversionToolbar.focusedButton.click();\n return;\n }\n\n if (BlockSelection.anyBlockSelected) {\n const selectionPositionIndex = BlockManager.removeSelectedBlocks();\n Caret.setToBlock(BlockManager.insertInitialBlockAtIndex(selectionPositionIndex, true), Caret.positions.START);\n\n /** Clear selection */\n BlockSelection.clearSelection(event);\n\n /**\n * Stop propagations\n * Manipulation with BlockSelections is handled in global enterPress because they may occur\n * with CMD+A or RectangleSelection\n */\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n return;\n }\n\n /**\n * If Caret is not set anywhere, event target on Enter is always Element that we handle\n * In our case it is document.body\n *\n * So, BlockManager points some Block and Enter press is on Body\n * We can create a new block\n */\n if (hasPointerToBlock && (event.target as HTMLElement).tagName === 'BODY') {\n /**\n * Insert initial typed Block\n */\n const newBlock = this.Editor.BlockManager.insert();\n\n this.Editor.Caret.setToBlock(newBlock);\n\n /**\n * And highlight\n */\n this.Editor.BlockManager.highlightCurrentNode();\n\n /**\n * Move toolbar and show plus button because new Block is empty\n */\n this.Editor.Toolbar.move();\n this.Editor.Toolbar.plusButton.show();\n }\n\n this.Editor.BlockSelection.clearSelection(event);\n }\n\n /**\n * All clicks on document\n * @param {MouseEvent} event - Click\n */\n private documentClicked(event: MouseEvent): void {\n /**\n * Close Inline Toolbar when nothing selected\n * Do not fire check on clicks at the Inline Toolbar buttons\n */\n const target = event.target as HTMLElement;\n const clickedInsideOfEditor = this.nodes.holder.contains(target) || Selection.isAtEditor;\n\n if (!clickedInsideOfEditor) {\n /**\n * Clear highlightings and pointer on BlockManager\n *\n * Current page might contain several instances\n * Click between instances MUST clear focus, pointers and close toolbars\n */\n this.Editor.BlockManager.dropPointer();\n this.Editor.InlineToolbar.close();\n this.Editor.Toolbar.close();\n this.Editor.BlockSelection.clearSelection(event);\n this.Editor.ConversionToolbar.close();\n }\n\n if (Selection.isAtEditor) {\n /**\n * Focus clicked Block.\n * Workaround case when user clicks on the bottom of editor\n */\n if (Selection.anchorNode === this.nodes.redactor) {\n this.Editor.Caret.setToTheLastBlock();\n } else {\n this.Editor.BlockManager.setCurrentBlockByChildNode(Selection.anchorNode);\n }\n }\n }\n\n /**\n * All clicks on the redactor zone\n *\n * @param {MouseEvent} event\n *\n * @description\n * 1. Save clicked Block as a current {@link BlockManager#currentNode}\n * it uses for the following:\n * - add CSS modifier for the selected Block\n * - on Enter press, we make a new Block under that\n *\n * 2. Move and show the Toolbar\n *\n * 3. Set a Caret\n *\n * 4. By clicks on the Editor's bottom zone:\n * - if last Block is empty, set a Caret to this\n * - otherwise, add a new empty Block and set a Caret to that\n *\n * 5. Hide the Inline Toolbar\n *\n * @see selectClickedBlock\n *\n */\n private redactorClicked(event: MouseEvent): void {\n if (!Selection.isCollapsed) {\n return;\n }\n\n let clickedNode = event.target as HTMLElement;\n\n /**\n * If click was fired is on Editor`s wrapper, try to get clicked node by elementFromPoint method\n */\n if (clickedNode === this.nodes.redactor) {\n clickedNode = document.elementFromPoint(event.clientX, event.clientY) as HTMLElement;\n }\n\n /**\n * Select clicked Block as Current\n */\n try {\n /**\n * Renew Current Block\n */\n this.Editor.BlockManager.setCurrentBlockByChildNode(clickedNode);\n\n /**\n * Highlight Current Node\n */\n this.Editor.BlockManager.highlightCurrentNode();\n } catch (e) {\n /**\n * If clicked outside first-level Blocks and it is not RectSelection, set Caret to the last empty Block\n */\n if (!this.Editor.RectangleSelection.isRectActivated()) {\n this.Editor.Caret.setToTheLastBlock();\n }\n }\n\n event.stopImmediatePropagation();\n event.stopPropagation();\n\n /**\n * Move and open toolbar\n */\n this.Editor.Toolbar.open();\n\n /**\n * Hide the Plus Button\n */\n this.Editor.Toolbar.plusButton.hide();\n\n if (!this.Editor.BlockManager.currentBlock) {\n this.Editor.BlockManager.insert();\n }\n\n /**\n * Show the Plus Button if:\n * - Block is an initial-block (Text)\n * - Block is empty\n */\n const isInitialBlock = this.Editor.Tools.isInitial(this.Editor.BlockManager.currentBlock.tool);\n\n if (isInitialBlock) {\n /**\n * Check isEmpty only for paragraphs to prevent unnecessary tree-walking on Tools with many nodes (for ex. Table)\n */\n const isEmptyBlock = this.Editor.BlockManager.currentBlock.isEmpty;\n\n if (isEmptyBlock) {\n this.Editor.Toolbar.plusButton.show();\n }\n }\n }\n\n /**\n * Handle selection changes on mobile devices\n * Uses for showing the Inline Toolbar\n * @param {Event} event\n */\n private selectionChanged(event: Event): void {\n const focusedElement = Selection.anchorElement as Element;\n\n /**\n * Event can be fired on clicks at the Editor elements, for example, at the Inline Toolbar\n * We need to skip such firings\n */\n if (!focusedElement || !focusedElement.closest(`.${Block.CSS.content}`)) {\n return;\n }\n\n this.Editor.InlineToolbar.tryToShow();\n }\n\n /**\n * Append prebuilt sprite with SVG icons\n */\n private appendSVGSprite(): void {\n const spriteHolder = $.make('div');\n\n spriteHolder.hidden = true;\n spriteHolder.style.display = 'none';\n spriteHolder.innerHTML = sprite;\n\n $.append(this.nodes.wrapper, spriteHolder);\n }\n}\n","'use strict';\n\n/**\n * Extend Element interface to include prefixed and experimental properties\n */\ninterface Element {\n matchesSelector: (selector: string) => boolean;\n mozMatchesSelector: (selector: string) => boolean;\n msMatchesSelector: (selector: string) => boolean;\n oMatchesSelector: (selector: string) => boolean;\n\n prepend: (...nodes: Array) => void;\n append: (...nodes: Array) => void;\n}\n\n/**\n * The Element.matches() method returns true if the element\n * would be selected by the specified selector string;\n * otherwise, returns false.\n *\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill}\n */\nif (!Element.prototype.matches) {\n Element.prototype.matches = Element.prototype.matchesSelector ||\n Element.prototype.mozMatchesSelector ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.oMatchesSelector ||\n Element.prototype.webkitMatchesSelector ||\n function(s) {\n const matches = (this.document || this.ownerDocument).querySelectorAll(s);\n let i = matches.length;\n\n while (--i >= 0 && matches.item(i) !== this) {\n }\n\n return i > -1;\n };\n}\n\n/**\n * The Element.closest() method returns the closest ancestor\n * of the current element (or the current element itself) which\n * matches the selectors given in parameter.\n * If there isn't such an ancestor, it returns null.\n *\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill}\n */\nif (!Element.prototype.closest) {\n Element.prototype.closest = function(s) {\n let el = this;\n\n if (!document.documentElement.contains(el)) {\n return null;\n }\n\n do {\n if (el.matches(s)) {\n return el;\n }\n\n el = el.parentElement || el.parentNode;\n } while (el !== null);\n\n return null;\n };\n}\n\n/**\n * The ParentNode.prepend method inserts a set of Node objects\n * or DOMString objects before the first child of the ParentNode.\n * DOMString objects are inserted as equivalent Text nodes.\n *\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend#Polyfill}\n */\nif (!Element.prototype.prepend) {\n Element.prototype.prepend = function prepend(nodes: Node|Node[]|any) {\n const docFrag = document.createDocumentFragment();\n\n if (!Array.isArray(nodes)) {\n nodes = [ nodes ];\n }\n\n nodes.forEach((node: Node|any) => {\n const isNode = node instanceof Node;\n\n docFrag.appendChild(isNode ? node : document.createTextNode(String(node)));\n });\n\n this.insertBefore(docFrag, this.firstChild);\n };\n}\n","/**\n * TextRange interface fot IE9-\n */\nimport _ from './utils';\nimport $ from './dom';\n\ninterface TextRange {\n boundingTop: number;\n boundingLeft: number;\n boundingBottom: number;\n boundingRight: number;\n boundingHeight: number;\n boundingWidth: number;\n}\n\n/**\n * Interface for object returned by document.selection in IE9-\n */\ninterface MSSelection {\n createRange: () => TextRange;\n type: string;\n}\n\n/**\n * Extends Document interface for IE9-\n */\ninterface Document {\n selection?: MSSelection;\n}\n\n/**\n * Working with selection\n * @typedef {SelectionUtils} SelectionUtils\n */\nexport default class SelectionUtils {\n\n /**\n * Editor styles\n * @return {{editorWrapper: string, editorZone: string}}\n */\n static get CSS(): { editorWrapper: string, editorZone: string } {\n return {\n editorWrapper: 'codex-editor',\n editorZone: 'codex-editor__redactor',\n };\n }\n\n /**\n * Returns selected anchor\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorNode}\n * @return {Node|null}\n */\n static get anchorNode(): Node | null {\n const selection = window.getSelection();\n\n return selection ? selection.anchorNode : null;\n }\n\n /**\n * Returns selected anchor element\n * @return {Element|null}\n */\n static get anchorElement(): Element | null {\n const selection = window.getSelection();\n\n if (!selection) {\n return null;\n }\n\n const anchorNode = selection.anchorNode;\n\n if (!anchorNode) {\n return null;\n }\n\n if (!$.isElement(anchorNode)) {\n return anchorNode.parentElement;\n } else {\n return anchorNode;\n }\n }\n\n /**\n * Returns selection offset according to the anchor node\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorOffset}\n * @return {Number|null}\n */\n static get anchorOffset(): number | null {\n const selection = window.getSelection();\n\n return selection ? selection.anchorOffset : null;\n }\n\n /**\n * Is current selection range collapsed\n * @return {boolean|null}\n */\n static get isCollapsed(): boolean | null {\n const selection = window.getSelection();\n\n return selection ? selection.isCollapsed : null;\n }\n\n /**\n * Returns true if 85% of text content is selected\n * @return {boolean}\n */\n public static almostAllSelected(targetText: string): boolean {\n const range = SelectionUtils.range;\n\n if (!range) {\n return false;\n }\n\n const copiedFragment = range.cloneContents();\n const lengthOfWholeText = targetText.length;\n const lengthOfCopiedText = copiedFragment.textContent.length;\n\n return lengthOfCopiedText / lengthOfWholeText > 0.85;\n }\n\n /**\n * Check current selection if it is at Editor's zone\n * @return {boolean}\n */\n static get isAtEditor(): boolean {\n const selection = SelectionUtils.get();\n\n /**\n * Something selected on document\n */\n let selectedNode = (selection.anchorNode || selection.focusNode) as HTMLElement;\n\n if (selectedNode && selectedNode.nodeType === Node.TEXT_NODE) {\n selectedNode = selectedNode.parentNode as HTMLElement;\n }\n\n let editorZone = null;\n if (selectedNode) {\n editorZone = selectedNode.closest(`.${SelectionUtils.CSS.editorZone}`);\n }\n\n /**\n * SelectionUtils is not out of Editor because Editor's wrapper was found\n */\n return editorZone && editorZone.nodeType === Node.ELEMENT_NODE;\n }\n\n /**\n * Return first range\n * @return {Range|null}\n */\n static get range(): Range {\n const selection = window.getSelection();\n\n return selection && selection.rangeCount ? selection.getRangeAt(0) : null;\n }\n\n /**\n * Calculates position and size of selected text\n * @return {{x, y, width, height, top?, left?, bottom?, right?}}\n */\n static get rect(): DOMRect | ClientRect {\n let sel: Selection | MSSelection = (document as Document).selection,\n range: TextRange | Range;\n\n let rect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n } as DOMRect;\n\n if (sel && sel.type !== 'Control') {\n sel = sel as MSSelection;\n range = sel.createRange() as TextRange;\n rect.x = range.boundingLeft;\n rect.y = range.boundingTop;\n rect.width = range.boundingWidth;\n rect.height = range.boundingHeight;\n\n return rect;\n }\n\n if (!window.getSelection) {\n _.log('Method window.getSelection is not supported', 'warn');\n return rect;\n }\n\n sel = window.getSelection();\n\n if (sel.rangeCount === null || isNaN(sel.rangeCount)) {\n _.log('Method SelectionUtils.rangeCount is not supported', 'warn');\n return rect;\n }\n\n range = sel.getRangeAt(0).cloneRange() as Range;\n\n if (range.getBoundingClientRect) {\n rect = range.getBoundingClientRect() as DOMRect;\n }\n // Fall back to inserting a temporary element\n if (rect.x === 0 && rect.y === 0) {\n const span = document.createElement('span');\n\n if (span.getBoundingClientRect) {\n // Ensure span has dimensions and position by\n // adding a zero-width space character\n span.appendChild(document.createTextNode('\\u200b'));\n range.insertNode(span);\n rect = span.getBoundingClientRect() as DOMRect;\n\n const spanParent = span.parentNode;\n\n spanParent.removeChild(span);\n\n // Glue any broken text nodes back together\n spanParent.normalize();\n }\n }\n\n return rect;\n }\n\n /**\n * Returns selected text as String\n * @returns {string}\n */\n static get text(): string {\n return window.getSelection ? window.getSelection().toString() : '';\n }\n\n /**\n * Returns window SelectionUtils\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Window/getSelection}\n * @return {Selection}\n */\n public static get(): Selection {\n return window.getSelection();\n }\n\n public instance: Selection = null;\n public selection: Selection = null;\n\n /**\n * This property can store SelectionUtils's range for restoring later\n * @type {Range|null}\n */\n public savedSelectionRange: Range = null;\n\n /**\n * Fake background is active\n *\n * @return {boolean}\n */\n public isFakeBackgroundEnabled = false;\n\n /**\n * Native Document's commands for fake background\n */\n private readonly commandBackground: string = 'backColor';\n private readonly commandRemoveFormat: string = 'removeFormat';\n\n /**\n * Removes fake background\n */\n public removeFakeBackground() {\n if (!this.isFakeBackgroundEnabled) {\n return;\n }\n\n this.isFakeBackgroundEnabled = false;\n document.execCommand(this.commandRemoveFormat);\n }\n\n /**\n * Sets fake background\n */\n public setFakeBackground() {\n document.execCommand(this.commandBackground, false, '#a8d6ff');\n\n this.isFakeBackgroundEnabled = true;\n }\n\n /**\n * Save SelectionUtils's range\n */\n public save(): void {\n this.savedSelectionRange = SelectionUtils.range;\n }\n\n /**\n * Restore saved SelectionUtils's range\n */\n public restore(): void {\n if (!this.savedSelectionRange) {\n return;\n }\n\n const sel = window.getSelection();\n\n sel.removeAllRanges();\n sel.addRange(this.savedSelectionRange);\n }\n\n /**\n * Clears saved selection\n */\n public clearSaved(): void {\n this.savedSelectionRange = null;\n }\n\n /**\n * Collapse current selection\n */\n public collapseToEnd(): void {\n const sel = window.getSelection();\n const range = document.createRange();\n\n range.selectNodeContents(sel.focusNode);\n range.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range);\n }\n\n /**\n * Looks ahead to find passed tag from current selection\n *\n * @param {String} tagName - tag to found\n * @param {String} [className] - tag's class name\n * @param {Number} [searchDepth] - count of tags that can be included. For better performance.\n * @return {HTMLElement|null}\n */\n public findParentTag(tagName: string, className?: string, searchDepth = 10): HTMLElement | null {\n const selection = window.getSelection();\n let parentTag = null;\n\n /**\n * If selection is missing or no anchorNode or focusNode were found then return null\n */\n if (!selection || !selection.anchorNode || !selection.focusNode) {\n return null;\n }\n\n /**\n * Define Nodes for start and end of selection\n */\n const boundNodes = [\n /** the Node in which the selection begins */\n selection.anchorNode as HTMLElement,\n /** the Node in which the selection ends */\n selection.focusNode as HTMLElement,\n ];\n\n /**\n * For each selection parent Nodes we try to find target tag [with target class name]\n * It would be saved in parentTag variable\n */\n boundNodes.forEach((parent) => {\n /** Reset tags limit */\n let searchDepthIterable = searchDepth;\n\n while (searchDepthIterable > 0 && parent.parentNode) {\n /**\n * Check tag's name\n */\n if (parent.tagName === tagName) {\n /**\n * Save the result\n */\n parentTag = parent;\n\n /**\n * Optional additional check for class-name mismatching\n */\n if (className && parent.classList && !parent.classList.contains(className)) {\n parentTag = null;\n }\n\n /**\n * If we have found required tag with class then go out from the cycle\n */\n if (parentTag) {\n break;\n }\n }\n\n /**\n * Target tag was not found. Go up to the parent and check it\n */\n parent = parent.parentNode as HTMLElement;\n searchDepthIterable--;\n }\n });\n\n /**\n * Return found tag or null\n */\n return parentTag;\n }\n\n /**\n * Expands selection range to the passed parent node\n *\n * @param {HTMLElement} element\n */\n public expandToTag(element: HTMLElement): void {\n const selection = window.getSelection();\n\n selection.removeAllRanges();\n const range = document.createRange();\n\n range.selectNodeContents(element);\n selection.addRange(range);\n }\n}\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Paragraph=t():e.Paragraph=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=\"/\",n(n.s=0)}([function(e,t,n){function r(e,t){for(var n=0;n=0&&f.splice(t,1)}function v(e){var t=document.createElement(\"style\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),b(t,e.attrs),h(e,t),t}function b(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=c||(c=v(t)),r=w.bind(null,n,a,!1),o=w.bind(null,n,a,!0)}else e.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(n=function(e){var t=document.createElement(\"link\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),e.attrs.rel=\"stylesheet\",b(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=l(r));o&&(r+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+\" */\");var a=new Blob([r],{type:\"text/css\"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute(\"media\",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(t=t||{}).attrs=\"object\"==typeof t.attrs?t.attrs:{},t.singleton||\"boolean\"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto=\"head\"),t.insertAt||(t.insertAt=\"bottom\");var n=d(e,t);return p(n,t),function(e){for(var r=[],o=0;o any;\n}\n\n/**\n * Editor.js utils\n */\nexport default class Util {\n /**\n * Custom logger\n *\n * @param {string} msg - message\n * @param {string} type - logging type 'log'|'warn'|'error'|'info'\n * @param {*} [args] - argument to log with a message\n * @param {string} style - additional styling to message\n */\n public static log(msg: string, type: string = 'log', args?: any, style: string = 'color: inherit'): void {\n\n if ( !('console' in window) || !window.console[ type ] ) {\n return;\n }\n\n const editorLabelText = `Editor.js ${VERSION}`;\n const editorLabelStyle = `line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;`;\n\n try {\n if (['time', 'timeEnd'].includes(type)) {\n console[type](`( ${editorLabelText} ) ${msg}`);\n } else if (args) {\n console[type](`%c${editorLabelText}%c ${msg} %o`, editorLabelStyle, style, args);\n } else {\n console[type](`%c${editorLabelText}%c ${msg}`, editorLabelStyle, style);\n }\n } catch (ignored) {}\n }\n\n /**\n * Returns basic keycodes as constants\n * @return {{}}\n */\n static get keyCodes() {\n return {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n LEFT: 37,\n UP: 38,\n DOWN: 40,\n RIGHT: 39,\n DELETE: 46,\n META: 91,\n };\n }\n\n /**\n * Return mouse buttons codes\n */\n static get mouseButtons() {\n return {\n LEFT: 0,\n WHEEL: 1,\n RIGHT: 2,\n BACKWARD: 3,\n FORWARD: 4,\n };\n }\n\n /**\n * Returns true if passed key code is printable (a-Z, 0-9, etc) character.\n * @param {number} keyCode\n * @return {boolean}\n */\n public static isPrintableKey( keyCode: number ): boolean {\n return (keyCode > 47 && keyCode < 58) || // number keys\n keyCode === 32 || keyCode === 13 || // Spacebar & return key(s)\n (keyCode > 64 && keyCode < 91) || // letter keys\n (keyCode > 95 && keyCode < 112) || // Numpad keys\n (keyCode > 185 && keyCode < 193) || // ;=,-./` (in order)\n (keyCode > 218 && keyCode < 223); // [\\]' (in order)\n }\n\n /**\n * Fires a promise sequence asyncronically\n *\n * @param {ChainData[]} chains - list or ChainData's\n * @param {Function} success - success callback\n * @param {Function} fallback - callback that fires in case of errors\n *\n * @return {Promise}\n */\n public static async sequence(\n chains: ChainData[],\n success: (data: any) => void = () => {},\n fallback: (data: any) => void = () => {},\n ): Promise {\n /**\n * Decorator\n *\n * @param {ChainData} chainData\n *\n * @param {Function} successCallback\n * @param {Function} fallbackCallback\n *\n * @return {Promise}\n */\n async function waitNextBlock(\n chainData: ChainData,\n successCallback: (data: any) => void,\n fallbackCallback: (data: any) => void,\n ): Promise {\n try {\n await chainData.function(chainData.data);\n await successCallback(typeof chainData.data !== 'undefined' ? chainData.data : {});\n } catch (e) {\n fallbackCallback(typeof chainData.data !== 'undefined' ? chainData.data : {});\n }\n }\n\n /**\n * pluck each element from queue\n * First, send resolved Promise as previous value\n * Each plugins \"prepare\" method returns a Promise, that's why\n * reduce current element will not be able to continue while can't get\n * a resolved Promise\n */\n return await chains.reduce(async (previousValue, currentValue) => {\n await previousValue;\n return waitNextBlock(currentValue, success, fallback);\n }, Promise.resolve());\n }\n\n /**\n * Make array from array-like collection\n *\n * @param {ArrayLike} collection\n *\n * @return {Array}\n */\n public static array(collection: ArrayLike): any[] {\n return Array.prototype.slice.call(collection);\n }\n\n /**\n * Check if passed variable is a function\n * @param {*} fn\n * @return {boolean}\n */\n public static isFunction(fn: any): boolean {\n return typeof fn === 'function';\n }\n\n /**\n * Check if passed function is a class\n * @param {function} fn\n * @return {boolean}\n */\n public static isClass(fn: any): boolean {\n return typeof fn === 'function' && /^\\s*class\\s+/.test(fn.toString());\n }\n\n /**\n * Checks if object is empty\n *\n * @param {Object} object\n * @return {boolean}\n */\n public static isEmpty(object: object): boolean {\n if (!object) {\n return true;\n }\n\n return Object.keys(object).length === 0 && object.constructor === Object;\n }\n\n /**\n * Check if passed object is a Promise\n * @param {*} object - object to check\n * @return {Boolean}\n */\n public static isPromise(object: any): boolean {\n return Promise.resolve(object) === object;\n }\n\n /**\n * Delays method execution\n *\n * @param {Function} method\n * @param {Number} timeout\n */\n public static delay(method: (...args: any[]) => any, timeout: number) {\n return function() {\n const context = this,\n args = arguments;\n\n window.setTimeout(() => method.apply(context, args), timeout);\n };\n }\n\n /**\n * Get file extension\n *\n * @param {File} file\n * @return string\n */\n public static getFileExtension(file: File): string {\n return file.name.split('.').pop();\n }\n\n /**\n * Check if string is MIME type\n *\n * @param {string} type\n * @return boolean\n */\n public static isValidMimeType(type: string): boolean {\n return /^[-\\w]+\\/([-+\\w]+|\\*)$/.test(type);\n }\n\n /**\n * Debouncing method\n * Call method after passed time\n *\n * Note that this method returns Function and declared variable need to be called\n *\n * @param {Function} func - function that we're throttling\n * @param {Number} wait - time in milliseconds\n * @param {Boolean} immediate - call now\n * @return {Function}\n */\n public static debounce(func: () => void, wait?: number , immediate?: boolean): () => void {\n let timeout;\n\n return () => {\n const context = this,\n args = arguments;\n\n const later = () => {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n\n const callNow = immediate && !timeout;\n\n window.clearTimeout(timeout);\n timeout = window.setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n }\n\n /**\n * Copies passed text to the clipboard\n * @param text\n */\n public static copyTextToClipboard(text) {\n const el = Dom.make('div', 'codex-editor-clipboard', {\n innerHTML: text,\n });\n\n document.body.appendChild(el);\n\n const selection = window.getSelection();\n const range = document.createRange();\n range.selectNode(el);\n\n window.getSelection().removeAllRanges();\n selection.addRange(range);\n\n document.execCommand('copy');\n document.body.removeChild(el);\n }\n\n /**\n * Returns object with os name as key and boolean as value. Shows current user OS\n *\n * @return {[key: string]: boolean}\n */\n public static getUserOS(): {[key: string]: boolean} {\n const OS = {\n win: false,\n mac: false,\n x11: false,\n linux: false,\n };\n\n const userOS = Object.keys(OS).find((os: string) => navigator.appVersion.toLowerCase().indexOf(os) !== -1);\n\n if (userOS) {\n OS[userOS] = true;\n return OS;\n }\n\n return OS;\n }\n\n /**\n * Capitalizes first letter of the string\n * @param {string} text\n * @return {string}\n */\n public static capitalize(text: string): string {\n return text[0].toUpperCase() + text.slice(1);\n }\n\n /**\n * Merge to objects recursively\n * @param {object} target\n * @param {object[]} sources\n * @return {object}\n */\n public static deepMerge(target, ...sources) {\n const isObject = (item) => item && Util.typeof(item) === 'object';\n\n if (!sources.length) { return target; }\n const source = sources.shift();\n\n if (isObject(target) && isObject(source)) {\n for (const key in source) {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, { [key]: {} });\n }\n\n Util.deepMerge(target[key], source[key]);\n } else {\n Object.assign(target, { [key]: source[key] });\n }\n }\n }\n\n return Util.deepMerge(target, ...sources);\n }\n\n /**\n * Return true if current device supports touch events\n *\n * Note! This is a simple solution, it can give false-positive results.\n * To detect touch devices more carefully, use 'touchstart' event listener\n * @see http://www.stucox.com/blog/you-cant-detect-a-touchscreen/\n *\n * @return {boolean}\n */\n public static isTouchSupported(): boolean {\n return 'ontouchstart' in document.documentElement;\n }\n\n /**\n * Return string representation of the object type\n *\n * @param {any} object\n */\n public static typeof(object: any): string {\n return Object.prototype.toString.call(object).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n }\n}\n","module.exports = \".codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide,.codex-editor__redactor--hidden{display:none}@media (min-width:651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor__loader{position:relative;height:30vh}.codex-editor__loader:before{content:\\\"\\\";position:absolute;left:50%;top:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:2px solid rgba(201,201,204,.48);border-top-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:editor-loader-spin .8s linear infinite;animation:editor-loader-spin .8s linear infinite;will-change:transform}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:rgba(46,170,220,.2);border:1px solid transparent}.codex-editor svg{fill:currentColor;vertical-align:middle;max-height:100%}::selection{background-color:#a8d6ff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}@-webkit-keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,transform;display:none}@media (max-width:650px){.ce-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}}@media (max-width:650px) and (max-width:650px){.ce-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}@media (max-width:650px){.ce-toolbar:before{content:\\\"\\\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-toolbar{padding:3px;margin-top:5px}.ce-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar--opened{display:block}@media (max-width:650px){.ce-toolbar--opened{display:-webkit-box;display:-ms-flexbox;display:flex}}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}@media (max-width:650px){.ce-toolbar__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin:0;max-width:calc(100% - 40px)}}.ce-toolbar__plus{color:#707684;cursor:pointer;width:34px;height:34px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;left:-34px;-ms-flex-negative:0;flex-shrink:0}.ce-toolbar__plus--active,.ce-toolbar__plus:hover{color:#388ae5}.ce-toolbar__plus--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus--hidden{display:none}@media (max-width:650px){.ce-toolbar__plus{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;position:static;-webkit-transform:none!important;transform:none!important}}.ce-toolbar .ce-toolbox,.ce-toolbar__plus{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ce-toolbar__actions{position:absolute;right:0;top:10px;padding-right:16px;opacity:0}@media (max-width:650px){.ce-toolbar__actions{position:static;margin-left:auto;padding-right:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.ce-toolbar__actions--opened{opacity:1}.ce-toolbar__actions-buttons{text-align:right}.ce-toolbar__settings-btn{display:inline-block;width:24px;height:24px;color:#707684;cursor:pointer}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{position:absolute;visibility:hidden;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}@media (max-width:650px){.ce-toolbox{position:static;-webkit-transform:none!important;transform:none!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow-x:auto}}.ce-toolbox--opened{opacity:1;visibility:visible}.ce-toolbox__button{color:#707684;cursor:pointer;width:34px;height:34px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0}.ce-toolbox__button--active,.ce-toolbox__button:hover{color:#388ae5}.ce-toolbox__button--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbox__tooltip{position:absolute;top:25px;padding:6px 10px;border-radius:5px;opacity:0;background:#eff2f5;-webkit-box-shadow:0 10px 12px -9px rgba(26,39,54,.32),0 3px 2px -2px rgba(33,48,73,.05);box-shadow:0 10px 12px -9px rgba(26,39,54,.32),0 3px 2px -2px rgba(33,48,73,.05);color:#5c6174;font-size:12px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity .15s ease-in,left .1s linear;transition:opacity .15s ease-in,left .1s linear;will-change:opacity,left;letter-spacing:.02em;line-height:1em}@media (max-width:650px){.ce-toolbox__tooltip{display:none}}.ce-toolbox__tooltip-shortcut{color:rgba(100,105,122,.6);word-spacing:-2px;margin-top:5px}.ce-toolbox__tooltip--shown{opacity:1;-webkit-transition-delay:.1s,0s;transition-delay:.1s,0s}.ce-toolbox__tooltip:before{content:\\\"\\\";width:10px;height:10px;position:absolute;top:-5px;left:50%;margin-left:-5px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#eff2f5;z-index:-1}@media (min-width:651px){.codex-editor--narrow .ce-toolbox{background:#fff;z-index:2}}.ce-inline-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-inline-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-inline-toolbar:before{content:\\\"\\\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-inline-toolbar{padding:3px;-webkit-transform:translateX(-50%) translateY(8px) scale(.9);transform:translateX(-50%) translateY(8px) scale(.9);-webkit-box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.9);transform:translateX(-23px) translateY(8px) scale(.9)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translateX(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.9);transform:translateX(-100%) translateY(8px) scale(.9);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-inline-tool:hover{background-color:#eff2f5}.ce-inline-tool{line-height:normal}.ce-inline-tool .icon,.ce-inline-tool>svg{margin:auto}.ce-inline-tool--active{color:#388ae5}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool:not(:last-of-type){margin-right:2px}.ce-inline-tool--last{margin-right:0!important}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block}.ce-inline-tool-input{background-color:#eff2f5;outline:none;border:0;border-radius:3px;margin:3px 0 0;font-size:13px;padding:8px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-conversion-toolbar{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-conversion-toolbar:before{content:\\\"\\\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-conversion-toolbar{padding:3px;-webkit-box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);box-shadow:0 6px 12px -6px rgba(131,147,173,.46),5px -12px 34px -13px rgba(97,105,134,.6),0 26px 52px 3px rgba(147,165,186,.24);opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;-webkit-transform:translateY(8px) scale(.9);transform:translateY(8px) scale(.9)}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar:before{left:20px}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-conversion-tool:hover{background-color:#eff2f5}.ce-conversion-tool{line-height:normal}.ce-conversion-tool .icon,.ce-conversion-tool>svg{margin:auto}.ce-conversion-tool--active{color:#388ae5}.ce-conversion-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:not(:last-of-type){margin-right:2px}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active,.ce-conversion-tool:hover{color:#388ae5!important}.ce-conversion-tool--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);box-shadow:0 8px 23px -6px rgba(21,40,54,.31),22px -14px 34px -18px rgba(33,48,73,.26);border-radius:4px;z-index:2}@media (max-width:650px){.ce-settings{-webkit-box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54);box-shadow:0 5px 9px -5px rgba(21,40,54,.49),6px 15px 34px -6px rgba(33,48,73,.54)}}.ce-settings:before{content:\\\"\\\";width:15px;height:15px;position:absolute;top:-7px;left:50%;margin-left:-7px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:#fff;z-index:-1}.ce-settings{right:5px;top:35px;min-width:114px}.ce-settings--left-oriented:before{left:15px;margin-left:0}.ce-settings--right-oriented:before{left:auto;right:15px;margin-left:0}@media (max-width:650px){.ce-settings{bottom:50px;top:auto}}.ce-settings:before{left:auto;right:12px}@media (max-width:650px){.ce-settings:before{bottom:-5px;top:auto}}.ce-settings{display:none}.ce-settings--opened{display:block;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-name:panelShowing;animation-name:panelShowing}.ce-settings__plugin-zone:not(:empty){padding:3px 3px 0}.ce-settings__default-zone:not(:empty){padding:3px}.ce-settings__button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.ce-settings__button:hover{background-color:#eff2f5}.ce-settings__button .icon,.ce-settings__button>svg{margin:auto}.ce-settings__button--active{color:#388ae5}.ce-settings__button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button{line-height:32px}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#388ae5}.ce-settings__button--delete{-webkit-transition:background-color .3s ease;transition:background-color .3s ease;will-change:background-color}.ce-settings__button--delete .icon{-webkit-transition:-webkit-transform .2s ease-out;transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out;transition:transform .2s ease-out,-webkit-transform .2s ease-out;will-change:transform}.ce-settings__button--confirm{background-color:#e24a4a!important;color:#fff}.ce-settings__button--confirm:hover{background-color:#d54a4a!important}.ce-settings__button--confirm .icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-block:first-of-type{margin-top:0}.ce-block--focused{background-image:linear-gradient(17deg,rgba(243,248,255,.03) 63.45%,rgba(207,214,229,.27) 98%);border-radius:3px}@media (max-width:650px){.ce-block--focused{background-image:none;background-color:rgba(200,199,219,.17);margin:0 -10px;padding:0 10px}}.ce-block--selected .ce-block__content{background:#a8d6ff;-webkit-box-shadow:0 31px 23px -22px #afdcff;box-shadow:0 31px 23px -22px #afdcff;-webkit-animation:selectionBounce .2s 1;animation:selectionBounce .2s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content .ce-stub,.ce-block--selected .ce-block__content img{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto}.ce-block--drop-target .ce-block__content:before{content:\\\"\\\";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388ae5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:\\\"\\\";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388ae5,#388ae5 1px,#fff 0,#fff 6px)}.ce-block a{cursor:pointer;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@media (min-width:651px){.codex-editor--narrow .ce-block--focused{margin-right:-50px;padding-right:50px}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cdx-block{padding:.7em 0}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#707684}.cdx-settings-button:hover{background-color:#eff2f5}.cdx-settings-button .icon,.cdx-settings-button>svg{margin:auto}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button:not(:nth-child(3n+3)){margin-right:3px}.cdx-settings-button:nth-child(n+4){margin-top:3px}.cdx-settings-button--active{color:#388ae5}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:\\\"\\\";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s linear infinite;animation:cdxRotation 1.2s linear infinite}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px 0 rgba(18,30,57,.04);color:#707684;text-align:center;cursor:pointer}.cdx-button:hover{background:#fbfcfe;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px 0 rgba(18,30,57,.08)}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:3.5em 0;margin:17px 0;border-radius:3px;background:#fcf7f7;color:#b46262}.ce-stub__info{margin-left:20px}.ce-stub__title{margin-bottom:3px;font-weight:600;font-size:18px;text-transform:capitalize}.ce-stub__subtitle{font-size:16px}\""],"sourceRoot":""} \ No newline at end of file diff --git a/src/components/modules/toolbar/inline.ts b/src/components/modules/toolbar/inline.ts index befe5e4a..10fa0281 100644 --- a/src/components/modules/toolbar/inline.ts +++ b/src/components/modules/toolbar/inline.ts @@ -96,12 +96,17 @@ export default class InlineToolbar extends Module { if (!this.toolsInstances || this.toolsInstances.size === 0) { const allTools = this.inlineTools; - this.toolsInstances = new Map(); - for (const tool in allTools) { - if (allTools.hasOwnProperty(tool)) { - this.toolsInstances.set(tool, allTools[tool]); - } - } + const orderedTools = new Map(); + + // get the user order specifications + const order = this.config.tools.header.inlineToolbar; + + // iterate through the list of user specified tools + order.map((tool: string) => { + orderedTools.set(tool, allTools[tool]); + }); + + this.toolsInstances = new Map([...orderedTools, ...Object.entries(allTools)]); } return this.toolsInstances; diff --git a/yarn.lock b/yarn.lock index d664ebec..77786fe7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1509,10 +1509,6 @@ color@^3.0.0: color-convert "^1.9.1" color-string "^1.5.2" -colors@>=0.6.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" - commander@^2.12.1, commander@^2.19.0, commander@^2.8.1: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -3503,10 +3499,6 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime@^1.2.9: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -3544,10 +3536,6 @@ minimist@^1.2.0: version "1.2.0" resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - minipass@^2.2.1, minipass@^2.3.4: version "2.3.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" @@ -3711,14 +3699,6 @@ node-releases@^1.1.8: dependencies: semver "^5.3.0" -node-static@^0.7.11: - version "0.7.11" - resolved "https://registry.yarnpkg.com/node-static/-/node-static-0.7.11.tgz#60120d349f3cef533e4e820670057eb631882e7f" - dependencies: - colors ">=0.6.0" - mime "^1.2.9" - optimist ">=0.3.4" - nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -3857,13 +3837,6 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -optimist@>=0.3.4: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" @@ -6132,10 +6105,6 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"