From 52fe96fb7ec8e9f0a28bc7ee81dd2c094c97e1da Mon Sep 17 00:00:00 2001 From: Katochimoto Date: Sun, 20 Nov 2016 11:33:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=B0=D1=80=D1=81=D0=B8=D0=BD=D0=B3=D0=B0?= =?UTF-8?q?=20=D1=80=D0=B5=D0=B3=D1=83=D0=BB=D1=8F=D1=80=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/x-bubbles-compact.js | 2 +- dist/x-bubbles-compact.min.js | 2 +- dist/x-bubbles-compact.min.js.map | 2 +- dist/x-bubbles.js | 2 +- dist/x-bubbles.min.js | 2 +- dist/x-bubbles.min.js.map | 2 +- docs/x-bubbles.min.js | 2 +- docs/x-bubbles.min.js.map | 2 +- package.json | 2 +- src/index.js | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/x-bubbles-compact.js b/dist/x-bubbles-compact.js index 9af2cca..11bcba0 100644 --- a/dist/x-bubbles-compact.js +++ b/dist/x-bubbles-compact.js @@ -205,7 +205,7 @@ var XBubbles = return null; case 'object': - if (value instanceof context.RegExp) { + if (value instanceof context.RegExp || value === null) { return value; } } diff --git a/dist/x-bubbles-compact.min.js b/dist/x-bubbles-compact.min.js index 9abff2d..dcc967d 100644 --- a/dist/x-bubbles-compact.min.js +++ b/dist/x-bubbles-compact.min.js @@ -1,3 +1,3 @@ -var XBubbles=function(e){function t(u){if(n[u])return n[u].exports;var r=n[u]={exports:{},id:u,loaded:!1};return e[u].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function u(e){for(var t in g){var n=c(g[t],2),u=n[0],r=n[1];e[t]=A[u](e[t]),"undefined"==typeof e[t]&&(e[t]=r)}}function r(e){e.editor||Object.defineProperty(e,"editor",{configurable:!0,value:d.init(e)})}function o(e){e.editor&&(d.destroy(e),delete e.editor)}function i(e){return e.map(function(e){return e.innerHTML}).join(", ")}function a(){return!0}var c=function(){function e(e,t){var n=[],u=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(u=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);u=!0);}catch(c){r=!0,o=c}finally{try{!u&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(1),f=n(2),d=n(19),b=n(5),p=n(7),g={begining:["reg",null,"begining"],bubbleCopy:["func",i,"bubble-copy"],bubbleDeformation:["func",function(){},"bubble-deformation"],bubbleFormation:["func",function(){},"bubble-formation"],checkBubblePaste:["func",a,"check-bubble-paste"],classBubble:["str","bubble","class-bubble"],disableControls:["bool",!1,"disable-controls"],draggable:["bool",!0,"draggable"],ending:["reg",null,"ending"],separator:["reg",/[,;]/,"separator"],tokenizer:["func",null,"tokenizer"]},v=Object.create(HTMLDivElement.prototype,{createdCallback:{value:function(){r(this)}},attachedCallback:{value:function(){r(this),f.init(this),b.bubbling(this)}},detachedCallback:{value:function(){f.destroy(this),o(this)}},options:{value:function(e,t){if(!this._options){this._options={};for(var n in g){this._options[n]=void 0;var r="data-"+g[n][2];this.hasAttribute(r)&&(this._options[n]=this.getAttribute(r))}u(this._options)}return"undefined"==typeof t?this._options[e]:(this._options[e]=t,void u(this._options))}},items:{get:function(){return p.getBubbles(this)}},inputValue:{get:function(){return this.editor.inputValue()}},setContent:{value:function(e){return this.editor.setContent(e)}},addBubble:{value:function(e,t){return this.editor.addBubble(e,t)}},removeBubble:{value:function(e){return this.editor.removeBubble(e)}},editBubble:{value:function(e){return this.editor.editBubble(e)}}});e.exports=s.document.registerElement("x-bubbles",{"extends":"div",prototype:v});var A={func:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return new Function("context","return context."+e+";")(s);case"function":return e}},bool:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return"true"===e||"on"===e;case"boolean":return e}},noop:function(e){return e},reg:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":if(e){var n=e.match(/\/(.+)\/([gimy]{0,3})/i);if(n)return new RegExp(n[1],n[2])}return null;case"object":if(e instanceof s.RegExp)return e}},str:function(e){if("undefined"!=typeof e)return e?String(e):""}}},function(e,t){"use strict";e.exports=function(){return this||(0,eval)("this")}()},function(e,t,n){"use strict";var u=n(3),r=n(17),o=n(8),i=o.canUseDrag;t.init=function(e){return i?u.init(e):r.init(e)},t.destroy=function(e){return i?u.destroy(e):r.destroy(e)}},function(e,t,n){"use strict";function u(e){e.stopPropagation();var t=f.closestNodeSet(e.target),n=f.closestNodeBubble(e.target);if(!t||!n)return void e.preventDefault();var u=l.getSelection();u&&u.removeAllRanges(),E=t,t.classList.add(p.DRAGSTART),s.add(n),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain","");var r=s.get(E);r.length>1&&e.dataTransfer.setDragImage(v(),F.w,F.h)}function r(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);if(t&&t!==E){var n=s.get(E);n.length&&(n.forEach(function(e){return t.appendChild(e)}),l.setTimeout(A,0,E,t))}}}function o(e){e.stopPropagation(),e.preventDefault(),E&&(e.dataTransfer.dropEffect="move")}function i(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.add(p.DROPZONE)}}function a(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(p.DROPZONE)}}function c(e){if(e.stopPropagation(),e.preventDefault(),E){E.classList.remove(p.DRAGSTART);var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(p.DROPZONE),E=null}}var l=n(1),s=n(4),f=n(7),d=n(12),b=n(14),p=b.CLS,g=n(15),v=g.getDragImage,A=g.onDropSuccess,F=g.DRAG_IMG,h={dragend:c,dragenter:i,dragleave:a,dragover:o,dragstart:u,drop:r},E=null;t.init=function(e){d.on(e,h)},t.destroy=function(e){d.off(e,h)}},function(e,t,n){"use strict";function u(e){if(A.isBubbleNode(e)){var t=e.parentNode,n=c(t);if(!n.length)return void f(e);l(t);var u=n[0],r=n[n.length-1];u!==r&&t.startRangeSelect||(t.startRangeSelect=u);var o=void 0,i=void 0,a=e.compareDocumentPosition(t.startRangeSelect);if(a&Node.DOCUMENT_POSITION_PRECEDING?(o=t.startRangeSelect,i=e):(o=e,i=t.startRangeSelect),o&&i){for(var s=o;s&&p(s)&&s!==i;)s=s.nextSibling;A.bubbling(t)}}}function r(e){h.call(e.querySelectorAll(D)).forEach(function(e){return p(e)}),e.startRangeSelect=e.querySelector(E),A.bubbling(e);var t=v.getSelection();t&&t.removeAllRanges()}function o(e){return Boolean(e.querySelector(E))}function i(e){return c(e)[0]}function a(e){var t=c(e);return t[t.length-1]}function c(e){return h.call(e.querySelectorAll(E))}function l(e){c(e).forEach(function(e){return e.removeAttribute("selected")})}function s(e){if(p(e)){var t=F.closestNodeSet(e);return t.startRangeSelect=e,A.bubbling(t),!0}return!1}function f(e){if(!A.isBubbleNode(e))return!1;var t=F.closestNodeSet(e),n=v.getSelection();return n&&n.removeAllRanges(),l(t),s(e)}function d(e){if(b(e)){var t=F.closestNodeSet(e);if(1===c(t).length)return g(e)}return f(e)}function b(e){return A.isBubbleNode(e)&&e.hasAttribute("selected")||!1}function p(e){return!!A.isBubbleNode(e)&&(e.setAttribute("selected",""),!0)}function g(e){return!!A.isBubbleNode(e)&&(e.removeAttribute("selected"),!0)}var v=n(1),A=n(5),F=n(7),h=Array.prototype.slice,E="[bubble][selected]",D="[bubble]:not([selected])";t.all=r,t.add=s,t.clear=l,t.get=c,t.uniq=f,t.head=i,t.last=a,t.has=o,t.range=u,t.toggleUniq=d},function(e,t,n){"use strict";function u(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&e.hasAttribute("bubble")}function r(e,t){if(t.hasAttribute("readonly"))return!1;var n=d.getSelection();if(!n)return!1;var u=e.options("bubbleDeformation"),r=u(t);if(!r){var o=b.textClean(t.innerText);r={text:o,startOffset:0,endOffset:o.length}}var i=b.createZws(),a=d.document.createTextNode(r.text);e.fireEdit(t),e.replaceChild(a,t),e.insertBefore(i,a);var c=d.document.createRange();return c.setStart(a,r.startOffset),c.setEnd(a,r.endOffset),n.removeAllRanges(),n.addRange(c),!0}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t=b.textClean(t)){var u=e.options("bubbleFormation"),r=e.options("classBubble"),o=v&&e.options("draggable"),i=e.ownerDocument.createElement("span");i.innerText=t;for(var a in n)n[a]&&i.setAttribute("data-"+a,g(n[a]));if(u(i),r)for(var c=String(r).trim().split(/\s+/),l=c.length;l--;)i.classList.add(c[l]);return i.setAttribute("bubble",""),i.setAttribute("contenteditable","false"),o&&i.setAttribute("draggable","true"),i}}function i(e){var t=e.options("begining"),n=e.options("ending"),u=e.options("separator"),r=e.options("tokenizer"),i=a(e),p=[];return i.forEach(function(i){var a=b.textClean(i.toString());if(!a)return void i.deleteContents();var g=[a];if(r?g=r(a):(u&&(g=a.split(u).map(c).filter(l)),n?g=g.reduce(function(e,t){return e.concat(s(t,n))},[]).map(c).filter(l):t&&(g=g.reduce(function(e,n){return e.concat(f(n,t))},[]).map(c).filter(l))),!Array.isArray(g)||!g.length)return void i.deleteContents();var v=d.document.createDocumentFragment();g.forEach(function(t){var n=o(e,t);n&&(v.appendChild(n),p.push(n))}),i.deleteContents(),i.insertNode(v)}),e.fireInput(),p.length&&e.fireChange(),p}function a(e){for(var t=[],n=e.childNodes,r=void 0,o=void 0,i=0;is)c=c.nextSibling,l=0;else{var f=c.nodeValue.substring(l,l+1);if(!b(f))break;l+=1}}if(!c)return!1;if(t){var d=Boolean(e.extend);if(d)e.extend(c,l+1);else{var p=v.document.createRange();a?(p.setStart(c,l+1),p.setEnd(r,i)):(p.setStart(u,o),p.setEnd(c,l+1)),e.removeAllRanges(),e.addRange(p)}}else e.collapse(c,l+1);return!0}function s(e){if(!e)return"";var t=v.document.implementation.createHTMLDocument("").body;return t.innerText=e,t.innerText.replace(/^[\u0020\u00a0]+$/gm,"").replace(/\n/gm," ").trim()}function f(e,t){e=e||v.getSelection();var n=e&&e.anchorNode;if(!n||n.nodeType!==Node.TEXT_NODE)return!1;for(var u=void 0,r=void 0,o=n;o&&o.nodeType===Node.TEXT_NODE;)u=o,o=o.previousSibling;for(o=n;o&&o.nodeType===Node.TEXT_NODE;)r=o,o=o.nextSibling;var i=A.hasBubbles(t),a=v.document.createRange();a.setStartBefore(u),a.setEndAfter(r);var c=p(a.toString());return!(!c&&(c||i))&&(c||a.collapse(),e.removeAllRanges(),e.addRange(a),!0)}function d(){return v.document.createTextNode(B)}function b(e){return D.test(e)}function p(e){return String(e||"").trim().replace(E,"")}function g(e){var t=e.anchorNode,n=e.focusNode,u=e.anchorOffset,r=e.focusOffset,o=!1;if(t===n)u=Math.min(e.anchorOffset,e.focusOffset),r=Math.max(e.anchorOffset,e.focusOffset),o=e.anchorOffset>e.focusOffset;else{var i=e.anchorNode.compareDocumentPosition(e.focusNode);i&Node.DOCUMENT_POSITION_PRECEDING&&(t=e.focusNode,u=e.focusOffset,n=e.anchorNode,r=e.anchorOffset,o=!0)}return{startNode:t,endNode:n,startOffset:u,endOffset:r,revert:o}}var v=n(1),A=n(7),F=n(8),h=F.getSelection,E=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,D=/\u200B/,B="​";t.arrowRight=l,t.arrowLeft=c,t.remove=o,t.html2text=s,t.currentTextRange=r,t.text2bubble=u,t.replaceString=a,t.selectAll=f,t.textClean=p,t.checkZws=b,t.createZws=d},function(e,t,n){"use strict";function u(e){return e.querySelector("[bubble]:last-child")}function r(e){return e.querySelector("[bubble]:first-child")}function o(e){return Array.prototype.slice.call(e.querySelectorAll("[bubble]"))}function i(e){return Boolean(e.querySelector("[bubble]"))}function a(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.previousSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.previousSibling);t;){if(p.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.previousSibling}}}function c(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.nextSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.nextSibling);t;){if(p.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.nextSibling}}}function l(e){for(;e;){if(b(e))return e;e=e.parentNode}}function s(e){for(;e;){if(p.isBubbleNode(e))return e;if(b(e))return;e=e.parentNode}}function f(e){for(var t=e&&e.previousSibling;t;){if(p.isBubbleNode(t))return t;t=t.previousSibling}}function d(e){for(var t=e&&e.nextSibling;t;){if(p.isBubbleNode(t))return t;t=t.nextSibling}}function b(e){return e.nodeType===Node.ELEMENT_NODE&&"x-bubbles"===e.getAttribute("is")}var p=n(5),g=n(6);t.closestNodeBubble=s,t.closestNodeSet=l,t.findBubbleLeft=a,t.findBubbleRight=c,t.getBubbles=o,t.hasBubbles=i,t.headBubble=r,t.lastBubble=u,t.nextBubble=d,t.prevBubble=f},function(e,t,n){"use strict";function u(e){return c[e]}function r(e){return a[e]}var o=n(9),i=n(1),a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},l=/&(?:amp|lt|gt|quot|#39|#96);/g,s=/[&<>"'`]/g,f=RegExp(l.source),d=RegExp(s.source),b=/Trident|Edge/;t.getSelection=function(e){var t=i.getSelection();if(t&&t.anchorNode&&e.compareDocumentPosition(t.anchorNode)&Node.DOCUMENT_POSITION_CONTAINED_BY)return t},t.throttle=function(e,t){var n=0,u=function(){n=0};return function(){n||(n=o(u),e.apply(t||this,arguments))}},t.escape=function(e){return e=String(e),e&&d.test(e)?e.replace(s,r):e},t.unescape=function(e){return e=String(e),e&&f.test(e)?e.replace(l,u):e},t.canUseDrag=function(){return!b.test(i.navigator.userAgent)}(),t.isIE=function(){return b.test(i.navigator.userAgent)}()},function(e,t,n){(function(t){for(var u=n(10),r="undefined"==typeof window?t:window,o=["moz","webkit"],i="AnimationFrame",a=r["request"+i],c=r["cancel"+i]||r["cancelRequest"+i],l=0;!a&&l1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};e.dispatchEvent(new s(t,n))}function a(e,t,n){return function u(r){e.removeEventListener(t,u),n(r)}}var c=n(1),l=n(13);t.scrollX=r,t.scrollY=o,t.dispatch=i,t.keyCode=function(e){return e.charCode||e.keyCode},t.metaKey=function(e){return e.ctrlKey||e.metaKey},t.pageX=function(e){return null===e.pageX&&null!==e.clientX?e.clientX+r():e.pageX},t.pageY=function(e){return null===e.pageY&&null!==e.clientY?e.clientY+o():e.pageY},t.one=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,a(e,o,r[o]))},t.on=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,r[o])},t.off=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.removeEventListener(o,r[o])},t.prevent=function(e){return e.cancelBubble=!0,e.returnValue=!1,e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),!1};var s=function(){return"function"==typeof c.CustomEvent?c.CustomEvent:l}()},function(e,t,n){"use strict";var u=n(1),r=u.document,o=u.Event.prototype,i=!1;try{i=Boolean(r.createEvent("CustomEvent"))}catch(a){}var c=o.stopImmediatePropagation;o.stopImmediatePropagation=function(){this.immediatePropagationStopped=!0,c?c.call(this):this.stopPropagation()};var l=function(){return i?function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("CustomEvent");return o.initCustomEvent(e,n,u,t.detail),o}:function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("Event");return o.initEvent(e,n,u),o.detail=t.detail,o}}();l.prototype=o,e.exports=l},function(e,t){"use strict";t.KEY={a:65,Backspace:8,Bottom:40,c:67,Cmd:91,Comma:44,Delete:46,Enter:13,Esc:27,Left:37,Right:39,Semicolon:59,Space:32,Tab:9,Top:38,x:88},t.CLS={DRAGSTART:"drag",DROPZONE:"dropzone"},t.EV={BUBBLE_EDIT:"bubble-edit",BUBBLE_INPUT:"bubble-input",CHANGE:"change",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGLEAVE:"dragleave",DRAGSTART:"dragstart",DROP:"drop"},t.PROPS={BUBBLE_VALUE:"_bubbleValue",CLICK_TIME:"_clickTime",LOCK_COPY:"_lockCopy"}},function(e,t,n){"use strict";var u={w:16,h:16},r=null;t.DRAG_IMG=u,t.getDragImage=function(){return r||(r=new Image,r.src=n(16)),r},t.onDropSuccess=function(e,t){e.fireChange(),t.focus(),t.fireChange()}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function u(e){var t=f.closestNodeBubble(e.target);if(t){var n=f.closestNodeSet(e.target);if(n){e.preventDefault(),n.focus();var u=n.__drag__={onMouseup:r.bind(this,n),onMousemove:l.throttle(o.bind(this,n)),onScroll:l.throttle(i.bind(this,n)),nodeOffsetX:e.offsetX,nodeOffsetY:e.offsetY,x:0,y:0};E=null,D=null,B=null,c.one(document,"mouseup",u.onMouseup),c.on(document,"mousemove",u.onMousemove),c.on(document,"scroll",u.onScroll)}}}function r(e,t){var n=e.__drag__;if(n){if(c.off(document,"mousemove",n.onMousemove),c.off(document,"scroll",n.onScroll),delete e.__drag__,B&&(B.parentNode&&B.parentNode.removeChild(B),B=null),D){var u=D;D=null,u.classList.remove(p.DROPZONE),c.dispatch(u,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}E&&!function(){var e=f.closestNodeSet(t.target);if(e&&e!==E){var n=s.get(E);n.length&&(n.forEach(function(t){return e.appendChild(t)}),a.setTimeout(F,0,E,e))}var u=E;E=null,u.classList.remove(p.DRAGSTART),c.dispatch(u,g.DROP,{bubbles:!1,cancelable:!1}),c.dispatch(u,g.DRAGEND,{bubbles:!1,cancelable:!1})}()}}function o(e,t){var n=e.__drag__;if(n){if(!E){var u=a.getSelection();u&&u.removeAllRanges(),E=e,E.classList.add(p.DRAGSTART);var r=f.closestNodeBubble(t.target),o=void 0;r&&(s.add(r),1===s.get(E).length&&(o=r.cloneNode(!0))),o||(o=A(),n.nodeOffsetX=h.w,n.nodeOffsetY=h.h),B=document.body.appendChild(document.createElement("div")),B.style.cssText="position:absolute;z-index:9999;pointer-events:none;top:0;left:0;",B.appendChild(o),c.dispatch(E,g.DRAGSTART,{bubbles:!1,cancelable:!1})}n.x=t.clientX,n.y=t.clientY,i(e);var l=f.closestNodeSet(t.target);if(l&&l!==E)D&&D!==l?(D.classList.remove(p.DROPZONE),l.classList.add(p.DROPZONE),D=l,c.dispatch(D,g.DRAGENTER,{bubbles:!1,cancelable:!1})):D||(l.classList.add(p.DROPZONE),D=l,c.dispatch(D,g.DRAGENTER,{bubbles:!1,cancelable:!1}));else if(D){var d=D;D=null,d.classList.remove(p.DROPZONE),c.dispatch(d,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}}}function i(e){var t=e.__drag__;if(t&&B){var n=t.x-t.nodeOffsetX+c.scrollX(),u=t.y-t.nodeOffsetY+c.scrollY();d.csstransforms3d?B.style.transform="translate3d("+n+"px, "+u+"px, 0px)":d.csstransforms?B.style.transform="translate("+n+"px, "+u+"px)":(B.style.top=u+"px",B.style.left=n+"px")}}var a=n(1),c=n(12),l=n(8),s=n(4),f=n(7),d=n(18),b=n(14),p=b.CLS,g=b.EV,v=n(15),A=v.getDragImage,F=v.onDropSuccess,h=v.DRAG_IMG,E=null,D=null,B=null;t.init=function(e){c.on(e,"mousedown",u)},t.destroy=function(e){c.off(e,"mousedown",u)}},function(e,t){e.exports=Modernizr},function(e,t,n){"use strict";function u(e){var t=e.currentTarget;return t[x.LOCK_COPY]?R.prevent(e):(N.clear(t),void C.bubbling(t))}function r(e){var t=e.currentTarget;return t[x.LOCK_COPY]?(R.prevent(e),delete t[x.LOCK_COPY],E(function(){var e=D.getSelection();e&&e.removeAllRanges()}),!1):void m.restore(t)}function o(e){var t=e.currentTarget,n=R.keyCode(e),u=e.key?1===e.key.length:(n>47||n===S.Space||n===S.Backspace)&&n!==S.Cmd;u&&t.fireInput()}function i(e){var t=R.keyCode(e),n=e.currentTarget;switch(t){case S.Enter:e.preventDefault(),n.options("disableControls")||f(n)||(C.bubbling(n),m.restore(n));break;case S.Space:f(n)&&e.preventDefault();break;default:var u=n.options("separator");u&&u.test(String.fromCharCode(t))&&(e.preventDefault(),C.bubbling(n),m.restore(n))}}function a(e){var t=R.keyCode(e),n=R.metaKey(e),u=e.currentTarget,r=!u.options("disableControls");switch(t){case S.Esc:e.preventDefault(),C.bubbling(u),m.restore(u);break;case S.Backspace:e.preventDefault(),k(e);break;case S.Delete:e.preventDefault(),I(e);break;case S.Left:e.preventDefault(),c(e);break;case S.Top:if(e.preventDefault(),r){var o=B.headBubble(u);o&&N.uniq(o)}break;case S.Right:e.preventDefault(),l(e);break;case S.Bottom:e.preventDefault(),r&&N.has(u)&&m.restore(u);break;case S.a:n&&(e.preventDefault(),O.selectAll(null,e.currentTarget)||N.all(u));break;case S.c:n&&_(e);break;case S.x:n&&_(e,function(){return I(e)})}}function c(e){var t=D.getSelection();if(!O.arrowLeft(t,e.shiftKey)){if(t.anchorNode&&t.anchorNode.nodeType===Node.TEXT_NODE){var n=B.prevBubble(t.anchorNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[0]===u.startRangeSelect?r[r.length-1]:r[0],i=B.prevBubble(o);i&&(e.shiftKey?N.range(i):N.uniq(i))}}function l(e){var t=D.getSelection();if(!O.arrowRight(t,e.shiftKey)){if(t.focusNode&&t.focusNode.nodeType===Node.TEXT_NODE){var n=B.nextBubble(t.focusNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[r.length-1]===u.startRangeSelect?r[0]:r[r.length-1],i=B.nextBubble(o);i?e.shiftKey?N.range(i):N.uniq(i):o&&o.nextSibling&&o.nextSibling.nodeType===Node.TEXT_NODE?(N.clear(u),t.collapse(o.nextSibling,0)):m.restore(u)}}function s(e){var t=B.closestNodeSet(e.target);if(t){var n=B.closestNodeBubble(e.target);if(n){var u=Date.now(),r=t[x.CLICK_TIME]&&u-t[x.CLICK_TIME]<200;t[x.CLICK_TIME]=u,R.metaKey(e)?N.add(n):e.shiftKey?t.startRangeSelect?N.range(n):N.uniq(n):r?C.edit(t,n):N.toggleUniq(n)}else{N.clear(t);var o=D.getSelection();o&&o.anchorNode&&o.anchorNode.nodeType===Node.TEXT_NODE||m.restore(t)}}}function f(e){var t=D.getSelection();if(!t||!t.rangeCount){var n=N.get(e);if(1===n.length)return C.edit(e,n[0])}return!1}function d(e){var t=D.getSelection();for(t&&t.removeAllRanges();this.firstChild;)this.removeChild(this.firstChild);e=O.html2text(e),this.appendChild(this.ownerDocument.createTextNode(e)),C.bubbling(this),m.restore(this)}function b(e,t){var n=C.create(this,e,t);return!!n&&(!!O.text2bubble(this,n)&&(this.fireInput(),this.fireChange(),m.restore(this),!0))}function p(e){return!!this.contains(e)&&(this.removeChild(e),this.fireChange(),!0)}function g(e){return!!this.contains(e)&&C.edit(this,e)}function v(){var e=O.currentTextRange(this);return e&&O.textClean(e.toString())||""}function A(e){R.dispatch(this,y.BUBBLE_EDIT,{bubbles:!1,cancelable:!1,detail:{data:e}})}function F(){R.dispatch(this,y.CHANGE,{bubbles:!1,cancelable:!1})}function h(){var e=v.call(this);this[x.BUBBLE_VALUE]!==e&&(this[x.BUBBLE_VALUE]=e,R.dispatch(this,y.BUBBLE_INPUT,{bubbles:!1,cancelable:!1,detail:{data:e}}))}var E=n(9),D=n(1),B=n(7),C=n(5),m=n(20),N=n(4),T=n(14),S=T.KEY,y=T.EV,x=T.PROPS,O=n(6),R=n(12),L=n(8),_=n(21),w=n(22),k=n(23),I=n(24),P={ +var XBubbles=function(e){function t(u){if(n[u])return n[u].exports;var r=n[u]={exports:{},id:u,loaded:!1};return e[u].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function u(e){for(var t in g){var n=c(g[t],2),u=n[0],r=n[1];e[t]=A[u](e[t]),"undefined"==typeof e[t]&&(e[t]=r)}}function r(e){e.editor||Object.defineProperty(e,"editor",{configurable:!0,value:d.init(e)})}function o(e){e.editor&&(d.destroy(e),delete e.editor)}function i(e){return e.map(function(e){return e.innerHTML}).join(", ")}function a(){return!0}var c=function(){function e(e,t){var n=[],u=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(u=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);u=!0);}catch(c){r=!0,o=c}finally{try{!u&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(1),f=n(2),d=n(19),b=n(5),p=n(7),g={begining:["reg",null,"begining"],bubbleCopy:["func",i,"bubble-copy"],bubbleDeformation:["func",function(){},"bubble-deformation"],bubbleFormation:["func",function(){},"bubble-formation"],checkBubblePaste:["func",a,"check-bubble-paste"],classBubble:["str","bubble","class-bubble"],disableControls:["bool",!1,"disable-controls"],draggable:["bool",!0,"draggable"],ending:["reg",null,"ending"],separator:["reg",/[,;]/,"separator"],tokenizer:["func",null,"tokenizer"]},v=Object.create(HTMLDivElement.prototype,{createdCallback:{value:function(){r(this)}},attachedCallback:{value:function(){r(this),f.init(this),b.bubbling(this)}},detachedCallback:{value:function(){f.destroy(this),o(this)}},options:{value:function(e,t){if(!this._options){this._options={};for(var n in g){this._options[n]=void 0;var r="data-"+g[n][2];this.hasAttribute(r)&&(this._options[n]=this.getAttribute(r))}u(this._options)}return"undefined"==typeof t?this._options[e]:(this._options[e]=t,void u(this._options))}},items:{get:function(){return p.getBubbles(this)}},inputValue:{get:function(){return this.editor.inputValue()}},setContent:{value:function(e){return this.editor.setContent(e)}},addBubble:{value:function(e,t){return this.editor.addBubble(e,t)}},removeBubble:{value:function(e){return this.editor.removeBubble(e)}},editBubble:{value:function(e){return this.editor.editBubble(e)}}});e.exports=s.document.registerElement("x-bubbles",{"extends":"div",prototype:v});var A={func:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return new Function("context","return context."+e+";")(s);case"function":return e}},bool:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return"true"===e||"on"===e;case"boolean":return e}},noop:function(e){return e},reg:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":if(e){var n=e.match(/\/(.+)\/([gimy]{0,3})/i);if(n)return new RegExp(n[1],n[2])}return null;case"object":if(e instanceof s.RegExp||null===e)return e}},str:function(e){if("undefined"!=typeof e)return e?String(e):""}}},function(e,t){"use strict";e.exports=function(){return this||(0,eval)("this")}()},function(e,t,n){"use strict";var u=n(3),r=n(17),o=n(8),i=o.canUseDrag;t.init=function(e){return i?u.init(e):r.init(e)},t.destroy=function(e){return i?u.destroy(e):r.destroy(e)}},function(e,t,n){"use strict";function u(e){e.stopPropagation();var t=f.closestNodeSet(e.target),n=f.closestNodeBubble(e.target);if(!t||!n)return void e.preventDefault();var u=l.getSelection();u&&u.removeAllRanges(),E=t,t.classList.add(p.DRAGSTART),s.add(n),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain","");var r=s.get(E);r.length>1&&e.dataTransfer.setDragImage(v(),F.w,F.h)}function r(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);if(t&&t!==E){var n=s.get(E);n.length&&(n.forEach(function(e){return t.appendChild(e)}),l.setTimeout(A,0,E,t))}}}function o(e){e.stopPropagation(),e.preventDefault(),E&&(e.dataTransfer.dropEffect="move")}function i(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.add(p.DROPZONE)}}function a(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(p.DROPZONE)}}function c(e){if(e.stopPropagation(),e.preventDefault(),E){E.classList.remove(p.DRAGSTART);var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(p.DROPZONE),E=null}}var l=n(1),s=n(4),f=n(7),d=n(12),b=n(14),p=b.CLS,g=n(15),v=g.getDragImage,A=g.onDropSuccess,F=g.DRAG_IMG,h={dragend:c,dragenter:i,dragleave:a,dragover:o,dragstart:u,drop:r},E=null;t.init=function(e){d.on(e,h)},t.destroy=function(e){d.off(e,h)}},function(e,t,n){"use strict";function u(e){if(A.isBubbleNode(e)){var t=e.parentNode,n=c(t);if(!n.length)return void f(e);l(t);var u=n[0],r=n[n.length-1];u!==r&&t.startRangeSelect||(t.startRangeSelect=u);var o=void 0,i=void 0,a=e.compareDocumentPosition(t.startRangeSelect);if(a&Node.DOCUMENT_POSITION_PRECEDING?(o=t.startRangeSelect,i=e):(o=e,i=t.startRangeSelect),o&&i){for(var s=o;s&&p(s)&&s!==i;)s=s.nextSibling;A.bubbling(t)}}}function r(e){h.call(e.querySelectorAll(D)).forEach(function(e){return p(e)}),e.startRangeSelect=e.querySelector(E),A.bubbling(e);var t=v.getSelection();t&&t.removeAllRanges()}function o(e){return Boolean(e.querySelector(E))}function i(e){return c(e)[0]}function a(e){var t=c(e);return t[t.length-1]}function c(e){return h.call(e.querySelectorAll(E))}function l(e){c(e).forEach(function(e){return e.removeAttribute("selected")})}function s(e){if(p(e)){var t=F.closestNodeSet(e);return t.startRangeSelect=e,A.bubbling(t),!0}return!1}function f(e){if(!A.isBubbleNode(e))return!1;var t=F.closestNodeSet(e),n=v.getSelection();return n&&n.removeAllRanges(),l(t),s(e)}function d(e){if(b(e)){var t=F.closestNodeSet(e);if(1===c(t).length)return g(e)}return f(e)}function b(e){return A.isBubbleNode(e)&&e.hasAttribute("selected")||!1}function p(e){return!!A.isBubbleNode(e)&&(e.setAttribute("selected",""),!0)}function g(e){return!!A.isBubbleNode(e)&&(e.removeAttribute("selected"),!0)}var v=n(1),A=n(5),F=n(7),h=Array.prototype.slice,E="[bubble][selected]",D="[bubble]:not([selected])";t.all=r,t.add=s,t.clear=l,t.get=c,t.uniq=f,t.head=i,t.last=a,t.has=o,t.range=u,t.toggleUniq=d},function(e,t,n){"use strict";function u(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&e.hasAttribute("bubble")}function r(e,t){if(t.hasAttribute("readonly"))return!1;var n=d.getSelection();if(!n)return!1;var u=e.options("bubbleDeformation"),r=u(t);if(!r){var o=b.textClean(t.innerText);r={text:o,startOffset:0,endOffset:o.length}}var i=b.createZws(),a=d.document.createTextNode(r.text);e.fireEdit(t),e.replaceChild(a,t),e.insertBefore(i,a);var c=d.document.createRange();return c.setStart(a,r.startOffset),c.setEnd(a,r.endOffset),n.removeAllRanges(),n.addRange(c),!0}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t=b.textClean(t)){var u=e.options("bubbleFormation"),r=e.options("classBubble"),o=v&&e.options("draggable"),i=e.ownerDocument.createElement("span");i.innerText=t;for(var a in n)n[a]&&i.setAttribute("data-"+a,g(n[a]));if(u(i),r)for(var c=String(r).trim().split(/\s+/),l=c.length;l--;)i.classList.add(c[l]);return i.setAttribute("bubble",""),i.setAttribute("contenteditable","false"),o&&i.setAttribute("draggable","true"),i}}function i(e){var t=e.options("begining"),n=e.options("ending"),u=e.options("separator"),r=e.options("tokenizer"),i=a(e),p=[];return i.forEach(function(i){var a=b.textClean(i.toString());if(!a)return void i.deleteContents();var g=[a];if(r?g=r(a):(u&&(g=a.split(u).map(c).filter(l)),n?g=g.reduce(function(e,t){return e.concat(s(t,n))},[]).map(c).filter(l):t&&(g=g.reduce(function(e,n){return e.concat(f(n,t))},[]).map(c).filter(l))),!Array.isArray(g)||!g.length)return void i.deleteContents();var v=d.document.createDocumentFragment();g.forEach(function(t){var n=o(e,t);n&&(v.appendChild(n),p.push(n))}),i.deleteContents(),i.insertNode(v)}),e.fireInput(),p.length&&e.fireChange(),p}function a(e){for(var t=[],n=e.childNodes,r=void 0,o=void 0,i=0;is)c=c.nextSibling,l=0;else{var f=c.nodeValue.substring(l,l+1);if(!b(f))break;l+=1}}if(!c)return!1;if(t){var d=Boolean(e.extend);if(d)e.extend(c,l+1);else{var p=v.document.createRange();a?(p.setStart(c,l+1),p.setEnd(r,i)):(p.setStart(u,o),p.setEnd(c,l+1)),e.removeAllRanges(),e.addRange(p)}}else e.collapse(c,l+1);return!0}function s(e){if(!e)return"";var t=v.document.implementation.createHTMLDocument("").body;return t.innerText=e,t.innerText.replace(/^[\u0020\u00a0]+$/gm,"").replace(/\n/gm," ").trim()}function f(e,t){e=e||v.getSelection();var n=e&&e.anchorNode;if(!n||n.nodeType!==Node.TEXT_NODE)return!1;for(var u=void 0,r=void 0,o=n;o&&o.nodeType===Node.TEXT_NODE;)u=o,o=o.previousSibling;for(o=n;o&&o.nodeType===Node.TEXT_NODE;)r=o,o=o.nextSibling;var i=A.hasBubbles(t),a=v.document.createRange();a.setStartBefore(u),a.setEndAfter(r);var c=p(a.toString());return!(!c&&(c||i))&&(c||a.collapse(),e.removeAllRanges(),e.addRange(a),!0)}function d(){return v.document.createTextNode(B)}function b(e){return D.test(e)}function p(e){return String(e||"").trim().replace(E,"")}function g(e){var t=e.anchorNode,n=e.focusNode,u=e.anchorOffset,r=e.focusOffset,o=!1;if(t===n)u=Math.min(e.anchorOffset,e.focusOffset),r=Math.max(e.anchorOffset,e.focusOffset),o=e.anchorOffset>e.focusOffset;else{var i=e.anchorNode.compareDocumentPosition(e.focusNode);i&Node.DOCUMENT_POSITION_PRECEDING&&(t=e.focusNode,u=e.focusOffset,n=e.anchorNode,r=e.anchorOffset,o=!0)}return{startNode:t,endNode:n,startOffset:u,endOffset:r,revert:o}}var v=n(1),A=n(7),F=n(8),h=F.getSelection,E=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\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C\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,D=/\u200B/,B="​";t.arrowRight=l,t.arrowLeft=c,t.remove=o,t.html2text=s,t.currentTextRange=r,t.text2bubble=u,t.replaceString=a,t.selectAll=f,t.textClean=p,t.checkZws=b,t.createZws=d},function(e,t,n){"use strict";function u(e){return e.querySelector("[bubble]:last-child")}function r(e){return e.querySelector("[bubble]:first-child")}function o(e){return Array.prototype.slice.call(e.querySelectorAll("[bubble]"))}function i(e){return Boolean(e.querySelector("[bubble]"))}function a(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.previousSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.previousSibling);t;){if(p.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.previousSibling}}}function c(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.nextSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.nextSibling);t;){if(p.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.nextSibling}}}function l(e){for(;e;){if(b(e))return e;e=e.parentNode}}function s(e){for(;e;){if(p.isBubbleNode(e))return e;if(b(e))return;e=e.parentNode}}function f(e){for(var t=e&&e.previousSibling;t;){if(p.isBubbleNode(t))return t;t=t.previousSibling}}function d(e){for(var t=e&&e.nextSibling;t;){if(p.isBubbleNode(t))return t;t=t.nextSibling}}function b(e){return e.nodeType===Node.ELEMENT_NODE&&"x-bubbles"===e.getAttribute("is")}var p=n(5),g=n(6);t.closestNodeBubble=s,t.closestNodeSet=l,t.findBubbleLeft=a,t.findBubbleRight=c,t.getBubbles=o,t.hasBubbles=i,t.headBubble=r,t.lastBubble=u,t.nextBubble=d,t.prevBubble=f},function(e,t,n){"use strict";function u(e){return c[e]}function r(e){return a[e]}var o=n(9),i=n(1),a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},l=/&(?:amp|lt|gt|quot|#39|#96);/g,s=/[&<>"'`]/g,f=RegExp(l.source),d=RegExp(s.source),b=/Trident|Edge/;t.getSelection=function(e){var t=i.getSelection();if(t&&t.anchorNode&&e.compareDocumentPosition(t.anchorNode)&Node.DOCUMENT_POSITION_CONTAINED_BY)return t},t.throttle=function(e,t){var n=0,u=function(){n=0};return function(){n||(n=o(u),e.apply(t||this,arguments))}},t.escape=function(e){return e=String(e),e&&d.test(e)?e.replace(s,r):e},t.unescape=function(e){return e=String(e),e&&f.test(e)?e.replace(l,u):e},t.canUseDrag=function(){return!b.test(i.navigator.userAgent)}(),t.isIE=function(){return b.test(i.navigator.userAgent)}()},function(e,t,n){(function(t){for(var u=n(10),r="undefined"==typeof window?t:window,o=["moz","webkit"],i="AnimationFrame",a=r["request"+i],c=r["cancel"+i]||r["cancelRequest"+i],l=0;!a&&l1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};e.dispatchEvent(new s(t,n))}function a(e,t,n){return function u(r){e.removeEventListener(t,u),n(r)}}var c=n(1),l=n(13);t.scrollX=r,t.scrollY=o,t.dispatch=i,t.keyCode=function(e){return e.charCode||e.keyCode},t.metaKey=function(e){return e.ctrlKey||e.metaKey},t.pageX=function(e){return null===e.pageX&&null!==e.clientX?e.clientX+r():e.pageX},t.pageY=function(e){return null===e.pageY&&null!==e.clientY?e.clientY+o():e.pageY},t.one=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,a(e,o,r[o]))},t.on=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,r[o])},t.off=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.removeEventListener(o,r[o])},t.prevent=function(e){return e.cancelBubble=!0,e.returnValue=!1,e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),!1};var s=function(){return"function"==typeof c.CustomEvent?c.CustomEvent:l}()},function(e,t,n){"use strict";var u=n(1),r=u.document,o=u.Event.prototype,i=!1;try{i=Boolean(r.createEvent("CustomEvent"))}catch(a){}var c=o.stopImmediatePropagation;o.stopImmediatePropagation=function(){this.immediatePropagationStopped=!0,c?c.call(this):this.stopPropagation()};var l=function(){return i?function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("CustomEvent");return o.initCustomEvent(e,n,u,t.detail),o}:function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("Event");return o.initEvent(e,n,u),o.detail=t.detail,o}}();l.prototype=o,e.exports=l},function(e,t){"use strict";t.KEY={a:65,Backspace:8,Bottom:40,c:67,Cmd:91,Comma:44,Delete:46,Enter:13,Esc:27,Left:37,Right:39,Semicolon:59,Space:32,Tab:9,Top:38,x:88},t.CLS={DRAGSTART:"drag",DROPZONE:"dropzone"},t.EV={BUBBLE_EDIT:"bubble-edit",BUBBLE_INPUT:"bubble-input",CHANGE:"change",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGLEAVE:"dragleave",DRAGSTART:"dragstart",DROP:"drop"},t.PROPS={BUBBLE_VALUE:"_bubbleValue",CLICK_TIME:"_clickTime",LOCK_COPY:"_lockCopy"}},function(e,t,n){"use strict";var u={w:16,h:16},r=null;t.DRAG_IMG=u,t.getDragImage=function(){return r||(r=new Image,r.src=n(16)),r},t.onDropSuccess=function(e,t){e.fireChange(),t.focus(),t.fireChange()}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function u(e){var t=f.closestNodeBubble(e.target);if(t){var n=f.closestNodeSet(e.target);if(n){e.preventDefault(),n.focus();var u=n.__drag__={onMouseup:r.bind(this,n),onMousemove:l.throttle(o.bind(this,n)),onScroll:l.throttle(i.bind(this,n)),nodeOffsetX:e.offsetX,nodeOffsetY:e.offsetY,x:0,y:0};E=null,D=null,B=null,c.one(document,"mouseup",u.onMouseup),c.on(document,"mousemove",u.onMousemove),c.on(document,"scroll",u.onScroll)}}}function r(e,t){var n=e.__drag__;if(n){if(c.off(document,"mousemove",n.onMousemove),c.off(document,"scroll",n.onScroll),delete e.__drag__,B&&(B.parentNode&&B.parentNode.removeChild(B),B=null),D){var u=D;D=null,u.classList.remove(p.DROPZONE),c.dispatch(u,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}E&&!function(){var e=f.closestNodeSet(t.target);if(e&&e!==E){var n=s.get(E);n.length&&(n.forEach(function(t){return e.appendChild(t)}),a.setTimeout(F,0,E,e))}var u=E;E=null,u.classList.remove(p.DRAGSTART),c.dispatch(u,g.DROP,{bubbles:!1,cancelable:!1}),c.dispatch(u,g.DRAGEND,{bubbles:!1,cancelable:!1})}()}}function o(e,t){var n=e.__drag__;if(n){if(!E){var u=a.getSelection();u&&u.removeAllRanges(),E=e,E.classList.add(p.DRAGSTART);var r=f.closestNodeBubble(t.target),o=void 0;r&&(s.add(r),1===s.get(E).length&&(o=r.cloneNode(!0))),o||(o=A(),n.nodeOffsetX=h.w,n.nodeOffsetY=h.h),B=document.body.appendChild(document.createElement("div")),B.style.cssText="position:absolute;z-index:9999;pointer-events:none;top:0;left:0;",B.appendChild(o),c.dispatch(E,g.DRAGSTART,{bubbles:!1,cancelable:!1})}n.x=t.clientX,n.y=t.clientY,i(e);var l=f.closestNodeSet(t.target);if(l&&l!==E)D&&D!==l?(D.classList.remove(p.DROPZONE),l.classList.add(p.DROPZONE),D=l,c.dispatch(D,g.DRAGENTER,{bubbles:!1,cancelable:!1})):D||(l.classList.add(p.DROPZONE),D=l,c.dispatch(D,g.DRAGENTER,{bubbles:!1,cancelable:!1}));else if(D){var d=D;D=null,d.classList.remove(p.DROPZONE),c.dispatch(d,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}}}function i(e){var t=e.__drag__;if(t&&B){var n=t.x-t.nodeOffsetX+c.scrollX(),u=t.y-t.nodeOffsetY+c.scrollY();d.csstransforms3d?B.style.transform="translate3d("+n+"px, "+u+"px, 0px)":d.csstransforms?B.style.transform="translate("+n+"px, "+u+"px)":(B.style.top=u+"px",B.style.left=n+"px")}}var a=n(1),c=n(12),l=n(8),s=n(4),f=n(7),d=n(18),b=n(14),p=b.CLS,g=b.EV,v=n(15),A=v.getDragImage,F=v.onDropSuccess,h=v.DRAG_IMG,E=null,D=null,B=null;t.init=function(e){c.on(e,"mousedown",u)},t.destroy=function(e){c.off(e,"mousedown",u)}},function(e,t){e.exports=Modernizr},function(e,t,n){"use strict";function u(e){var t=e.currentTarget;return t[x.LOCK_COPY]?R.prevent(e):(N.clear(t),void C.bubbling(t))}function r(e){var t=e.currentTarget;return t[x.LOCK_COPY]?(R.prevent(e),delete t[x.LOCK_COPY],E(function(){var e=D.getSelection();e&&e.removeAllRanges()}),!1):void m.restore(t)}function o(e){var t=e.currentTarget,n=R.keyCode(e),u=e.key?1===e.key.length:(n>47||n===S.Space||n===S.Backspace)&&n!==S.Cmd;u&&t.fireInput()}function i(e){var t=R.keyCode(e),n=e.currentTarget;switch(t){case S.Enter:e.preventDefault(),n.options("disableControls")||f(n)||(C.bubbling(n),m.restore(n));break;case S.Space:f(n)&&e.preventDefault();break;default:var u=n.options("separator");u&&u.test(String.fromCharCode(t))&&(e.preventDefault(),C.bubbling(n),m.restore(n))}}function a(e){var t=R.keyCode(e),n=R.metaKey(e),u=e.currentTarget,r=!u.options("disableControls");switch(t){case S.Esc:e.preventDefault(),C.bubbling(u),m.restore(u);break;case S.Backspace:e.preventDefault(),k(e);break;case S.Delete:e.preventDefault(),I(e);break;case S.Left:e.preventDefault(),c(e);break;case S.Top:if(e.preventDefault(),r){var o=B.headBubble(u);o&&N.uniq(o)}break;case S.Right:e.preventDefault(),l(e);break;case S.Bottom:e.preventDefault(),r&&N.has(u)&&m.restore(u);break;case S.a:n&&(e.preventDefault(),O.selectAll(null,e.currentTarget)||N.all(u));break;case S.c:n&&_(e);break;case S.x:n&&_(e,function(){return I(e)})}}function c(e){var t=D.getSelection();if(!O.arrowLeft(t,e.shiftKey)){if(t.anchorNode&&t.anchorNode.nodeType===Node.TEXT_NODE){var n=B.prevBubble(t.anchorNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[0]===u.startRangeSelect?r[r.length-1]:r[0],i=B.prevBubble(o);i&&(e.shiftKey?N.range(i):N.uniq(i))}}function l(e){var t=D.getSelection();if(!O.arrowRight(t,e.shiftKey)){if(t.focusNode&&t.focusNode.nodeType===Node.TEXT_NODE){var n=B.nextBubble(t.focusNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[r.length-1]===u.startRangeSelect?r[0]:r[r.length-1],i=B.nextBubble(o);i?e.shiftKey?N.range(i):N.uniq(i):o&&o.nextSibling&&o.nextSibling.nodeType===Node.TEXT_NODE?(N.clear(u),t.collapse(o.nextSibling,0)):m.restore(u)}}function s(e){var t=B.closestNodeSet(e.target);if(t){var n=B.closestNodeBubble(e.target);if(n){var u=Date.now(),r=t[x.CLICK_TIME]&&u-t[x.CLICK_TIME]<200;t[x.CLICK_TIME]=u,R.metaKey(e)?N.add(n):e.shiftKey?t.startRangeSelect?N.range(n):N.uniq(n):r?C.edit(t,n):N.toggleUniq(n)}else{N.clear(t);var o=D.getSelection();o&&o.anchorNode&&o.anchorNode.nodeType===Node.TEXT_NODE||m.restore(t)}}}function f(e){var t=D.getSelection();if(!t||!t.rangeCount){var n=N.get(e);if(1===n.length)return C.edit(e,n[0])}return!1}function d(e){var t=D.getSelection();for(t&&t.removeAllRanges();this.firstChild;)this.removeChild(this.firstChild);e=O.html2text(e),this.appendChild(this.ownerDocument.createTextNode(e)),C.bubbling(this),m.restore(this)}function b(e,t){var n=C.create(this,e,t);return!!n&&(!!O.text2bubble(this,n)&&(this.fireInput(),this.fireChange(),m.restore(this),!0))}function p(e){return!!this.contains(e)&&(this.removeChild(e),this.fireChange(),!0)}function g(e){return!!this.contains(e)&&C.edit(this,e)}function v(){var e=O.currentTextRange(this);return e&&O.textClean(e.toString())||""}function A(e){R.dispatch(this,y.BUBBLE_EDIT,{bubbles:!1,cancelable:!1,detail:{data:e}})}function F(){R.dispatch(this,y.CHANGE,{bubbles:!1,cancelable:!1})}function h(){var e=v.call(this);this[x.BUBBLE_VALUE]!==e&&(this[x.BUBBLE_VALUE]=e,R.dispatch(this,y.BUBBLE_INPUT,{bubbles:!1,cancelable:!1,detail:{data:e}}))}var E=n(9),D=n(1),B=n(7),C=n(5),m=n(20),N=n(4),T=n(14),S=T.KEY,y=T.EV,x=T.PROPS,O=n(6),R=n(12),L=n(8),_=n(21),w=n(22),k=n(23),I=n(24),P={ blur:u,click:s,focus:r,keydown:a,keypress:i,keyup:o,mscontrolselect:R.prevent,paste:w,resize:R.prevent,resizestart:R.prevent};t.init=function(e){var t=e;return t.setAttribute("contenteditable","true"),t.setAttribute("spellcheck","false"),t.fireChange=L.throttle(F,e),t.fireEdit=L.throttle(A,e),t.fireInput=L.throttle(h,e),R.on(t,P),{addBubble:b.bind(t),editBubble:g.bind(t),inputValue:v.bind(t),removeBubble:p.bind(t),setContent:d.bind(t)}},t.destroy=function(e){R.off(e,P)}},function(e,t,n){"use strict";function u(e){a.clear(e);var t=r(e),n=o.getSelection();n.removeAllRanges(),n.collapse(t,1)}function r(e){var t=i.createZws();if(e.hasChildNodes()){var n=e.childNodes[e.childNodes.length-1];n.isEqualNode(t)?t=n:e.appendChild(t)}else e.appendChild(t);return t}var o=n(1),i=n(6),a=n(4);t.restore=u,t.restoreBasis=r},function(e,t,n){"use strict";function u(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var r=n(9),o=n(12),i=n(4),a=n(14),c=a.PROPS,l=n(8);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=e.target,a=l.getSelection(n);if(a)return!1;var s=i.get(n);if(!s.length)return!1;var f=n.options("bubbleCopy"),d=f(s);if(!d)return!1;n[c.LOCK_COPY]=!0;var b=n.ownerDocument.createElement("input");return b.value=d,b.style.cssText="\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;",n.parentNode.appendChild(b),o.one(b,{keyup:function(){return n.focus()},blur:function(){u(b),r(t)}}),b.select(),!0}},function(e,t,n){"use strict";function u(e,t){var n=e.options("checkBubblePaste"),u=i.getSelection(),a=!(!t||!u.isCollapsed||e.inputValue)&&n(t);return!!l.replaceString(t,u)&&(a?f?o(function(){return r(e)}):r(e):e.fireInput(),!0)}function r(e){a.bubbling(e),e.focus(),o(function(){return c.restore(e)})}var o=n(9),i=n(1),a=n(5),c=n(20),l=n(6),s=n(8),f=s.isIE;e.exports=function(e){e.preventDefault();var t=e.currentTarget;i.clipboardData&&i.clipboardData.getData?u(t,i.clipboardData.getData("Text")):e.clipboardData&&!function(){var n="text/plain",r=e.clipboardData,o=r.getData&&r.getData(n);!u(t,o)&&r.items&&Array.prototype.slice.call(r.items).filter(function(e){return"string"===e.kind&&e.type===n}).some(function(e){return e.getAsString(function(e){u(t,e)}),!0})}()}},function(e,t,n){"use strict";function u(e){var t=o.get(e);if(!t.length)return!1;var n=t[0].previousSibling,u=t[t.length-1].nextSibling;return t.forEach(function(e){return e.parentNode.removeChild(e)}),c.isBubbleNode(n)?o.uniq(n):c.isBubbleNode(u)?o.uniq(u):(e.focus(),r(function(){return l.restore(e)})),e.fireChange(),!0}var r=n(9),o=n(4),i=n(6),a=n(7),c=n(5),l=n(20),s=n(8);e.exports=function(e){var t=e.target,n=s.getSelection(t);if(n)if(n.isCollapsed)if(i.arrowLeft(n,!0))i.remove(n),t.fireInput();else{var c=a.findBubbleLeft(n);c&&o.uniq(c)}else i.remove(n),t.fireInput();else u(t)||(t.focus(),r(function(){return l.restore(t)}))}},function(e,t,n){"use strict";function u(e){var t=o.get(e);if(!t.length)return!1;var n=t[0].previousSibling,u=t[t.length-1].nextSibling;return t.forEach(function(e){return e.parentNode.removeChild(e)}),c.isBubbleNode(u)?o.uniq(u):c.isBubbleNode(n)?o.uniq(n):(e.focus(),r(function(){return l.restore(e)})),e.fireChange(),!0}var r=n(9),o=n(4),i=n(6),a=n(7),c=n(5),l=n(20),s=n(8);e.exports=function(e){var t=e.target,n=s.getSelection(t);if(n)if(n.isCollapsed)if(i.arrowRight(n,!0))i.remove(n),t.fireInput();else{var c=a.findBubbleRight(n);c&&o.uniq(c)}else i.remove(n),t.fireInput();else u(t)||(t.focus(),r(function(){return l.restore(t)}))}}]); //# sourceMappingURL=x-bubbles-compact.min.js.map \ No newline at end of file diff --git a/dist/x-bubbles-compact.min.js.map b/dist/x-bubbles-compact.min.js.map index d491809..465c98a 100644 --- a/dist/x-bubbles-compact.min.js.map +++ b/dist/x-bubbles-compact.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///x-bubbles-compact.min.js","webpack:///webpack/bootstrap f7d2657b782326567ccf","webpack:///./index.js","webpack:///./context.js","webpack:///./core/drag.js","webpack:///./core/drag/native.js","webpack:///./core/select.js","webpack:///./core/bubble.js","webpack:///./core/text.js","webpack:///./core/bubbleset.js","webpack:///./core/utils.js","webpack:///../~/raf/index.js","webpack:///../~/performance-now/lib/performance-now.js","webpack:///../~/process/browser.js","webpack:///./core/events.js","webpack:///./polyfills/CustomEventCommon.js","webpack:///./core/constant.js","webpack:///./core/drag/common.js","webpack:///./core/drag/bubbles.png","webpack:///./core/drag/mouse.js","webpack:///external {\"var\":\"Modernizr\",\"root\":\"modernizr\",\"commonjs2\":\"modernizr\",\"commonjs\":\"modernizr\",\"amd\":\"modernizr\"}","webpack:///./core/editor.js","webpack:///./core/cursor.js","webpack:///./core/editor/copy.js","webpack:///./core/editor/paste.js","webpack:///./core/editor/backspace.js","webpack:///./core/editor/delete.js"],"names":["XBubbles","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","optionsPrepare","options","name","OPTIONS","_OPTIONS$name","_slicedToArray","type","def","OPTIONS_PREPARE","initEditor","node","editor","Object","defineProperty","configurable","value","init","destroyEditor","destroy","bubbleCopyOption","list","map","item","innerHTML","join","checkBubblePasteOption","sliceIterator","arr","i","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","_typeof","obj","constructor","prototype","context","drag","bubble","bubbleset","begining","bubbleCopy","bubbleDeformation","bubbleFormation","checkBubblePaste","classBubble","disableControls","draggable","ending","separator","tokenizer","create","HTMLDivElement","createdCallback","this","attachedCallback","bubbling","detachedCallback","_options","optionName","attrName","hasAttribute","getAttribute","items","get","getBubbles","inputValue","setContent","data","addBubble","bubbleText","removeBubble","nodeBubble","editBubble","document","registerElement","extends","func","Function","bool","noop","reg","match","RegExp","str","String","eval","native","mouse","_require","canUseDrag","nodeSet","onDragstart","event","stopPropagation","closestNodeSet","target","closestNodeBubble","preventDefault","selection","getSelection","removeAllRanges","currentDragSet","classList","add","CLS","DRAGSTART","select","dataTransfer","effectAllowed","setData","setDragImage","getDragImage","DRAG_IMG","w","h","onDrop","forEach","appendChild","setTimeout","onDropSuccess","onDragover","dropEffect","onDragenter","DROPZONE","onDragleave","remove","onDragend","events","_require2","EVENTS","dragend","dragenter","dragleave","dragover","dragstart","drop","on","off","range","isBubbleNode","set","parentNode","uniq","clear","headList","lastList","startRangeSelect","fromNode","toNode","position","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","setSelected","nextSibling","all","slice","querySelectorAll","PATH_NOT_SELECTED","querySelector","PATH_SELECTED","has","Boolean","head","last","removeAttribute","toggleUniq","isSelected","removeSelected","setAttribute","nodeType","ELEMENT_NODE","edit","rangeParams","dataText","text","textClean","innerText","startOffset","endOffset","textFake","createZws","textNode","createTextNode","fireEdit","replaceChild","insertBefore","createRange","setStart","setEnd","addRange","dataAttributes","arguments","wrap","ownerDocument","createElement","key","escape","classes","trim","split","len","ranges","getBubbleRanges","nodes","toString","deleteContents","textParts","trimIterator","filter","nonEmptyIterator","reduce","parts","concat","parseFragmentByEnding","parseFragmentByBeginning","fragment","createDocumentFragment","textPart","insertNode","fireInput","fireChange","children","childNodes","setEndBefore","setStartBefore","setEndAfter","lastIndex","loop","exec","substring","res","index","text2bubble","nodeEditor","currentTextRange","replace","pointNode","focusNode","TEXT_NODE","anchorNode","startNode","endNode","previousSibling","rangeCount","anchor","getRangeAt","surroundContents","nodeValue","collapse","replaceString","arrowLeft","extend","_selectionCorrect","selectionCorrect","revert","isCollapsed","isNativeExtend","offset","checkZws","arrowRight","_selectionCorrect2","html2text","DOMContainer","implementation","createHTMLDocument","body","selectAll","hasBubbles","TEXT_ZWS","REG_ZWS","test","REG_REPLACE_NON_PRINTABLE","anchorOffset","focusOffset","Math","min","max","lastBubble","headBubble","findBubbleLeft","DOCUMENT_POSITION_FOLLOWING","findBubbleRight","isEditorNode","prevBubble","nextBubble","unescapeHtmlChar","chr","HTML_UNESCAPES","escapeHtmlChar","HTML_ESCAPES","raf","&","<",">","\"","'","`","&","<",">",""","'","`","REG_ESCAPED_HTML","REG_UNESCAPED_HTML","REG_HAS_ESCAPED_HTML","source","REG_HAS_UNESCAPED_HTML","REG_IE","DOCUMENT_POSITION_CONTAINED_BY","throttle","callback","runContext","animationCallback","apply","unescape","navigator","userAgent","isIE","global","now","root","window","vendors","suffix","caf","queue","frameDuration","_now","cp","cancelled","e","round","handle","fn","cancel","polyfill","requestAnimationFrame","cancelAnimationFrame","process","getNanoSeconds","hrtime","loadTime","performance","hr","Date","getTime","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","array","nextTick","args","title","browser","env","argv","version","versions","addListener","once","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","_defineProperty","enumerable","writable","scrollX","html","documentElement","scrollLeft","clientLeft","scrollY","scrollTop","clientTop","dispatch","element","params","dispatchEvent","Custom","oneCallback","eventName","_callback","removeEventListener","CustomEventCommon","keyCode","charCode","metaKey","ctrlKey","pageX","clientX","pageY","clientY","one","addEventListener","prevent","cancelBubble","returnValue","stopImmediatePropagation","CustomEvent","doc","protoEvent","Event","issetCustomEvent","createEvent","immediatePropagationStopped","bubbles","cancelable","evt","initCustomEvent","detail","initEvent","KEY","a","Backspace","Bottom","Cmd","Comma","Delete","Enter","Esc","Left","Right","Semicolon","Space","Tab","Top","x","EV","BUBBLE_EDIT","BUBBLE_INPUT","CHANGE","DRAGEND","DRAGENTER","DRAGLEAVE","DROP","PROPS","BUBBLE_VALUE","CLICK_TIME","LOCK_COPY","dragImage","Image","src","fromNodeSet","toNodeSet","focus","onMousedown","__drag__","onMouseup","bind","onMousemove","utils","onScroll","nodeOffsetX","offsetX","nodeOffsetY","offsetY","y","currentMoveSet","currentDragElement","dragSet","removeChild","_","moveElement","cloneNode","style","cssText","Modernizr","csstransforms3d","transform","csstransforms","top","left","onBlur","currentTarget","onFocus","cursor","restore","onKeyup","code","isPrintableChar","onKeypress","editBubbleKeyboardEvent","fromCharCode","onKeydown","enable","eventBackspace","eventDelete","eventCopy","shiftKey","begin","onClick","clickTime","isDblclick","firstChild","contains","textRange","editText","eventPaste","blur","click","keydown","keypress","keyup","mscontrolselect","paste","resize","resizestart","nodeWrap","basis","restoreBasis","fakeText","hasChildNodes","lastNode","isEqualNode","removeNode","onPasteSuccess","isBubbling","onReplaceSuccess","clipboardData","getData","contentType","kind","some","getAsString","removeBubbles"],"mappings":"AAAA,GAAIA,UACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAASI,EAAQD,EAASH,GAE/B,YEwHD,SAASW,GAAeC,GACpB,IAAK,GAAIC,KAAQC,GAAS,IAAAC,GAAAC,EACAF,EAASD,GADT,GACdI,EADcF,EAAA,GACRG,EADQH,EAAA,EAEtBH,GAASC,GAASM,EAAiBF,GAAOL,EAASC,IACpB,mBAApBD,GAASC,KAChBD,EAASC,GAASK,IAK9B,QAASE,GAAWC,GACXA,EAAKC,QACNC,OAAOC,eAAeH,EAAM,UACxBI,cAAc,EACdC,MAAOJ,EAAOK,KAAKN,KAK/B,QAASO,GAAcP,GACfA,EAAKC,SACLA,EAAOO,QAAQR,SACRA,GAAKC,QAIpB,QAASQ,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var 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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _slicedToArray = function () { function sliceIterator(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\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar context = __webpack_require__(1);\n\tvar drag = __webpack_require__(2);\n\tvar editor = __webpack_require__(19);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar OPTIONS = {\n\t begining: ['reg', null, 'begining'],\n\t bubbleCopy: ['func', bubbleCopyOption, 'bubble-copy'],\n\t bubbleDeformation: ['func', function () {}, 'bubble-deformation'],\n\t bubbleFormation: ['func', function () {}, 'bubble-formation'],\n\t checkBubblePaste: ['func', checkBubblePasteOption, 'check-bubble-paste'],\n\t classBubble: ['str', 'bubble', 'class-bubble'],\n\t disableControls: ['bool', false, 'disable-controls'],\n\t draggable: ['bool', true, 'draggable'],\n\t ending: ['reg', null, 'ending'], // /\\@ya\\.ru/g;\n\t separator: ['reg', /[,;]/, 'separator'],\n\t tokenizer: ['func', null, 'tokenizer']\n\t};\n\t\n\tvar XBubbles = Object.create(HTMLDivElement.prototype, {\n\t createdCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t }\n\t },\n\t\n\t attachedCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t drag.init(this);\n\t bubble.bubbling(this);\n\t }\n\t },\n\t\n\t detachedCallback: {\n\t value: function value() {\n\t drag.destroy(this);\n\t destroyEditor(this);\n\t }\n\t },\n\t\n\t /*\n\t attributeChangedCallback: {\n\t value: function (name, prevValue, value) {}\n\t },\n\t */\n\t\n\t options: {\n\t value: function value(name, _value) {\n\t if (!this._options) {\n\t this._options = {};\n\t\n\t for (var optionName in OPTIONS) {\n\t this._options[optionName] = undefined;\n\t\n\t var attrName = 'data-' + OPTIONS[optionName][2];\n\t if (this.hasAttribute(attrName)) {\n\t this._options[optionName] = this.getAttribute(attrName);\n\t }\n\t }\n\t\n\t optionsPrepare(this._options);\n\t }\n\t\n\t if (typeof _value !== 'undefined') {\n\t this._options[name] = _value;\n\t optionsPrepare(this._options);\n\t } else {\n\t return this._options[name];\n\t }\n\t }\n\t },\n\t\n\t items: {\n\t get: function get() {\n\t return bubbleset.getBubbles(this);\n\t }\n\t },\n\t\n\t inputValue: {\n\t get: function get() {\n\t return this.editor.inputValue();\n\t }\n\t },\n\t\n\t setContent: {\n\t value: function value(data) {\n\t return this.editor.setContent(data);\n\t }\n\t },\n\t\n\t addBubble: {\n\t value: function value(bubbleText, data) {\n\t return this.editor.addBubble(bubbleText, data);\n\t }\n\t },\n\t\n\t removeBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.removeBubble(nodeBubble);\n\t }\n\t },\n\t\n\t editBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.editBubble(nodeBubble);\n\t }\n\t }\n\t});\n\t\n\tmodule.exports = context.document.registerElement('x-bubbles', {\n\t extends: 'div',\n\t prototype: XBubbles\n\t});\n\t\n\tvar OPTIONS_PREPARE = {\n\t func: function func(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return new Function('context', 'return context.' + value + ';')(context);\n\t\n\t case 'function':\n\t return value;\n\t }\n\t },\n\t bool: function bool(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return value === 'true' || value === 'on';\n\t\n\t case 'boolean':\n\t return value;\n\t }\n\t },\n\t noop: function noop(value) {\n\t return value;\n\t },\n\t reg: function reg(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t if (value) {\n\t var match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n\t if (match) {\n\t return new RegExp(match[1], match[2]);\n\t }\n\t }\n\t\n\t return null;\n\t\n\t case 'object':\n\t if (value instanceof context.RegExp) {\n\t return value;\n\t }\n\t }\n\t },\n\t str: function str(value) {\n\t if (typeof value !== 'undefined') {\n\t return value ? String(value) : '';\n\t }\n\t }\n\t};\n\t\n\tfunction optionsPrepare(options) {\n\t for (var name in OPTIONS) {\n\t var _OPTIONS$name = _slicedToArray(OPTIONS[name], 2),\n\t type = _OPTIONS$name[0],\n\t def = _OPTIONS$name[1];\n\t\n\t options[name] = OPTIONS_PREPARE[type](options[name]);\n\t if (typeof options[name] === 'undefined') {\n\t options[name] = def;\n\t }\n\t }\n\t}\n\t\n\tfunction initEditor(node) {\n\t if (!node.editor) {\n\t Object.defineProperty(node, 'editor', {\n\t configurable: true,\n\t value: editor.init(node)\n\t });\n\t }\n\t}\n\t\n\tfunction destroyEditor(node) {\n\t if (node.editor) {\n\t editor.destroy(node);\n\t delete node.editor;\n\t }\n\t}\n\t\n\tfunction bubbleCopyOption(list) {\n\t return list.map(function (item) {\n\t return item.innerHTML;\n\t }).join(', ');\n\t}\n\t\n\tfunction checkBubblePasteOption() {\n\t return true;\n\t}\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function () {\n\t /* eslint no-eval: 0 */\n\t return this || (1, eval)('this');\n\t}();\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar native = __webpack_require__(3);\n\tvar mouse = __webpack_require__(17);\n\t\n\tvar _require = __webpack_require__(8),\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.init = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.init(nodeSet);\n\t }\n\t\n\t return mouse.init(nodeSet);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.destroy(nodeSet);\n\t }\n\t\n\t return mouse.destroy(nodeSet);\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar events = __webpack_require__(12);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar EVENTS = {\n\t dragend: onDragend,\n\t dragenter: onDragenter,\n\t dragleave: onDragleave,\n\t dragover: onDragover,\n\t dragstart: onDragstart,\n\t drop: onDrop\n\t};\n\t\n\tvar currentDragSet = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, EVENTS);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, EVENTS);\n\t};\n\t\n\tfunction onDragstart(event) {\n\t event.stopPropagation();\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (!nodeSet || !nodeBubble) {\n\t event.preventDefault();\n\t return;\n\t }\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = nodeSet;\n\t nodeSet.classList.add(CLS.DRAGSTART);\n\t select.add(nodeBubble);\n\t\n\t event.dataTransfer.effectAllowed = 'move';\n\t event.dataTransfer.setData('text/plain', '');\n\t\n\t var list = select.get(currentDragSet);\n\t if (list.length > 1) {\n\t event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n\t }\n\t}\n\t\n\tfunction onDrop(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet || nodeSet === currentDragSet) {\n\t return;\n\t }\n\t\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t}\n\t\n\tfunction onDragover(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t event.dataTransfer.dropEffect = 'move';\n\t}\n\t\n\tfunction onDragenter(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragleave(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragend(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t currentDragSet.classList.remove(CLS.DRAGSTART);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t\n\t currentDragSet = null;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar slice = Array.prototype.slice;\n\tvar PATH_SELECTED = '[bubble][selected]';\n\tvar PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\t\n\texports.all = all;\n\texports.add = add;\n\texports.clear = clear;\n\texports.get = get;\n\texports.uniq = uniq;\n\texports.head = head;\n\texports.last = last;\n\texports.has = has;\n\texports.range = range;\n\texports.toggleUniq = toggleUniq;\n\t\n\tfunction range(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return;\n\t }\n\t\n\t var set = node.parentNode;\n\t var list = get(set);\n\t\n\t if (!list.length) {\n\t uniq(node);\n\t return;\n\t }\n\t\n\t clear(set);\n\t\n\t var headList = list[0];\n\t var lastList = list[list.length - 1];\n\t\n\t if (headList === lastList || !set.startRangeSelect) {\n\t set.startRangeSelect = headList;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var position = node.compareDocumentPosition(set.startRangeSelect);\n\t\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t fromNode = set.startRangeSelect;\n\t toNode = node;\n\t } else {\n\t fromNode = node;\n\t toNode = set.startRangeSelect;\n\t }\n\t\n\t if (fromNode && toNode) {\n\t var item = fromNode;\n\t\n\t while (item) {\n\t if (!setSelected(item)) {\n\t break;\n\t }\n\t\n\t if (item === toNode) {\n\t break;\n\t }\n\t\n\t item = item.nextSibling;\n\t }\n\t\n\t bubble.bubbling(set);\n\t }\n\t}\n\t\n\tfunction all(nodeSet) {\n\t slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(function (item) {\n\t return setSelected(item);\n\t });\n\t nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\t\n\t bubble.bubbling(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t}\n\t\n\tfunction has(nodeSet) {\n\t return Boolean(nodeSet.querySelector(PATH_SELECTED));\n\t}\n\t\n\tfunction head(set) {\n\t return get(set)[0];\n\t}\n\t\n\tfunction last(set) {\n\t var list = get(set);\n\t return list[list.length - 1];\n\t}\n\t\n\tfunction get(nodeSet) {\n\t return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n\t}\n\t\n\tfunction clear(nodeSet) {\n\t get(nodeSet).forEach(function (item) {\n\t return item.removeAttribute('selected');\n\t });\n\t}\n\t\n\tfunction add(node) {\n\t if (setSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t nodeSet.startRangeSelect = node;\n\t // ???\n\t bubble.bubbling(nodeSet);\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction uniq(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return false;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t var selection = context.getSelection();\n\t\n\t selection && selection.removeAllRanges();\n\t clear(nodeSet);\n\t\n\t return add(node);\n\t}\n\t\n\tfunction toggleUniq(node) {\n\t if (isSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t if (get(nodeSet).length === 1) {\n\t return removeSelected(node);\n\t }\n\t }\n\t\n\t return uniq(node);\n\t}\n\t\n\tfunction isSelected(node) {\n\t return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n\t}\n\t\n\tfunction setSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.setAttribute('selected', '');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.removeAttribute('selected');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t escape = _require.escape,\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.isBubbleNode = isBubbleNode;\n\texports.bubbling = bubbling;\n\texports.create = create;\n\texports.edit = edit;\n\t\n\tfunction isBubbleNode(node) {\n\t if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n\t return false;\n\t }\n\t\n\t return node.hasAttribute('bubble');\n\t}\n\t\n\tfunction edit(nodeSet, nodeBubble) {\n\t if (nodeBubble.hasAttribute('readonly')) {\n\t return false;\n\t }\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection) {\n\t return false;\n\t }\n\t\n\t var bubbleDeformation = nodeSet.options('bubbleDeformation');\n\t var rangeParams = bubbleDeformation(nodeBubble);\n\t\n\t if (!rangeParams) {\n\t var dataText = text.textClean(nodeBubble.innerText);\n\t\n\t rangeParams = {\n\t text: dataText,\n\t startOffset: 0,\n\t endOffset: dataText.length\n\t };\n\t }\n\t\n\t var textFake = text.createZws();\n\t var textNode = context.document.createTextNode(rangeParams.text);\n\t\n\t nodeSet.fireEdit(nodeBubble);\n\t nodeSet.replaceChild(textNode, nodeBubble);\n\t nodeSet.insertBefore(textFake, textNode);\n\t\n\t var range = context.document.createRange();\n\t range.setStart(textNode, rangeParams.startOffset);\n\t range.setEnd(textNode, rangeParams.endOffset);\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t}\n\t\n\t/**\n\t * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n\t * @param {[type]} nodeSet [description]\n\t * @param {[type]} dataText [description]\n\t * @param {Object} [dataAttributes={}] [description]\n\t * @returns {[type]} [description]\n\t */\n\tfunction create(nodeSet, dataText) {\n\t var dataAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t dataText = text.textClean(dataText);\n\t\n\t if (!dataText) {\n\t return;\n\t }\n\t\n\t var bubbleFormation = nodeSet.options('bubbleFormation');\n\t var classBubble = nodeSet.options('classBubble');\n\t var draggable = canUseDrag && nodeSet.options('draggable');\n\t var wrap = nodeSet.ownerDocument.createElement('span');\n\t\n\t wrap.innerText = dataText;\n\t\n\t for (var key in dataAttributes) {\n\t if (dataAttributes[key]) {\n\t wrap.setAttribute('data-' + key, escape(dataAttributes[key]));\n\t }\n\t }\n\t\n\t bubbleFormation(wrap);\n\t\n\t if (classBubble) {\n\t var classes = String(classBubble).trim().split(/\\s+/);\n\t var len = classes.length;\n\t\n\t while (len--) {\n\t wrap.classList.add(classes[len]);\n\t }\n\t }\n\t\n\t wrap.setAttribute('bubble', '');\n\t wrap.setAttribute('contenteditable', 'false');\n\t draggable && wrap.setAttribute('draggable', 'true');\n\t\n\t return wrap;\n\t}\n\t\n\tfunction bubbling(nodeSet) {\n\t var begining = nodeSet.options('begining');\n\t var ending = nodeSet.options('ending');\n\t var separator = nodeSet.options('separator');\n\t var tokenizer = nodeSet.options('tokenizer');\n\t var ranges = getBubbleRanges(nodeSet);\n\t var nodes = [];\n\t\n\t ranges.forEach(function (range) {\n\t var dataText = text.textClean(range.toString());\n\t\n\t if (!dataText) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var textParts = [dataText];\n\t\n\t if (tokenizer) {\n\t textParts = tokenizer(dataText);\n\t } else {\n\t if (separator) {\n\t textParts = dataText.split(separator).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t\n\t if (ending) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByEnding(str, ending));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t } else if (begining) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByBeginning(str, begining));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t }\n\t\n\t if (!Array.isArray(textParts) || !textParts.length) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var fragment = context.document.createDocumentFragment();\n\t\n\t textParts.forEach(function (textPart) {\n\t var nodeBubble = create(nodeSet, textPart);\n\t if (nodeBubble) {\n\t fragment.appendChild(nodeBubble);\n\t nodes.push(nodeBubble);\n\t }\n\t });\n\t\n\t range.deleteContents();\n\t range.insertNode(fragment);\n\t });\n\t\n\t nodeSet.fireInput();\n\t\n\t if (nodes.length) {\n\t nodeSet.fireChange();\n\t }\n\t\n\t return nodes;\n\t}\n\t\n\tfunction getBubbleRanges(nodeSet) {\n\t var ranges = [];\n\t var children = nodeSet.childNodes;\n\t var range = void 0;\n\t var node = void 0;\n\t\n\t for (var i = 0; i < children.length; i++) {\n\t node = children[i];\n\t\n\t if (isBubbleNode(node)) {\n\t if (range) {\n\t range.setEndBefore(node);\n\t ranges.push(range);\n\t range = undefined;\n\t }\n\t } else {\n\t if (!range) {\n\t range = context.document.createRange();\n\t range.setStartBefore(node);\n\t }\n\t }\n\t }\n\t\n\t if (range) {\n\t range.setEndAfter(node);\n\t ranges.push(range);\n\t }\n\t\n\t return ranges;\n\t}\n\t\n\tfunction trimIterator(str) {\n\t return str.trim();\n\t}\n\t\n\tfunction nonEmptyIterator(str) {\n\t return Boolean(str);\n\t}\n\t\n\tfunction parseFragmentByEnding(str, reg) {\n\t var parts = [];\n\t var lastIndex = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while (reg.exec(str) !== null && loop) {\n\t loop--;\n\t parts.push(str.substring(lastIndex, reg.lastIndex));\n\t lastIndex = reg.lastIndex;\n\t }\n\t\n\t return parts;\n\t}\n\t\n\tfunction parseFragmentByBeginning(str, reg) {\n\t var parts = [];\n\t var res = void 0;\n\t var index = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while ((res = reg.exec(str)) !== null && loop) {\n\t loop--;\n\t if (index !== res.index) {\n\t parts.push(str.substring(index, res.index));\n\t index = res.index;\n\t }\n\t }\n\t\n\t parts.push(str.substring(index, str.length));\n\t return parts;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar _require = __webpack_require__(8),\n\t getSelection = _require.getSelection;\n\t\n\t/* eslint-disable max-len */\n\t\n\t\n\tvar REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\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3-\\u0D01\\u0D04\\u0D0D\\u0D11\\u0D3B\\u0D3C\\u0D45\\u0D49\\u0D4F-\\u0D56\\u0D58-\\u0D5F\\u0D64\\u0D65\\u0D76-\\u0D78\\u0D80\\u0D81\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DF1\\u0DF5-\\u0E00\\u0E3B-\\u0E3E\\u0E5C-\\u0E80\\u0E83\\u0E85\\u0E86\\u0E89\\u0E8B\\u0E8C\\u0E8E-\\u0E93\\u0E98\\u0EA0\\u0EA4\\u0EA6\\u0EA8\\u0EA9\\u0EAC\\u0EBA\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A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\\uA9CE\\uA9DA-\\uA9DD\\uA9E0-\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A\\uAA5B\\uAA7C-\\uAA7F\\uAAC3-\\uAADA\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F-\\uABBF\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBC2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFE\\uFDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\n\tvar REG_ZWS = /\\u200B/;\n\tvar TEXT_ZWS = '\\u200B';\n\t\n\texports.arrowRight = arrowRight;\n\texports.arrowLeft = arrowLeft;\n\texports.remove = remove;\n\texports.html2text = html2text;\n\texports.currentTextRange = currentTextRange;\n\texports.text2bubble = text2bubble;\n\texports.replaceString = replaceString;\n\texports.selectAll = selectAll;\n\texports.textClean = textClean;\n\texports.checkZws = checkZws;\n\texports.createZws = createZws;\n\t\n\tfunction text2bubble(nodeEditor, nodeBubble) {\n\t var selection = getSelection(nodeEditor);\n\t var range = selection && currentTextRange(nodeEditor, selection);\n\t\n\t if (range) {\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t replace(selection, nodeBubble);\n\t } else {\n\t nodeEditor.appendChild(nodeBubble);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction currentTextRange(nodeEditor, selection) {\n\t selection = selection || getSelection(nodeEditor);\n\t if (!selection) {\n\t return;\n\t }\n\t\n\t var pointNode = selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE ? selection.focusNode : selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE ? selection.anchorNode : undefined;\n\t\n\t if (!pointNode) {\n\t return;\n\t }\n\t\n\t var startNode = pointNode;\n\t var endNode = pointNode;\n\t var item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t startNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t endNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var range = nodeEditor.ownerDocument.createRange();\n\t range.setStartBefore(startNode);\n\t range.setEndAfter(endNode);\n\t\n\t return range;\n\t}\n\t\n\tfunction remove(selection) {\n\t return replace(selection, createZws());\n\t}\n\t\n\tfunction replace(selection, node) {\n\t if (!selection || !selection.rangeCount) {\n\t return false;\n\t }\n\t\n\t var anchor = context.document.createElement('span');\n\t selection.getRangeAt(0).surroundContents(anchor);\n\t anchor.parentNode.replaceChild(node, anchor);\n\t\n\t selection.removeAllRanges();\n\t\n\t if (node.nodeType === Node.TEXT_NODE) {\n\t var range = context.document.createRange();\n\t // для ИЕ обязательно указывать node.nodeValue.length\n\t range.setStart(node, node.nodeValue.length);\n\t range.collapse(false);\n\t selection.addRange(range);\n\t } else {\n\t selection.collapse(node, 0);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction replaceString(data, selection) {\n\t data = textClean(data);\n\t if (!data) {\n\t return false;\n\t }\n\t\n\t selection = selection || context.getSelection();\n\t var textNode = context.document.createTextNode(data);\n\t\n\t if (!replace(selection, textNode)) {\n\t return false;\n\t }\n\t\n\t selection.collapse(textNode, textNode.nodeValue.length);\n\t return true;\n\t}\n\t\n\tfunction arrowLeft(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect = selectionCorrect(selection),\n\t startNode = _selectionCorrect.startNode,\n\t endNode = _selectionCorrect.endNode,\n\t startOffset = _selectionCorrect.startOffset,\n\t endOffset = _selectionCorrect.endOffset,\n\t revert = _selectionCorrect.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(startNode, startOffset);\n\t return true;\n\t }\n\t\n\t var isNativeExtend = Boolean(selection.extend);\n\t revert = isNativeExtend ? revert : !revert;\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t if (offset === null) {\n\t offset = node.nodeValue.length;\n\t }\n\t\n\t if (offset - 1 < 0) {\n\t node = node.previousSibling;\n\t offset = null;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset - 1, offset);\n\t\n\t if (checkZws(text)) {\n\t offset = offset - 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node || offset === null) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t if (isNativeExtend) {\n\t selection.extend(node, offset - 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset - 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset - 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset - 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction arrowRight(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.focusNode || selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect2 = selectionCorrect(selection),\n\t startNode = _selectionCorrect2.startNode,\n\t endNode = _selectionCorrect2.endNode,\n\t startOffset = _selectionCorrect2.startOffset,\n\t endOffset = _selectionCorrect2.endOffset,\n\t revert = _selectionCorrect2.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(endNode, endOffset);\n\t return true;\n\t }\n\t\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var len = node.nodeValue.length;\n\t\n\t if (offset + 1 > len) {\n\t node = node.nextSibling;\n\t offset = 0;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset, offset + 1);\n\t\n\t if (checkZws(text)) {\n\t offset = offset + 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t var isNativeExtend = Boolean(selection.extend);\n\t\n\t if (isNativeExtend) {\n\t selection.extend(node, offset + 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset + 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset + 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset + 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction html2text(value) {\n\t if (!value) {\n\t return '';\n\t }\n\t\n\t var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n\t DOMContainer.innerText = value;\n\t\n\t return DOMContainer.innerText.replace(/^[\\u0020\\u00a0]+$/gm, '').replace(/\\n/gm, ' ').trim();\n\t}\n\t\n\tfunction selectAll(selection, nodeSet) {\n\t selection = selection || context.getSelection();\n\t var node = selection && selection.anchorNode;\n\t\n\t if (!node || node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t fromNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t toNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var hasBubbles = bubbleset.hasBubbles(nodeSet);\n\t var range = context.document.createRange();\n\t range.setStartBefore(fromNode);\n\t range.setEndAfter(toNode);\n\t\n\t var dataText = textClean(range.toString());\n\t\n\t if (dataText || !dataText && !hasBubbles) {\n\t if (!dataText) {\n\t range.collapse();\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction createZws() {\n\t return context.document.createTextNode(TEXT_ZWS);\n\t}\n\t\n\tfunction checkZws(value) {\n\t return REG_ZWS.test(value);\n\t}\n\t\n\tfunction textClean(value) {\n\t return String(value || '').trim().replace(REG_REPLACE_NON_PRINTABLE, '');\n\t}\n\t\n\tfunction selectionCorrect(selection) {\n\t var startNode = selection.anchorNode;\n\t var endNode = selection.focusNode;\n\t var startOffset = selection.anchorOffset;\n\t var endOffset = selection.focusOffset;\n\t var revert = false;\n\t\n\t if (startNode === endNode) {\n\t startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n\t endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n\t revert = selection.anchorOffset > selection.focusOffset;\n\t } else {\n\t var position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t startNode = selection.focusNode;\n\t startOffset = selection.focusOffset;\n\t endNode = selection.anchorNode;\n\t endOffset = selection.anchorOffset;\n\t revert = true;\n\t }\n\t }\n\t\n\t return { startNode: startNode, endNode: endNode, startOffset: startOffset, endOffset: endOffset, revert: revert };\n\t}\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bubble = __webpack_require__(5);\n\tvar text = __webpack_require__(6);\n\t\n\texports.closestNodeBubble = closestNodeBubble;\n\texports.closestNodeSet = closestNodeSet;\n\texports.findBubbleLeft = findBubbleLeft;\n\texports.findBubbleRight = findBubbleRight;\n\texports.getBubbles = getBubbles;\n\texports.hasBubbles = hasBubbles;\n\texports.headBubble = headBubble;\n\texports.lastBubble = lastBubble;\n\texports.nextBubble = nextBubble;\n\texports.prevBubble = prevBubble;\n\t\n\tfunction lastBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:last-child');\n\t}\n\t\n\tfunction headBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:first-child');\n\t}\n\t\n\tfunction getBubbles(nodeSet) {\n\t return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n\t}\n\t\n\tfunction hasBubbles(nodeSet) {\n\t return Boolean(nodeSet.querySelector('[bubble]'));\n\t}\n\t\n\tfunction findBubbleLeft(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.previousSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.previousSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction findBubbleRight(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.nextSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.nextSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction closestNodeSet(node) {\n\t while (node) {\n\t if (isEditorNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction closestNodeBubble(node) {\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (isEditorNode(node)) {\n\t return;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction prevBubble(target) {\n\t var node = target && target.previousSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction nextBubble(target) {\n\t var node = target && target.nextSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction isEditorNode(node) {\n\t return node.nodeType === Node.ELEMENT_NODE && node.getAttribute('is') === 'x-bubbles';\n\t}\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\t\n\t/* eslint quotes: 0 */\n\t\n\tvar HTML_ESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '\"': '"',\n\t \"'\": ''',\n\t '`': '`'\n\t};\n\t\n\tvar HTML_UNESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '"': '\"',\n\t ''': \"'\",\n\t '`': '`'\n\t};\n\t\n\tvar REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\n\tvar REG_UNESCAPED_HTML = /[&<>\"'`]/g;\n\tvar REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\n\tvar REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\n\tvar REG_IE = /Trident|Edge/;\n\t\n\texports.getSelection = function (nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (selection && selection.anchorNode && nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n\t return selection;\n\t }\n\t};\n\t\n\texports.throttle = function (callback, runContext) {\n\t var throttle = 0;\n\t var animationCallback = function animationCallback() {\n\t throttle = 0;\n\t };\n\t\n\t return function () {\n\t if (throttle) {\n\t return;\n\t }\n\t\n\t throttle = raf(animationCallback);\n\t\n\t callback.apply(runContext || this, arguments);\n\t };\n\t};\n\t\n\texports.escape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n\t return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.unescape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n\t return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.canUseDrag = function () {\n\t return !REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\texports.isIE = function () {\n\t return REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\tfunction unescapeHtmlChar(chr) {\n\t return HTML_UNESCAPES[chr];\n\t}\n\t\n\tfunction escapeHtmlChar(chr) {\n\t return HTML_ESCAPES[chr];\n\t}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(10)\n\t , root = typeof window === 'undefined' ? global : window\n\t , vendors = ['moz', 'webkit']\n\t , suffix = 'AnimationFrame'\n\t , raf = root['request' + suffix]\n\t , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\t\n\tfor(var i = 0; !raf && i < vendors.length; i++) {\n\t raf = root[vendors[i] + 'Request' + suffix]\n\t caf = root[vendors[i] + 'Cancel' + suffix]\n\t || root[vendors[i] + 'CancelRequest' + suffix]\n\t}\n\t\n\t// Some versions of FF have rAF but not cAF\n\tif(!raf || !caf) {\n\t var last = 0\n\t , id = 0\n\t , queue = []\n\t , frameDuration = 1000 / 60\n\t\n\t raf = function(callback) {\n\t if(queue.length === 0) {\n\t var _now = now()\n\t , next = Math.max(0, frameDuration - (_now - last))\n\t last = next + _now\n\t setTimeout(function() {\n\t var cp = queue.slice(0)\n\t // Clear queue here to prevent\n\t // callbacks from appending listeners\n\t // to the current frame's queue\n\t queue.length = 0\n\t for(var i = 0; i < cp.length; i++) {\n\t if(!cp[i].cancelled) {\n\t try{\n\t cp[i].callback(last)\n\t } catch(e) {\n\t setTimeout(function() { throw e }, 0)\n\t }\n\t }\n\t }\n\t }, Math.round(next))\n\t }\n\t queue.push({\n\t handle: ++id,\n\t callback: callback,\n\t cancelled: false\n\t })\n\t return id\n\t }\n\t\n\t caf = function(handle) {\n\t for(var i = 0; i < queue.length; i++) {\n\t if(queue[i].handle === handle) {\n\t queue[i].cancelled = true\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = function(fn) {\n\t // Wrap in a new function to prevent\n\t // `cancel` potentially being assigned\n\t // to the native rAF function\n\t return raf.call(root, fn)\n\t}\n\tmodule.exports.cancel = function() {\n\t caf.apply(root, arguments)\n\t}\n\tmodule.exports.polyfill = function() {\n\t root.requestAnimationFrame = raf\n\t root.cancelAnimationFrame = caf\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1\n\t(function() {\n\t var getNanoSeconds, hrtime, loadTime;\n\t\n\t if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n\t module.exports = function() {\n\t return performance.now();\n\t };\n\t } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n\t module.exports = function() {\n\t return (getNanoSeconds() - loadTime) / 1e6;\n\t };\n\t hrtime = process.hrtime;\n\t getNanoSeconds = function() {\n\t var hr;\n\t hr = hrtime();\n\t return hr[0] * 1e9 + hr[1];\n\t };\n\t loadTime = getNanoSeconds();\n\t } else if (Date.now) {\n\t module.exports = function() {\n\t return Date.now() - loadTime;\n\t };\n\t loadTime = Date.now();\n\t } else {\n\t module.exports = function() {\n\t return new Date().getTime() - loadTime;\n\t };\n\t loadTime = new Date().getTime();\n\t }\n\t\n\t}).call(this);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction _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; }\n\t\n\t/**\n\t * @module x-bubbles/event\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar CustomEventCommon = __webpack_require__(13);\n\t\n\texports.scrollX = scrollX;\n\texports.scrollY = scrollY;\n\texports.dispatch = dispatch;\n\t\n\texports.keyCode = function (event) {\n\t return event.charCode || event.keyCode;\n\t};\n\t\n\texports.metaKey = function (event) {\n\t return event.ctrlKey || event.metaKey;\n\t};\n\t\n\texports.pageX = function (event) {\n\t return event.pageX === null && event.clientX !== null ? event.clientX + scrollX() : event.pageX;\n\t};\n\t\n\texports.pageY = function (event) {\n\t return event.pageY === null && event.clientY !== null ? event.clientY + scrollY() : event.pageY;\n\t};\n\t\n\texports.one = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, oneCallback(target, name, events[name]));\n\t }\n\t};\n\t\n\texports.on = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.off = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.removeEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.prevent = function (event) {\n\t event.cancelBubble = true;\n\t event.returnValue = false;\n\t event.stopImmediatePropagation();\n\t event.stopPropagation();\n\t event.preventDefault();\n\t return false;\n\t};\n\t\n\tfunction scrollX() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n\t}\n\t\n\tfunction scrollY() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n\t}\n\t\n\t/**\n\t * Designer events.\n\t *\n\t * @example\n\t * const { Custom } = require('event');\n\t *\n\t * new Custom('custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event~Custom\n\t * @constructor\n\t */\n\tvar Custom = function () {\n\t if (typeof context.CustomEvent === 'function') {\n\t return context.CustomEvent;\n\t }\n\t\n\t return CustomEventCommon;\n\t}();\n\t\n\t/**\n\t * Dispatch event.\n\t *\n\t * @example\n\t * const { dispatch } = require('event');\n\t * dispatch(node, 'custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event.dispatch\n\t * @param {HTMLElement} element node events\n\t * @param {string} name event name\n\t * @param {Object} params the event parameters\n\t * @param {boolean} [params.bubbles=false]\n\t * @param {boolean} [params.cancelable=false]\n\t * @param {*} [params.detail]\n\t */\n\tfunction dispatch(element, name) {\n\t var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t element.dispatchEvent(new Custom(name, params));\n\t}\n\t\n\tfunction oneCallback(target, eventName, callback) {\n\t return function _callback(event) {\n\t target.removeEventListener(eventName, _callback);\n\t callback(event);\n\t };\n\t}\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\t\n\t/**\n\t * @constant {Document}\n\t * @private\n\t */\n\tvar doc = context.document;\n\t\n\t/**\n\t * @constant {Object}\n\t * @private\n\t */\n\tvar protoEvent = context.Event.prototype;\n\t\n\tvar issetCustomEvent = false;\n\t\n\ttry {\n\t issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n\t} catch (e) {}\n\t// do nothing\n\t\n\t\n\t/**\n\t * The original function \"stopImmediatePropagation\"\n\t * @constant {function}\n\t * @private\n\t */\n\tvar stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\t\n\t/**\n\t * Override function to set properties \"immediatePropagationStopped\"\n\t */\n\tprotoEvent.stopImmediatePropagation = function () {\n\t this.immediatePropagationStopped = true;\n\t\n\t if (stopImmediatePropagation) {\n\t stopImmediatePropagation.call(this);\n\t } else {\n\t this.stopPropagation();\n\t }\n\t};\n\t\n\tvar CustomEventCommon = function () {\n\t if (issetCustomEvent) {\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('CustomEvent');\n\t\n\t evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\t\n\t return evt;\n\t };\n\t }\n\t\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('Event');\n\t\n\t evt.initEvent(eventName, bubbles, cancelable);\n\t evt.detail = params.detail;\n\t\n\t return evt;\n\t };\n\t}();\n\t\n\tCustomEventCommon.prototype = protoEvent;\n\t\n\tmodule.exports = CustomEventCommon;\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\texports.KEY = {\n\t a: 65,\n\t Backspace: 8,\n\t Bottom: 40,\n\t c: 67,\n\t Cmd: 91,\n\t Comma: 44, // ,\n\t Delete: 46,\n\t Enter: 13, // Enter\n\t Esc: 27,\n\t Left: 37,\n\t Right: 39,\n\t Semicolon: 59, // ;\n\t Space: 32,\n\t Tab: 9,\n\t Top: 38,\n\t x: 88\n\t};\n\t\n\texports.CLS = {\n\t DRAGSTART: 'drag',\n\t DROPZONE: 'dropzone'\n\t};\n\t\n\texports.EV = {\n\t BUBBLE_EDIT: 'bubble-edit',\n\t BUBBLE_INPUT: 'bubble-input',\n\t CHANGE: 'change',\n\t DRAGEND: 'dragend',\n\t DRAGENTER: 'dragenter',\n\t DRAGLEAVE: 'dragleave',\n\t DRAGSTART: 'dragstart',\n\t DROP: 'drop'\n\t};\n\t\n\texports.PROPS = {\n\t BUBBLE_VALUE: '_bubbleValue',\n\t CLICK_TIME: '_clickTime',\n\t LOCK_COPY: '_lockCopy'\n\t};\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar DRAG_IMG = { w: 16, h: 16 };\n\t\n\tvar dragImage = null;\n\t\n\texports.DRAG_IMG = DRAG_IMG;\n\t\n\texports.getDragImage = function () {\n\t if (!dragImage) {\n\t dragImage = new Image();\n\t dragImage.src = __webpack_require__(16);\n\t }\n\t\n\t return dragImage;\n\t};\n\t\n\texports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n\t fromNodeSet.fireChange();\n\t toNodeSet.focus();\n\t toNodeSet.fireChange();\n\t};\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar Modernizr = __webpack_require__(18);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS,\n\t EV = _require.EV;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar currentDragSet = null;\n\tvar currentMoveSet = null;\n\tvar currentDragElement = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\tfunction onMousedown(event) {\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t if (!nodeBubble) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t event.preventDefault();\n\t nodeSet.focus();\n\t\n\t var drag = nodeSet.__drag__ = {\n\t onMouseup: onMouseup.bind(this, nodeSet),\n\t onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n\t onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n\t nodeOffsetX: event.offsetX,\n\t nodeOffsetY: event.offsetY,\n\t x: 0,\n\t y: 0\n\t };\n\t\n\t currentDragSet = null;\n\t currentMoveSet = null;\n\t currentDragElement = null;\n\t\n\t events.one(document, 'mouseup', drag.onMouseup);\n\t events.on(document, 'mousemove', drag.onMousemove);\n\t events.on(document, 'scroll', drag.onScroll);\n\t}\n\t\n\tfunction onMouseup(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t events.off(document, 'mousemove', drag.onMousemove);\n\t events.off(document, 'scroll', drag.onScroll);\n\t delete dragSet.__drag__;\n\t\n\t if (currentDragElement) {\n\t currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n\t currentDragElement = null;\n\t }\n\t\n\t if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t\n\t if (currentDragSet) {\n\t (function () {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t }\n\t\n\t var _ = currentDragSet;\n\t currentDragSet = null;\n\t\n\t _.classList.remove(CLS.DRAGSTART);\n\t events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n\t events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n\t })();\n\t }\n\t}\n\t\n\tfunction onMousemove(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t if (!currentDragSet) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = dragSet;\n\t currentDragSet.classList.add(CLS.DRAGSTART);\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t var moveElement = void 0;\n\t\n\t if (nodeBubble) {\n\t select.add(nodeBubble);\n\t if (select.get(currentDragSet).length === 1) {\n\t moveElement = nodeBubble.cloneNode(true);\n\t }\n\t }\n\t\n\t if (!moveElement) {\n\t moveElement = getDragImage();\n\t drag.nodeOffsetX = DRAG_IMG.w;\n\t drag.nodeOffsetY = DRAG_IMG.h;\n\t }\n\t\n\t currentDragElement = document.body.appendChild(document.createElement('div'));\n\t currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n\t currentDragElement.appendChild(moveElement);\n\t\n\t events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n\t }\n\t\n\t drag.x = event.clientX;\n\t drag.y = event.clientY;\n\t onScroll(dragSet);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t if (currentMoveSet && currentMoveSet !== nodeSet) {\n\t currentMoveSet.classList.remove(CLS.DROPZONE);\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t } else if (!currentMoveSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t }\n\t } else if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t}\n\t\n\tfunction onScroll(dragSet) {\n\t var drag = dragSet.__drag__;\n\t if (!drag || !currentDragElement) {\n\t return;\n\t }\n\t\n\t var x = drag.x - drag.nodeOffsetX + events.scrollX();\n\t var y = drag.y - drag.nodeOffsetY + events.scrollY();\n\t\n\t if (Modernizr.csstransforms3d) {\n\t currentDragElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';\n\t } else if (Modernizr.csstransforms) {\n\t currentDragElement.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\n\t } else {\n\t currentDragElement.style.top = y + 'px';\n\t currentDragElement.style.left = x + 'px';\n\t }\n\t}\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\tmodule.exports = Modernizr;\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t KEY = _require.KEY,\n\t EV = _require.EV,\n\t PROPS = _require.PROPS;\n\t\n\tvar text = __webpack_require__(6);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar eventCopy = __webpack_require__(21);\n\tvar eventPaste = __webpack_require__(22);\n\tvar eventBackspace = __webpack_require__(23);\n\tvar eventDelete = __webpack_require__(24);\n\t\n\tvar EVENTS = {\n\t blur: onBlur,\n\t click: onClick,\n\t focus: onFocus,\n\t keydown: onKeydown,\n\t keypress: onKeypress,\n\t keyup: onKeyup,\n\t mscontrolselect: events.prevent,\n\t paste: eventPaste,\n\t resize: events.prevent,\n\t resizestart: events.prevent\n\t};\n\t\n\texports.init = function (nodeWrap) {\n\t var nodeEditor = nodeWrap;\n\t nodeEditor.setAttribute('contenteditable', 'true');\n\t nodeEditor.setAttribute('spellcheck', 'false');\n\t\n\t nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n\t nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n\t nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\t\n\t events.on(nodeEditor, EVENTS);\n\t\n\t return {\n\t addBubble: addBubble.bind(nodeEditor),\n\t editBubble: editBubble.bind(nodeEditor),\n\t inputValue: inputValue.bind(nodeEditor),\n\t removeBubble: removeBubble.bind(nodeEditor),\n\t setContent: setContent.bind(nodeEditor)\n\t };\n\t};\n\t\n\texports.destroy = function (nodeEditor) {\n\t events.off(nodeEditor, EVENTS);\n\t};\n\t\n\tfunction onBlur(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t return events.prevent(event);\n\t }\n\t\n\t select.clear(nodeEditor);\n\t bubble.bubbling(nodeEditor);\n\t}\n\t\n\tfunction onFocus(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t events.prevent(event);\n\t delete nodeEditor[PROPS.LOCK_COPY];\n\t\n\t // Safary 10 не сбрасывает курсор без задержки\n\t raf(function () {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t });\n\t\n\t return false;\n\t }\n\t\n\t cursor.restore(nodeEditor);\n\t}\n\t\n\tfunction onKeyup(event) {\n\t var nodeEditor = event.currentTarget;\n\t var code = events.keyCode(event);\n\t var isPrintableChar = event.key ? event.key.length === 1 : (code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd;\n\t\n\t if (isPrintableChar) {\n\t nodeEditor.fireInput();\n\t }\n\t}\n\t\n\tfunction onKeypress(event) {\n\t var code = events.keyCode(event);\n\t var nodeEditor = event.currentTarget;\n\t\n\t /* eslint no-case-declarations: 0 */\n\t switch (code) {\n\t case KEY.Enter:\n\t event.preventDefault();\n\t if (!nodeEditor.options('disableControls')) {\n\t if (!editBubbleKeyboardEvent(nodeEditor)) {\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.Space:\n\t if (editBubbleKeyboardEvent(nodeEditor)) {\n\t event.preventDefault();\n\t }\n\t break;\n\t\n\t default:\n\t var separator = nodeEditor.options('separator');\n\t if (separator && separator.test(String.fromCharCode(code))) {\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t}\n\t\n\tfunction onKeydown(event) {\n\t var code = events.keyCode(event);\n\t var metaKey = events.metaKey(event);\n\t var nodeEditor = event.currentTarget;\n\t var enable = !nodeEditor.options('disableControls');\n\t\n\t switch (code) {\n\t case KEY.Esc:\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t break;\n\t\n\t case KEY.Backspace:\n\t event.preventDefault();\n\t eventBackspace(event);\n\t break;\n\t\n\t case KEY.Delete:\n\t event.preventDefault();\n\t eventDelete(event);\n\t break;\n\t\n\t case KEY.Left:\n\t event.preventDefault();\n\t arrowLeft(event);\n\t break;\n\t\n\t // сдвигаем курсор в начало списка\n\t case KEY.Top:\n\t event.preventDefault();\n\t if (enable) {\n\t var headBubble = bubbleset.headBubble(nodeEditor);\n\t headBubble && select.uniq(headBubble);\n\t }\n\t break;\n\t\n\t case KEY.Right:\n\t event.preventDefault();\n\t arrowRight(event);\n\t break;\n\t\n\t // сдвигаем курсор в конец списка\n\t // case KEY.Tab:\n\t case KEY.Bottom:\n\t event.preventDefault();\n\t if (enable && select.has(nodeEditor)) {\n\t cursor.restore(nodeEditor);\n\t }\n\t break;\n\t\n\t case KEY.a:\n\t if (metaKey) {\n\t event.preventDefault();\n\t\n\t if (!text.selectAll(null, event.currentTarget)) {\n\t select.all(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.c:\n\t if (metaKey) {\n\t eventCopy(event);\n\t }\n\t break;\n\t\n\t case KEY.x:\n\t if (metaKey) {\n\t eventCopy(event, function () {\n\t return eventDelete(event);\n\t });\n\t }\n\t break;\n\t }\n\t}\n\t\n\tfunction arrowLeft(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowLeft(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[0] === nodeSet.startRangeSelect ? list[list.length - 1] : list[0];\n\t\n\t var node = bubbleset.prevBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t }\n\t}\n\t\n\tfunction arrowRight(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowRight(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.nextBubble(selection.focusNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[list.length - 1] === nodeSet.startRangeSelect ? list[0] : list[list.length - 1];\n\t\n\t var node = bubbleset.nextBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n\t select.clear(nodeSet);\n\t selection.collapse(begin.nextSibling, 0);\n\t } else {\n\t cursor.restore(nodeSet);\n\t }\n\t}\n\t\n\tfunction onClick(event) {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (nodeBubble) {\n\t var clickTime = Date.now();\n\t var isDblclick = nodeSet[PROPS.CLICK_TIME] && clickTime - nodeSet[PROPS.CLICK_TIME] < 200;\n\t\n\t nodeSet[PROPS.CLICK_TIME] = clickTime;\n\t\n\t if (events.metaKey(event)) {\n\t select.add(nodeBubble);\n\t } else if (event.shiftKey) {\n\t if (!nodeSet.startRangeSelect) {\n\t select.uniq(nodeBubble);\n\t } else {\n\t select.range(nodeBubble);\n\t }\n\t } else if (isDblclick) {\n\t bubble.edit(nodeSet, nodeBubble);\n\t } else {\n\t select.toggleUniq(nodeBubble);\n\t }\n\t } else {\n\t select.clear(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t cursor.restore(nodeSet);\n\t }\n\t }\n\t}\n\t\n\tfunction editBubbleKeyboardEvent(nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.rangeCount) {\n\t var list = select.get(nodeEditor);\n\t\n\t if (list.length === 1) {\n\t return bubble.edit(nodeEditor, list[0]);\n\t }\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction setContent(data) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t while (this.firstChild) {\n\t this.removeChild(this.firstChild);\n\t }\n\t\n\t data = text.html2text(data);\n\t this.appendChild(this.ownerDocument.createTextNode(data));\n\t bubble.bubbling(this);\n\t cursor.restore(this);\n\t}\n\t\n\tfunction addBubble(bubbleText, dataAttributes) {\n\t var nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n\t if (!nodeBubble) {\n\t return false;\n\t }\n\t\n\t if (text.text2bubble(this, nodeBubble)) {\n\t this.fireInput();\n\t this.fireChange();\n\t cursor.restore(this);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t this.removeChild(nodeBubble);\n\t this.fireChange();\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction editBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t return bubble.edit(this, nodeBubble);\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction inputValue() {\n\t var textRange = text.currentTextRange(this);\n\t return textRange && text.textClean(textRange.toString()) || '';\n\t}\n\t\n\t/**\n\t * Генерация события редактирования бабла.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireEdit\n\t * @param {HTMLElement} nodeBubble нода бабл\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireEdit(nodeBubble) {\n\t events.dispatch(this, EV.BUBBLE_EDIT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: nodeBubble }\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события изменения набора баблов.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireChange\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireChange() {\n\t events.dispatch(this, EV.CHANGE, {\n\t bubbles: false,\n\t cancelable: false\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события ввода текста.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireInput\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireInput() {\n\t var editText = inputValue.call(this);\n\t\n\t if (this[PROPS.BUBBLE_VALUE] !== editText) {\n\t this[PROPS.BUBBLE_VALUE] = editText;\n\t\n\t events.dispatch(this, EV.BUBBLE_INPUT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: editText }\n\t });\n\t }\n\t}\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * @module x-bubbles/cursor\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\tvar select = __webpack_require__(4);\n\t\n\texports.restore = restore;\n\texports.restoreBasis = restoreBasis;\n\t\n\t/**\n\t * Reset the cursor position to the end of the input field.\n\t * @alias module:x-bubbles/cursor.restore\n\t * @param {HTMLElement} nodeSet\n\t */\n\tfunction restore(nodeSet) {\n\t select.clear(nodeSet);\n\t var basis = restoreBasis(nodeSet);\n\t var selection = context.getSelection();\n\t selection.removeAllRanges();\n\t selection.collapse(basis, 1);\n\t}\n\t\n\t/**\n\t * The creation of the fake text at the end childNodes\n\t * @alias module:x-bubbles/cursor.restoreBasis\n\t * @param {HTMLElement} nodeSet\n\t * @returns {HTMLTextElement} fake text node\n\t */\n\tfunction restoreBasis(nodeSet) {\n\t var fakeText = text.createZws();\n\t\n\t if (nodeSet.hasChildNodes()) {\n\t var lastNode = nodeSet.childNodes[nodeSet.childNodes.length - 1];\n\t\n\t if (lastNode.isEqualNode(fakeText)) {\n\t fakeText = lastNode;\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t\n\t return fakeText;\n\t}\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar events = __webpack_require__(12);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t PROPS = _require.PROPS;\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = function (event) {\n\t var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\t\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t return false;\n\t }\n\t\n\t var list = select.get(nodeEditor);\n\t\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var bubbleCopy = nodeEditor.options('bubbleCopy');\n\t var value = bubbleCopy(list);\n\t\n\t if (!value) {\n\t return false;\n\t }\n\t\n\t nodeEditor[PROPS.LOCK_COPY] = true;\n\t\n\t var target = nodeEditor.ownerDocument.createElement('input');\n\t target.value = value;\n\t target.style.cssText = '\\n position: absolute;\\n left: -9999px;\\n width: 1px;\\n height: 1px;\\n margin: 0;\\n padding: 0;\\n border: none;';\n\t\n\t nodeEditor.parentNode.appendChild(target);\n\t\n\t events.one(target, {\n\t keyup: function keyup() {\n\t return nodeEditor.focus();\n\t },\n\t blur: function blur() {\n\t removeNode(target);\n\t raf(callback);\n\t }\n\t });\n\t\n\t target.select();\n\t return true;\n\t};\n\t\n\tfunction removeNode(node) {\n\t node && node.parentNode && node.parentNode.removeChild(node);\n\t}\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t isIE = _require.isIE;\n\t\n\tmodule.exports = function (event) {\n\t event.preventDefault();\n\t var nodeEditor = event.currentTarget;\n\t\n\t if (context.clipboardData && context.clipboardData.getData) {\n\t onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\t } else if (event.clipboardData) {\n\t (function () {\n\t var contentType = 'text/plain';\n\t var clipboardData = event.clipboardData;\n\t var data = clipboardData.getData && clipboardData.getData(contentType);\n\t\n\t if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n\t Array.prototype.slice.call(clipboardData.items).filter(function (item) {\n\t return item.kind === 'string' && item.type === contentType;\n\t }).some(function (item) {\n\t item.getAsString(function (dataText) {\n\t onPasteSuccess(nodeEditor, dataText);\n\t });\n\t\n\t return true;\n\t });\n\t }\n\t })();\n\t }\n\t};\n\t\n\tfunction onPasteSuccess(nodeEditor, dataText) {\n\t var checkBubblePaste = nodeEditor.options('checkBubblePaste');\n\t var selection = context.getSelection();\n\t var isBubbling = dataText && selection.isCollapsed && !nodeEditor.inputValue ? checkBubblePaste(dataText) : false;\n\t\n\t if (text.replaceString(dataText, selection)) {\n\t if (isBubbling) {\n\t if (isIE) {\n\t raf(function () {\n\t return onReplaceSuccess(nodeEditor);\n\t });\n\t } else {\n\t onReplaceSuccess(nodeEditor);\n\t }\n\t } else {\n\t nodeEditor.fireInput();\n\t }\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction onReplaceSuccess(nodeEditor) {\n\t bubble.bubbling(nodeEditor);\n\t nodeEditor.focus();\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t}\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Backspace.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowLeft(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleLeft(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Delete.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowRight(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleRight(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** x-bubbles-compact.min.js\n **/"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap f7d2657b782326567ccf\n **/","const context = require('./context');\nconst drag = require('./core/drag');\nconst editor = require('./core/editor');\nconst bubble = require('./core/bubble');\nconst bubbleset = require('./core/bubbleset');\n\nconst OPTIONS = {\n begining: [ 'reg', null, 'begining' ],\n bubbleCopy: [ 'func', bubbleCopyOption, 'bubble-copy' ],\n bubbleDeformation: [ 'func', function () {}, 'bubble-deformation' ],\n bubbleFormation: [ 'func', function () {}, 'bubble-formation' ],\n checkBubblePaste: [ 'func', checkBubblePasteOption, 'check-bubble-paste' ],\n classBubble: [ 'str', 'bubble', 'class-bubble' ],\n disableControls: [ 'bool', false, 'disable-controls' ],\n draggable: [ 'bool', true, 'draggable' ],\n ending: [ 'reg', null, 'ending' ], // /\\@ya\\.ru/g;\n separator: [ 'reg', /[,;]/, 'separator' ],\n tokenizer: [ 'func', null, 'tokenizer' ],\n};\n\nconst XBubbles = Object.create(HTMLDivElement.prototype, {\n createdCallback: {\n value: function () {\n initEditor(this);\n }\n },\n\n attachedCallback: {\n value: function () {\n initEditor(this);\n drag.init(this);\n bubble.bubbling(this);\n }\n },\n\n detachedCallback: {\n value: function () {\n drag.destroy(this);\n destroyEditor(this);\n }\n },\n\n /*\n attributeChangedCallback: {\n value: function (name, prevValue, value) {}\n },\n */\n\n options: {\n value: function (name, value) {\n if (!this._options) {\n this._options = {};\n\n for (const optionName in OPTIONS) {\n this._options[ optionName ] = undefined;\n\n const attrName = `data-${OPTIONS[ optionName ][2]}`;\n if (this.hasAttribute(attrName)) {\n this._options[ optionName ] = this.getAttribute(attrName);\n }\n }\n\n optionsPrepare(this._options);\n }\n\n if (typeof value !== 'undefined') {\n this._options[ name ] = value;\n optionsPrepare(this._options);\n\n } else {\n return this._options[ name ];\n }\n }\n },\n\n items: {\n get: function () {\n return bubbleset.getBubbles(this);\n }\n },\n\n inputValue: {\n get: function () {\n return this.editor.inputValue();\n }\n },\n\n setContent: {\n value: function (data) {\n return this.editor.setContent(data);\n }\n },\n\n addBubble: {\n value: function (bubbleText, data) {\n return this.editor.addBubble(bubbleText, data);\n }\n },\n\n removeBubble: {\n value: function (nodeBubble) {\n return this.editor.removeBubble(nodeBubble);\n }\n },\n\n editBubble: {\n value: function (nodeBubble) {\n return this.editor.editBubble(nodeBubble);\n }\n }\n});\n\nmodule.exports = context.document.registerElement('x-bubbles', {\n extends: 'div',\n prototype: XBubbles\n});\n\nconst OPTIONS_PREPARE = {\n func: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return new Function('context', `return context.${value};`)(context);\n\n case 'function':\n return value;\n }\n },\n bool: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return (value === 'true' || value === 'on');\n\n case 'boolean':\n return value;\n }\n },\n noop: function (value) {\n return value;\n },\n reg: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n if (value) {\n const match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n if (match) {\n return new RegExp(match[1], match[2]);\n }\n }\n\n return null;\n\n case 'object':\n if (value instanceof context.RegExp) {\n return value;\n }\n }\n },\n str: function (value) {\n if (typeof value !== 'undefined') {\n return value ? String(value) : '';\n }\n },\n};\n\nfunction optionsPrepare(options) {\n for (let name in OPTIONS) {\n const [ type, def ] = OPTIONS[ name ];\n options[ name ] = OPTIONS_PREPARE[ type ](options[ name ]);\n if (typeof options[ name ] === 'undefined') {\n options[ name ] = def;\n }\n }\n}\n\nfunction initEditor(node) {\n if (!node.editor) {\n Object.defineProperty(node, 'editor', {\n configurable: true,\n value: editor.init(node)\n });\n }\n}\n\nfunction destroyEditor(node) {\n if (node.editor) {\n editor.destroy(node);\n delete node.editor;\n }\n}\n\nfunction bubbleCopyOption(list) {\n return list.map(item => item.innerHTML).join(', ');\n}\n\nfunction checkBubblePasteOption() {\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","module.exports = (function () {\n /* eslint no-eval: 0 */\n return this || (1, eval)('this');\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./context.js\n **/","const native = require('./drag/native');\nconst mouse = require('./drag/mouse');\nconst { canUseDrag } = require('./utils');\n\nexports.init = function (nodeSet) {\n if (canUseDrag) {\n return native.init(nodeSet);\n }\n\n return mouse.init(nodeSet);\n};\n\nexports.destroy = function (nodeSet) {\n if (canUseDrag) {\n return native.destroy(nodeSet);\n }\n\n return mouse.destroy(nodeSet);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag.js\n **/","const context = require('../../context');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst events = require('../events');\nconst { CLS } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nconst EVENTS = {\n dragend: onDragend,\n dragenter: onDragenter,\n dragleave: onDragleave,\n dragover: onDragover,\n dragstart: onDragstart,\n drop: onDrop,\n};\n\nlet currentDragSet = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, EVENTS);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, EVENTS);\n};\n\nfunction onDragstart(event) {\n event.stopPropagation();\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (!nodeSet || !nodeBubble) {\n event.preventDefault();\n return;\n }\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = nodeSet;\n nodeSet.classList.add(CLS.DRAGSTART);\n select.add(nodeBubble);\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', '');\n\n const list = select.get(currentDragSet);\n if (list.length > 1) {\n event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n }\n}\n\nfunction onDrop(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet || nodeSet === currentDragSet) {\n return;\n }\n\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n}\n\nfunction onDragover(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n event.dataTransfer.dropEffect = 'move';\n}\n\nfunction onDragenter(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n }\n}\n\nfunction onDragleave(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n}\n\nfunction onDragend(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n currentDragSet.classList.remove(CLS.DRAGSTART);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n\n currentDragSet = null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/native.js\n **/","const context = require('../context');\nconst bubble = require('./bubble');\nconst bubbleset = require('./bubbleset');\n\nconst slice = Array.prototype.slice;\nconst PATH_SELECTED = '[bubble][selected]';\nconst PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\nexports.all = all;\nexports.add = add;\nexports.clear = clear;\nexports.get = get;\nexports.uniq = uniq;\nexports.head = head;\nexports.last = last;\nexports.has = has;\nexports.range = range;\nexports.toggleUniq = toggleUniq;\n\nfunction range(node) {\n if (!bubble.isBubbleNode(node)) {\n return;\n }\n\n const set = node.parentNode;\n const list = get(set);\n\n if (!list.length) {\n uniq(node);\n return;\n }\n\n clear(set);\n\n const headList = list[0];\n const lastList = list[ list.length - 1 ];\n\n if (headList === lastList || !set.startRangeSelect) {\n set.startRangeSelect = headList;\n }\n\n let fromNode;\n let toNode;\n const position = node.compareDocumentPosition(set.startRangeSelect);\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n fromNode = set.startRangeSelect;\n toNode = node;\n\n } else {\n fromNode = node;\n toNode = set.startRangeSelect;\n }\n\n if (fromNode && toNode) {\n let item = fromNode;\n\n while (item) {\n if (!setSelected(item)) {\n break;\n }\n\n if (item === toNode) {\n break;\n }\n\n item = item.nextSibling;\n }\n\n bubble.bubbling(set);\n }\n}\n\nfunction all(nodeSet) {\n slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(item => setSelected(item));\n nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\n bubble.bubbling(nodeSet);\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n}\n\nfunction has(nodeSet) {\n return Boolean(nodeSet.querySelector(PATH_SELECTED));\n}\n\nfunction head(set) {\n return get(set)[0];\n}\n\nfunction last(set) {\n const list = get(set);\n return list[ list.length - 1 ];\n}\n\nfunction get(nodeSet) {\n return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n}\n\nfunction clear(nodeSet) {\n get(nodeSet).forEach(item => item.removeAttribute('selected'));\n}\n\nfunction add(node) {\n if (setSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n nodeSet.startRangeSelect = node;\n // ???\n bubble.bubbling(nodeSet);\n\n return true;\n }\n\n return false;\n}\n\nfunction uniq(node) {\n if (!bubble.isBubbleNode(node)) {\n return false;\n }\n\n const nodeSet = bubbleset.closestNodeSet(node);\n const selection = context.getSelection();\n\n selection && selection.removeAllRanges();\n clear(nodeSet);\n\n return add(node);\n}\n\nfunction toggleUniq(node) {\n if (isSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n if (get(nodeSet).length === 1) {\n return removeSelected(node);\n }\n }\n\n return uniq(node);\n}\n\nfunction isSelected(node) {\n return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n}\n\nfunction setSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.setAttribute('selected', '');\n return true;\n }\n\n return false;\n}\n\nfunction removeSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.removeAttribute('selected');\n return true;\n }\n\n return false;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/select.js\n **/","const context = require('../context');\nconst text = require('./text');\nconst { escape, canUseDrag } = require('./utils');\n\nexports.isBubbleNode = isBubbleNode;\nexports.bubbling = bubbling;\nexports.create = create;\nexports.edit = edit;\n\nfunction isBubbleNode(node) {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n\n return node.hasAttribute('bubble');\n}\n\nfunction edit(nodeSet, nodeBubble) {\n if (nodeBubble.hasAttribute('readonly')) {\n return false;\n }\n\n const selection = context.getSelection();\n\n if (!selection) {\n return false;\n }\n\n const bubbleDeformation = nodeSet.options('bubbleDeformation');\n let rangeParams = bubbleDeformation(nodeBubble);\n\n if (!rangeParams) {\n const dataText = text.textClean(nodeBubble.innerText);\n\n rangeParams = {\n text: dataText,\n startOffset: 0,\n endOffset: dataText.length\n };\n }\n\n const textFake = text.createZws();\n const textNode = context.document.createTextNode(rangeParams.text);\n\n nodeSet.fireEdit(nodeBubble);\n nodeSet.replaceChild(textNode, nodeBubble);\n nodeSet.insertBefore(textFake, textNode);\n\n const range = context.document.createRange();\n range.setStart(textNode, rangeParams.startOffset);\n range.setEnd(textNode, rangeParams.endOffset);\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n}\n\n/**\n * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n * @param {[type]} nodeSet [description]\n * @param {[type]} dataText [description]\n * @param {Object} [dataAttributes={}] [description]\n * @returns {[type]} [description]\n */\nfunction create(nodeSet, dataText, dataAttributes = {}) {\n dataText = text.textClean(dataText);\n\n if (!dataText) {\n return;\n }\n\n const bubbleFormation = nodeSet.options('bubbleFormation');\n const classBubble = nodeSet.options('classBubble');\n const draggable = canUseDrag && nodeSet.options('draggable');\n const wrap = nodeSet.ownerDocument.createElement('span');\n\n wrap.innerText = dataText;\n\n for (let key in dataAttributes) {\n if (dataAttributes[ key ]) {\n wrap.setAttribute(`data-${key}`, escape(dataAttributes[ key ]));\n }\n }\n\n bubbleFormation(wrap);\n\n if (classBubble) {\n const classes = String(classBubble).trim().split(/\\s+/);\n let len = classes.length;\n\n while (len--) {\n wrap.classList.add(classes[ len ]);\n }\n }\n\n wrap.setAttribute('bubble', '');\n wrap.setAttribute('contenteditable', 'false');\n draggable && wrap.setAttribute('draggable', 'true');\n\n return wrap;\n}\n\nfunction bubbling(nodeSet) {\n const begining = nodeSet.options('begining');\n const ending = nodeSet.options('ending');\n const separator = nodeSet.options('separator');\n const tokenizer = nodeSet.options('tokenizer');\n const ranges = getBubbleRanges(nodeSet);\n const nodes = [];\n\n ranges.forEach(function (range) {\n const dataText = text.textClean(range.toString());\n\n if (!dataText) {\n range.deleteContents();\n return;\n }\n\n let textParts = [ dataText ];\n\n if (tokenizer) {\n textParts = tokenizer(dataText);\n\n } else {\n if (separator) {\n textParts = dataText\n .split(separator)\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n\n if (ending) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByEnding(str, ending)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n\n } else if (begining) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByBeginning(str, begining)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n }\n\n if (!Array.isArray(textParts) || !textParts.length) {\n range.deleteContents();\n return;\n }\n\n const fragment = context.document.createDocumentFragment();\n\n textParts.forEach(function (textPart) {\n const nodeBubble = create(nodeSet, textPart);\n if (nodeBubble) {\n fragment.appendChild(nodeBubble);\n nodes.push(nodeBubble);\n }\n });\n\n range.deleteContents();\n range.insertNode(fragment);\n });\n\n nodeSet.fireInput();\n\n if (nodes.length) {\n nodeSet.fireChange();\n }\n\n return nodes;\n}\n\nfunction getBubbleRanges(nodeSet) {\n const ranges = [];\n const children = nodeSet.childNodes;\n let range;\n let node;\n\n for (let i = 0; i < children.length; i++) {\n node = children[ i ];\n\n if (isBubbleNode(node)) {\n if (range) {\n range.setEndBefore(node);\n ranges.push(range);\n range = undefined;\n }\n\n } else {\n if (!range) {\n range = context.document.createRange();\n range.setStartBefore(node);\n }\n }\n }\n\n if (range) {\n range.setEndAfter(node);\n ranges.push(range);\n }\n\n return ranges;\n}\n\nfunction trimIterator(str) {\n return str.trim();\n}\n\nfunction nonEmptyIterator(str) {\n return Boolean(str);\n}\n\nfunction parseFragmentByEnding(str, reg) {\n const parts = [];\n let lastIndex = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while (reg.exec(str) !== null && loop) {\n loop--;\n parts.push(str.substring(lastIndex, reg.lastIndex));\n lastIndex = reg.lastIndex;\n }\n\n return parts;\n}\n\nfunction parseFragmentByBeginning(str, reg) {\n const parts = [];\n let res;\n let index = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while ((res = reg.exec(str)) !== null && loop) {\n loop--;\n if (index !== res.index) {\n parts.push(str.substring(index, res.index));\n index = res.index;\n }\n }\n\n parts.push(str.substring(index, str.length));\n return parts;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubble.js\n **/","const context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst { getSelection } = require('./utils');\n\n/* eslint-disable max-len */\nconst REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09FC-\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF2-\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31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98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1AAE-\\u1AFF\\u1B4C-\\u1B4F\\u1B7D-\\u1B7F\\u1BF4-\\u1BFB\\u1C38-\\u1C3A\\u1C4A-\\u1C4C\\u1C80-\\u1CBF\\u1CC8-\\u1CCF\\u1CF7-\\u1CFF\\u1DE7-\\u1DFB\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FC5\\u1FD4\\u1FD5\\u1FDC\\u1FF0\\u1FF1\\u1FF5\\u1FFF\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u2072\\u2073\\u208F\\u209D-\\u209F\\u20BB-\\u20CF\\u20F1-\\u20FF\\u218A-\\u218F\\u23F4-\\u23FF\\u2427-\\u243F\\u244B-\\u245F\\u2700\\u2B4D-\\u2B4F\\u2B5A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\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\nconst REG_ZWS = /\\u200B/;\nconst TEXT_ZWS = '\\u200B';\n\nexports.arrowRight = arrowRight;\nexports.arrowLeft = arrowLeft;\nexports.remove = remove;\nexports.html2text = html2text;\nexports.currentTextRange = currentTextRange;\nexports.text2bubble = text2bubble;\nexports.replaceString = replaceString;\nexports.selectAll = selectAll;\nexports.textClean = textClean;\nexports.checkZws = checkZws;\nexports.createZws = createZws;\n\nfunction text2bubble(nodeEditor, nodeBubble) {\n const selection = getSelection(nodeEditor);\n const range = selection && currentTextRange(nodeEditor, selection);\n\n if (range) {\n selection.removeAllRanges();\n selection.addRange(range);\n replace(selection, nodeBubble);\n\n } else {\n nodeEditor.appendChild(nodeBubble);\n }\n\n return true;\n}\n\nfunction currentTextRange(nodeEditor, selection) {\n selection = selection || getSelection(nodeEditor);\n if (!selection) {\n return;\n }\n\n const pointNode = do {\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n selection.focusNode;\n\n } else if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n selection.anchorNode;\n\n } else {\n undefined;\n }\n };\n\n if (!pointNode) {\n return;\n }\n\n let startNode = pointNode;\n let endNode = pointNode;\n let item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n startNode = item;\n item = item.previousSibling;\n }\n\n item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n endNode = item;\n item = item.nextSibling;\n }\n\n const range = nodeEditor.ownerDocument.createRange();\n range.setStartBefore(startNode);\n range.setEndAfter(endNode);\n\n return range;\n}\n\nfunction remove(selection) {\n return replace(selection, createZws());\n}\n\nfunction replace(selection, node) {\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const anchor = context.document.createElement('span');\n selection.getRangeAt(0).surroundContents(anchor);\n anchor.parentNode.replaceChild(node, anchor);\n\n selection.removeAllRanges();\n\n if (node.nodeType === Node.TEXT_NODE) {\n const range = context.document.createRange();\n // для ИЕ обязательно указывать node.nodeValue.length\n range.setStart(node, node.nodeValue.length);\n range.collapse(false);\n selection.addRange(range);\n\n } else {\n selection.collapse(node, 0);\n }\n\n return true;\n}\n\nfunction replaceString(data, selection) {\n data = textClean(data);\n if (!data) {\n return false;\n }\n\n selection = selection || context.getSelection();\n const textNode = context.document.createTextNode(data);\n\n if (!replace(selection, textNode)) {\n return false;\n }\n\n selection.collapse(textNode, textNode.nodeValue.length);\n return true;\n}\n\nfunction arrowLeft(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(startNode, startOffset);\n return true;\n }\n\n const isNativeExtend = Boolean(selection.extend);\n revert = isNativeExtend ? revert : !revert;\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n if (offset === null) {\n offset = node.nodeValue.length;\n }\n\n if (offset - 1 < 0) {\n node = node.previousSibling;\n offset = null;\n continue;\n }\n\n const text = node.nodeValue.substring(offset - 1, offset);\n\n if (checkZws(text)) {\n offset = offset - 1;\n continue;\n }\n\n break;\n }\n\n if (!node || offset === null) {\n return false;\n }\n\n if (extend) {\n if (isNativeExtend) {\n selection.extend(node, offset - 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset - 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset - 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset - 1);\n }\n\n return true;\n}\n\nfunction arrowRight(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.focusNode ||\n selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(endNode, endOffset);\n return true;\n }\n\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n const len = node.nodeValue.length;\n\n if (offset + 1 > len) {\n node = node.nextSibling;\n offset = 0;\n continue;\n }\n\n const text = node.nodeValue.substring(offset, offset + 1);\n\n if (checkZws(text)) {\n offset = offset + 1;\n continue;\n }\n\n break;\n }\n\n if (!node) {\n return false;\n }\n\n if (extend) {\n const isNativeExtend = Boolean(selection.extend);\n\n if (isNativeExtend) {\n selection.extend(node, offset + 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset + 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset + 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset + 1);\n }\n\n return true;\n}\n\nfunction html2text(value) {\n if (!value) {\n return '';\n }\n\n var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n DOMContainer.innerText = value;\n\n return DOMContainer.innerText\n .replace(/^[\\u0020\\u00a0]+$/gm, '')\n .replace(/\\n/gm, ' ')\n .trim();\n}\n\nfunction selectAll(selection, nodeSet) {\n selection = selection || context.getSelection();\n const node = selection && selection.anchorNode;\n\n if (!node || node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n let fromNode;\n let toNode;\n let item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n fromNode = item;\n item = item.previousSibling;\n }\n\n item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n toNode = item;\n item = item.nextSibling;\n }\n\n const hasBubbles = bubbleset.hasBubbles(nodeSet);\n const range = context.document.createRange();\n range.setStartBefore(fromNode);\n range.setEndAfter(toNode);\n\n const dataText = textClean(range.toString());\n\n if (dataText || (!dataText && !hasBubbles)) {\n if (!dataText) {\n range.collapse();\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n }\n\n return false;\n}\n\nfunction createZws() {\n return context.document.createTextNode(TEXT_ZWS);\n}\n\nfunction checkZws(value) {\n return REG_ZWS.test(value);\n}\n\nfunction textClean(value) {\n return String(value || '')\n .trim()\n .replace(REG_REPLACE_NON_PRINTABLE, '');\n}\n\nfunction selectionCorrect(selection) {\n let startNode = selection.anchorNode;\n let endNode = selection.focusNode;\n let startOffset = selection.anchorOffset;\n let endOffset = selection.focusOffset;\n let revert = false;\n\n if (startNode === endNode) {\n startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n revert = selection.anchorOffset > selection.focusOffset;\n\n } else {\n const position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n startNode = selection.focusNode;\n startOffset = selection.focusOffset;\n endNode = selection.anchorNode;\n endOffset = selection.anchorOffset;\n revert = true;\n }\n }\n\n return { startNode, endNode, startOffset, endOffset, revert };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/text.js\n **/","const bubble = require('./bubble');\nconst text = require('./text');\n\nexports.closestNodeBubble = closestNodeBubble;\nexports.closestNodeSet = closestNodeSet;\nexports.findBubbleLeft = findBubbleLeft;\nexports.findBubbleRight = findBubbleRight;\nexports.getBubbles = getBubbles;\nexports.hasBubbles = hasBubbles;\nexports.headBubble = headBubble;\nexports.lastBubble = lastBubble;\nexports.nextBubble = nextBubble;\nexports.prevBubble = prevBubble;\n\nfunction lastBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:last-child');\n}\n\nfunction headBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:first-child');\n}\n\nfunction getBubbles(nodeSet) {\n return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n}\n\nfunction hasBubbles(nodeSet) {\n return Boolean(nodeSet.querySelector('[bubble]'));\n}\n\nfunction findBubbleLeft(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.previousSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.previousSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction findBubbleRight(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.nextSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.nextSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction closestNodeSet(node) {\n while (node) {\n if (isEditorNode(node)) {\n return node;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction closestNodeBubble(node) {\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (isEditorNode(node)) {\n return;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction prevBubble(target) {\n let node = target && target.previousSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction nextBubble(target) {\n let node = target && target.nextSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction isEditorNode(node) {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n node.getAttribute('is') === 'x-bubbles'\n );\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubbleset.js\n **/","const raf = require('raf');\nconst context = require('../context');\n\n/* eslint quotes: 0 */\n\nconst HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n\nconst HTML_UNESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n};\n\nconst REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\nconst REG_UNESCAPED_HTML = /[&<>\"'`]/g;\nconst REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\nconst REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\nconst REG_IE = /Trident|Edge/;\n\nexports.getSelection = function (nodeEditor) {\n const selection = context.getSelection();\n\n if (selection && selection.anchorNode && (nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n return selection;\n }\n};\n\nexports.throttle = function (callback, runContext) {\n let throttle = 0;\n const animationCallback = function () {\n throttle = 0;\n };\n\n return function () {\n if (throttle) {\n return;\n }\n\n throttle = raf(animationCallback);\n\n callback.apply(runContext || this, arguments);\n };\n};\n\nexports.escape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n }\n\n return data;\n};\n\nexports.unescape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n }\n\n return data;\n};\n\nexports.canUseDrag = (function () {\n return !REG_IE.test(context.navigator.userAgent);\n})();\n\nexports.isIE = (function () {\n return REG_IE.test(context.navigator.userAgent);\n})();\n\nfunction unescapeHtmlChar(chr) {\n return HTML_UNESCAPES[ chr ];\n}\n\nfunction escapeHtmlChar(chr) {\n return HTML_ESCAPES[ chr ];\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/utils.js\n **/","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/raf/index.js\n ** module id = 9\n ** module chunks = 0\n **/","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/performance-now/lib/performance-now.js\n ** module id = 10\n ** module chunks = 0\n **/","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * @module x-bubbles/event\n */\n\nconst context = require('../context');\nconst CustomEventCommon = require('../polyfills/CustomEventCommon');\n\nexports.scrollX = scrollX;\nexports.scrollY = scrollY;\nexports.dispatch = dispatch;\n\nexports.keyCode = function (event) {\n return event.charCode || event.keyCode;\n};\n\nexports.metaKey = function (event) {\n return event.ctrlKey || event.metaKey;\n};\n\nexports.pageX = function (event) {\n return (event.pageX === null && event.clientX !== null) ?\n event.clientX + scrollX() :\n event.pageX;\n};\n\nexports.pageY = function (event) {\n return (event.pageY === null && event.clientY !== null) ?\n event.clientY + scrollY() :\n event.pageY;\n};\n\nexports.one = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, oneCallback(target, name, events[ name ]));\n }\n};\n\nexports.on = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, events[ name ]);\n }\n};\n\nexports.off = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.removeEventListener(name, events[ name ]);\n }\n};\n\nexports.prevent = function (event) {\n event.cancelBubble = true;\n event.returnValue = false;\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n return false;\n};\n\nfunction scrollX() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n}\n\nfunction scrollY() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n}\n\n/**\n * Designer events.\n *\n * @example\n * const { Custom } = require('event');\n *\n * new Custom('custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event~Custom\n * @constructor\n */\nconst Custom = (function () {\n if (typeof context.CustomEvent === 'function') {\n return context.CustomEvent;\n }\n\n return CustomEventCommon;\n}());\n\n/**\n * Dispatch event.\n *\n * @example\n * const { dispatch } = require('event');\n * dispatch(node, 'custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event.dispatch\n * @param {HTMLElement} element node events\n * @param {string} name event name\n * @param {Object} params the event parameters\n * @param {boolean} [params.bubbles=false]\n * @param {boolean} [params.cancelable=false]\n * @param {*} [params.detail]\n */\nfunction dispatch(element, name, params = {}) {\n element.dispatchEvent(new Custom(name, params));\n}\n\nfunction oneCallback(target, eventName, callback) {\n return function _callback(event) {\n target.removeEventListener(eventName, _callback);\n callback(event);\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/events.js\n **/","const context = require('../context');\n\n/**\n * @constant {Document}\n * @private\n */\nconst doc = context.document;\n\n/**\n * @constant {Object}\n * @private\n */\nconst protoEvent = context.Event.prototype;\n\nlet issetCustomEvent = false;\n\ntry {\n issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n} catch (e) {\n // do nothing\n}\n\n/**\n * The original function \"stopImmediatePropagation\"\n * @constant {function}\n * @private\n */\nconst stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\n/**\n * Override function to set properties \"immediatePropagationStopped\"\n */\nprotoEvent.stopImmediatePropagation = function () {\n this.immediatePropagationStopped = true;\n\n if (stopImmediatePropagation) {\n stopImmediatePropagation.call(this);\n\n } else {\n this.stopPropagation();\n }\n};\n\nlet CustomEventCommon = (function () {\n if (issetCustomEvent) {\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('CustomEvent');\n\n evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\n return evt;\n };\n }\n\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('Event');\n\n evt.initEvent(eventName, bubbles, cancelable);\n evt.detail = params.detail;\n\n return evt;\n };\n}());\n\nCustomEventCommon.prototype = protoEvent;\n\nmodule.exports = CustomEventCommon;\n\n\n\n/** WEBPACK FOOTER **\n ** ./polyfills/CustomEventCommon.js\n **/","exports.KEY = {\n a: 65,\n Backspace: 8,\n Bottom: 40,\n c: 67,\n Cmd: 91,\n Comma: 44, // ,\n Delete: 46,\n Enter: 13, // Enter\n Esc: 27,\n Left: 37,\n Right: 39,\n Semicolon: 59, // ;\n Space: 32,\n Tab: 9,\n Top: 38,\n x: 88,\n};\n\nexports.CLS = {\n DRAGSTART: 'drag',\n DROPZONE: 'dropzone',\n};\n\nexports.EV = {\n BUBBLE_EDIT: 'bubble-edit',\n BUBBLE_INPUT: 'bubble-input',\n CHANGE: 'change',\n DRAGEND: 'dragend',\n DRAGENTER: 'dragenter',\n DRAGLEAVE: 'dragleave',\n DRAGSTART: 'dragstart',\n DROP: 'drop',\n};\n\nexports.PROPS = {\n BUBBLE_VALUE: '_bubbleValue',\n CLICK_TIME: '_clickTime',\n LOCK_COPY: '_lockCopy',\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/constant.js\n **/","const DRAG_IMG = { w: 16, h: 16 };\n\nlet dragImage = null;\n\nexports.DRAG_IMG = DRAG_IMG;\n\nexports.getDragImage = function () {\n if (!dragImage) {\n dragImage = new Image();\n dragImage.src = require('url?mimetype=image/png!./bubbles.png');\n }\n\n return dragImage;\n};\n\nexports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n fromNodeSet.fireChange();\n toNodeSet.focus();\n toNodeSet.fireChange();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/common.js\n **/","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/url-loader?mimetype=image/png!./core/drag/bubbles.png\n ** module id = 16\n ** module chunks = 0\n **/","const context = require('../../context');\nconst events = require('../events');\nconst utils = require('../utils');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst Modernizr = require('modernizr');\nconst { CLS, EV } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nlet currentDragSet = null;\nlet currentMoveSet = null;\nlet currentDragElement = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, 'mousedown', onMousedown);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, 'mousedown', onMousedown);\n};\n\nfunction onMousedown(event) {\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n if (!nodeBubble) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (!nodeSet) {\n return;\n }\n\n event.preventDefault();\n nodeSet.focus();\n\n const drag = nodeSet.__drag__ = {\n onMouseup: onMouseup.bind(this, nodeSet),\n onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n nodeOffsetX: event.offsetX,\n nodeOffsetY: event.offsetY,\n x: 0,\n y: 0\n };\n\n currentDragSet = null;\n currentMoveSet = null;\n currentDragElement = null;\n\n events.one(document, 'mouseup', drag.onMouseup);\n events.on(document, 'mousemove', drag.onMousemove);\n events.on(document, 'scroll', drag.onScroll);\n}\n\nfunction onMouseup(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n events.off(document, 'mousemove', drag.onMousemove);\n events.off(document, 'scroll', drag.onScroll);\n delete dragSet.__drag__;\n\n if (currentDragElement) {\n currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n currentDragElement = null;\n }\n\n if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n\n if (currentDragSet) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n }\n\n const _ = currentDragSet;\n currentDragSet = null;\n\n _.classList.remove(CLS.DRAGSTART);\n events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onMousemove(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n if (!currentDragSet) {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = dragSet;\n currentDragSet.classList.add(CLS.DRAGSTART);\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n let moveElement;\n\n if (nodeBubble) {\n select.add(nodeBubble);\n if (select.get(currentDragSet).length === 1) {\n moveElement = nodeBubble.cloneNode(true);\n }\n }\n\n if (!moveElement) {\n moveElement = getDragImage();\n drag.nodeOffsetX = DRAG_IMG.w;\n drag.nodeOffsetY = DRAG_IMG.h;\n }\n\n currentDragElement = document.body.appendChild(document.createElement('div'));\n currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n currentDragElement.appendChild(moveElement);\n\n events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n }\n\n drag.x = event.clientX;\n drag.y = event.clientY;\n onScroll(dragSet);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n if (currentMoveSet && currentMoveSet !== nodeSet) {\n currentMoveSet.classList.remove(CLS.DROPZONE);\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\n } else if (!currentMoveSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n }\n\n } else if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onScroll(dragSet) {\n const drag = dragSet.__drag__;\n if (!drag || !currentDragElement) {\n return;\n }\n\n const x = drag.x - drag.nodeOffsetX + events.scrollX();\n const y = drag.y - drag.nodeOffsetY + events.scrollY();\n\n if (Modernizr.csstransforms3d) {\n currentDragElement.style.transform = `translate3d(${x}px, ${y}px, 0px)`;\n\n } else if (Modernizr.csstransforms) {\n currentDragElement.style.transform = `translate(${x}px, ${y}px)`;\n\n } else {\n currentDragElement.style.top = `${y}px`;\n currentDragElement.style.left = `${x}px`;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/mouse.js\n **/","module.exports = Modernizr;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"var\":\"Modernizr\",\"root\":\"modernizr\",\"commonjs2\":\"modernizr\",\"commonjs\":\"modernizr\",\"amd\":\"modernizr\"}\n ** module id = 18\n ** module chunks = 0\n **/","const raf = require('raf');\nconst context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst bubble = require('./bubble');\nconst cursor = require('./cursor');\nconst select = require('./select');\nconst { KEY, EV, PROPS } = require('./constant');\nconst text = require('./text');\nconst events = require('./events');\nconst utils = require('./utils');\n\nconst eventCopy = require('./editor/copy');\nconst eventPaste = require('./editor/paste');\nconst eventBackspace = require('./editor/backspace');\nconst eventDelete = require('./editor/delete');\n\nconst EVENTS = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n keydown: onKeydown,\n keypress: onKeypress,\n keyup: onKeyup,\n mscontrolselect: events.prevent,\n paste: eventPaste,\n resize: events.prevent,\n resizestart: events.prevent,\n};\n\nexports.init = function (nodeWrap) {\n const nodeEditor = nodeWrap;\n nodeEditor.setAttribute('contenteditable', 'true');\n nodeEditor.setAttribute('spellcheck', 'false');\n\n nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\n events.on(nodeEditor, EVENTS);\n\n return {\n addBubble: addBubble.bind(nodeEditor),\n editBubble: editBubble.bind(nodeEditor),\n inputValue: inputValue.bind(nodeEditor),\n removeBubble: removeBubble.bind(nodeEditor),\n setContent: setContent.bind(nodeEditor),\n };\n};\n\nexports.destroy = function (nodeEditor) {\n events.off(nodeEditor, EVENTS);\n};\n\nfunction onBlur(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n return events.prevent(event);\n }\n\n select.clear(nodeEditor);\n bubble.bubbling(nodeEditor);\n}\n\nfunction onFocus(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n events.prevent(event);\n delete nodeEditor[ PROPS.LOCK_COPY ];\n\n // Safary 10 не сбрасывает курсор без задержки\n raf(() => {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n });\n\n return false;\n }\n\n cursor.restore(nodeEditor);\n}\n\nfunction onKeyup(event) {\n const nodeEditor = event.currentTarget;\n const code = events.keyCode(event);\n const isPrintableChar = do {\n if (event.key) {\n event.key.length === 1;\n\n } else {\n ((code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd);\n }\n };\n\n if (isPrintableChar) {\n nodeEditor.fireInput();\n }\n}\n\nfunction onKeypress(event) {\n const code = events.keyCode(event);\n const nodeEditor = event.currentTarget;\n\n /* eslint no-case-declarations: 0 */\n switch (code) {\n case KEY.Enter:\n event.preventDefault();\n if (!nodeEditor.options('disableControls')) {\n if (!editBubbleKeyboardEvent(nodeEditor)) {\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n break;\n\n case KEY.Space:\n if (editBubbleKeyboardEvent(nodeEditor)) {\n event.preventDefault();\n }\n break;\n\n default:\n const separator = nodeEditor.options('separator');\n if (separator && separator.test(String.fromCharCode(code))) {\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n}\n\nfunction onKeydown(event) {\n const code = events.keyCode(event);\n const metaKey = events.metaKey(event);\n const nodeEditor = event.currentTarget;\n const enable = !nodeEditor.options('disableControls');\n\n switch (code) {\n case KEY.Esc:\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n break;\n\n case KEY.Backspace:\n event.preventDefault();\n eventBackspace(event);\n break;\n\n case KEY.Delete:\n event.preventDefault();\n eventDelete(event);\n break;\n\n case KEY.Left:\n event.preventDefault();\n arrowLeft(event);\n break;\n\n // сдвигаем курсор в начало списка\n case KEY.Top:\n event.preventDefault();\n if (enable) {\n const headBubble = bubbleset.headBubble(nodeEditor);\n headBubble && select.uniq(headBubble);\n }\n break;\n\n case KEY.Right:\n event.preventDefault();\n arrowRight(event);\n break;\n\n // сдвигаем курсор в конец списка\n // case KEY.Tab:\n case KEY.Bottom:\n event.preventDefault();\n if (enable && select.has(nodeEditor)) {\n cursor.restore(nodeEditor);\n }\n break;\n\n case KEY.a:\n if (metaKey) {\n event.preventDefault();\n\n if (!text.selectAll(null, event.currentTarget)) {\n select.all(nodeEditor);\n }\n }\n break;\n\n case KEY.c:\n if (metaKey) {\n eventCopy(event);\n }\n break;\n\n case KEY.x:\n if (metaKey) {\n eventCopy(event, () => eventDelete(event));\n }\n break;\n }\n}\n\nfunction arrowLeft(event) {\n const selection = context.getSelection();\n\n if (text.arrowLeft(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ 0 ] === nodeSet.startRangeSelect) {\n list[ list.length - 1 ];\n\n } else {\n list[ 0 ];\n }\n };\n\n const node = bubbleset.prevBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n }\n}\n\nfunction arrowRight(event) {\n const selection = context.getSelection();\n\n if (text.arrowRight(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.nextBubble(selection.focusNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ list.length - 1 ] === nodeSet.startRangeSelect) {\n list[ 0 ];\n\n } else {\n list[ list.length - 1 ];\n }\n };\n\n const node = bubbleset.nextBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n\n } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n select.clear(nodeSet);\n selection.collapse(begin.nextSibling, 0);\n\n } else {\n cursor.restore(nodeSet);\n }\n}\n\nfunction onClick(event) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet) {\n return;\n }\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (nodeBubble) {\n const clickTime = Date.now();\n const isDblclick = nodeSet[ PROPS.CLICK_TIME ] && (clickTime - nodeSet[ PROPS.CLICK_TIME ]) < 200;\n\n nodeSet[ PROPS.CLICK_TIME ] = clickTime;\n\n if (events.metaKey(event)) {\n select.add(nodeBubble);\n\n } else if (event.shiftKey) {\n if (!nodeSet.startRangeSelect) {\n select.uniq(nodeBubble);\n\n } else {\n select.range(nodeBubble);\n }\n\n } else if (isDblclick) {\n bubble.edit(nodeSet, nodeBubble);\n\n } else {\n select.toggleUniq(nodeBubble);\n }\n\n } else {\n select.clear(nodeSet);\n\n const selection = context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n cursor.restore(nodeSet);\n }\n }\n}\n\nfunction editBubbleKeyboardEvent(nodeEditor) {\n const selection = context.getSelection();\n\n if (!selection || !selection.rangeCount) {\n const list = select.get(nodeEditor);\n\n if (list.length === 1) {\n return bubble.edit(nodeEditor, list[0]);\n }\n }\n\n return false;\n}\n\nfunction setContent(data) {\n var selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n data = text.html2text(data);\n this.appendChild(this.ownerDocument.createTextNode(data));\n bubble.bubbling(this);\n cursor.restore(this);\n}\n\nfunction addBubble(bubbleText, dataAttributes) {\n const nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n if (!nodeBubble) {\n return false;\n }\n\n if (text.text2bubble(this, nodeBubble)) {\n this.fireInput();\n this.fireChange();\n cursor.restore(this);\n return true;\n }\n\n return false;\n}\n\nfunction removeBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n this.removeChild(nodeBubble);\n this.fireChange();\n return true;\n }\n\n return false;\n}\n\nfunction editBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n return bubble.edit(this, nodeBubble);\n }\n\n return false;\n}\n\nfunction inputValue() {\n const textRange = text.currentTextRange(this);\n return textRange && text.textClean(textRange.toString()) || '';\n}\n\n/**\n * Генерация события редактирования бабла.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireEdit\n * @param {HTMLElement} nodeBubble нода бабл\n * @this HTMLElement\n * @private\n */\nfunction fireEdit(nodeBubble) {\n events.dispatch(this, EV.BUBBLE_EDIT, {\n bubbles: false,\n cancelable: false,\n detail: { data: nodeBubble }\n });\n}\n\n/**\n * Генерация события изменения набора баблов.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireChange\n * @this HTMLElement\n * @private\n */\nfunction fireChange() {\n events.dispatch(this, EV.CHANGE, {\n bubbles: false,\n cancelable: false\n });\n}\n\n/**\n * Генерация события ввода текста.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireInput\n * @this HTMLElement\n * @private\n */\nfunction fireInput() {\n const editText = inputValue.call(this);\n\n if (this[ PROPS.BUBBLE_VALUE ] !== editText) {\n this[ PROPS.BUBBLE_VALUE ] = editText;\n\n events.dispatch(this, EV.BUBBLE_INPUT, {\n bubbles: false,\n cancelable: false,\n detail: { data: editText }\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor.js\n **/","/**\n * @module x-bubbles/cursor\n */\n\nconst context = require('../context');\nconst text = require('./text');\nconst select = require('./select');\n\nexports.restore = restore;\nexports.restoreBasis = restoreBasis;\n\n/**\n * Reset the cursor position to the end of the input field.\n * @alias module:x-bubbles/cursor.restore\n * @param {HTMLElement} nodeSet\n */\nfunction restore(nodeSet) {\n select.clear(nodeSet);\n const basis = restoreBasis(nodeSet);\n const selection = context.getSelection();\n selection.removeAllRanges();\n selection.collapse(basis, 1);\n}\n\n/**\n * The creation of the fake text at the end childNodes\n * @alias module:x-bubbles/cursor.restoreBasis\n * @param {HTMLElement} nodeSet\n * @returns {HTMLTextElement} fake text node\n */\nfunction restoreBasis(nodeSet) {\n let fakeText = text.createZws();\n\n if (nodeSet.hasChildNodes()) {\n const lastNode = nodeSet.childNodes[ nodeSet.childNodes.length - 1 ];\n\n if (lastNode.isEqualNode(fakeText)) {\n fakeText = lastNode;\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n return fakeText;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/cursor.js\n **/","const raf = require('raf');\nconst events = require('../events');\nconst select = require('../select');\nconst { PROPS } = require('../constant');\nconst utils = require('../utils');\n\nmodule.exports = function (event, callback = function () {}) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n return false;\n }\n\n const list = select.get(nodeEditor);\n\n if (!list.length) {\n return false;\n }\n\n const bubbleCopy = nodeEditor.options('bubbleCopy');\n const value = bubbleCopy(list);\n\n if (!value) {\n return false;\n }\n\n nodeEditor[ PROPS.LOCK_COPY ] = true;\n\n const target = nodeEditor.ownerDocument.createElement('input');\n target.value = value;\n target.style.cssText = `\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;`;\n\n nodeEditor.parentNode.appendChild(target);\n\n events.one(target, {\n keyup: () => nodeEditor.focus(),\n blur: () => {\n removeNode(target);\n raf(callback);\n }\n });\n\n target.select();\n return true;\n};\n\nfunction removeNode(node) {\n node && node.parentNode && node.parentNode.removeChild(node);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/copy.js\n **/","const raf = require('raf');\nconst context = require('../../context');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst text = require('../text');\nconst { isIE } = require('../utils');\n\nmodule.exports = function (event) {\n event.preventDefault();\n const nodeEditor = event.currentTarget;\n\n if (context.clipboardData && context.clipboardData.getData) {\n onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\n } else if (event.clipboardData) {\n const contentType = 'text/plain';\n const clipboardData = event.clipboardData;\n const data = clipboardData.getData && clipboardData.getData(contentType);\n\n if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n Array.prototype.slice.call(clipboardData.items)\n .filter(item => item.kind === 'string' && item.type === contentType)\n .some(function (item) {\n item.getAsString(function (dataText) {\n onPasteSuccess(nodeEditor, dataText);\n });\n\n return true;\n });\n }\n }\n};\n\nfunction onPasteSuccess(nodeEditor, dataText) {\n const checkBubblePaste = nodeEditor.options('checkBubblePaste');\n const selection = context.getSelection();\n const isBubbling = do {\n if (dataText && selection.isCollapsed && !nodeEditor.inputValue) {\n checkBubblePaste(dataText);\n\n } else {\n false;\n }\n };\n\n if (text.replaceString(dataText, selection)) {\n if (isBubbling) {\n if (isIE) {\n raf(() => onReplaceSuccess(nodeEditor));\n\n } else {\n onReplaceSuccess(nodeEditor);\n }\n\n } else {\n nodeEditor.fireInput();\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction onReplaceSuccess(nodeEditor) {\n bubble.bubbling(nodeEditor);\n nodeEditor.focus();\n raf(() => cursor.restore(nodeEditor));\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/paste.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Backspace.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowLeft(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleLeft(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/backspace.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Delete.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowRight(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleRight(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/delete.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///x-bubbles-compact.min.js","webpack:///webpack/bootstrap 8653023efb3343c18069","webpack:///./index.js","webpack:///./context.js","webpack:///./core/drag.js","webpack:///./core/drag/native.js","webpack:///./core/select.js","webpack:///./core/bubble.js","webpack:///./core/text.js","webpack:///./core/bubbleset.js","webpack:///./core/utils.js","webpack:///../~/raf/index.js","webpack:///../~/performance-now/lib/performance-now.js","webpack:///../~/process/browser.js","webpack:///./core/events.js","webpack:///./polyfills/CustomEventCommon.js","webpack:///./core/constant.js","webpack:///./core/drag/common.js","webpack:///./core/drag/bubbles.png","webpack:///./core/drag/mouse.js","webpack:///external {\"var\":\"Modernizr\",\"root\":\"modernizr\",\"commonjs2\":\"modernizr\",\"commonjs\":\"modernizr\",\"amd\":\"modernizr\"}","webpack:///./core/editor.js","webpack:///./core/cursor.js","webpack:///./core/editor/copy.js","webpack:///./core/editor/paste.js","webpack:///./core/editor/backspace.js","webpack:///./core/editor/delete.js"],"names":["XBubbles","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","optionsPrepare","options","name","OPTIONS","_OPTIONS$name","_slicedToArray","type","def","OPTIONS_PREPARE","initEditor","node","editor","Object","defineProperty","configurable","value","init","destroyEditor","destroy","bubbleCopyOption","list","map","item","innerHTML","join","checkBubblePasteOption","sliceIterator","arr","i","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","_typeof","obj","constructor","prototype","context","drag","bubble","bubbleset","begining","bubbleCopy","bubbleDeformation","bubbleFormation","checkBubblePaste","classBubble","disableControls","draggable","ending","separator","tokenizer","create","HTMLDivElement","createdCallback","this","attachedCallback","bubbling","detachedCallback","_options","optionName","attrName","hasAttribute","getAttribute","items","get","getBubbles","inputValue","setContent","data","addBubble","bubbleText","removeBubble","nodeBubble","editBubble","document","registerElement","extends","func","Function","bool","noop","reg","match","RegExp","str","String","eval","native","mouse","_require","canUseDrag","nodeSet","onDragstart","event","stopPropagation","closestNodeSet","target","closestNodeBubble","preventDefault","selection","getSelection","removeAllRanges","currentDragSet","classList","add","CLS","DRAGSTART","select","dataTransfer","effectAllowed","setData","setDragImage","getDragImage","DRAG_IMG","w","h","onDrop","forEach","appendChild","setTimeout","onDropSuccess","onDragover","dropEffect","onDragenter","DROPZONE","onDragleave","remove","onDragend","events","_require2","EVENTS","dragend","dragenter","dragleave","dragover","dragstart","drop","on","off","range","isBubbleNode","set","parentNode","uniq","clear","headList","lastList","startRangeSelect","fromNode","toNode","position","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","setSelected","nextSibling","all","slice","querySelectorAll","PATH_NOT_SELECTED","querySelector","PATH_SELECTED","has","Boolean","head","last","removeAttribute","toggleUniq","isSelected","removeSelected","setAttribute","nodeType","ELEMENT_NODE","edit","rangeParams","dataText","text","textClean","innerText","startOffset","endOffset","textFake","createZws","textNode","createTextNode","fireEdit","replaceChild","insertBefore","createRange","setStart","setEnd","addRange","dataAttributes","arguments","wrap","ownerDocument","createElement","key","escape","classes","trim","split","len","ranges","getBubbleRanges","nodes","toString","deleteContents","textParts","trimIterator","filter","nonEmptyIterator","reduce","parts","concat","parseFragmentByEnding","parseFragmentByBeginning","fragment","createDocumentFragment","textPart","insertNode","fireInput","fireChange","children","childNodes","setEndBefore","setStartBefore","setEndAfter","lastIndex","loop","exec","substring","res","index","text2bubble","nodeEditor","currentTextRange","replace","pointNode","focusNode","TEXT_NODE","anchorNode","startNode","endNode","previousSibling","rangeCount","anchor","getRangeAt","surroundContents","nodeValue","collapse","replaceString","arrowLeft","extend","_selectionCorrect","selectionCorrect","revert","isCollapsed","isNativeExtend","offset","checkZws","arrowRight","_selectionCorrect2","html2text","DOMContainer","implementation","createHTMLDocument","body","selectAll","hasBubbles","TEXT_ZWS","REG_ZWS","test","REG_REPLACE_NON_PRINTABLE","anchorOffset","focusOffset","Math","min","max","lastBubble","headBubble","findBubbleLeft","DOCUMENT_POSITION_FOLLOWING","findBubbleRight","isEditorNode","prevBubble","nextBubble","unescapeHtmlChar","chr","HTML_UNESCAPES","escapeHtmlChar","HTML_ESCAPES","raf","&","<",">","\"","'","`","&","<",">",""","'","`","REG_ESCAPED_HTML","REG_UNESCAPED_HTML","REG_HAS_ESCAPED_HTML","source","REG_HAS_UNESCAPED_HTML","REG_IE","DOCUMENT_POSITION_CONTAINED_BY","throttle","callback","runContext","animationCallback","apply","unescape","navigator","userAgent","isIE","global","now","root","window","vendors","suffix","caf","queue","frameDuration","_now","cp","cancelled","e","round","handle","fn","cancel","polyfill","requestAnimationFrame","cancelAnimationFrame","process","getNanoSeconds","hrtime","loadTime","performance","hr","Date","getTime","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","array","nextTick","args","title","browser","env","argv","version","versions","addListener","once","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","_defineProperty","enumerable","writable","scrollX","html","documentElement","scrollLeft","clientLeft","scrollY","scrollTop","clientTop","dispatch","element","params","dispatchEvent","Custom","oneCallback","eventName","_callback","removeEventListener","CustomEventCommon","keyCode","charCode","metaKey","ctrlKey","pageX","clientX","pageY","clientY","one","addEventListener","prevent","cancelBubble","returnValue","stopImmediatePropagation","CustomEvent","doc","protoEvent","Event","issetCustomEvent","createEvent","immediatePropagationStopped","bubbles","cancelable","evt","initCustomEvent","detail","initEvent","KEY","a","Backspace","Bottom","Cmd","Comma","Delete","Enter","Esc","Left","Right","Semicolon","Space","Tab","Top","x","EV","BUBBLE_EDIT","BUBBLE_INPUT","CHANGE","DRAGEND","DRAGENTER","DRAGLEAVE","DROP","PROPS","BUBBLE_VALUE","CLICK_TIME","LOCK_COPY","dragImage","Image","src","fromNodeSet","toNodeSet","focus","onMousedown","__drag__","onMouseup","bind","onMousemove","utils","onScroll","nodeOffsetX","offsetX","nodeOffsetY","offsetY","y","currentMoveSet","currentDragElement","dragSet","removeChild","_","moveElement","cloneNode","style","cssText","Modernizr","csstransforms3d","transform","csstransforms","top","left","onBlur","currentTarget","onFocus","cursor","restore","onKeyup","code","isPrintableChar","onKeypress","editBubbleKeyboardEvent","fromCharCode","onKeydown","enable","eventBackspace","eventDelete","eventCopy","shiftKey","begin","onClick","clickTime","isDblclick","firstChild","contains","textRange","editText","eventPaste","blur","click","keydown","keypress","keyup","mscontrolselect","paste","resize","resizestart","nodeWrap","basis","restoreBasis","fakeText","hasChildNodes","lastNode","isEqualNode","removeNode","onPasteSuccess","isBubbling","onReplaceSuccess","clipboardData","getData","contentType","kind","some","getAsString","removeBubbles"],"mappings":"AAAA,GAAIA,UACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAASI,EAAQD,EAASH,GAE/B,YEwHD,SAASW,GAAeC,GACpB,IAAK,GAAIC,KAAQC,GAAS,IAAAC,GAAAC,EACAF,EAASD,GADT,GACdI,EADcF,EAAA,GACRG,EADQH,EAAA,EAEtBH,GAASC,GAASM,EAAiBF,GAAOL,EAASC,IACpB,mBAApBD,GAASC,KAChBD,EAASC,GAASK,IAK9B,QAASE,GAAWC,GACXA,EAAKC,QACNC,OAAOC,eAAeH,EAAM,UACxBI,cAAc,EACdC,MAAOJ,EAAOK,KAAKN,KAK/B,QAASO,GAAcP,GACfA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","sourcesContent":["var XBubbles =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _slicedToArray = function () { function sliceIterator(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\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar context = __webpack_require__(1);\n\tvar drag = __webpack_require__(2);\n\tvar editor = __webpack_require__(19);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar OPTIONS = {\n\t begining: ['reg', null, 'begining'],\n\t bubbleCopy: ['func', bubbleCopyOption, 'bubble-copy'],\n\t bubbleDeformation: ['func', function () {}, 'bubble-deformation'],\n\t bubbleFormation: ['func', function () {}, 'bubble-formation'],\n\t checkBubblePaste: ['func', checkBubblePasteOption, 'check-bubble-paste'],\n\t classBubble: ['str', 'bubble', 'class-bubble'],\n\t disableControls: ['bool', false, 'disable-controls'],\n\t draggable: ['bool', true, 'draggable'],\n\t ending: ['reg', null, 'ending'], // /\\@ya\\.ru/g;\n\t separator: ['reg', /[,;]/, 'separator'],\n\t tokenizer: ['func', null, 'tokenizer']\n\t};\n\t\n\tvar XBubbles = Object.create(HTMLDivElement.prototype, {\n\t createdCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t }\n\t },\n\t\n\t attachedCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t drag.init(this);\n\t bubble.bubbling(this);\n\t }\n\t },\n\t\n\t detachedCallback: {\n\t value: function value() {\n\t drag.destroy(this);\n\t destroyEditor(this);\n\t }\n\t },\n\t\n\t /*\n\t attributeChangedCallback: {\n\t value: function (name, prevValue, value) {}\n\t },\n\t */\n\t\n\t options: {\n\t value: function value(name, _value) {\n\t if (!this._options) {\n\t this._options = {};\n\t\n\t for (var optionName in OPTIONS) {\n\t this._options[optionName] = undefined;\n\t\n\t var attrName = 'data-' + OPTIONS[optionName][2];\n\t if (this.hasAttribute(attrName)) {\n\t this._options[optionName] = this.getAttribute(attrName);\n\t }\n\t }\n\t\n\t optionsPrepare(this._options);\n\t }\n\t\n\t if (typeof _value !== 'undefined') {\n\t this._options[name] = _value;\n\t optionsPrepare(this._options);\n\t } else {\n\t return this._options[name];\n\t }\n\t }\n\t },\n\t\n\t items: {\n\t get: function get() {\n\t return bubbleset.getBubbles(this);\n\t }\n\t },\n\t\n\t inputValue: {\n\t get: function get() {\n\t return this.editor.inputValue();\n\t }\n\t },\n\t\n\t setContent: {\n\t value: function value(data) {\n\t return this.editor.setContent(data);\n\t }\n\t },\n\t\n\t addBubble: {\n\t value: function value(bubbleText, data) {\n\t return this.editor.addBubble(bubbleText, data);\n\t }\n\t },\n\t\n\t removeBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.removeBubble(nodeBubble);\n\t }\n\t },\n\t\n\t editBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.editBubble(nodeBubble);\n\t }\n\t }\n\t});\n\t\n\tmodule.exports = context.document.registerElement('x-bubbles', {\n\t extends: 'div',\n\t prototype: XBubbles\n\t});\n\t\n\tvar OPTIONS_PREPARE = {\n\t func: function func(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return new Function('context', 'return context.' + value + ';')(context);\n\t\n\t case 'function':\n\t return value;\n\t }\n\t },\n\t bool: function bool(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return value === 'true' || value === 'on';\n\t\n\t case 'boolean':\n\t return value;\n\t }\n\t },\n\t noop: function noop(value) {\n\t return value;\n\t },\n\t reg: function reg(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t if (value) {\n\t var match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n\t if (match) {\n\t return new RegExp(match[1], match[2]);\n\t }\n\t }\n\t\n\t return null;\n\t\n\t case 'object':\n\t if (value instanceof context.RegExp || value === null) {\n\t return value;\n\t }\n\t }\n\t },\n\t str: function str(value) {\n\t if (typeof value !== 'undefined') {\n\t return value ? String(value) : '';\n\t }\n\t }\n\t};\n\t\n\tfunction optionsPrepare(options) {\n\t for (var name in OPTIONS) {\n\t var _OPTIONS$name = _slicedToArray(OPTIONS[name], 2),\n\t type = _OPTIONS$name[0],\n\t def = _OPTIONS$name[1];\n\t\n\t options[name] = OPTIONS_PREPARE[type](options[name]);\n\t if (typeof options[name] === 'undefined') {\n\t options[name] = def;\n\t }\n\t }\n\t}\n\t\n\tfunction initEditor(node) {\n\t if (!node.editor) {\n\t Object.defineProperty(node, 'editor', {\n\t configurable: true,\n\t value: editor.init(node)\n\t });\n\t }\n\t}\n\t\n\tfunction destroyEditor(node) {\n\t if (node.editor) {\n\t editor.destroy(node);\n\t delete node.editor;\n\t }\n\t}\n\t\n\tfunction bubbleCopyOption(list) {\n\t return list.map(function (item) {\n\t return item.innerHTML;\n\t }).join(', ');\n\t}\n\t\n\tfunction checkBubblePasteOption() {\n\t return true;\n\t}\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function () {\n\t /* eslint no-eval: 0 */\n\t return this || (1, eval)('this');\n\t}();\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar native = __webpack_require__(3);\n\tvar mouse = __webpack_require__(17);\n\t\n\tvar _require = __webpack_require__(8),\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.init = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.init(nodeSet);\n\t }\n\t\n\t return mouse.init(nodeSet);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.destroy(nodeSet);\n\t }\n\t\n\t return mouse.destroy(nodeSet);\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar events = __webpack_require__(12);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar EVENTS = {\n\t dragend: onDragend,\n\t dragenter: onDragenter,\n\t dragleave: onDragleave,\n\t dragover: onDragover,\n\t dragstart: onDragstart,\n\t drop: onDrop\n\t};\n\t\n\tvar currentDragSet = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, EVENTS);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, EVENTS);\n\t};\n\t\n\tfunction onDragstart(event) {\n\t event.stopPropagation();\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (!nodeSet || !nodeBubble) {\n\t event.preventDefault();\n\t return;\n\t }\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = nodeSet;\n\t nodeSet.classList.add(CLS.DRAGSTART);\n\t select.add(nodeBubble);\n\t\n\t event.dataTransfer.effectAllowed = 'move';\n\t event.dataTransfer.setData('text/plain', '');\n\t\n\t var list = select.get(currentDragSet);\n\t if (list.length > 1) {\n\t event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n\t }\n\t}\n\t\n\tfunction onDrop(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet || nodeSet === currentDragSet) {\n\t return;\n\t }\n\t\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t}\n\t\n\tfunction onDragover(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t event.dataTransfer.dropEffect = 'move';\n\t}\n\t\n\tfunction onDragenter(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragleave(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragend(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t currentDragSet.classList.remove(CLS.DRAGSTART);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t\n\t currentDragSet = null;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar slice = Array.prototype.slice;\n\tvar PATH_SELECTED = '[bubble][selected]';\n\tvar PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\t\n\texports.all = all;\n\texports.add = add;\n\texports.clear = clear;\n\texports.get = get;\n\texports.uniq = uniq;\n\texports.head = head;\n\texports.last = last;\n\texports.has = has;\n\texports.range = range;\n\texports.toggleUniq = toggleUniq;\n\t\n\tfunction range(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return;\n\t }\n\t\n\t var set = node.parentNode;\n\t var list = get(set);\n\t\n\t if (!list.length) {\n\t uniq(node);\n\t return;\n\t }\n\t\n\t clear(set);\n\t\n\t var headList = list[0];\n\t var lastList = list[list.length - 1];\n\t\n\t if (headList === lastList || !set.startRangeSelect) {\n\t set.startRangeSelect = headList;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var position = node.compareDocumentPosition(set.startRangeSelect);\n\t\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t fromNode = set.startRangeSelect;\n\t toNode = node;\n\t } else {\n\t fromNode = node;\n\t toNode = set.startRangeSelect;\n\t }\n\t\n\t if (fromNode && toNode) {\n\t var item = fromNode;\n\t\n\t while (item) {\n\t if (!setSelected(item)) {\n\t break;\n\t }\n\t\n\t if (item === toNode) {\n\t break;\n\t }\n\t\n\t item = item.nextSibling;\n\t }\n\t\n\t bubble.bubbling(set);\n\t }\n\t}\n\t\n\tfunction all(nodeSet) {\n\t slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(function (item) {\n\t return setSelected(item);\n\t });\n\t nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\t\n\t bubble.bubbling(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t}\n\t\n\tfunction has(nodeSet) {\n\t return Boolean(nodeSet.querySelector(PATH_SELECTED));\n\t}\n\t\n\tfunction head(set) {\n\t return get(set)[0];\n\t}\n\t\n\tfunction last(set) {\n\t var list = get(set);\n\t return list[list.length - 1];\n\t}\n\t\n\tfunction get(nodeSet) {\n\t return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n\t}\n\t\n\tfunction clear(nodeSet) {\n\t get(nodeSet).forEach(function (item) {\n\t return item.removeAttribute('selected');\n\t });\n\t}\n\t\n\tfunction add(node) {\n\t if (setSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t nodeSet.startRangeSelect = node;\n\t // ???\n\t bubble.bubbling(nodeSet);\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction uniq(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return false;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t var selection = context.getSelection();\n\t\n\t selection && selection.removeAllRanges();\n\t clear(nodeSet);\n\t\n\t return add(node);\n\t}\n\t\n\tfunction toggleUniq(node) {\n\t if (isSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t if (get(nodeSet).length === 1) {\n\t return removeSelected(node);\n\t }\n\t }\n\t\n\t return uniq(node);\n\t}\n\t\n\tfunction isSelected(node) {\n\t return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n\t}\n\t\n\tfunction setSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.setAttribute('selected', '');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.removeAttribute('selected');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t escape = _require.escape,\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.isBubbleNode = isBubbleNode;\n\texports.bubbling = bubbling;\n\texports.create = create;\n\texports.edit = edit;\n\t\n\tfunction isBubbleNode(node) {\n\t if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n\t return false;\n\t }\n\t\n\t return node.hasAttribute('bubble');\n\t}\n\t\n\tfunction edit(nodeSet, nodeBubble) {\n\t if (nodeBubble.hasAttribute('readonly')) {\n\t return false;\n\t }\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection) {\n\t return false;\n\t }\n\t\n\t var bubbleDeformation = nodeSet.options('bubbleDeformation');\n\t var rangeParams = bubbleDeformation(nodeBubble);\n\t\n\t if (!rangeParams) {\n\t var dataText = text.textClean(nodeBubble.innerText);\n\t\n\t rangeParams = {\n\t text: dataText,\n\t startOffset: 0,\n\t endOffset: dataText.length\n\t };\n\t }\n\t\n\t var textFake = text.createZws();\n\t var textNode = context.document.createTextNode(rangeParams.text);\n\t\n\t nodeSet.fireEdit(nodeBubble);\n\t nodeSet.replaceChild(textNode, nodeBubble);\n\t nodeSet.insertBefore(textFake, textNode);\n\t\n\t var range = context.document.createRange();\n\t range.setStart(textNode, rangeParams.startOffset);\n\t range.setEnd(textNode, rangeParams.endOffset);\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t}\n\t\n\t/**\n\t * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n\t * @param {[type]} nodeSet [description]\n\t * @param {[type]} dataText [description]\n\t * @param {Object} [dataAttributes={}] [description]\n\t * @returns {[type]} [description]\n\t */\n\tfunction create(nodeSet, dataText) {\n\t var dataAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t dataText = text.textClean(dataText);\n\t\n\t if (!dataText) {\n\t return;\n\t }\n\t\n\t var bubbleFormation = nodeSet.options('bubbleFormation');\n\t var classBubble = nodeSet.options('classBubble');\n\t var draggable = canUseDrag && nodeSet.options('draggable');\n\t var wrap = nodeSet.ownerDocument.createElement('span');\n\t\n\t wrap.innerText = dataText;\n\t\n\t for (var key in dataAttributes) {\n\t if (dataAttributes[key]) {\n\t wrap.setAttribute('data-' + key, escape(dataAttributes[key]));\n\t }\n\t }\n\t\n\t bubbleFormation(wrap);\n\t\n\t if (classBubble) {\n\t var classes = String(classBubble).trim().split(/\\s+/);\n\t var len = classes.length;\n\t\n\t while (len--) {\n\t wrap.classList.add(classes[len]);\n\t }\n\t }\n\t\n\t wrap.setAttribute('bubble', '');\n\t wrap.setAttribute('contenteditable', 'false');\n\t draggable && wrap.setAttribute('draggable', 'true');\n\t\n\t return wrap;\n\t}\n\t\n\tfunction bubbling(nodeSet) {\n\t var begining = nodeSet.options('begining');\n\t var ending = nodeSet.options('ending');\n\t var separator = nodeSet.options('separator');\n\t var tokenizer = nodeSet.options('tokenizer');\n\t var ranges = getBubbleRanges(nodeSet);\n\t var nodes = [];\n\t\n\t ranges.forEach(function (range) {\n\t var dataText = text.textClean(range.toString());\n\t\n\t if (!dataText) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var textParts = [dataText];\n\t\n\t if (tokenizer) {\n\t textParts = tokenizer(dataText);\n\t } else {\n\t if (separator) {\n\t textParts = dataText.split(separator).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t\n\t if (ending) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByEnding(str, ending));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t } else if (begining) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByBeginning(str, begining));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t }\n\t\n\t if (!Array.isArray(textParts) || !textParts.length) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var fragment = context.document.createDocumentFragment();\n\t\n\t textParts.forEach(function (textPart) {\n\t var nodeBubble = create(nodeSet, textPart);\n\t if (nodeBubble) {\n\t fragment.appendChild(nodeBubble);\n\t nodes.push(nodeBubble);\n\t }\n\t });\n\t\n\t range.deleteContents();\n\t range.insertNode(fragment);\n\t });\n\t\n\t nodeSet.fireInput();\n\t\n\t if (nodes.length) {\n\t nodeSet.fireChange();\n\t }\n\t\n\t return nodes;\n\t}\n\t\n\tfunction getBubbleRanges(nodeSet) {\n\t var ranges = [];\n\t var children = nodeSet.childNodes;\n\t var range = void 0;\n\t var node = void 0;\n\t\n\t for (var i = 0; i < children.length; i++) {\n\t node = children[i];\n\t\n\t if (isBubbleNode(node)) {\n\t if (range) {\n\t range.setEndBefore(node);\n\t ranges.push(range);\n\t range = undefined;\n\t }\n\t } else {\n\t if (!range) {\n\t range = context.document.createRange();\n\t range.setStartBefore(node);\n\t }\n\t }\n\t }\n\t\n\t if (range) {\n\t range.setEndAfter(node);\n\t ranges.push(range);\n\t }\n\t\n\t return ranges;\n\t}\n\t\n\tfunction trimIterator(str) {\n\t return str.trim();\n\t}\n\t\n\tfunction nonEmptyIterator(str) {\n\t return Boolean(str);\n\t}\n\t\n\tfunction parseFragmentByEnding(str, reg) {\n\t var parts = [];\n\t var lastIndex = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while (reg.exec(str) !== null && loop) {\n\t loop--;\n\t parts.push(str.substring(lastIndex, reg.lastIndex));\n\t lastIndex = reg.lastIndex;\n\t }\n\t\n\t return parts;\n\t}\n\t\n\tfunction parseFragmentByBeginning(str, reg) {\n\t var parts = [];\n\t var res = void 0;\n\t var index = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while ((res = reg.exec(str)) !== null && loop) {\n\t loop--;\n\t if (index !== res.index) {\n\t parts.push(str.substring(index, res.index));\n\t index = res.index;\n\t }\n\t }\n\t\n\t parts.push(str.substring(index, str.length));\n\t return parts;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar _require = __webpack_require__(8),\n\t getSelection = _require.getSelection;\n\t\n\t/* eslint-disable max-len */\n\t\n\t\n\tvar REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F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\u0CCE-\\u0CD4\\u0CD7-\\u0CDD\\u0CDF\\u0CE4\\u0CE5\\u0CF0\\u0CF3-\\u0D01\\u0D04\\u0D0D\\u0D11\\u0D3B\\u0D3C\\u0D45\\u0D49\\u0D4F-\\u0D56\\u0D58-\\u0D5F\\u0D64\\u0D65\\u0D76-\\u0D78\\u0D80\\u0D81\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DF1\\u0DF5-\\u0E00\\u0E3B-\\u0E3E\\u0E5C-\\u0E80\\u0E83\\u0E85\\u0E86\\u0E89\\u0E8B\\u0E8C\\u0E8E-\\u0E93\\u0E98\\u0EA0\\u0EA4\\u0EA6\\u0EA8\\u0EA9\\u0EAC\\u0EBA\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-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-\\uA8CD\\uA8DA-\\uA8DF\\uA8FC-\\uA8FF\\uA954-\\uA95E\\uA97D-\\uA97F\\uA9CE\\uA9DA-\\uA9DD\\uA9E0-\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A\\uAA5B\\uAA7C-\\uAA7F\\uAAC3-\\uAADA\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F-\\uABBF\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBC2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFE\\uFDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\n\tvar REG_ZWS = /\\u200B/;\n\tvar TEXT_ZWS = '\\u200B';\n\t\n\texports.arrowRight = arrowRight;\n\texports.arrowLeft = arrowLeft;\n\texports.remove = remove;\n\texports.html2text = html2text;\n\texports.currentTextRange = currentTextRange;\n\texports.text2bubble = text2bubble;\n\texports.replaceString = replaceString;\n\texports.selectAll = selectAll;\n\texports.textClean = textClean;\n\texports.checkZws = checkZws;\n\texports.createZws = createZws;\n\t\n\tfunction text2bubble(nodeEditor, nodeBubble) {\n\t var selection = getSelection(nodeEditor);\n\t var range = selection && currentTextRange(nodeEditor, selection);\n\t\n\t if (range) {\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t replace(selection, nodeBubble);\n\t } else {\n\t nodeEditor.appendChild(nodeBubble);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction currentTextRange(nodeEditor, selection) {\n\t selection = selection || getSelection(nodeEditor);\n\t if (!selection) {\n\t return;\n\t }\n\t\n\t var pointNode = selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE ? selection.focusNode : selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE ? selection.anchorNode : undefined;\n\t\n\t if (!pointNode) {\n\t return;\n\t }\n\t\n\t var startNode = pointNode;\n\t var endNode = pointNode;\n\t var item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t startNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t endNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var range = nodeEditor.ownerDocument.createRange();\n\t range.setStartBefore(startNode);\n\t range.setEndAfter(endNode);\n\t\n\t return range;\n\t}\n\t\n\tfunction remove(selection) {\n\t return replace(selection, createZws());\n\t}\n\t\n\tfunction replace(selection, node) {\n\t if (!selection || !selection.rangeCount) {\n\t return false;\n\t }\n\t\n\t var anchor = context.document.createElement('span');\n\t selection.getRangeAt(0).surroundContents(anchor);\n\t anchor.parentNode.replaceChild(node, anchor);\n\t\n\t selection.removeAllRanges();\n\t\n\t if (node.nodeType === Node.TEXT_NODE) {\n\t var range = context.document.createRange();\n\t // для ИЕ обязательно указывать node.nodeValue.length\n\t range.setStart(node, node.nodeValue.length);\n\t range.collapse(false);\n\t selection.addRange(range);\n\t } else {\n\t selection.collapse(node, 0);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction replaceString(data, selection) {\n\t data = textClean(data);\n\t if (!data) {\n\t return false;\n\t }\n\t\n\t selection = selection || context.getSelection();\n\t var textNode = context.document.createTextNode(data);\n\t\n\t if (!replace(selection, textNode)) {\n\t return false;\n\t }\n\t\n\t selection.collapse(textNode, textNode.nodeValue.length);\n\t return true;\n\t}\n\t\n\tfunction arrowLeft(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect = selectionCorrect(selection),\n\t startNode = _selectionCorrect.startNode,\n\t endNode = _selectionCorrect.endNode,\n\t startOffset = _selectionCorrect.startOffset,\n\t endOffset = _selectionCorrect.endOffset,\n\t revert = _selectionCorrect.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(startNode, startOffset);\n\t return true;\n\t }\n\t\n\t var isNativeExtend = Boolean(selection.extend);\n\t revert = isNativeExtend ? revert : !revert;\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t if (offset === null) {\n\t offset = node.nodeValue.length;\n\t }\n\t\n\t if (offset - 1 < 0) {\n\t node = node.previousSibling;\n\t offset = null;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset - 1, offset);\n\t\n\t if (checkZws(text)) {\n\t offset = offset - 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node || offset === null) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t if (isNativeExtend) {\n\t selection.extend(node, offset - 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset - 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset - 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset - 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction arrowRight(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.focusNode || selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect2 = selectionCorrect(selection),\n\t startNode = _selectionCorrect2.startNode,\n\t endNode = _selectionCorrect2.endNode,\n\t startOffset = _selectionCorrect2.startOffset,\n\t endOffset = _selectionCorrect2.endOffset,\n\t revert = _selectionCorrect2.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(endNode, endOffset);\n\t return true;\n\t }\n\t\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var len = node.nodeValue.length;\n\t\n\t if (offset + 1 > len) {\n\t node = node.nextSibling;\n\t offset = 0;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset, offset + 1);\n\t\n\t if (checkZws(text)) {\n\t offset = offset + 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t var isNativeExtend = Boolean(selection.extend);\n\t\n\t if (isNativeExtend) {\n\t selection.extend(node, offset + 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset + 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset + 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset + 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction html2text(value) {\n\t if (!value) {\n\t return '';\n\t }\n\t\n\t var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n\t DOMContainer.innerText = value;\n\t\n\t return DOMContainer.innerText.replace(/^[\\u0020\\u00a0]+$/gm, '').replace(/\\n/gm, ' ').trim();\n\t}\n\t\n\tfunction selectAll(selection, nodeSet) {\n\t selection = selection || context.getSelection();\n\t var node = selection && selection.anchorNode;\n\t\n\t if (!node || node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t fromNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t toNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var hasBubbles = bubbleset.hasBubbles(nodeSet);\n\t var range = context.document.createRange();\n\t range.setStartBefore(fromNode);\n\t range.setEndAfter(toNode);\n\t\n\t var dataText = textClean(range.toString());\n\t\n\t if (dataText || !dataText && !hasBubbles) {\n\t if (!dataText) {\n\t range.collapse();\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction createZws() {\n\t return context.document.createTextNode(TEXT_ZWS);\n\t}\n\t\n\tfunction checkZws(value) {\n\t return REG_ZWS.test(value);\n\t}\n\t\n\tfunction textClean(value) {\n\t return String(value || '').trim().replace(REG_REPLACE_NON_PRINTABLE, '');\n\t}\n\t\n\tfunction selectionCorrect(selection) {\n\t var startNode = selection.anchorNode;\n\t var endNode = selection.focusNode;\n\t var startOffset = selection.anchorOffset;\n\t var endOffset = selection.focusOffset;\n\t var revert = false;\n\t\n\t if (startNode === endNode) {\n\t startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n\t endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n\t revert = selection.anchorOffset > selection.focusOffset;\n\t } else {\n\t var position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t startNode = selection.focusNode;\n\t startOffset = selection.focusOffset;\n\t endNode = selection.anchorNode;\n\t endOffset = selection.anchorOffset;\n\t revert = true;\n\t }\n\t }\n\t\n\t return { startNode: startNode, endNode: endNode, startOffset: startOffset, endOffset: endOffset, revert: revert };\n\t}\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bubble = __webpack_require__(5);\n\tvar text = __webpack_require__(6);\n\t\n\texports.closestNodeBubble = closestNodeBubble;\n\texports.closestNodeSet = closestNodeSet;\n\texports.findBubbleLeft = findBubbleLeft;\n\texports.findBubbleRight = findBubbleRight;\n\texports.getBubbles = getBubbles;\n\texports.hasBubbles = hasBubbles;\n\texports.headBubble = headBubble;\n\texports.lastBubble = lastBubble;\n\texports.nextBubble = nextBubble;\n\texports.prevBubble = prevBubble;\n\t\n\tfunction lastBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:last-child');\n\t}\n\t\n\tfunction headBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:first-child');\n\t}\n\t\n\tfunction getBubbles(nodeSet) {\n\t return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n\t}\n\t\n\tfunction hasBubbles(nodeSet) {\n\t return Boolean(nodeSet.querySelector('[bubble]'));\n\t}\n\t\n\tfunction findBubbleLeft(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.previousSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.previousSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction findBubbleRight(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.nextSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.nextSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction closestNodeSet(node) {\n\t while (node) {\n\t if (isEditorNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction closestNodeBubble(node) {\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (isEditorNode(node)) {\n\t return;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction prevBubble(target) {\n\t var node = target && target.previousSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction nextBubble(target) {\n\t var node = target && target.nextSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction isEditorNode(node) {\n\t return node.nodeType === Node.ELEMENT_NODE && node.getAttribute('is') === 'x-bubbles';\n\t}\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\t\n\t/* eslint quotes: 0 */\n\t\n\tvar HTML_ESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '\"': '"',\n\t \"'\": ''',\n\t '`': '`'\n\t};\n\t\n\tvar HTML_UNESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '"': '\"',\n\t ''': \"'\",\n\t '`': '`'\n\t};\n\t\n\tvar REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\n\tvar REG_UNESCAPED_HTML = /[&<>\"'`]/g;\n\tvar REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\n\tvar REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\n\tvar REG_IE = /Trident|Edge/;\n\t\n\texports.getSelection = function (nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (selection && selection.anchorNode && nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n\t return selection;\n\t }\n\t};\n\t\n\texports.throttle = function (callback, runContext) {\n\t var throttle = 0;\n\t var animationCallback = function animationCallback() {\n\t throttle = 0;\n\t };\n\t\n\t return function () {\n\t if (throttle) {\n\t return;\n\t }\n\t\n\t throttle = raf(animationCallback);\n\t\n\t callback.apply(runContext || this, arguments);\n\t };\n\t};\n\t\n\texports.escape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n\t return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.unescape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n\t return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.canUseDrag = function () {\n\t return !REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\texports.isIE = function () {\n\t return REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\tfunction unescapeHtmlChar(chr) {\n\t return HTML_UNESCAPES[chr];\n\t}\n\t\n\tfunction escapeHtmlChar(chr) {\n\t return HTML_ESCAPES[chr];\n\t}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(10)\n\t , root = typeof window === 'undefined' ? global : window\n\t , vendors = ['moz', 'webkit']\n\t , suffix = 'AnimationFrame'\n\t , raf = root['request' + suffix]\n\t , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\t\n\tfor(var i = 0; !raf && i < vendors.length; i++) {\n\t raf = root[vendors[i] + 'Request' + suffix]\n\t caf = root[vendors[i] + 'Cancel' + suffix]\n\t || root[vendors[i] + 'CancelRequest' + suffix]\n\t}\n\t\n\t// Some versions of FF have rAF but not cAF\n\tif(!raf || !caf) {\n\t var last = 0\n\t , id = 0\n\t , queue = []\n\t , frameDuration = 1000 / 60\n\t\n\t raf = function(callback) {\n\t if(queue.length === 0) {\n\t var _now = now()\n\t , next = Math.max(0, frameDuration - (_now - last))\n\t last = next + _now\n\t setTimeout(function() {\n\t var cp = queue.slice(0)\n\t // Clear queue here to prevent\n\t // callbacks from appending listeners\n\t // to the current frame's queue\n\t queue.length = 0\n\t for(var i = 0; i < cp.length; i++) {\n\t if(!cp[i].cancelled) {\n\t try{\n\t cp[i].callback(last)\n\t } catch(e) {\n\t setTimeout(function() { throw e }, 0)\n\t }\n\t }\n\t }\n\t }, Math.round(next))\n\t }\n\t queue.push({\n\t handle: ++id,\n\t callback: callback,\n\t cancelled: false\n\t })\n\t return id\n\t }\n\t\n\t caf = function(handle) {\n\t for(var i = 0; i < queue.length; i++) {\n\t if(queue[i].handle === handle) {\n\t queue[i].cancelled = true\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = function(fn) {\n\t // Wrap in a new function to prevent\n\t // `cancel` potentially being assigned\n\t // to the native rAF function\n\t return raf.call(root, fn)\n\t}\n\tmodule.exports.cancel = function() {\n\t caf.apply(root, arguments)\n\t}\n\tmodule.exports.polyfill = function() {\n\t root.requestAnimationFrame = raf\n\t root.cancelAnimationFrame = caf\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1\n\t(function() {\n\t var getNanoSeconds, hrtime, loadTime;\n\t\n\t if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n\t module.exports = function() {\n\t return performance.now();\n\t };\n\t } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n\t module.exports = function() {\n\t return (getNanoSeconds() - loadTime) / 1e6;\n\t };\n\t hrtime = process.hrtime;\n\t getNanoSeconds = function() {\n\t var hr;\n\t hr = hrtime();\n\t return hr[0] * 1e9 + hr[1];\n\t };\n\t loadTime = getNanoSeconds();\n\t } else if (Date.now) {\n\t module.exports = function() {\n\t return Date.now() - loadTime;\n\t };\n\t loadTime = Date.now();\n\t } else {\n\t module.exports = function() {\n\t return new Date().getTime() - loadTime;\n\t };\n\t loadTime = new Date().getTime();\n\t }\n\t\n\t}).call(this);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction _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; }\n\t\n\t/**\n\t * @module x-bubbles/event\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar CustomEventCommon = __webpack_require__(13);\n\t\n\texports.scrollX = scrollX;\n\texports.scrollY = scrollY;\n\texports.dispatch = dispatch;\n\t\n\texports.keyCode = function (event) {\n\t return event.charCode || event.keyCode;\n\t};\n\t\n\texports.metaKey = function (event) {\n\t return event.ctrlKey || event.metaKey;\n\t};\n\t\n\texports.pageX = function (event) {\n\t return event.pageX === null && event.clientX !== null ? event.clientX + scrollX() : event.pageX;\n\t};\n\t\n\texports.pageY = function (event) {\n\t return event.pageY === null && event.clientY !== null ? event.clientY + scrollY() : event.pageY;\n\t};\n\t\n\texports.one = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, oneCallback(target, name, events[name]));\n\t }\n\t};\n\t\n\texports.on = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.off = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.removeEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.prevent = function (event) {\n\t event.cancelBubble = true;\n\t event.returnValue = false;\n\t event.stopImmediatePropagation();\n\t event.stopPropagation();\n\t event.preventDefault();\n\t return false;\n\t};\n\t\n\tfunction scrollX() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n\t}\n\t\n\tfunction scrollY() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n\t}\n\t\n\t/**\n\t * Designer events.\n\t *\n\t * @example\n\t * const { Custom } = require('event');\n\t *\n\t * new Custom('custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event~Custom\n\t * @constructor\n\t */\n\tvar Custom = function () {\n\t if (typeof context.CustomEvent === 'function') {\n\t return context.CustomEvent;\n\t }\n\t\n\t return CustomEventCommon;\n\t}();\n\t\n\t/**\n\t * Dispatch event.\n\t *\n\t * @example\n\t * const { dispatch } = require('event');\n\t * dispatch(node, 'custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event.dispatch\n\t * @param {HTMLElement} element node events\n\t * @param {string} name event name\n\t * @param {Object} params the event parameters\n\t * @param {boolean} [params.bubbles=false]\n\t * @param {boolean} [params.cancelable=false]\n\t * @param {*} [params.detail]\n\t */\n\tfunction dispatch(element, name) {\n\t var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t element.dispatchEvent(new Custom(name, params));\n\t}\n\t\n\tfunction oneCallback(target, eventName, callback) {\n\t return function _callback(event) {\n\t target.removeEventListener(eventName, _callback);\n\t callback(event);\n\t };\n\t}\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\t\n\t/**\n\t * @constant {Document}\n\t * @private\n\t */\n\tvar doc = context.document;\n\t\n\t/**\n\t * @constant {Object}\n\t * @private\n\t */\n\tvar protoEvent = context.Event.prototype;\n\t\n\tvar issetCustomEvent = false;\n\t\n\ttry {\n\t issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n\t} catch (e) {}\n\t// do nothing\n\t\n\t\n\t/**\n\t * The original function \"stopImmediatePropagation\"\n\t * @constant {function}\n\t * @private\n\t */\n\tvar stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\t\n\t/**\n\t * Override function to set properties \"immediatePropagationStopped\"\n\t */\n\tprotoEvent.stopImmediatePropagation = function () {\n\t this.immediatePropagationStopped = true;\n\t\n\t if (stopImmediatePropagation) {\n\t stopImmediatePropagation.call(this);\n\t } else {\n\t this.stopPropagation();\n\t }\n\t};\n\t\n\tvar CustomEventCommon = function () {\n\t if (issetCustomEvent) {\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('CustomEvent');\n\t\n\t evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\t\n\t return evt;\n\t };\n\t }\n\t\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('Event');\n\t\n\t evt.initEvent(eventName, bubbles, cancelable);\n\t evt.detail = params.detail;\n\t\n\t return evt;\n\t };\n\t}();\n\t\n\tCustomEventCommon.prototype = protoEvent;\n\t\n\tmodule.exports = CustomEventCommon;\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\texports.KEY = {\n\t a: 65,\n\t Backspace: 8,\n\t Bottom: 40,\n\t c: 67,\n\t Cmd: 91,\n\t Comma: 44, // ,\n\t Delete: 46,\n\t Enter: 13, // Enter\n\t Esc: 27,\n\t Left: 37,\n\t Right: 39,\n\t Semicolon: 59, // ;\n\t Space: 32,\n\t Tab: 9,\n\t Top: 38,\n\t x: 88\n\t};\n\t\n\texports.CLS = {\n\t DRAGSTART: 'drag',\n\t DROPZONE: 'dropzone'\n\t};\n\t\n\texports.EV = {\n\t BUBBLE_EDIT: 'bubble-edit',\n\t BUBBLE_INPUT: 'bubble-input',\n\t CHANGE: 'change',\n\t DRAGEND: 'dragend',\n\t DRAGENTER: 'dragenter',\n\t DRAGLEAVE: 'dragleave',\n\t DRAGSTART: 'dragstart',\n\t DROP: 'drop'\n\t};\n\t\n\texports.PROPS = {\n\t BUBBLE_VALUE: '_bubbleValue',\n\t CLICK_TIME: '_clickTime',\n\t LOCK_COPY: '_lockCopy'\n\t};\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar DRAG_IMG = { w: 16, h: 16 };\n\t\n\tvar dragImage = null;\n\t\n\texports.DRAG_IMG = DRAG_IMG;\n\t\n\texports.getDragImage = function () {\n\t if (!dragImage) {\n\t dragImage = new Image();\n\t dragImage.src = __webpack_require__(16);\n\t }\n\t\n\t return dragImage;\n\t};\n\t\n\texports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n\t fromNodeSet.fireChange();\n\t toNodeSet.focus();\n\t toNodeSet.fireChange();\n\t};\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar Modernizr = __webpack_require__(18);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS,\n\t EV = _require.EV;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar currentDragSet = null;\n\tvar currentMoveSet = null;\n\tvar currentDragElement = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\tfunction onMousedown(event) {\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t if (!nodeBubble) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t event.preventDefault();\n\t nodeSet.focus();\n\t\n\t var drag = nodeSet.__drag__ = {\n\t onMouseup: onMouseup.bind(this, nodeSet),\n\t onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n\t onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n\t nodeOffsetX: event.offsetX,\n\t nodeOffsetY: event.offsetY,\n\t x: 0,\n\t y: 0\n\t };\n\t\n\t currentDragSet = null;\n\t currentMoveSet = null;\n\t currentDragElement = null;\n\t\n\t events.one(document, 'mouseup', drag.onMouseup);\n\t events.on(document, 'mousemove', drag.onMousemove);\n\t events.on(document, 'scroll', drag.onScroll);\n\t}\n\t\n\tfunction onMouseup(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t events.off(document, 'mousemove', drag.onMousemove);\n\t events.off(document, 'scroll', drag.onScroll);\n\t delete dragSet.__drag__;\n\t\n\t if (currentDragElement) {\n\t currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n\t currentDragElement = null;\n\t }\n\t\n\t if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t\n\t if (currentDragSet) {\n\t (function () {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t }\n\t\n\t var _ = currentDragSet;\n\t currentDragSet = null;\n\t\n\t _.classList.remove(CLS.DRAGSTART);\n\t events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n\t events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n\t })();\n\t }\n\t}\n\t\n\tfunction onMousemove(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t if (!currentDragSet) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = dragSet;\n\t currentDragSet.classList.add(CLS.DRAGSTART);\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t var moveElement = void 0;\n\t\n\t if (nodeBubble) {\n\t select.add(nodeBubble);\n\t if (select.get(currentDragSet).length === 1) {\n\t moveElement = nodeBubble.cloneNode(true);\n\t }\n\t }\n\t\n\t if (!moveElement) {\n\t moveElement = getDragImage();\n\t drag.nodeOffsetX = DRAG_IMG.w;\n\t drag.nodeOffsetY = DRAG_IMG.h;\n\t }\n\t\n\t currentDragElement = document.body.appendChild(document.createElement('div'));\n\t currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n\t currentDragElement.appendChild(moveElement);\n\t\n\t events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n\t }\n\t\n\t drag.x = event.clientX;\n\t drag.y = event.clientY;\n\t onScroll(dragSet);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t if (currentMoveSet && currentMoveSet !== nodeSet) {\n\t currentMoveSet.classList.remove(CLS.DROPZONE);\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t } else if (!currentMoveSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t }\n\t } else if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t}\n\t\n\tfunction onScroll(dragSet) {\n\t var drag = dragSet.__drag__;\n\t if (!drag || !currentDragElement) {\n\t return;\n\t }\n\t\n\t var x = drag.x - drag.nodeOffsetX + events.scrollX();\n\t var y = drag.y - drag.nodeOffsetY + events.scrollY();\n\t\n\t if (Modernizr.csstransforms3d) {\n\t currentDragElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';\n\t } else if (Modernizr.csstransforms) {\n\t currentDragElement.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\n\t } else {\n\t currentDragElement.style.top = y + 'px';\n\t currentDragElement.style.left = x + 'px';\n\t }\n\t}\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\tmodule.exports = Modernizr;\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t KEY = _require.KEY,\n\t EV = _require.EV,\n\t PROPS = _require.PROPS;\n\t\n\tvar text = __webpack_require__(6);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar eventCopy = __webpack_require__(21);\n\tvar eventPaste = __webpack_require__(22);\n\tvar eventBackspace = __webpack_require__(23);\n\tvar eventDelete = __webpack_require__(24);\n\t\n\tvar EVENTS = {\n\t blur: onBlur,\n\t click: onClick,\n\t focus: onFocus,\n\t keydown: onKeydown,\n\t keypress: onKeypress,\n\t keyup: onKeyup,\n\t mscontrolselect: events.prevent,\n\t paste: eventPaste,\n\t resize: events.prevent,\n\t resizestart: events.prevent\n\t};\n\t\n\texports.init = function (nodeWrap) {\n\t var nodeEditor = nodeWrap;\n\t nodeEditor.setAttribute('contenteditable', 'true');\n\t nodeEditor.setAttribute('spellcheck', 'false');\n\t\n\t nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n\t nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n\t nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\t\n\t events.on(nodeEditor, EVENTS);\n\t\n\t return {\n\t addBubble: addBubble.bind(nodeEditor),\n\t editBubble: editBubble.bind(nodeEditor),\n\t inputValue: inputValue.bind(nodeEditor),\n\t removeBubble: removeBubble.bind(nodeEditor),\n\t setContent: setContent.bind(nodeEditor)\n\t };\n\t};\n\t\n\texports.destroy = function (nodeEditor) {\n\t events.off(nodeEditor, EVENTS);\n\t};\n\t\n\tfunction onBlur(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t return events.prevent(event);\n\t }\n\t\n\t select.clear(nodeEditor);\n\t bubble.bubbling(nodeEditor);\n\t}\n\t\n\tfunction onFocus(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t events.prevent(event);\n\t delete nodeEditor[PROPS.LOCK_COPY];\n\t\n\t // Safary 10 не сбрасывает курсор без задержки\n\t raf(function () {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t });\n\t\n\t return false;\n\t }\n\t\n\t cursor.restore(nodeEditor);\n\t}\n\t\n\tfunction onKeyup(event) {\n\t var nodeEditor = event.currentTarget;\n\t var code = events.keyCode(event);\n\t var isPrintableChar = event.key ? event.key.length === 1 : (code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd;\n\t\n\t if (isPrintableChar) {\n\t nodeEditor.fireInput();\n\t }\n\t}\n\t\n\tfunction onKeypress(event) {\n\t var code = events.keyCode(event);\n\t var nodeEditor = event.currentTarget;\n\t\n\t /* eslint no-case-declarations: 0 */\n\t switch (code) {\n\t case KEY.Enter:\n\t event.preventDefault();\n\t if (!nodeEditor.options('disableControls')) {\n\t if (!editBubbleKeyboardEvent(nodeEditor)) {\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.Space:\n\t if (editBubbleKeyboardEvent(nodeEditor)) {\n\t event.preventDefault();\n\t }\n\t break;\n\t\n\t default:\n\t var separator = nodeEditor.options('separator');\n\t if (separator && separator.test(String.fromCharCode(code))) {\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t}\n\t\n\tfunction onKeydown(event) {\n\t var code = events.keyCode(event);\n\t var metaKey = events.metaKey(event);\n\t var nodeEditor = event.currentTarget;\n\t var enable = !nodeEditor.options('disableControls');\n\t\n\t switch (code) {\n\t case KEY.Esc:\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t break;\n\t\n\t case KEY.Backspace:\n\t event.preventDefault();\n\t eventBackspace(event);\n\t break;\n\t\n\t case KEY.Delete:\n\t event.preventDefault();\n\t eventDelete(event);\n\t break;\n\t\n\t case KEY.Left:\n\t event.preventDefault();\n\t arrowLeft(event);\n\t break;\n\t\n\t // сдвигаем курсор в начало списка\n\t case KEY.Top:\n\t event.preventDefault();\n\t if (enable) {\n\t var headBubble = bubbleset.headBubble(nodeEditor);\n\t headBubble && select.uniq(headBubble);\n\t }\n\t break;\n\t\n\t case KEY.Right:\n\t event.preventDefault();\n\t arrowRight(event);\n\t break;\n\t\n\t // сдвигаем курсор в конец списка\n\t // case KEY.Tab:\n\t case KEY.Bottom:\n\t event.preventDefault();\n\t if (enable && select.has(nodeEditor)) {\n\t cursor.restore(nodeEditor);\n\t }\n\t break;\n\t\n\t case KEY.a:\n\t if (metaKey) {\n\t event.preventDefault();\n\t\n\t if (!text.selectAll(null, event.currentTarget)) {\n\t select.all(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.c:\n\t if (metaKey) {\n\t eventCopy(event);\n\t }\n\t break;\n\t\n\t case KEY.x:\n\t if (metaKey) {\n\t eventCopy(event, function () {\n\t return eventDelete(event);\n\t });\n\t }\n\t break;\n\t }\n\t}\n\t\n\tfunction arrowLeft(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowLeft(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[0] === nodeSet.startRangeSelect ? list[list.length - 1] : list[0];\n\t\n\t var node = bubbleset.prevBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t }\n\t}\n\t\n\tfunction arrowRight(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowRight(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.nextBubble(selection.focusNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[list.length - 1] === nodeSet.startRangeSelect ? list[0] : list[list.length - 1];\n\t\n\t var node = bubbleset.nextBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n\t select.clear(nodeSet);\n\t selection.collapse(begin.nextSibling, 0);\n\t } else {\n\t cursor.restore(nodeSet);\n\t }\n\t}\n\t\n\tfunction onClick(event) {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (nodeBubble) {\n\t var clickTime = Date.now();\n\t var isDblclick = nodeSet[PROPS.CLICK_TIME] && clickTime - nodeSet[PROPS.CLICK_TIME] < 200;\n\t\n\t nodeSet[PROPS.CLICK_TIME] = clickTime;\n\t\n\t if (events.metaKey(event)) {\n\t select.add(nodeBubble);\n\t } else if (event.shiftKey) {\n\t if (!nodeSet.startRangeSelect) {\n\t select.uniq(nodeBubble);\n\t } else {\n\t select.range(nodeBubble);\n\t }\n\t } else if (isDblclick) {\n\t bubble.edit(nodeSet, nodeBubble);\n\t } else {\n\t select.toggleUniq(nodeBubble);\n\t }\n\t } else {\n\t select.clear(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t cursor.restore(nodeSet);\n\t }\n\t }\n\t}\n\t\n\tfunction editBubbleKeyboardEvent(nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.rangeCount) {\n\t var list = select.get(nodeEditor);\n\t\n\t if (list.length === 1) {\n\t return bubble.edit(nodeEditor, list[0]);\n\t }\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction setContent(data) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t while (this.firstChild) {\n\t this.removeChild(this.firstChild);\n\t }\n\t\n\t data = text.html2text(data);\n\t this.appendChild(this.ownerDocument.createTextNode(data));\n\t bubble.bubbling(this);\n\t cursor.restore(this);\n\t}\n\t\n\tfunction addBubble(bubbleText, dataAttributes) {\n\t var nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n\t if (!nodeBubble) {\n\t return false;\n\t }\n\t\n\t if (text.text2bubble(this, nodeBubble)) {\n\t this.fireInput();\n\t this.fireChange();\n\t cursor.restore(this);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t this.removeChild(nodeBubble);\n\t this.fireChange();\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction editBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t return bubble.edit(this, nodeBubble);\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction inputValue() {\n\t var textRange = text.currentTextRange(this);\n\t return textRange && text.textClean(textRange.toString()) || '';\n\t}\n\t\n\t/**\n\t * Генерация события редактирования бабла.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireEdit\n\t * @param {HTMLElement} nodeBubble нода бабл\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireEdit(nodeBubble) {\n\t events.dispatch(this, EV.BUBBLE_EDIT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: nodeBubble }\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события изменения набора баблов.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireChange\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireChange() {\n\t events.dispatch(this, EV.CHANGE, {\n\t bubbles: false,\n\t cancelable: false\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события ввода текста.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireInput\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireInput() {\n\t var editText = inputValue.call(this);\n\t\n\t if (this[PROPS.BUBBLE_VALUE] !== editText) {\n\t this[PROPS.BUBBLE_VALUE] = editText;\n\t\n\t events.dispatch(this, EV.BUBBLE_INPUT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: editText }\n\t });\n\t }\n\t}\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * @module x-bubbles/cursor\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\tvar select = __webpack_require__(4);\n\t\n\texports.restore = restore;\n\texports.restoreBasis = restoreBasis;\n\t\n\t/**\n\t * Reset the cursor position to the end of the input field.\n\t * @alias module:x-bubbles/cursor.restore\n\t * @param {HTMLElement} nodeSet\n\t */\n\tfunction restore(nodeSet) {\n\t select.clear(nodeSet);\n\t var basis = restoreBasis(nodeSet);\n\t var selection = context.getSelection();\n\t selection.removeAllRanges();\n\t selection.collapse(basis, 1);\n\t}\n\t\n\t/**\n\t * The creation of the fake text at the end childNodes\n\t * @alias module:x-bubbles/cursor.restoreBasis\n\t * @param {HTMLElement} nodeSet\n\t * @returns {HTMLTextElement} fake text node\n\t */\n\tfunction restoreBasis(nodeSet) {\n\t var fakeText = text.createZws();\n\t\n\t if (nodeSet.hasChildNodes()) {\n\t var lastNode = nodeSet.childNodes[nodeSet.childNodes.length - 1];\n\t\n\t if (lastNode.isEqualNode(fakeText)) {\n\t fakeText = lastNode;\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t\n\t return fakeText;\n\t}\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar events = __webpack_require__(12);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t PROPS = _require.PROPS;\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = function (event) {\n\t var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\t\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t return false;\n\t }\n\t\n\t var list = select.get(nodeEditor);\n\t\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var bubbleCopy = nodeEditor.options('bubbleCopy');\n\t var value = bubbleCopy(list);\n\t\n\t if (!value) {\n\t return false;\n\t }\n\t\n\t nodeEditor[PROPS.LOCK_COPY] = true;\n\t\n\t var target = nodeEditor.ownerDocument.createElement('input');\n\t target.value = value;\n\t target.style.cssText = '\\n position: absolute;\\n left: -9999px;\\n width: 1px;\\n height: 1px;\\n margin: 0;\\n padding: 0;\\n border: none;';\n\t\n\t nodeEditor.parentNode.appendChild(target);\n\t\n\t events.one(target, {\n\t keyup: function keyup() {\n\t return nodeEditor.focus();\n\t },\n\t blur: function blur() {\n\t removeNode(target);\n\t raf(callback);\n\t }\n\t });\n\t\n\t target.select();\n\t return true;\n\t};\n\t\n\tfunction removeNode(node) {\n\t node && node.parentNode && node.parentNode.removeChild(node);\n\t}\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t isIE = _require.isIE;\n\t\n\tmodule.exports = function (event) {\n\t event.preventDefault();\n\t var nodeEditor = event.currentTarget;\n\t\n\t if (context.clipboardData && context.clipboardData.getData) {\n\t onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\t } else if (event.clipboardData) {\n\t (function () {\n\t var contentType = 'text/plain';\n\t var clipboardData = event.clipboardData;\n\t var data = clipboardData.getData && clipboardData.getData(contentType);\n\t\n\t if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n\t Array.prototype.slice.call(clipboardData.items).filter(function (item) {\n\t return item.kind === 'string' && item.type === contentType;\n\t }).some(function (item) {\n\t item.getAsString(function (dataText) {\n\t onPasteSuccess(nodeEditor, dataText);\n\t });\n\t\n\t return true;\n\t });\n\t }\n\t })();\n\t }\n\t};\n\t\n\tfunction onPasteSuccess(nodeEditor, dataText) {\n\t var checkBubblePaste = nodeEditor.options('checkBubblePaste');\n\t var selection = context.getSelection();\n\t var isBubbling = dataText && selection.isCollapsed && !nodeEditor.inputValue ? checkBubblePaste(dataText) : false;\n\t\n\t if (text.replaceString(dataText, selection)) {\n\t if (isBubbling) {\n\t if (isIE) {\n\t raf(function () {\n\t return onReplaceSuccess(nodeEditor);\n\t });\n\t } else {\n\t onReplaceSuccess(nodeEditor);\n\t }\n\t } else {\n\t nodeEditor.fireInput();\n\t }\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction onReplaceSuccess(nodeEditor) {\n\t bubble.bubbling(nodeEditor);\n\t nodeEditor.focus();\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t}\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Backspace.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowLeft(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleLeft(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Delete.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowRight(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleRight(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** x-bubbles-compact.min.js\n **/"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 8653023efb3343c18069\n **/","const context = require('./context');\nconst drag = require('./core/drag');\nconst editor = require('./core/editor');\nconst bubble = require('./core/bubble');\nconst bubbleset = require('./core/bubbleset');\n\nconst OPTIONS = {\n begining: [ 'reg', null, 'begining' ],\n bubbleCopy: [ 'func', bubbleCopyOption, 'bubble-copy' ],\n bubbleDeformation: [ 'func', function () {}, 'bubble-deformation' ],\n bubbleFormation: [ 'func', function () {}, 'bubble-formation' ],\n checkBubblePaste: [ 'func', checkBubblePasteOption, 'check-bubble-paste' ],\n classBubble: [ 'str', 'bubble', 'class-bubble' ],\n disableControls: [ 'bool', false, 'disable-controls' ],\n draggable: [ 'bool', true, 'draggable' ],\n ending: [ 'reg', null, 'ending' ], // /\\@ya\\.ru/g;\n separator: [ 'reg', /[,;]/, 'separator' ],\n tokenizer: [ 'func', null, 'tokenizer' ],\n};\n\nconst XBubbles = Object.create(HTMLDivElement.prototype, {\n createdCallback: {\n value: function () {\n initEditor(this);\n }\n },\n\n attachedCallback: {\n value: function () {\n initEditor(this);\n drag.init(this);\n bubble.bubbling(this);\n }\n },\n\n detachedCallback: {\n value: function () {\n drag.destroy(this);\n destroyEditor(this);\n }\n },\n\n /*\n attributeChangedCallback: {\n value: function (name, prevValue, value) {}\n },\n */\n\n options: {\n value: function (name, value) {\n if (!this._options) {\n this._options = {};\n\n for (const optionName in OPTIONS) {\n this._options[ optionName ] = undefined;\n\n const attrName = `data-${OPTIONS[ optionName ][2]}`;\n if (this.hasAttribute(attrName)) {\n this._options[ optionName ] = this.getAttribute(attrName);\n }\n }\n\n optionsPrepare(this._options);\n }\n\n if (typeof value !== 'undefined') {\n this._options[ name ] = value;\n optionsPrepare(this._options);\n\n } else {\n return this._options[ name ];\n }\n }\n },\n\n items: {\n get: function () {\n return bubbleset.getBubbles(this);\n }\n },\n\n inputValue: {\n get: function () {\n return this.editor.inputValue();\n }\n },\n\n setContent: {\n value: function (data) {\n return this.editor.setContent(data);\n }\n },\n\n addBubble: {\n value: function (bubbleText, data) {\n return this.editor.addBubble(bubbleText, data);\n }\n },\n\n removeBubble: {\n value: function (nodeBubble) {\n return this.editor.removeBubble(nodeBubble);\n }\n },\n\n editBubble: {\n value: function (nodeBubble) {\n return this.editor.editBubble(nodeBubble);\n }\n }\n});\n\nmodule.exports = context.document.registerElement('x-bubbles', {\n extends: 'div',\n prototype: XBubbles\n});\n\nconst OPTIONS_PREPARE = {\n func: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return new Function('context', `return context.${value};`)(context);\n\n case 'function':\n return value;\n }\n },\n bool: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return (value === 'true' || value === 'on');\n\n case 'boolean':\n return value;\n }\n },\n noop: function (value) {\n return value;\n },\n reg: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n if (value) {\n const match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n if (match) {\n return new RegExp(match[1], match[2]);\n }\n }\n\n return null;\n\n case 'object':\n if (value instanceof context.RegExp || value === null) {\n return value;\n }\n }\n },\n str: function (value) {\n if (typeof value !== 'undefined') {\n return value ? String(value) : '';\n }\n },\n};\n\nfunction optionsPrepare(options) {\n for (let name in OPTIONS) {\n const [ type, def ] = OPTIONS[ name ];\n options[ name ] = OPTIONS_PREPARE[ type ](options[ name ]);\n if (typeof options[ name ] === 'undefined') {\n options[ name ] = def;\n }\n }\n}\n\nfunction initEditor(node) {\n if (!node.editor) {\n Object.defineProperty(node, 'editor', {\n configurable: true,\n value: editor.init(node)\n });\n }\n}\n\nfunction destroyEditor(node) {\n if (node.editor) {\n editor.destroy(node);\n delete node.editor;\n }\n}\n\nfunction bubbleCopyOption(list) {\n return list.map(item => item.innerHTML).join(', ');\n}\n\nfunction checkBubblePasteOption() {\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","module.exports = (function () {\n /* eslint no-eval: 0 */\n return this || (1, eval)('this');\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./context.js\n **/","const native = require('./drag/native');\nconst mouse = require('./drag/mouse');\nconst { canUseDrag } = require('./utils');\n\nexports.init = function (nodeSet) {\n if (canUseDrag) {\n return native.init(nodeSet);\n }\n\n return mouse.init(nodeSet);\n};\n\nexports.destroy = function (nodeSet) {\n if (canUseDrag) {\n return native.destroy(nodeSet);\n }\n\n return mouse.destroy(nodeSet);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag.js\n **/","const context = require('../../context');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst events = require('../events');\nconst { CLS } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nconst EVENTS = {\n dragend: onDragend,\n dragenter: onDragenter,\n dragleave: onDragleave,\n dragover: onDragover,\n dragstart: onDragstart,\n drop: onDrop,\n};\n\nlet currentDragSet = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, EVENTS);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, EVENTS);\n};\n\nfunction onDragstart(event) {\n event.stopPropagation();\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (!nodeSet || !nodeBubble) {\n event.preventDefault();\n return;\n }\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = nodeSet;\n nodeSet.classList.add(CLS.DRAGSTART);\n select.add(nodeBubble);\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', '');\n\n const list = select.get(currentDragSet);\n if (list.length > 1) {\n event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n }\n}\n\nfunction onDrop(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet || nodeSet === currentDragSet) {\n return;\n }\n\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n}\n\nfunction onDragover(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n event.dataTransfer.dropEffect = 'move';\n}\n\nfunction onDragenter(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n }\n}\n\nfunction onDragleave(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n}\n\nfunction onDragend(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n currentDragSet.classList.remove(CLS.DRAGSTART);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n\n currentDragSet = null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/native.js\n **/","const context = require('../context');\nconst bubble = require('./bubble');\nconst bubbleset = require('./bubbleset');\n\nconst slice = Array.prototype.slice;\nconst PATH_SELECTED = '[bubble][selected]';\nconst PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\nexports.all = all;\nexports.add = add;\nexports.clear = clear;\nexports.get = get;\nexports.uniq = uniq;\nexports.head = head;\nexports.last = last;\nexports.has = has;\nexports.range = range;\nexports.toggleUniq = toggleUniq;\n\nfunction range(node) {\n if (!bubble.isBubbleNode(node)) {\n return;\n }\n\n const set = node.parentNode;\n const list = get(set);\n\n if (!list.length) {\n uniq(node);\n return;\n }\n\n clear(set);\n\n const headList = list[0];\n const lastList = list[ list.length - 1 ];\n\n if (headList === lastList || !set.startRangeSelect) {\n set.startRangeSelect = headList;\n }\n\n let fromNode;\n let toNode;\n const position = node.compareDocumentPosition(set.startRangeSelect);\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n fromNode = set.startRangeSelect;\n toNode = node;\n\n } else {\n fromNode = node;\n toNode = set.startRangeSelect;\n }\n\n if (fromNode && toNode) {\n let item = fromNode;\n\n while (item) {\n if (!setSelected(item)) {\n break;\n }\n\n if (item === toNode) {\n break;\n }\n\n item = item.nextSibling;\n }\n\n bubble.bubbling(set);\n }\n}\n\nfunction all(nodeSet) {\n slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(item => setSelected(item));\n nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\n bubble.bubbling(nodeSet);\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n}\n\nfunction has(nodeSet) {\n return Boolean(nodeSet.querySelector(PATH_SELECTED));\n}\n\nfunction head(set) {\n return get(set)[0];\n}\n\nfunction last(set) {\n const list = get(set);\n return list[ list.length - 1 ];\n}\n\nfunction get(nodeSet) {\n return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n}\n\nfunction clear(nodeSet) {\n get(nodeSet).forEach(item => item.removeAttribute('selected'));\n}\n\nfunction add(node) {\n if (setSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n nodeSet.startRangeSelect = node;\n // ???\n bubble.bubbling(nodeSet);\n\n return true;\n }\n\n return false;\n}\n\nfunction uniq(node) {\n if (!bubble.isBubbleNode(node)) {\n return false;\n }\n\n const nodeSet = bubbleset.closestNodeSet(node);\n const selection = context.getSelection();\n\n selection && selection.removeAllRanges();\n clear(nodeSet);\n\n return add(node);\n}\n\nfunction toggleUniq(node) {\n if (isSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n if (get(nodeSet).length === 1) {\n return removeSelected(node);\n }\n }\n\n return uniq(node);\n}\n\nfunction isSelected(node) {\n return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n}\n\nfunction setSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.setAttribute('selected', '');\n return true;\n }\n\n return false;\n}\n\nfunction removeSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.removeAttribute('selected');\n return true;\n }\n\n return false;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/select.js\n **/","const context = require('../context');\nconst text = require('./text');\nconst { escape, canUseDrag } = require('./utils');\n\nexports.isBubbleNode = isBubbleNode;\nexports.bubbling = bubbling;\nexports.create = create;\nexports.edit = edit;\n\nfunction isBubbleNode(node) {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n\n return node.hasAttribute('bubble');\n}\n\nfunction edit(nodeSet, nodeBubble) {\n if (nodeBubble.hasAttribute('readonly')) {\n return false;\n }\n\n const selection = context.getSelection();\n\n if (!selection) {\n return false;\n }\n\n const bubbleDeformation = nodeSet.options('bubbleDeformation');\n let rangeParams = bubbleDeformation(nodeBubble);\n\n if (!rangeParams) {\n const dataText = text.textClean(nodeBubble.innerText);\n\n rangeParams = {\n text: dataText,\n startOffset: 0,\n endOffset: dataText.length\n };\n }\n\n const textFake = text.createZws();\n const textNode = context.document.createTextNode(rangeParams.text);\n\n nodeSet.fireEdit(nodeBubble);\n nodeSet.replaceChild(textNode, nodeBubble);\n nodeSet.insertBefore(textFake, textNode);\n\n const range = context.document.createRange();\n range.setStart(textNode, rangeParams.startOffset);\n range.setEnd(textNode, rangeParams.endOffset);\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n}\n\n/**\n * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n * @param {[type]} nodeSet [description]\n * @param {[type]} dataText [description]\n * @param {Object} [dataAttributes={}] [description]\n * @returns {[type]} [description]\n */\nfunction create(nodeSet, dataText, dataAttributes = {}) {\n dataText = text.textClean(dataText);\n\n if (!dataText) {\n return;\n }\n\n const bubbleFormation = nodeSet.options('bubbleFormation');\n const classBubble = nodeSet.options('classBubble');\n const draggable = canUseDrag && nodeSet.options('draggable');\n const wrap = nodeSet.ownerDocument.createElement('span');\n\n wrap.innerText = dataText;\n\n for (let key in dataAttributes) {\n if (dataAttributes[ key ]) {\n wrap.setAttribute(`data-${key}`, escape(dataAttributes[ key ]));\n }\n }\n\n bubbleFormation(wrap);\n\n if (classBubble) {\n const classes = String(classBubble).trim().split(/\\s+/);\n let len = classes.length;\n\n while (len--) {\n wrap.classList.add(classes[ len ]);\n }\n }\n\n wrap.setAttribute('bubble', '');\n wrap.setAttribute('contenteditable', 'false');\n draggable && wrap.setAttribute('draggable', 'true');\n\n return wrap;\n}\n\nfunction bubbling(nodeSet) {\n const begining = nodeSet.options('begining');\n const ending = nodeSet.options('ending');\n const separator = nodeSet.options('separator');\n const tokenizer = nodeSet.options('tokenizer');\n const ranges = getBubbleRanges(nodeSet);\n const nodes = [];\n\n ranges.forEach(function (range) {\n const dataText = text.textClean(range.toString());\n\n if (!dataText) {\n range.deleteContents();\n return;\n }\n\n let textParts = [ dataText ];\n\n if (tokenizer) {\n textParts = tokenizer(dataText);\n\n } else {\n if (separator) {\n textParts = dataText\n .split(separator)\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n\n if (ending) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByEnding(str, ending)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n\n } else if (begining) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByBeginning(str, begining)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n }\n\n if (!Array.isArray(textParts) || !textParts.length) {\n range.deleteContents();\n return;\n }\n\n const fragment = context.document.createDocumentFragment();\n\n textParts.forEach(function (textPart) {\n const nodeBubble = create(nodeSet, textPart);\n if (nodeBubble) {\n fragment.appendChild(nodeBubble);\n nodes.push(nodeBubble);\n }\n });\n\n range.deleteContents();\n range.insertNode(fragment);\n });\n\n nodeSet.fireInput();\n\n if (nodes.length) {\n nodeSet.fireChange();\n }\n\n return nodes;\n}\n\nfunction getBubbleRanges(nodeSet) {\n const ranges = [];\n const children = nodeSet.childNodes;\n let range;\n let node;\n\n for (let i = 0; i < children.length; i++) {\n node = children[ i ];\n\n if (isBubbleNode(node)) {\n if (range) {\n range.setEndBefore(node);\n ranges.push(range);\n range = undefined;\n }\n\n } else {\n if (!range) {\n range = context.document.createRange();\n range.setStartBefore(node);\n }\n }\n }\n\n if (range) {\n range.setEndAfter(node);\n ranges.push(range);\n }\n\n return ranges;\n}\n\nfunction trimIterator(str) {\n return str.trim();\n}\n\nfunction nonEmptyIterator(str) {\n return Boolean(str);\n}\n\nfunction parseFragmentByEnding(str, reg) {\n const parts = [];\n let lastIndex = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while (reg.exec(str) !== null && loop) {\n loop--;\n parts.push(str.substring(lastIndex, reg.lastIndex));\n lastIndex = reg.lastIndex;\n }\n\n return parts;\n}\n\nfunction parseFragmentByBeginning(str, reg) {\n const parts = [];\n let res;\n let index = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while ((res = reg.exec(str)) !== null && loop) {\n loop--;\n if (index !== res.index) {\n parts.push(str.substring(index, res.index));\n index = res.index;\n }\n }\n\n parts.push(str.substring(index, str.length));\n return parts;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubble.js\n **/","const context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst { getSelection } = require('./utils');\n\n/* eslint-disable max-len */\nconst REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09FC-\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE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u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1AAE-\\u1AFF\\u1B4C-\\u1B4F\\u1B7D-\\u1B7F\\u1BF4-\\u1BFB\\u1C38-\\u1C3A\\u1C4A-\\u1C4C\\u1C80-\\u1CBF\\u1CC8-\\u1CCF\\u1CF7-\\u1CFF\\u1DE7-\\u1DFB\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FC5\\u1FD4\\u1FD5\\u1FDC\\u1FF0\\u1FF1\\u1FF5\\u1FFF\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u2072\\u2073\\u208F\\u209D-\\u209F\\u20BB-\\u20CF\\u20F1-\\u20FF\\u218A-\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FDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\nconst REG_ZWS = /\\u200B/;\nconst TEXT_ZWS = '\\u200B';\n\nexports.arrowRight = arrowRight;\nexports.arrowLeft = arrowLeft;\nexports.remove = remove;\nexports.html2text = html2text;\nexports.currentTextRange = currentTextRange;\nexports.text2bubble = text2bubble;\nexports.replaceString = replaceString;\nexports.selectAll = selectAll;\nexports.textClean = textClean;\nexports.checkZws = checkZws;\nexports.createZws = createZws;\n\nfunction text2bubble(nodeEditor, nodeBubble) {\n const selection = getSelection(nodeEditor);\n const range = selection && currentTextRange(nodeEditor, selection);\n\n if (range) {\n selection.removeAllRanges();\n selection.addRange(range);\n replace(selection, nodeBubble);\n\n } else {\n nodeEditor.appendChild(nodeBubble);\n }\n\n return true;\n}\n\nfunction currentTextRange(nodeEditor, selection) {\n selection = selection || getSelection(nodeEditor);\n if (!selection) {\n return;\n }\n\n const pointNode = do {\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n selection.focusNode;\n\n } else if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n selection.anchorNode;\n\n } else {\n undefined;\n }\n };\n\n if (!pointNode) {\n return;\n }\n\n let startNode = pointNode;\n let endNode = pointNode;\n let item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n startNode = item;\n item = item.previousSibling;\n }\n\n item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n endNode = item;\n item = item.nextSibling;\n }\n\n const range = nodeEditor.ownerDocument.createRange();\n range.setStartBefore(startNode);\n range.setEndAfter(endNode);\n\n return range;\n}\n\nfunction remove(selection) {\n return replace(selection, createZws());\n}\n\nfunction replace(selection, node) {\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const anchor = context.document.createElement('span');\n selection.getRangeAt(0).surroundContents(anchor);\n anchor.parentNode.replaceChild(node, anchor);\n\n selection.removeAllRanges();\n\n if (node.nodeType === Node.TEXT_NODE) {\n const range = context.document.createRange();\n // для ИЕ обязательно указывать node.nodeValue.length\n range.setStart(node, node.nodeValue.length);\n range.collapse(false);\n selection.addRange(range);\n\n } else {\n selection.collapse(node, 0);\n }\n\n return true;\n}\n\nfunction replaceString(data, selection) {\n data = textClean(data);\n if (!data) {\n return false;\n }\n\n selection = selection || context.getSelection();\n const textNode = context.document.createTextNode(data);\n\n if (!replace(selection, textNode)) {\n return false;\n }\n\n selection.collapse(textNode, textNode.nodeValue.length);\n return true;\n}\n\nfunction arrowLeft(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(startNode, startOffset);\n return true;\n }\n\n const isNativeExtend = Boolean(selection.extend);\n revert = isNativeExtend ? revert : !revert;\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n if (offset === null) {\n offset = node.nodeValue.length;\n }\n\n if (offset - 1 < 0) {\n node = node.previousSibling;\n offset = null;\n continue;\n }\n\n const text = node.nodeValue.substring(offset - 1, offset);\n\n if (checkZws(text)) {\n offset = offset - 1;\n continue;\n }\n\n break;\n }\n\n if (!node || offset === null) {\n return false;\n }\n\n if (extend) {\n if (isNativeExtend) {\n selection.extend(node, offset - 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset - 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset - 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset - 1);\n }\n\n return true;\n}\n\nfunction arrowRight(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.focusNode ||\n selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(endNode, endOffset);\n return true;\n }\n\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n const len = node.nodeValue.length;\n\n if (offset + 1 > len) {\n node = node.nextSibling;\n offset = 0;\n continue;\n }\n\n const text = node.nodeValue.substring(offset, offset + 1);\n\n if (checkZws(text)) {\n offset = offset + 1;\n continue;\n }\n\n break;\n }\n\n if (!node) {\n return false;\n }\n\n if (extend) {\n const isNativeExtend = Boolean(selection.extend);\n\n if (isNativeExtend) {\n selection.extend(node, offset + 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset + 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset + 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset + 1);\n }\n\n return true;\n}\n\nfunction html2text(value) {\n if (!value) {\n return '';\n }\n\n var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n DOMContainer.innerText = value;\n\n return DOMContainer.innerText\n .replace(/^[\\u0020\\u00a0]+$/gm, '')\n .replace(/\\n/gm, ' ')\n .trim();\n}\n\nfunction selectAll(selection, nodeSet) {\n selection = selection || context.getSelection();\n const node = selection && selection.anchorNode;\n\n if (!node || node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n let fromNode;\n let toNode;\n let item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n fromNode = item;\n item = item.previousSibling;\n }\n\n item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n toNode = item;\n item = item.nextSibling;\n }\n\n const hasBubbles = bubbleset.hasBubbles(nodeSet);\n const range = context.document.createRange();\n range.setStartBefore(fromNode);\n range.setEndAfter(toNode);\n\n const dataText = textClean(range.toString());\n\n if (dataText || (!dataText && !hasBubbles)) {\n if (!dataText) {\n range.collapse();\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n }\n\n return false;\n}\n\nfunction createZws() {\n return context.document.createTextNode(TEXT_ZWS);\n}\n\nfunction checkZws(value) {\n return REG_ZWS.test(value);\n}\n\nfunction textClean(value) {\n return String(value || '')\n .trim()\n .replace(REG_REPLACE_NON_PRINTABLE, '');\n}\n\nfunction selectionCorrect(selection) {\n let startNode = selection.anchorNode;\n let endNode = selection.focusNode;\n let startOffset = selection.anchorOffset;\n let endOffset = selection.focusOffset;\n let revert = false;\n\n if (startNode === endNode) {\n startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n revert = selection.anchorOffset > selection.focusOffset;\n\n } else {\n const position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n startNode = selection.focusNode;\n startOffset = selection.focusOffset;\n endNode = selection.anchorNode;\n endOffset = selection.anchorOffset;\n revert = true;\n }\n }\n\n return { startNode, endNode, startOffset, endOffset, revert };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/text.js\n **/","const bubble = require('./bubble');\nconst text = require('./text');\n\nexports.closestNodeBubble = closestNodeBubble;\nexports.closestNodeSet = closestNodeSet;\nexports.findBubbleLeft = findBubbleLeft;\nexports.findBubbleRight = findBubbleRight;\nexports.getBubbles = getBubbles;\nexports.hasBubbles = hasBubbles;\nexports.headBubble = headBubble;\nexports.lastBubble = lastBubble;\nexports.nextBubble = nextBubble;\nexports.prevBubble = prevBubble;\n\nfunction lastBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:last-child');\n}\n\nfunction headBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:first-child');\n}\n\nfunction getBubbles(nodeSet) {\n return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n}\n\nfunction hasBubbles(nodeSet) {\n return Boolean(nodeSet.querySelector('[bubble]'));\n}\n\nfunction findBubbleLeft(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.previousSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.previousSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction findBubbleRight(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.nextSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.nextSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction closestNodeSet(node) {\n while (node) {\n if (isEditorNode(node)) {\n return node;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction closestNodeBubble(node) {\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (isEditorNode(node)) {\n return;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction prevBubble(target) {\n let node = target && target.previousSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction nextBubble(target) {\n let node = target && target.nextSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction isEditorNode(node) {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n node.getAttribute('is') === 'x-bubbles'\n );\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubbleset.js\n **/","const raf = require('raf');\nconst context = require('../context');\n\n/* eslint quotes: 0 */\n\nconst HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n\nconst HTML_UNESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n};\n\nconst REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\nconst REG_UNESCAPED_HTML = /[&<>\"'`]/g;\nconst REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\nconst REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\nconst REG_IE = /Trident|Edge/;\n\nexports.getSelection = function (nodeEditor) {\n const selection = context.getSelection();\n\n if (selection && selection.anchorNode && (nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n return selection;\n }\n};\n\nexports.throttle = function (callback, runContext) {\n let throttle = 0;\n const animationCallback = function () {\n throttle = 0;\n };\n\n return function () {\n if (throttle) {\n return;\n }\n\n throttle = raf(animationCallback);\n\n callback.apply(runContext || this, arguments);\n };\n};\n\nexports.escape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n }\n\n return data;\n};\n\nexports.unescape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n }\n\n return data;\n};\n\nexports.canUseDrag = (function () {\n return !REG_IE.test(context.navigator.userAgent);\n})();\n\nexports.isIE = (function () {\n return REG_IE.test(context.navigator.userAgent);\n})();\n\nfunction unescapeHtmlChar(chr) {\n return HTML_UNESCAPES[ chr ];\n}\n\nfunction escapeHtmlChar(chr) {\n return HTML_ESCAPES[ chr ];\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/utils.js\n **/","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/raf/index.js\n ** module id = 9\n ** module chunks = 0\n **/","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/performance-now/lib/performance-now.js\n ** module id = 10\n ** module chunks = 0\n **/","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * @module x-bubbles/event\n */\n\nconst context = require('../context');\nconst CustomEventCommon = require('../polyfills/CustomEventCommon');\n\nexports.scrollX = scrollX;\nexports.scrollY = scrollY;\nexports.dispatch = dispatch;\n\nexports.keyCode = function (event) {\n return event.charCode || event.keyCode;\n};\n\nexports.metaKey = function (event) {\n return event.ctrlKey || event.metaKey;\n};\n\nexports.pageX = function (event) {\n return (event.pageX === null && event.clientX !== null) ?\n event.clientX + scrollX() :\n event.pageX;\n};\n\nexports.pageY = function (event) {\n return (event.pageY === null && event.clientY !== null) ?\n event.clientY + scrollY() :\n event.pageY;\n};\n\nexports.one = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, oneCallback(target, name, events[ name ]));\n }\n};\n\nexports.on = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, events[ name ]);\n }\n};\n\nexports.off = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.removeEventListener(name, events[ name ]);\n }\n};\n\nexports.prevent = function (event) {\n event.cancelBubble = true;\n event.returnValue = false;\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n return false;\n};\n\nfunction scrollX() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n}\n\nfunction scrollY() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n}\n\n/**\n * Designer events.\n *\n * @example\n * const { Custom } = require('event');\n *\n * new Custom('custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event~Custom\n * @constructor\n */\nconst Custom = (function () {\n if (typeof context.CustomEvent === 'function') {\n return context.CustomEvent;\n }\n\n return CustomEventCommon;\n}());\n\n/**\n * Dispatch event.\n *\n * @example\n * const { dispatch } = require('event');\n * dispatch(node, 'custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event.dispatch\n * @param {HTMLElement} element node events\n * @param {string} name event name\n * @param {Object} params the event parameters\n * @param {boolean} [params.bubbles=false]\n * @param {boolean} [params.cancelable=false]\n * @param {*} [params.detail]\n */\nfunction dispatch(element, name, params = {}) {\n element.dispatchEvent(new Custom(name, params));\n}\n\nfunction oneCallback(target, eventName, callback) {\n return function _callback(event) {\n target.removeEventListener(eventName, _callback);\n callback(event);\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/events.js\n **/","const context = require('../context');\n\n/**\n * @constant {Document}\n * @private\n */\nconst doc = context.document;\n\n/**\n * @constant {Object}\n * @private\n */\nconst protoEvent = context.Event.prototype;\n\nlet issetCustomEvent = false;\n\ntry {\n issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n} catch (e) {\n // do nothing\n}\n\n/**\n * The original function \"stopImmediatePropagation\"\n * @constant {function}\n * @private\n */\nconst stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\n/**\n * Override function to set properties \"immediatePropagationStopped\"\n */\nprotoEvent.stopImmediatePropagation = function () {\n this.immediatePropagationStopped = true;\n\n if (stopImmediatePropagation) {\n stopImmediatePropagation.call(this);\n\n } else {\n this.stopPropagation();\n }\n};\n\nlet CustomEventCommon = (function () {\n if (issetCustomEvent) {\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('CustomEvent');\n\n evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\n return evt;\n };\n }\n\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('Event');\n\n evt.initEvent(eventName, bubbles, cancelable);\n evt.detail = params.detail;\n\n return evt;\n };\n}());\n\nCustomEventCommon.prototype = protoEvent;\n\nmodule.exports = CustomEventCommon;\n\n\n\n/** WEBPACK FOOTER **\n ** ./polyfills/CustomEventCommon.js\n **/","exports.KEY = {\n a: 65,\n Backspace: 8,\n Bottom: 40,\n c: 67,\n Cmd: 91,\n Comma: 44, // ,\n Delete: 46,\n Enter: 13, // Enter\n Esc: 27,\n Left: 37,\n Right: 39,\n Semicolon: 59, // ;\n Space: 32,\n Tab: 9,\n Top: 38,\n x: 88,\n};\n\nexports.CLS = {\n DRAGSTART: 'drag',\n DROPZONE: 'dropzone',\n};\n\nexports.EV = {\n BUBBLE_EDIT: 'bubble-edit',\n BUBBLE_INPUT: 'bubble-input',\n CHANGE: 'change',\n DRAGEND: 'dragend',\n DRAGENTER: 'dragenter',\n DRAGLEAVE: 'dragleave',\n DRAGSTART: 'dragstart',\n DROP: 'drop',\n};\n\nexports.PROPS = {\n BUBBLE_VALUE: '_bubbleValue',\n CLICK_TIME: '_clickTime',\n LOCK_COPY: '_lockCopy',\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/constant.js\n **/","const DRAG_IMG = { w: 16, h: 16 };\n\nlet dragImage = null;\n\nexports.DRAG_IMG = DRAG_IMG;\n\nexports.getDragImage = function () {\n if (!dragImage) {\n dragImage = new Image();\n dragImage.src = require('url?mimetype=image/png!./bubbles.png');\n }\n\n return dragImage;\n};\n\nexports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n fromNodeSet.fireChange();\n toNodeSet.focus();\n toNodeSet.fireChange();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/common.js\n **/","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/url-loader?mimetype=image/png!./core/drag/bubbles.png\n ** module id = 16\n ** module chunks = 0\n **/","const context = require('../../context');\nconst events = require('../events');\nconst utils = require('../utils');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst Modernizr = require('modernizr');\nconst { CLS, EV } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nlet currentDragSet = null;\nlet currentMoveSet = null;\nlet currentDragElement = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, 'mousedown', onMousedown);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, 'mousedown', onMousedown);\n};\n\nfunction onMousedown(event) {\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n if (!nodeBubble) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (!nodeSet) {\n return;\n }\n\n event.preventDefault();\n nodeSet.focus();\n\n const drag = nodeSet.__drag__ = {\n onMouseup: onMouseup.bind(this, nodeSet),\n onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n nodeOffsetX: event.offsetX,\n nodeOffsetY: event.offsetY,\n x: 0,\n y: 0\n };\n\n currentDragSet = null;\n currentMoveSet = null;\n currentDragElement = null;\n\n events.one(document, 'mouseup', drag.onMouseup);\n events.on(document, 'mousemove', drag.onMousemove);\n events.on(document, 'scroll', drag.onScroll);\n}\n\nfunction onMouseup(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n events.off(document, 'mousemove', drag.onMousemove);\n events.off(document, 'scroll', drag.onScroll);\n delete dragSet.__drag__;\n\n if (currentDragElement) {\n currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n currentDragElement = null;\n }\n\n if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n\n if (currentDragSet) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n }\n\n const _ = currentDragSet;\n currentDragSet = null;\n\n _.classList.remove(CLS.DRAGSTART);\n events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onMousemove(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n if (!currentDragSet) {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = dragSet;\n currentDragSet.classList.add(CLS.DRAGSTART);\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n let moveElement;\n\n if (nodeBubble) {\n select.add(nodeBubble);\n if (select.get(currentDragSet).length === 1) {\n moveElement = nodeBubble.cloneNode(true);\n }\n }\n\n if (!moveElement) {\n moveElement = getDragImage();\n drag.nodeOffsetX = DRAG_IMG.w;\n drag.nodeOffsetY = DRAG_IMG.h;\n }\n\n currentDragElement = document.body.appendChild(document.createElement('div'));\n currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n currentDragElement.appendChild(moveElement);\n\n events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n }\n\n drag.x = event.clientX;\n drag.y = event.clientY;\n onScroll(dragSet);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n if (currentMoveSet && currentMoveSet !== nodeSet) {\n currentMoveSet.classList.remove(CLS.DROPZONE);\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\n } else if (!currentMoveSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n }\n\n } else if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onScroll(dragSet) {\n const drag = dragSet.__drag__;\n if (!drag || !currentDragElement) {\n return;\n }\n\n const x = drag.x - drag.nodeOffsetX + events.scrollX();\n const y = drag.y - drag.nodeOffsetY + events.scrollY();\n\n if (Modernizr.csstransforms3d) {\n currentDragElement.style.transform = `translate3d(${x}px, ${y}px, 0px)`;\n\n } else if (Modernizr.csstransforms) {\n currentDragElement.style.transform = `translate(${x}px, ${y}px)`;\n\n } else {\n currentDragElement.style.top = `${y}px`;\n currentDragElement.style.left = `${x}px`;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/mouse.js\n **/","module.exports = Modernizr;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"var\":\"Modernizr\",\"root\":\"modernizr\",\"commonjs2\":\"modernizr\",\"commonjs\":\"modernizr\",\"amd\":\"modernizr\"}\n ** module id = 18\n ** module chunks = 0\n **/","const raf = require('raf');\nconst context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst bubble = require('./bubble');\nconst cursor = require('./cursor');\nconst select = require('./select');\nconst { KEY, EV, PROPS } = require('./constant');\nconst text = require('./text');\nconst events = require('./events');\nconst utils = require('./utils');\n\nconst eventCopy = require('./editor/copy');\nconst eventPaste = require('./editor/paste');\nconst eventBackspace = require('./editor/backspace');\nconst eventDelete = require('./editor/delete');\n\nconst EVENTS = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n keydown: onKeydown,\n keypress: onKeypress,\n keyup: onKeyup,\n mscontrolselect: events.prevent,\n paste: eventPaste,\n resize: events.prevent,\n resizestart: events.prevent,\n};\n\nexports.init = function (nodeWrap) {\n const nodeEditor = nodeWrap;\n nodeEditor.setAttribute('contenteditable', 'true');\n nodeEditor.setAttribute('spellcheck', 'false');\n\n nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\n events.on(nodeEditor, EVENTS);\n\n return {\n addBubble: addBubble.bind(nodeEditor),\n editBubble: editBubble.bind(nodeEditor),\n inputValue: inputValue.bind(nodeEditor),\n removeBubble: removeBubble.bind(nodeEditor),\n setContent: setContent.bind(nodeEditor),\n };\n};\n\nexports.destroy = function (nodeEditor) {\n events.off(nodeEditor, EVENTS);\n};\n\nfunction onBlur(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n return events.prevent(event);\n }\n\n select.clear(nodeEditor);\n bubble.bubbling(nodeEditor);\n}\n\nfunction onFocus(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n events.prevent(event);\n delete nodeEditor[ PROPS.LOCK_COPY ];\n\n // Safary 10 не сбрасывает курсор без задержки\n raf(() => {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n });\n\n return false;\n }\n\n cursor.restore(nodeEditor);\n}\n\nfunction onKeyup(event) {\n const nodeEditor = event.currentTarget;\n const code = events.keyCode(event);\n const isPrintableChar = do {\n if (event.key) {\n event.key.length === 1;\n\n } else {\n ((code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd);\n }\n };\n\n if (isPrintableChar) {\n nodeEditor.fireInput();\n }\n}\n\nfunction onKeypress(event) {\n const code = events.keyCode(event);\n const nodeEditor = event.currentTarget;\n\n /* eslint no-case-declarations: 0 */\n switch (code) {\n case KEY.Enter:\n event.preventDefault();\n if (!nodeEditor.options('disableControls')) {\n if (!editBubbleKeyboardEvent(nodeEditor)) {\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n break;\n\n case KEY.Space:\n if (editBubbleKeyboardEvent(nodeEditor)) {\n event.preventDefault();\n }\n break;\n\n default:\n const separator = nodeEditor.options('separator');\n if (separator && separator.test(String.fromCharCode(code))) {\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n}\n\nfunction onKeydown(event) {\n const code = events.keyCode(event);\n const metaKey = events.metaKey(event);\n const nodeEditor = event.currentTarget;\n const enable = !nodeEditor.options('disableControls');\n\n switch (code) {\n case KEY.Esc:\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n break;\n\n case KEY.Backspace:\n event.preventDefault();\n eventBackspace(event);\n break;\n\n case KEY.Delete:\n event.preventDefault();\n eventDelete(event);\n break;\n\n case KEY.Left:\n event.preventDefault();\n arrowLeft(event);\n break;\n\n // сдвигаем курсор в начало списка\n case KEY.Top:\n event.preventDefault();\n if (enable) {\n const headBubble = bubbleset.headBubble(nodeEditor);\n headBubble && select.uniq(headBubble);\n }\n break;\n\n case KEY.Right:\n event.preventDefault();\n arrowRight(event);\n break;\n\n // сдвигаем курсор в конец списка\n // case KEY.Tab:\n case KEY.Bottom:\n event.preventDefault();\n if (enable && select.has(nodeEditor)) {\n cursor.restore(nodeEditor);\n }\n break;\n\n case KEY.a:\n if (metaKey) {\n event.preventDefault();\n\n if (!text.selectAll(null, event.currentTarget)) {\n select.all(nodeEditor);\n }\n }\n break;\n\n case KEY.c:\n if (metaKey) {\n eventCopy(event);\n }\n break;\n\n case KEY.x:\n if (metaKey) {\n eventCopy(event, () => eventDelete(event));\n }\n break;\n }\n}\n\nfunction arrowLeft(event) {\n const selection = context.getSelection();\n\n if (text.arrowLeft(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ 0 ] === nodeSet.startRangeSelect) {\n list[ list.length - 1 ];\n\n } else {\n list[ 0 ];\n }\n };\n\n const node = bubbleset.prevBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n }\n}\n\nfunction arrowRight(event) {\n const selection = context.getSelection();\n\n if (text.arrowRight(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.nextBubble(selection.focusNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ list.length - 1 ] === nodeSet.startRangeSelect) {\n list[ 0 ];\n\n } else {\n list[ list.length - 1 ];\n }\n };\n\n const node = bubbleset.nextBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n\n } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n select.clear(nodeSet);\n selection.collapse(begin.nextSibling, 0);\n\n } else {\n cursor.restore(nodeSet);\n }\n}\n\nfunction onClick(event) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet) {\n return;\n }\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (nodeBubble) {\n const clickTime = Date.now();\n const isDblclick = nodeSet[ PROPS.CLICK_TIME ] && (clickTime - nodeSet[ PROPS.CLICK_TIME ]) < 200;\n\n nodeSet[ PROPS.CLICK_TIME ] = clickTime;\n\n if (events.metaKey(event)) {\n select.add(nodeBubble);\n\n } else if (event.shiftKey) {\n if (!nodeSet.startRangeSelect) {\n select.uniq(nodeBubble);\n\n } else {\n select.range(nodeBubble);\n }\n\n } else if (isDblclick) {\n bubble.edit(nodeSet, nodeBubble);\n\n } else {\n select.toggleUniq(nodeBubble);\n }\n\n } else {\n select.clear(nodeSet);\n\n const selection = context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n cursor.restore(nodeSet);\n }\n }\n}\n\nfunction editBubbleKeyboardEvent(nodeEditor) {\n const selection = context.getSelection();\n\n if (!selection || !selection.rangeCount) {\n const list = select.get(nodeEditor);\n\n if (list.length === 1) {\n return bubble.edit(nodeEditor, list[0]);\n }\n }\n\n return false;\n}\n\nfunction setContent(data) {\n var selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n data = text.html2text(data);\n this.appendChild(this.ownerDocument.createTextNode(data));\n bubble.bubbling(this);\n cursor.restore(this);\n}\n\nfunction addBubble(bubbleText, dataAttributes) {\n const nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n if (!nodeBubble) {\n return false;\n }\n\n if (text.text2bubble(this, nodeBubble)) {\n this.fireInput();\n this.fireChange();\n cursor.restore(this);\n return true;\n }\n\n return false;\n}\n\nfunction removeBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n this.removeChild(nodeBubble);\n this.fireChange();\n return true;\n }\n\n return false;\n}\n\nfunction editBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n return bubble.edit(this, nodeBubble);\n }\n\n return false;\n}\n\nfunction inputValue() {\n const textRange = text.currentTextRange(this);\n return textRange && text.textClean(textRange.toString()) || '';\n}\n\n/**\n * Генерация события редактирования бабла.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireEdit\n * @param {HTMLElement} nodeBubble нода бабл\n * @this HTMLElement\n * @private\n */\nfunction fireEdit(nodeBubble) {\n events.dispatch(this, EV.BUBBLE_EDIT, {\n bubbles: false,\n cancelable: false,\n detail: { data: nodeBubble }\n });\n}\n\n/**\n * Генерация события изменения набора баблов.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireChange\n * @this HTMLElement\n * @private\n */\nfunction fireChange() {\n events.dispatch(this, EV.CHANGE, {\n bubbles: false,\n cancelable: false\n });\n}\n\n/**\n * Генерация события ввода текста.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireInput\n * @this HTMLElement\n * @private\n */\nfunction fireInput() {\n const editText = inputValue.call(this);\n\n if (this[ PROPS.BUBBLE_VALUE ] !== editText) {\n this[ PROPS.BUBBLE_VALUE ] = editText;\n\n events.dispatch(this, EV.BUBBLE_INPUT, {\n bubbles: false,\n cancelable: false,\n detail: { data: editText }\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor.js\n **/","/**\n * @module x-bubbles/cursor\n */\n\nconst context = require('../context');\nconst text = require('./text');\nconst select = require('./select');\n\nexports.restore = restore;\nexports.restoreBasis = restoreBasis;\n\n/**\n * Reset the cursor position to the end of the input field.\n * @alias module:x-bubbles/cursor.restore\n * @param {HTMLElement} nodeSet\n */\nfunction restore(nodeSet) {\n select.clear(nodeSet);\n const basis = restoreBasis(nodeSet);\n const selection = context.getSelection();\n selection.removeAllRanges();\n selection.collapse(basis, 1);\n}\n\n/**\n * The creation of the fake text at the end childNodes\n * @alias module:x-bubbles/cursor.restoreBasis\n * @param {HTMLElement} nodeSet\n * @returns {HTMLTextElement} fake text node\n */\nfunction restoreBasis(nodeSet) {\n let fakeText = text.createZws();\n\n if (nodeSet.hasChildNodes()) {\n const lastNode = nodeSet.childNodes[ nodeSet.childNodes.length - 1 ];\n\n if (lastNode.isEqualNode(fakeText)) {\n fakeText = lastNode;\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n return fakeText;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/cursor.js\n **/","const raf = require('raf');\nconst events = require('../events');\nconst select = require('../select');\nconst { PROPS } = require('../constant');\nconst utils = require('../utils');\n\nmodule.exports = function (event, callback = function () {}) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n return false;\n }\n\n const list = select.get(nodeEditor);\n\n if (!list.length) {\n return false;\n }\n\n const bubbleCopy = nodeEditor.options('bubbleCopy');\n const value = bubbleCopy(list);\n\n if (!value) {\n return false;\n }\n\n nodeEditor[ PROPS.LOCK_COPY ] = true;\n\n const target = nodeEditor.ownerDocument.createElement('input');\n target.value = value;\n target.style.cssText = `\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;`;\n\n nodeEditor.parentNode.appendChild(target);\n\n events.one(target, {\n keyup: () => nodeEditor.focus(),\n blur: () => {\n removeNode(target);\n raf(callback);\n }\n });\n\n target.select();\n return true;\n};\n\nfunction removeNode(node) {\n node && node.parentNode && node.parentNode.removeChild(node);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/copy.js\n **/","const raf = require('raf');\nconst context = require('../../context');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst text = require('../text');\nconst { isIE } = require('../utils');\n\nmodule.exports = function (event) {\n event.preventDefault();\n const nodeEditor = event.currentTarget;\n\n if (context.clipboardData && context.clipboardData.getData) {\n onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\n } else if (event.clipboardData) {\n const contentType = 'text/plain';\n const clipboardData = event.clipboardData;\n const data = clipboardData.getData && clipboardData.getData(contentType);\n\n if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n Array.prototype.slice.call(clipboardData.items)\n .filter(item => item.kind === 'string' && item.type === contentType)\n .some(function (item) {\n item.getAsString(function (dataText) {\n onPasteSuccess(nodeEditor, dataText);\n });\n\n return true;\n });\n }\n }\n};\n\nfunction onPasteSuccess(nodeEditor, dataText) {\n const checkBubblePaste = nodeEditor.options('checkBubblePaste');\n const selection = context.getSelection();\n const isBubbling = do {\n if (dataText && selection.isCollapsed && !nodeEditor.inputValue) {\n checkBubblePaste(dataText);\n\n } else {\n false;\n }\n };\n\n if (text.replaceString(dataText, selection)) {\n if (isBubbling) {\n if (isIE) {\n raf(() => onReplaceSuccess(nodeEditor));\n\n } else {\n onReplaceSuccess(nodeEditor);\n }\n\n } else {\n nodeEditor.fireInput();\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction onReplaceSuccess(nodeEditor) {\n bubble.bubbling(nodeEditor);\n nodeEditor.focus();\n raf(() => cursor.restore(nodeEditor));\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/paste.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Backspace.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowLeft(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleLeft(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/backspace.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Delete.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowRight(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleRight(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/delete.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/x-bubbles.js b/dist/x-bubbles.js index bae239c..8643a02 100644 --- a/dist/x-bubbles.js +++ b/dist/x-bubbles.js @@ -205,7 +205,7 @@ var XBubbles = return null; case 'object': - if (value instanceof context.RegExp) { + if (value instanceof context.RegExp || value === null) { return value; } } diff --git a/dist/x-bubbles.min.js b/dist/x-bubbles.min.js index baa3bd6..1761caf 100644 --- a/dist/x-bubbles.min.js +++ b/dist/x-bubbles.min.js @@ -1,3 +1,3 @@ -var XBubbles=function(e){function t(u){if(n[u])return n[u].exports;var r=n[u]={exports:{},id:u,loaded:!1};return e[u].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function u(e){for(var t in g){var n=s(g[t],2),u=n[0],r=n[1];e[t]=h[u](e[t]),"undefined"==typeof e[t]&&(e[t]=r)}}function r(e){e.editor||Object.defineProperty(e,"editor",{configurable:!0,value:d.init(e)})}function o(e){e.editor&&(d.destroy(e),delete e.editor)}function i(e){return e.map(function(e){return e.innerHTML}).join(", ")}function a(){return!0}var s=function(){function e(e,t){var n=[],u=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(u=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);u=!0);}catch(s){r=!0,o=s}finally{try{!u&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=n(1),f=n(2),d=n(19),p=n(5),b=n(7),g={begining:["reg",null,"begining"],bubbleCopy:["func",i,"bubble-copy"],bubbleDeformation:["func",function(){},"bubble-deformation"],bubbleFormation:["func",function(){},"bubble-formation"],checkBubblePaste:["func",a,"check-bubble-paste"],classBubble:["str","bubble","class-bubble"],disableControls:["bool",!1,"disable-controls"],draggable:["bool",!0,"draggable"],ending:["reg",null,"ending"],separator:["reg",/[,;]/,"separator"],tokenizer:["func",null,"tokenizer"]},v=Object.create(HTMLDivElement.prototype,{createdCallback:{value:function(){r(this)}},attachedCallback:{value:function(){r(this),f.init(this),p.bubbling(this)}},detachedCallback:{value:function(){f.destroy(this),o(this)}},options:{value:function(e,t){if(!this._options){this._options={};for(var n in g){this._options[n]=void 0;var r="data-"+g[n][2];this.hasAttribute(r)&&(this._options[n]=this.getAttribute(r))}u(this._options)}return"undefined"==typeof t?this._options[e]:(this._options[e]=t,void u(this._options))}},items:{get:function(){return b.getBubbles(this)}},inputValue:{get:function(){return this.editor.inputValue()}},setContent:{value:function(e){return this.editor.setContent(e)}},addBubble:{value:function(e,t){return this.editor.addBubble(e,t)}},removeBubble:{value:function(e){return this.editor.removeBubble(e)}},editBubble:{value:function(e){return this.editor.editBubble(e)}}});e.exports=c.document.registerElement("x-bubbles",{"extends":"div",prototype:v});var h={func:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return new Function("context","return context."+e+";")(c);case"function":return e}},bool:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return"true"===e||"on"===e;case"boolean":return e}},noop:function(e){return e},reg:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":if(e){var n=e.match(/\/(.+)\/([gimy]{0,3})/i);if(n)return new RegExp(n[1],n[2])}return null;case"object":if(e instanceof c.RegExp)return e}},str:function(e){if("undefined"!=typeof e)return e?String(e):""}}},function(e,t){"use strict";e.exports=function(){return this||(0,eval)("this")}()},function(e,t,n){"use strict";var u=n(3),r=n(17),o=n(8),i=o.canUseDrag;t.init=function(e){return i?u.init(e):r.init(e)},t.destroy=function(e){return i?u.destroy(e):r.destroy(e)}},function(e,t,n){"use strict";function u(e){e.stopPropagation();var t=f.closestNodeSet(e.target),n=f.closestNodeBubble(e.target);if(!t||!n)return void e.preventDefault();var u=l.getSelection();u&&u.removeAllRanges(),E=t,t.classList.add(b.DRAGSTART),c.add(n),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain","");var r=c.get(E);r.length>1&&e.dataTransfer.setDragImage(v(),A.w,A.h)}function r(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);if(t&&t!==E){var n=c.get(E);n.length&&(n.forEach(function(e){return t.appendChild(e)}),l.setTimeout(h,0,E,t))}}}function o(e){e.stopPropagation(),e.preventDefault(),E&&(e.dataTransfer.dropEffect="move")}function i(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.add(b.DROPZONE)}}function a(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE)}}function s(e){if(e.stopPropagation(),e.preventDefault(),E){E.classList.remove(b.DRAGSTART);var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE),E=null}}var l=n(1),c=n(4),f=n(7),d=n(12),p=n(14),b=p.CLS,g=n(15),v=g.getDragImage,h=g.onDropSuccess,A=g.DRAG_IMG,F={dragend:s,dragenter:i,dragleave:a,dragover:o,dragstart:u,drop:r},E=null;t.init=function(e){d.on(e,F)},t.destroy=function(e){d.off(e,F)}},function(e,t,n){"use strict";function u(e){if(h.isBubbleNode(e)){var t=e.parentNode,n=s(t);if(!n.length)return void f(e);l(t);var u=n[0],r=n[n.length-1];u!==r&&t.startRangeSelect||(t.startRangeSelect=u);var o=void 0,i=void 0,a=e.compareDocumentPosition(t.startRangeSelect);if(a&Node.DOCUMENT_POSITION_PRECEDING?(o=t.startRangeSelect,i=e):(o=e,i=t.startRangeSelect),o&&i){for(var c=o;c&&b(c)&&c!==i;)c=c.nextSibling;h.bubbling(t)}}}function r(e){F.call(e.querySelectorAll(C)).forEach(function(e){return b(e)}),e.startRangeSelect=e.querySelector(E),h.bubbling(e);var t=v.getSelection();t&&t.removeAllRanges()}function o(e){return Boolean(e.querySelector(E))}function i(e){return s(e)[0]}function a(e){var t=s(e);return t[t.length-1]}function s(e){return F.call(e.querySelectorAll(E))}function l(e){s(e).forEach(function(e){return e.removeAttribute("selected")})}function c(e){if(b(e)){var t=A.closestNodeSet(e);return t.startRangeSelect=e,h.bubbling(t),!0}return!1}function f(e){if(!h.isBubbleNode(e))return!1;var t=A.closestNodeSet(e),n=v.getSelection();return n&&n.removeAllRanges(),l(t),c(e)}function d(e){if(p(e)){var t=A.closestNodeSet(e);if(1===s(t).length)return g(e)}return f(e)}function p(e){return h.isBubbleNode(e)&&e.hasAttribute("selected")||!1}function b(e){return!!h.isBubbleNode(e)&&(e.setAttribute("selected",""),!0)}function g(e){return!!h.isBubbleNode(e)&&(e.removeAttribute("selected"),!0)}var v=n(1),h=n(5),A=n(7),F=Array.prototype.slice,E="[bubble][selected]",C="[bubble]:not([selected])";t.all=r,t.add=c,t.clear=l,t.get=s,t.uniq=f,t.head=i,t.last=a,t.has=o,t.range=u,t.toggleUniq=d},function(e,t,n){"use strict";function u(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&e.hasAttribute("bubble")}function r(e,t){if(t.hasAttribute("readonly"))return!1;var n=d.getSelection();if(!n)return!1;var u=e.options("bubbleDeformation"),r=u(t);if(!r){var o=p.textClean(t.innerText);r={text:o,startOffset:0,endOffset:o.length}}var i=p.createZws(),a=d.document.createTextNode(r.text);e.fireEdit(t),e.replaceChild(a,t),e.insertBefore(i,a);var s=d.document.createRange();return s.setStart(a,r.startOffset),s.setEnd(a,r.endOffset),n.removeAllRanges(),n.addRange(s),!0}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t=p.textClean(t)){var u=e.options("bubbleFormation"),r=e.options("classBubble"),o=v&&e.options("draggable"),i=e.ownerDocument.createElement("span");i.innerText=t;for(var a in n)n[a]&&i.setAttribute("data-"+a,g(n[a]));if(u(i),r)for(var s=String(r).trim().split(/\s+/),l=s.length;l--;)i.classList.add(s[l]);return i.setAttribute("bubble",""),i.setAttribute("contenteditable","false"),o&&i.setAttribute("draggable","true"),i}}function i(e){var t=e.options("begining"),n=e.options("ending"),u=e.options("separator"),r=e.options("tokenizer"),i=a(e),b=[];return i.forEach(function(i){var a=p.textClean(i.toString());if(!a)return void i.deleteContents();var g=[a];if(r?g=r(a):(u&&(g=a.split(u).map(s).filter(l)),n?g=g.reduce(function(e,t){return e.concat(c(t,n))},[]).map(s).filter(l):t&&(g=g.reduce(function(e,n){return e.concat(f(n,t))},[]).map(s).filter(l))),!Array.isArray(g)||!g.length)return void i.deleteContents();var v=d.document.createDocumentFragment();g.forEach(function(t){var n=o(e,t);n&&(v.appendChild(n),b.push(n))}),i.deleteContents(),i.insertNode(v)}),e.fireInput(),b.length&&e.fireChange(),b}function a(e){for(var t=[],n=e.childNodes,r=void 0,o=void 0,i=0;ic)s=s.nextSibling,l=0;else{var f=s.nodeValue.substring(l,l+1);if(!p(f))break;l+=1}}if(!s)return!1;if(t){var d=Boolean(e.extend);if(d)e.extend(s,l+1);else{var b=v.document.createRange();a?(b.setStart(s,l+1),b.setEnd(r,i)):(b.setStart(u,o),b.setEnd(s,l+1)),e.removeAllRanges(),e.addRange(b)}}else e.collapse(s,l+1);return!0}function c(e){if(!e)return"";var t=v.document.implementation.createHTMLDocument("").body;return t.innerText=e,t.innerText.replace(/^[\u0020\u00a0]+$/gm,"").replace(/\n/gm," ").trim()}function f(e,t){e=e||v.getSelection();var n=e&&e.anchorNode;if(!n||n.nodeType!==Node.TEXT_NODE)return!1;for(var u=void 0,r=void 0,o=n;o&&o.nodeType===Node.TEXT_NODE;)u=o,o=o.previousSibling;for(o=n;o&&o.nodeType===Node.TEXT_NODE;)r=o,o=o.nextSibling;var i=h.hasBubbles(t),a=v.document.createRange();a.setStartBefore(u),a.setEndAfter(r);var s=b(a.toString());return!(!s&&(s||i))&&(s||a.collapse(),e.removeAllRanges(),e.addRange(a),!0)}function d(){return v.document.createTextNode(D)}function p(e){return C.test(e)}function b(e){return String(e||"").trim().replace(E,"")}function g(e){var t=e.anchorNode,n=e.focusNode,u=e.anchorOffset,r=e.focusOffset,o=!1;if(t===n)u=Math.min(e.anchorOffset,e.focusOffset),r=Math.max(e.anchorOffset,e.focusOffset),o=e.anchorOffset>e.focusOffset;else{var i=e.anchorNode.compareDocumentPosition(e.focusNode);i&Node.DOCUMENT_POSITION_PRECEDING&&(t=e.focusNode,u=e.focusOffset,n=e.anchorNode,r=e.anchorOffset,o=!0)}return{startNode:t,endNode:n,startOffset:u,endOffset:r,revert:o}}var v=n(1),h=n(7),A=n(8),F=A.getSelection,E=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u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\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,C=/\u200B/,D="​";t.arrowRight=l,t.arrowLeft=s,t.remove=o,t.html2text=c,t.currentTextRange=r,t.text2bubble=u,t.replaceString=a,t.selectAll=f,t.textClean=b,t.checkZws=p,t.createZws=d},function(e,t,n){"use strict";function u(e){return e.querySelector("[bubble]:last-child")}function r(e){return e.querySelector("[bubble]:first-child")}function o(e){return Array.prototype.slice.call(e.querySelectorAll("[bubble]"))}function i(e){return Boolean(e.querySelector("[bubble]"))}function a(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.previousSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.previousSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.previousSibling}}}function s(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.nextSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.nextSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.nextSibling}}}function l(e){for(;e;){if(p(e))return e;e=e.parentNode}}function c(e){for(;e;){if(b.isBubbleNode(e))return e;if(p(e))return;e=e.parentNode}}function f(e){for(var t=e&&e.previousSibling;t;){if(b.isBubbleNode(t))return t;t=t.previousSibling}}function d(e){for(var t=e&&e.nextSibling;t;){if(b.isBubbleNode(t))return t;t=t.nextSibling}}function p(e){return e.nodeType===Node.ELEMENT_NODE&&"x-bubbles"===e.getAttribute("is")}var b=n(5),g=n(6);t.closestNodeBubble=c,t.closestNodeSet=l,t.findBubbleLeft=a,t.findBubbleRight=s,t.getBubbles=o,t.hasBubbles=i,t.headBubble=r,t.lastBubble=u,t.nextBubble=d,t.prevBubble=f},function(e,t,n){"use strict";function u(e){return s[e]}function r(e){return a[e]}var o=n(9),i=n(1),a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},s={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},l=/&(?:amp|lt|gt|quot|#39|#96);/g,c=/[&<>"'`]/g,f=RegExp(l.source),d=RegExp(c.source),p=/Trident|Edge/;t.getSelection=function(e){var t=i.getSelection();if(t&&t.anchorNode&&e.compareDocumentPosition(t.anchorNode)&Node.DOCUMENT_POSITION_CONTAINED_BY)return t},t.throttle=function(e,t){var n=0,u=function(){n=0};return function(){n||(n=o(u),e.apply(t||this,arguments))}},t.escape=function(e){return e=String(e),e&&d.test(e)?e.replace(c,r):e},t.unescape=function(e){return e=String(e),e&&f.test(e)?e.replace(l,u):e},t.canUseDrag=function(){return!p.test(i.navigator.userAgent)}(),t.isIE=function(){return p.test(i.navigator.userAgent)}()},function(e,t,n){(function(t){for(var u=n(10),r="undefined"==typeof window?t:window,o=["moz","webkit"],i="AnimationFrame",a=r["request"+i],s=r["cancel"+i]||r["cancelRequest"+i],l=0;!a&&l1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};e.dispatchEvent(new c(t,n))}function a(e,t,n){return function u(r){e.removeEventListener(t,u),n(r)}}var s=n(1),l=n(13);t.scrollX=r,t.scrollY=o,t.dispatch=i,t.keyCode=function(e){return e.charCode||e.keyCode},t.metaKey=function(e){return e.ctrlKey||e.metaKey},t.pageX=function(e){return null===e.pageX&&null!==e.clientX?e.clientX+r():e.pageX},t.pageY=function(e){return null===e.pageY&&null!==e.clientY?e.clientY+o():e.pageY},t.one=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,a(e,o,r[o]))},t.on=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,r[o])},t.off=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.removeEventListener(o,r[o])},t.prevent=function(e){return e.cancelBubble=!0,e.returnValue=!1,e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),!1};var c=function(){return"function"==typeof s.CustomEvent?s.CustomEvent:l}()},function(e,t,n){"use strict";var u=n(1),r=u.document,o=u.Event.prototype,i=!1;try{i=Boolean(r.createEvent("CustomEvent"))}catch(a){}var s=o.stopImmediatePropagation;o.stopImmediatePropagation=function(){this.immediatePropagationStopped=!0,s?s.call(this):this.stopPropagation()};var l=function(){return i?function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("CustomEvent");return o.initCustomEvent(e,n,u,t.detail),o}:function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("Event");return o.initEvent(e,n,u),o.detail=t.detail,o}}();l.prototype=o,e.exports=l},function(e,t){"use strict";t.KEY={a:65,Backspace:8,Bottom:40,c:67,Cmd:91,Comma:44,Delete:46,Enter:13,Esc:27,Left:37,Right:39,Semicolon:59,Space:32,Tab:9,Top:38,x:88},t.CLS={DRAGSTART:"drag",DROPZONE:"dropzone"},t.EV={BUBBLE_EDIT:"bubble-edit",BUBBLE_INPUT:"bubble-input",CHANGE:"change",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGLEAVE:"dragleave",DRAGSTART:"dragstart",DROP:"drop"},t.PROPS={BUBBLE_VALUE:"_bubbleValue",CLICK_TIME:"_clickTime",LOCK_COPY:"_lockCopy"}},function(e,t,n){"use strict";var u={w:16,h:16},r=null;t.DRAG_IMG=u,t.getDragImage=function(){return r||(r=new Image,r.src=n(16)),r},t.onDropSuccess=function(e,t){e.fireChange(),t.focus(),t.fireChange()}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function u(e){var t=f.closestNodeBubble(e.target);if(t){var n=f.closestNodeSet(e.target);if(n){e.preventDefault(),n.focus();var u=n.__drag__={onMouseup:r.bind(this,n),onMousemove:l.throttle(o.bind(this,n)),onScroll:l.throttle(i.bind(this,n)),nodeOffsetX:e.offsetX,nodeOffsetY:e.offsetY,x:0,y:0};E=null,C=null,D=null,s.one(document,"mouseup",u.onMouseup),s.on(document,"mousemove",u.onMousemove),s.on(document,"scroll",u.onScroll)}}}function r(e,t){var n=e.__drag__;if(n){if(s.off(document,"mousemove",n.onMousemove),s.off(document,"scroll",n.onScroll),delete e.__drag__,D&&(D.parentNode&&D.parentNode.removeChild(D),D=null),C){var u=C;C=null,u.classList.remove(b.DROPZONE),s.dispatch(u,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}E&&!function(){var e=f.closestNodeSet(t.target);if(e&&e!==E){var n=c.get(E);n.length&&(n.forEach(function(t){return e.appendChild(t)}),a.setTimeout(A,0,E,e))}var u=E;E=null,u.classList.remove(b.DRAGSTART),s.dispatch(u,g.DROP,{bubbles:!1,cancelable:!1}),s.dispatch(u,g.DRAGEND,{bubbles:!1,cancelable:!1})}()}}function o(e,t){var n=e.__drag__;if(n){if(!E){var u=a.getSelection();u&&u.removeAllRanges(),E=e,E.classList.add(b.DRAGSTART);var r=f.closestNodeBubble(t.target),o=void 0;r&&(c.add(r),1===c.get(E).length&&(o=r.cloneNode(!0))),o||(o=h(),n.nodeOffsetX=F.w,n.nodeOffsetY=F.h),D=document.body.appendChild(document.createElement("div")),D.style.cssText="position:absolute;z-index:9999;pointer-events:none;top:0;left:0;",D.appendChild(o),s.dispatch(E,g.DRAGSTART,{bubbles:!1,cancelable:!1})}n.x=t.clientX,n.y=t.clientY,i(e);var l=f.closestNodeSet(t.target);if(l&&l!==E)C&&C!==l?(C.classList.remove(b.DROPZONE),l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1})):C||(l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1}));else if(C){var d=C;C=null,d.classList.remove(b.DROPZONE),s.dispatch(d,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}}}function i(e){var t=e.__drag__;if(t&&D){var n=t.x-t.nodeOffsetX+s.scrollX(),u=t.y-t.nodeOffsetY+s.scrollY();d.csstransforms3d?D.style.transform="translate3d("+n+"px, "+u+"px, 0px)":d.csstransforms?D.style.transform="translate("+n+"px, "+u+"px)":(D.style.top=u+"px",D.style.left=n+"px")}}var a=n(1),s=n(12),l=n(8),c=n(4),f=n(7),d=n(18),p=n(14),b=p.CLS,g=p.EV,v=n(15),h=v.getDragImage,A=v.onDropSuccess,F=v.DRAG_IMG,E=null,C=null,D=null;t.init=function(e){s.on(e,"mousedown",u)},t.destroy=function(e){s.off(e,"mousedown",u)}},function(e,t){!function(t){!function(e,t,n){function u(e,t){return typeof e===t}function r(){var e,t,n,r,o,i,a;for(var s in h)if(h.hasOwnProperty(s)){if(e=[],t=h[s],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n1&&e.dataTransfer.setDragImage(v(),A.w,A.h)}function r(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);if(t&&t!==E){var n=c.get(E);n.length&&(n.forEach(function(e){return t.appendChild(e)}),l.setTimeout(h,0,E,t))}}}function o(e){e.stopPropagation(),e.preventDefault(),E&&(e.dataTransfer.dropEffect="move")}function i(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.add(b.DROPZONE)}}function a(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE)}}function s(e){if(e.stopPropagation(),e.preventDefault(),E){E.classList.remove(b.DRAGSTART);var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE),E=null}}var l=n(1),c=n(4),f=n(7),d=n(12),p=n(14),b=p.CLS,g=n(15),v=g.getDragImage,h=g.onDropSuccess,A=g.DRAG_IMG,F={dragend:s,dragenter:i,dragleave:a,dragover:o,dragstart:u,drop:r},E=null;t.init=function(e){d.on(e,F)},t.destroy=function(e){d.off(e,F)}},function(e,t,n){"use strict";function u(e){if(h.isBubbleNode(e)){var t=e.parentNode,n=s(t);if(!n.length)return void f(e);l(t);var u=n[0],r=n[n.length-1];u!==r&&t.startRangeSelect||(t.startRangeSelect=u);var o=void 0,i=void 0,a=e.compareDocumentPosition(t.startRangeSelect);if(a&Node.DOCUMENT_POSITION_PRECEDING?(o=t.startRangeSelect,i=e):(o=e,i=t.startRangeSelect),o&&i){for(var c=o;c&&b(c)&&c!==i;)c=c.nextSibling;h.bubbling(t)}}}function r(e){F.call(e.querySelectorAll(C)).forEach(function(e){return b(e)}),e.startRangeSelect=e.querySelector(E),h.bubbling(e);var t=v.getSelection();t&&t.removeAllRanges()}function o(e){return Boolean(e.querySelector(E))}function i(e){return s(e)[0]}function a(e){var t=s(e);return t[t.length-1]}function s(e){return F.call(e.querySelectorAll(E))}function l(e){s(e).forEach(function(e){return e.removeAttribute("selected")})}function c(e){if(b(e)){var t=A.closestNodeSet(e);return t.startRangeSelect=e,h.bubbling(t),!0}return!1}function f(e){if(!h.isBubbleNode(e))return!1;var t=A.closestNodeSet(e),n=v.getSelection();return n&&n.removeAllRanges(),l(t),c(e)}function d(e){if(p(e)){var t=A.closestNodeSet(e);if(1===s(t).length)return g(e)}return f(e)}function p(e){return h.isBubbleNode(e)&&e.hasAttribute("selected")||!1}function b(e){return!!h.isBubbleNode(e)&&(e.setAttribute("selected",""),!0)}function g(e){return!!h.isBubbleNode(e)&&(e.removeAttribute("selected"),!0)}var v=n(1),h=n(5),A=n(7),F=Array.prototype.slice,E="[bubble][selected]",C="[bubble]:not([selected])";t.all=r,t.add=c,t.clear=l,t.get=s,t.uniq=f,t.head=i,t.last=a,t.has=o,t.range=u,t.toggleUniq=d},function(e,t,n){"use strict";function u(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&e.hasAttribute("bubble")}function r(e,t){if(t.hasAttribute("readonly"))return!1;var n=d.getSelection();if(!n)return!1;var u=e.options("bubbleDeformation"),r=u(t);if(!r){var o=p.textClean(t.innerText);r={text:o,startOffset:0,endOffset:o.length}}var i=p.createZws(),a=d.document.createTextNode(r.text);e.fireEdit(t),e.replaceChild(a,t),e.insertBefore(i,a);var s=d.document.createRange();return s.setStart(a,r.startOffset),s.setEnd(a,r.endOffset),n.removeAllRanges(),n.addRange(s),!0}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t=p.textClean(t)){var u=e.options("bubbleFormation"),r=e.options("classBubble"),o=v&&e.options("draggable"),i=e.ownerDocument.createElement("span");i.innerText=t;for(var a in n)n[a]&&i.setAttribute("data-"+a,g(n[a]));if(u(i),r)for(var s=String(r).trim().split(/\s+/),l=s.length;l--;)i.classList.add(s[l]);return i.setAttribute("bubble",""),i.setAttribute("contenteditable","false"),o&&i.setAttribute("draggable","true"),i}}function i(e){var t=e.options("begining"),n=e.options("ending"),u=e.options("separator"),r=e.options("tokenizer"),i=a(e),b=[];return i.forEach(function(i){var a=p.textClean(i.toString());if(!a)return void i.deleteContents();var g=[a];if(r?g=r(a):(u&&(g=a.split(u).map(s).filter(l)),n?g=g.reduce(function(e,t){return e.concat(c(t,n))},[]).map(s).filter(l):t&&(g=g.reduce(function(e,n){return e.concat(f(n,t))},[]).map(s).filter(l))),!Array.isArray(g)||!g.length)return void i.deleteContents();var v=d.document.createDocumentFragment();g.forEach(function(t){var n=o(e,t);n&&(v.appendChild(n),b.push(n))}),i.deleteContents(),i.insertNode(v)}),e.fireInput(),b.length&&e.fireChange(),b}function a(e){for(var t=[],n=e.childNodes,r=void 0,o=void 0,i=0;ic)s=s.nextSibling,l=0;else{var f=s.nodeValue.substring(l,l+1);if(!p(f))break;l+=1}}if(!s)return!1;if(t){var d=Boolean(e.extend);if(d)e.extend(s,l+1);else{var b=v.document.createRange();a?(b.setStart(s,l+1),b.setEnd(r,i)):(b.setStart(u,o),b.setEnd(s,l+1)),e.removeAllRanges(),e.addRange(b)}}else e.collapse(s,l+1);return!0}function c(e){if(!e)return"";var t=v.document.implementation.createHTMLDocument("").body;return t.innerText=e,t.innerText.replace(/^[\u0020\u00a0]+$/gm,"").replace(/\n/gm," ").trim()}function f(e,t){e=e||v.getSelection();var n=e&&e.anchorNode;if(!n||n.nodeType!==Node.TEXT_NODE)return!1;for(var u=void 0,r=void 0,o=n;o&&o.nodeType===Node.TEXT_NODE;)u=o,o=o.previousSibling;for(o=n;o&&o.nodeType===Node.TEXT_NODE;)r=o,o=o.nextSibling;var i=h.hasBubbles(t),a=v.document.createRange();a.setStartBefore(u),a.setEndAfter(r);var s=b(a.toString());return!(!s&&(s||i))&&(s||a.collapse(),e.removeAllRanges(),e.addRange(a),!0)}function d(){return v.document.createTextNode(D)}function p(e){return C.test(e)}function b(e){return String(e||"").trim().replace(E,"")}function g(e){var t=e.anchorNode,n=e.focusNode,u=e.anchorOffset,r=e.focusOffset,o=!1;if(t===n)u=Math.min(e.anchorOffset,e.focusOffset),r=Math.max(e.anchorOffset,e.focusOffset),o=e.anchorOffset>e.focusOffset;else{var i=e.anchorNode.compareDocumentPosition(e.focusNode);i&Node.DOCUMENT_POSITION_PRECEDING&&(t=e.focusNode,u=e.focusOffset,n=e.anchorNode,r=e.anchorOffset,o=!0)}return{startNode:t,endNode:n,startOffset:u,endOffset:r,revert:o}}var v=n(1),h=n(7),A=n(8),F=A.getSelection,E=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,C=/\u200B/,D="​";t.arrowRight=l,t.arrowLeft=s,t.remove=o,t.html2text=c,t.currentTextRange=r,t.text2bubble=u,t.replaceString=a,t.selectAll=f,t.textClean=b,t.checkZws=p,t.createZws=d},function(e,t,n){"use strict";function u(e){return e.querySelector("[bubble]:last-child")}function r(e){return e.querySelector("[bubble]:first-child")}function o(e){return Array.prototype.slice.call(e.querySelectorAll("[bubble]"))}function i(e){return Boolean(e.querySelector("[bubble]"))}function a(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.previousSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.previousSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.previousSibling}}}function s(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.nextSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.nextSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.nextSibling}}}function l(e){for(;e;){if(p(e))return e;e=e.parentNode}}function c(e){for(;e;){if(b.isBubbleNode(e))return e;if(p(e))return;e=e.parentNode}}function f(e){for(var t=e&&e.previousSibling;t;){if(b.isBubbleNode(t))return t;t=t.previousSibling}}function d(e){for(var t=e&&e.nextSibling;t;){if(b.isBubbleNode(t))return t;t=t.nextSibling}}function p(e){return e.nodeType===Node.ELEMENT_NODE&&"x-bubbles"===e.getAttribute("is")}var b=n(5),g=n(6);t.closestNodeBubble=c,t.closestNodeSet=l,t.findBubbleLeft=a,t.findBubbleRight=s,t.getBubbles=o,t.hasBubbles=i,t.headBubble=r,t.lastBubble=u,t.nextBubble=d,t.prevBubble=f},function(e,t,n){"use strict";function u(e){return s[e]}function r(e){return a[e]}var o=n(9),i=n(1),a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},s={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},l=/&(?:amp|lt|gt|quot|#39|#96);/g,c=/[&<>"'`]/g,f=RegExp(l.source),d=RegExp(c.source),p=/Trident|Edge/;t.getSelection=function(e){var t=i.getSelection();if(t&&t.anchorNode&&e.compareDocumentPosition(t.anchorNode)&Node.DOCUMENT_POSITION_CONTAINED_BY)return t},t.throttle=function(e,t){var n=0,u=function(){n=0};return function(){n||(n=o(u),e.apply(t||this,arguments))}},t.escape=function(e){return e=String(e),e&&d.test(e)?e.replace(c,r):e},t.unescape=function(e){return e=String(e),e&&f.test(e)?e.replace(l,u):e},t.canUseDrag=function(){return!p.test(i.navigator.userAgent)}(),t.isIE=function(){return p.test(i.navigator.userAgent)}()},function(e,t,n){(function(t){for(var u=n(10),r="undefined"==typeof window?t:window,o=["moz","webkit"],i="AnimationFrame",a=r["request"+i],s=r["cancel"+i]||r["cancelRequest"+i],l=0;!a&&l1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};e.dispatchEvent(new c(t,n))}function a(e,t,n){return function u(r){e.removeEventListener(t,u),n(r)}}var s=n(1),l=n(13);t.scrollX=r,t.scrollY=o,t.dispatch=i,t.keyCode=function(e){return e.charCode||e.keyCode},t.metaKey=function(e){return e.ctrlKey||e.metaKey},t.pageX=function(e){return null===e.pageX&&null!==e.clientX?e.clientX+r():e.pageX},t.pageY=function(e){return null===e.pageY&&null!==e.clientY?e.clientY+o():e.pageY},t.one=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,a(e,o,r[o]))},t.on=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,r[o])},t.off=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.removeEventListener(o,r[o])},t.prevent=function(e){return e.cancelBubble=!0,e.returnValue=!1,e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),!1};var c=function(){return"function"==typeof s.CustomEvent?s.CustomEvent:l}()},function(e,t,n){"use strict";var u=n(1),r=u.document,o=u.Event.prototype,i=!1;try{i=Boolean(r.createEvent("CustomEvent"))}catch(a){}var s=o.stopImmediatePropagation;o.stopImmediatePropagation=function(){this.immediatePropagationStopped=!0,s?s.call(this):this.stopPropagation()};var l=function(){return i?function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("CustomEvent");return o.initCustomEvent(e,n,u,t.detail),o}:function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("Event");return o.initEvent(e,n,u),o.detail=t.detail,o}}();l.prototype=o,e.exports=l},function(e,t){"use strict";t.KEY={a:65,Backspace:8,Bottom:40,c:67,Cmd:91,Comma:44,Delete:46,Enter:13,Esc:27,Left:37,Right:39,Semicolon:59,Space:32,Tab:9,Top:38,x:88},t.CLS={DRAGSTART:"drag",DROPZONE:"dropzone"},t.EV={BUBBLE_EDIT:"bubble-edit",BUBBLE_INPUT:"bubble-input",CHANGE:"change",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGLEAVE:"dragleave",DRAGSTART:"dragstart",DROP:"drop"},t.PROPS={BUBBLE_VALUE:"_bubbleValue",CLICK_TIME:"_clickTime",LOCK_COPY:"_lockCopy"}},function(e,t,n){"use strict";var u={w:16,h:16},r=null;t.DRAG_IMG=u,t.getDragImage=function(){return r||(r=new Image,r.src=n(16)),r},t.onDropSuccess=function(e,t){e.fireChange(),t.focus(),t.fireChange()}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function u(e){var t=f.closestNodeBubble(e.target);if(t){var n=f.closestNodeSet(e.target);if(n){e.preventDefault(),n.focus();var u=n.__drag__={onMouseup:r.bind(this,n),onMousemove:l.throttle(o.bind(this,n)),onScroll:l.throttle(i.bind(this,n)),nodeOffsetX:e.offsetX,nodeOffsetY:e.offsetY,x:0,y:0};E=null,C=null,D=null,s.one(document,"mouseup",u.onMouseup),s.on(document,"mousemove",u.onMousemove),s.on(document,"scroll",u.onScroll)}}}function r(e,t){var n=e.__drag__;if(n){if(s.off(document,"mousemove",n.onMousemove),s.off(document,"scroll",n.onScroll),delete e.__drag__,D&&(D.parentNode&&D.parentNode.removeChild(D),D=null),C){var u=C;C=null,u.classList.remove(b.DROPZONE),s.dispatch(u,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}E&&!function(){var e=f.closestNodeSet(t.target);if(e&&e!==E){var n=c.get(E);n.length&&(n.forEach(function(t){return e.appendChild(t)}),a.setTimeout(A,0,E,e))}var u=E;E=null,u.classList.remove(b.DRAGSTART),s.dispatch(u,g.DROP,{bubbles:!1,cancelable:!1}),s.dispatch(u,g.DRAGEND,{bubbles:!1,cancelable:!1})}()}}function o(e,t){var n=e.__drag__;if(n){if(!E){var u=a.getSelection();u&&u.removeAllRanges(),E=e,E.classList.add(b.DRAGSTART);var r=f.closestNodeBubble(t.target),o=void 0;r&&(c.add(r),1===c.get(E).length&&(o=r.cloneNode(!0))),o||(o=h(),n.nodeOffsetX=F.w,n.nodeOffsetY=F.h),D=document.body.appendChild(document.createElement("div")),D.style.cssText="position:absolute;z-index:9999;pointer-events:none;top:0;left:0;",D.appendChild(o),s.dispatch(E,g.DRAGSTART,{bubbles:!1,cancelable:!1})}n.x=t.clientX,n.y=t.clientY,i(e);var l=f.closestNodeSet(t.target);if(l&&l!==E)C&&C!==l?(C.classList.remove(b.DROPZONE),l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1})):C||(l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1}));else if(C){var d=C;C=null,d.classList.remove(b.DROPZONE),s.dispatch(d,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}}}function i(e){var t=e.__drag__;if(t&&D){var n=t.x-t.nodeOffsetX+s.scrollX(),u=t.y-t.nodeOffsetY+s.scrollY();d.csstransforms3d?D.style.transform="translate3d("+n+"px, "+u+"px, 0px)":d.csstransforms?D.style.transform="translate("+n+"px, "+u+"px)":(D.style.top=u+"px",D.style.left=n+"px")}}var a=n(1),s=n(12),l=n(8),c=n(4),f=n(7),d=n(18),p=n(14),b=p.CLS,g=p.EV,v=n(15),h=v.getDragImage,A=v.onDropSuccess,F=v.DRAG_IMG,E=null,C=null,D=null;t.init=function(e){s.on(e,"mousedown",u)},t.destroy=function(e){s.off(e,"mousedown",u)}},function(e,t){!function(t){!function(e,t,n){function u(e,t){return typeof e===t}function r(){var e,t,n,r,o,i,a;for(var s in h)if(h.hasOwnProperty(s)){if(e=[],t=h[s],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n47||n===T.Space||n===T.Backspace)&&n!==T.Cmd;u&&t.fireInput()}function i(e){var t=R.keyCode(e),n=e.currentTarget;switch(t){case T.Enter:e.preventDefault(),n.options("disableControls")||f(n)||(m.bubbling(n),B.restore(n));break;case T.Space:f(n)&&e.preventDefault();break;default:var u=n.options("separator");u&&u.test(String.fromCharCode(t))&&(e.preventDefault(),m.bubbling(n),B.restore(n))}}function a(e){var t=R.keyCode(e),n=R.metaKey(e),u=e.currentTarget,r=!u.options("disableControls");switch(t){case T.Esc:e.preventDefault(),m.bubbling(u),B.restore(u);break;case T.Backspace:e.preventDefault(),P(e);break;case T.Delete:e.preventDefault(),k(e);break;case T.Left:e.preventDefault(),s(e);break;case T.Top:if(e.preventDefault(),r){var o=D.headBubble(u);o&&N.uniq(o)}break;case T.Right:e.preventDefault(),l(e);break;case T.Bottom:e.preventDefault(),r&&N.has(u)&&B.restore(u);break;case T.a:n&&(e.preventDefault(),O.selectAll(null,e.currentTarget)||N.all(u));break;case T.c:n&&_(e);break;case T.x:n&&_(e,function(){return k(e)})}}function s(e){var t=C.getSelection();if(!O.arrowLeft(t,e.shiftKey)){if(t.anchorNode&&t.anchorNode.nodeType===Node.TEXT_NODE){var n=D.prevBubble(t.anchorNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[0]===u.startRangeSelect?r[r.length-1]:r[0],i=D.prevBubble(o);i&&(e.shiftKey?N.range(i):N.uniq(i))}}function l(e){var t=C.getSelection();if(!O.arrowRight(t,e.shiftKey)){if(t.focusNode&&t.focusNode.nodeType===Node.TEXT_NODE){var n=D.nextBubble(t.focusNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[r.length-1]===u.startRangeSelect?r[0]:r[r.length-1],i=D.nextBubble(o);i?e.shiftKey?N.range(i):N.uniq(i):o&&o.nextSibling&&o.nextSibling.nodeType===Node.TEXT_NODE?(N.clear(u),t.collapse(o.nextSibling,0)):B.restore(u)}}function c(e){var t=D.closestNodeSet(e.target);if(t){var n=D.closestNodeBubble(e.target);if(n){var u=Date.now(),r=t[x.CLICK_TIME]&&u-t[x.CLICK_TIME]<200;t[x.CLICK_TIME]=u,R.metaKey(e)?N.add(n):e.shiftKey?t.startRangeSelect?N.range(n):N.uniq(n):r?m.edit(t,n):N.toggleUniq(n)}else{N.clear(t);var o=C.getSelection();o&&o.anchorNode&&o.anchorNode.nodeType===Node.TEXT_NODE||B.restore(t)}}}function f(e){var t=C.getSelection();if(!t||!t.rangeCount){var n=N.get(e);if(1===n.length)return m.edit(e,n[0])}return!1}function d(e){var t=C.getSelection();for(t&&t.removeAllRanges();this.firstChild;)this.removeChild(this.firstChild);e=O.html2text(e),this.appendChild(this.ownerDocument.createTextNode(e)),m.bubbling(this),B.restore(this)}function p(e,t){var n=m.create(this,e,t);return!!n&&(!!O.text2bubble(this,n)&&(this.fireInput(),this.fireChange(),B.restore(this),!0))}function b(e){return!!this.contains(e)&&(this.removeChild(e),this.fireChange(),!0)}function g(e){return!!this.contains(e)&&m.edit(this,e)}function v(){var e=O.currentTextRange(this);return e&&O.textClean(e.toString())||""}function h(e){R.dispatch(this,S.BUBBLE_EDIT,{bubbles:!1,cancelable:!1,detail:{data:e}})}function A(){R.dispatch(this,S.CHANGE,{bubbles:!1,cancelable:!1})}function F(){var e=v.call(this);this[x.BUBBLE_VALUE]!==e&&(this[x.BUBBLE_VALUE]=e,R.dispatch(this,S.BUBBLE_INPUT,{bubbles:!1,cancelable:!1,detail:{data:e}}))}var E=n(9),C=n(1),D=n(7),m=n(5),B=n(20),N=n(4),y=n(14),T=y.KEY,S=y.EV,x=y.PROPS,O=n(6),R=n(12),w=n(8),_=n(21),L=n(22),P=n(23),k=n(24),I={blur:u,click:c,focus:r,keydown:a,keypress:i,keyup:o,mscontrolselect:R.prevent,paste:L,resize:R.prevent,resizestart:R.prevent};t.init=function(e){var t=e;return t.setAttribute("contenteditable","true"),t.setAttribute("spellcheck","false"),t.fireChange=w.throttle(A,e),t.fireEdit=w.throttle(h,e),t.fireInput=w.throttle(F,e),R.on(t,I),{addBubble:p.bind(t),editBubble:g.bind(t),inputValue:v.bind(t),removeBubble:b.bind(t),setContent:d.bind(t)}},t.destroy=function(e){R.off(e,I)}},function(e,t,n){"use strict";function u(e){a.clear(e);var t=r(e),n=o.getSelection();n.removeAllRanges(),n.collapse(t,1)}function r(e){var t=i.createZws();if(e.hasChildNodes()){var n=e.childNodes[e.childNodes.length-1];n.isEqualNode(t)?t=n:e.appendChild(t)}else e.appendChild(t);return t}var o=n(1),i=n(6),a=n(4);t.restore=u,t.restoreBasis=r},function(e,t,n){"use strict";function u(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var r=n(9),o=n(12),i=n(4),a=n(14),s=a.PROPS,l=n(8);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=e.target,a=l.getSelection(n);if(a)return!1;var c=i.get(n);if(!c.length)return!1;var f=n.options("bubbleCopy"),d=f(c);if(!d)return!1;n[s.LOCK_COPY]=!0;var p=n.ownerDocument.createElement("input");return p.value=d,p.style.cssText="\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;",n.parentNode.appendChild(p),o.one(p,{keyup:function(){return n.focus()},blur:function(){u(p),r(t)}}),p.select(),!0}},function(e,t,n){"use strict";function u(e,t){var n=e.options("checkBubblePaste"),u=i.getSelection(),a=!(!t||!u.isCollapsed||e.inputValue)&&n(t);return!!l.replaceString(t,u)&&(a?f?o(function(){return r(e)}):r(e):e.fireInput(),!0)}function r(e){a.bubbling(e),e.focus(),o(function(){return s.restore(e)})}var o=n(9),i=n(1),a=n(5),s=n(20),l=n(6),c=n(8),f=c.isIE;e.exports=function(e){e.preventDefault();var t=e.currentTarget;i.clipboardData&&i.clipboardData.getData?u(t,i.clipboardData.getData("Text")):e.clipboardData&&!function(){var n="text/plain",r=e.clipboardData,o=r.getData&&r.getData(n);!u(t,o)&&r.items&&Array.prototype.slice.call(r.items).filter(function(e){return"string"===e.kind&&e.type===n}).some(function(e){return e.getAsString(function(e){u(t,e)}),!0})}()}},function(e,t,n){"use strict";function u(e){var t=o.get(e);if(!t.length)return!1;var n=t[0].previousSibling,u=t[t.length-1].nextSibling;return t.forEach(function(e){return e.parentNode.removeChild(e)}),s.isBubbleNode(n)?o.uniq(n):s.isBubbleNode(u)?o.uniq(u):(e.focus(),r(function(){return l.restore(e)})),e.fireChange(),!0}var r=n(9),o=n(4),i=n(6),a=n(7),s=n(5),l=n(20),c=n(8);e.exports=function(e){var t=e.target,n=c.getSelection(t);if(n)if(n.isCollapsed)if(i.arrowLeft(n,!0))i.remove(n),t.fireInput();else{var s=a.findBubbleLeft(n);s&&o.uniq(s)}else i.remove(n),t.fireInput();else u(t)||(t.focus(),r(function(){return l.restore(t)}))}},function(e,t,n){"use strict";function u(e){var t=o.get(e);if(!t.length)return!1;var n=t[0].previousSibling,u=t[t.length-1].nextSibling;return t.forEach(function(e){return e.parentNode.removeChild(e)}),s.isBubbleNode(u)?o.uniq(u):s.isBubbleNode(n)?o.uniq(n):(e.focus(),r(function(){return l.restore(e)})),e.fireChange(),!0}var r=n(9),o=n(4),i=n(6),a=n(7),s=n(5),l=n(20),c=n(8);e.exports=function(e){var t=e.target,n=c.getSelection(t);if(n)if(n.isCollapsed)if(i.arrowRight(n,!0))i.remove(n),t.fireInput();else{var s=a.findBubbleRight(n);s&&o.uniq(s)}else i.remove(n),t.fireInput();else u(t)||(t.focus(),r(function(){return l.restore(t)}))}}]); //# sourceMappingURL=x-bubbles.min.js.map \ No newline at end of file diff --git a/dist/x-bubbles.min.js.map b/dist/x-bubbles.min.js.map index ae3848c..0a4b7a8 100644 --- a/dist/x-bubbles.min.js.map +++ b/dist/x-bubbles.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///x-bubbles.min.js","webpack:///webpack/bootstrap b69a07b3119acb8c195e","webpack:///./index.js","webpack:///./context.js","webpack:///./core/drag.js","webpack:///./core/drag/native.js","webpack:///./core/select.js","webpack:///./core/bubble.js","webpack:///./core/text.js","webpack:///./core/bubbleset.js","webpack:///./core/utils.js","webpack:///../~/raf/index.js","webpack:///../~/performance-now/lib/performance-now.js","webpack:///../~/process/browser.js","webpack:///./core/events.js","webpack:///./polyfills/CustomEventCommon.js","webpack:///./core/constant.js","webpack:///./core/drag/common.js","webpack:///./core/drag/bubbles.png","webpack:///./core/drag/mouse.js","webpack:///../.modernizrrc","webpack:///./core/editor.js","webpack:///./core/cursor.js","webpack:///./core/editor/copy.js","webpack:///./core/editor/paste.js","webpack:///./core/editor/backspace.js","webpack:///./core/editor/delete.js"],"names":["XBubbles","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","optionsPrepare","options","name","OPTIONS","_OPTIONS$name","_slicedToArray","type","def","OPTIONS_PREPARE","initEditor","node","editor","Object","defineProperty","configurable","value","init","destroyEditor","destroy","bubbleCopyOption","list","map","item","innerHTML","join","checkBubblePasteOption","sliceIterator","arr","i","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","_typeof","obj","constructor","prototype","context","drag","bubble","bubbleset","begining","bubbleCopy","bubbleDeformation","bubbleFormation","checkBubblePaste","classBubble","disableControls","draggable","ending","separator","tokenizer","create","HTMLDivElement","createdCallback","this","attachedCallback","bubbling","detachedCallback","_options","optionName","attrName","hasAttribute","getAttribute","items","get","getBubbles","inputValue","setContent","data","addBubble","bubbleText","removeBubble","nodeBubble","editBubble","document","registerElement","extends","func","Function","bool","noop","reg","match","RegExp","str","String","eval","native","mouse","_require","canUseDrag","nodeSet","onDragstart","event","stopPropagation","closestNodeSet","target","closestNodeBubble","preventDefault","selection","getSelection","removeAllRanges","currentDragSet","classList","add","CLS","DRAGSTART","select","dataTransfer","effectAllowed","setData","setDragImage","getDragImage","DRAG_IMG","w","h","onDrop","forEach","appendChild","setTimeout","onDropSuccess","onDragover","dropEffect","onDragenter","DROPZONE","onDragleave","remove","onDragend","events","_require2","EVENTS","dragend","dragenter","dragleave","dragover","dragstart","drop","on","off","range","isBubbleNode","set","parentNode","uniq","clear","headList","lastList","startRangeSelect","fromNode","toNode","position","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","setSelected","nextSibling","all","slice","querySelectorAll","PATH_NOT_SELECTED","querySelector","PATH_SELECTED","has","Boolean","head","last","removeAttribute","toggleUniq","isSelected","removeSelected","setAttribute","nodeType","ELEMENT_NODE","edit","rangeParams","dataText","text","textClean","innerText","startOffset","endOffset","textFake","createZws","textNode","createTextNode","fireEdit","replaceChild","insertBefore","createRange","setStart","setEnd","addRange","dataAttributes","arguments","wrap","ownerDocument","createElement","key","escape","classes","trim","split","len","ranges","getBubbleRanges","nodes","toString","deleteContents","textParts","trimIterator","filter","nonEmptyIterator","reduce","parts","concat","parseFragmentByEnding","parseFragmentByBeginning","fragment","createDocumentFragment","textPart","insertNode","fireInput","fireChange","children","childNodes","setEndBefore","setStartBefore","setEndAfter","lastIndex","loop","exec","substring","res","index","text2bubble","nodeEditor","currentTextRange","replace","pointNode","focusNode","TEXT_NODE","anchorNode","startNode","endNode","previousSibling","rangeCount","anchor","getRangeAt","surroundContents","nodeValue","collapse","replaceString","arrowLeft","extend","_selectionCorrect","selectionCorrect","revert","isCollapsed","isNativeExtend","offset","checkZws","arrowRight","_selectionCorrect2","html2text","DOMContainer","implementation","createHTMLDocument","body","selectAll","hasBubbles","TEXT_ZWS","REG_ZWS","test","REG_REPLACE_NON_PRINTABLE","anchorOffset","focusOffset","Math","min","max","lastBubble","headBubble","findBubbleLeft","DOCUMENT_POSITION_FOLLOWING","findBubbleRight","isEditorNode","prevBubble","nextBubble","unescapeHtmlChar","chr","HTML_UNESCAPES","escapeHtmlChar","HTML_ESCAPES","raf","&","<",">","\"","'","`","&","<",">",""","'","`","REG_ESCAPED_HTML","REG_UNESCAPED_HTML","REG_HAS_ESCAPED_HTML","source","REG_HAS_UNESCAPED_HTML","REG_IE","DOCUMENT_POSITION_CONTAINED_BY","throttle","callback","runContext","animationCallback","apply","unescape","navigator","userAgent","isIE","global","now","root","window","vendors","suffix","caf","queue","frameDuration","_now","cp","cancelled","e","round","handle","fn","cancel","polyfill","requestAnimationFrame","cancelAnimationFrame","process","getNanoSeconds","hrtime","loadTime","performance","hr","Date","getTime","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","array","nextTick","args","title","browser","env","argv","version","versions","addListener","once","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","_defineProperty","enumerable","writable","scrollX","html","documentElement","scrollLeft","clientLeft","scrollY","scrollTop","clientTop","dispatch","element","params","dispatchEvent","Custom","oneCallback","eventName","_callback","removeEventListener","CustomEventCommon","keyCode","charCode","metaKey","ctrlKey","pageX","clientX","pageY","clientY","one","addEventListener","prevent","cancelBubble","returnValue","stopImmediatePropagation","CustomEvent","doc","protoEvent","Event","issetCustomEvent","createEvent","immediatePropagationStopped","bubbles","cancelable","evt","initCustomEvent","detail","initEvent","KEY","a","Backspace","Bottom","Cmd","Comma","Delete","Enter","Esc","Left","Right","Semicolon","Space","Tab","Top","x","EV","BUBBLE_EDIT","BUBBLE_INPUT","CHANGE","DRAGEND","DRAGENTER","DRAGLEAVE","DROP","PROPS","BUBBLE_VALUE","CLICK_TIME","LOCK_COPY","dragImage","Image","src","fromNodeSet","toNodeSet","focus","onMousedown","__drag__","onMouseup","bind","onMousemove","utils","onScroll","nodeOffsetX","offsetX","nodeOffsetY","offsetY","y","currentMoveSet","currentDragElement","dragSet","removeChild","_","moveElement","cloneNode","style","cssText","Modernizr","csstransforms3d","transform","csstransforms","top","left","is","testRunner","featureNames","feature","aliasIdx","result","nameIdx","featureName","featureNameSplit","featureIdx","tests","hasOwnProperty","toLowerCase","aliases","contains","substr","indexOf","isSVG","createElementNS","getBody","fake","injectElementWithStyles","rule","testnames","ret","docOverflow","mod","div","parseInt","styleSheet","background","overflow","docElement","offsetHeight","domToCSS","m1","nativeTestProps","props","CSS","supports","conditionText","getComputedStyle","cssToDOM","m2","toUpperCase","testProps","prefixed","skipValueTest","cleanElems","afterInit","mStyle","modElem","propsLength","prop","before","elems","shift","fnBind","that","testDOMProps","elem","testPropsAll","ucProp","charAt","cssomPrefixes","testAllProps","ModernizrProto","_version","_config","classPrefix","enableClasses","enableJSClass","usePrefixes","_q","cb","self","addTest","addAsyncTest","omPrefixes","_cssomPrefixes","nodeName","unshift","domPrefixes","_domPrefixes","testStyles","newSyntax","oldSyntax","usePrefix","mq","defaultStyle","offsetWidth","onBlur","currentTarget","onFocus","cursor","restore","onKeyup","code","isPrintableChar","onKeypress","editBubbleKeyboardEvent","fromCharCode","onKeydown","enable","eventBackspace","eventDelete","eventCopy","shiftKey","begin","onClick","clickTime","isDblclick","firstChild","textRange","editText","eventPaste","blur","click","keydown","keypress","keyup","mscontrolselect","paste","resize","resizestart","nodeWrap","basis","restoreBasis","fakeText","hasChildNodes","lastNode","isEqualNode","removeNode","onPasteSuccess","isBubbling","onReplaceSuccess","clipboardData","getData","contentType","kind","some","getAsString","removeBubbles"],"mappings":"AAAA,GAAIA,UACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAASI,EAAQD,EAASH,GAE/B,YEwHD,SAASW,GAAeC,GACpB,IAAK,GAAIC,KAAQC,GAAS,IAAAC,GAAAC,EACAF,EAASD,GADT,GACdI,EADcF,EAAA,GACRG,EADQH,EAAA,EAEtBH,GAASC,GAASM,EAAiBF,GAAOL,EAASC,IACpB,mBAApBD,GAASC,KAChBD,EAASC,GAASK,IAK9B,QAASE,GAAWC,GACXA,EAAKC,QACNC,OAAOC,eAAeH,EAAM,UACxBI,cAAc,EACdC,MAAOJ,EAAOK,KAAKN,KAK/B,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d,gBAWPga,GAAclZ,KACtBA,EAAWwO,QAEX/K,EAAI,iBAAMyS,GAAOC,QAAQnW,QzBquH3B,SAAShQ,EAAQD,EAASH,GAE/B,Y0BnuHD,SAASspB,GAAclZ,GACnB,GAAMrO,GAAOqG,EAAO3C,IAAI2K,EACxB,KAAKrO,EAAKqB,OACN,OAAO,CAGX,IAAMkQ,GAAavR,EAAM,GAAI8O,gBACvB0C,EAAaxR,EAAMA,EAAKqB,OAAS,GAAIgI,WAiB3C,OAfArJ,GAAK+G,QAAQ,SAAA7G,GAAA,MAAQA,GAAKsI,WAAWqV,YAAY3d,KAE7C8B,EAAOsG,aAAakJ,GACpBnL,EAAOoC,KAAK+I,GAELxP,EAAOsG,aAAaiJ,GAC3BlL,EAAOoC,KAAK8I,IAGZlD,EAAWwO,QAEX/K,EAAI,iBAAMyS,GAAOC,QAAQnW,MAG7BA,EAAWb,cACJ,EA9DX,GAAMsE,GAAM7T,EAAQ,GACdoI,EAASpI,EAAQ,GACjByM,EAAOzM,EAAQ,GACfgE,EAAYhE,EAAQ,GACpB+D,EAAS/D,EAAQ,GACjBsmB,EAAStmB,EAAQ,IACjBkf,EAAQlf,EAAQ,EAOtBI,GAAOD,QAAU,SAAUmH,GACvB,GAAM8I,GAAa9I,EAAMG,OACnBG,EAAYsX,EAAMrX,aAAauI,EAErC,IAAIxI,EACA,GAAKA,EAAU8J,YAIR,GAAIjF,EAAKqF,WAAWlK,GAAW,GAClC6E,EAAKlD,OAAO3B,GACZwI,EAAWd,gBAER,CACH,GAAMrJ,GAAajC,EAAUoP,gBAAgBxL,EAC7C3B,IAAcmC,EAAOoC,KAAKvE,OAT1BwG,GAAKlD,OAAO3B,GACZwI,EAAWd,gBAWPga,GAAclZ,KACtBA,EAAWwO,QAEX/K,EAAI,iBAAMyS,GAAOC,QAAQnW","file":"x-bubbles.min.js","sourcesContent":["var XBubbles =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _slicedToArray = function () { function sliceIterator(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\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar context = __webpack_require__(1);\n\tvar drag = __webpack_require__(2);\n\tvar editor = __webpack_require__(19);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar OPTIONS = {\n\t begining: ['reg', null, 'begining'],\n\t bubbleCopy: ['func', bubbleCopyOption, 'bubble-copy'],\n\t bubbleDeformation: ['func', function () {}, 'bubble-deformation'],\n\t bubbleFormation: ['func', function () {}, 'bubble-formation'],\n\t checkBubblePaste: ['func', checkBubblePasteOption, 'check-bubble-paste'],\n\t classBubble: ['str', 'bubble', 'class-bubble'],\n\t disableControls: ['bool', false, 'disable-controls'],\n\t draggable: ['bool', true, 'draggable'],\n\t ending: ['reg', null, 'ending'], // /\\@ya\\.ru/g;\n\t separator: ['reg', /[,;]/, 'separator'],\n\t tokenizer: ['func', null, 'tokenizer']\n\t};\n\t\n\tvar XBubbles = Object.create(HTMLDivElement.prototype, {\n\t createdCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t }\n\t },\n\t\n\t attachedCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t drag.init(this);\n\t bubble.bubbling(this);\n\t }\n\t },\n\t\n\t detachedCallback: {\n\t value: function value() {\n\t drag.destroy(this);\n\t destroyEditor(this);\n\t }\n\t },\n\t\n\t /*\n\t attributeChangedCallback: {\n\t value: function (name, prevValue, value) {}\n\t },\n\t */\n\t\n\t options: {\n\t value: function value(name, _value) {\n\t if (!this._options) {\n\t this._options = {};\n\t\n\t for (var optionName in OPTIONS) {\n\t this._options[optionName] = undefined;\n\t\n\t var attrName = 'data-' + OPTIONS[optionName][2];\n\t if (this.hasAttribute(attrName)) {\n\t this._options[optionName] = this.getAttribute(attrName);\n\t }\n\t }\n\t\n\t optionsPrepare(this._options);\n\t }\n\t\n\t if (typeof _value !== 'undefined') {\n\t this._options[name] = _value;\n\t optionsPrepare(this._options);\n\t } else {\n\t return this._options[name];\n\t }\n\t }\n\t },\n\t\n\t items: {\n\t get: function get() {\n\t return bubbleset.getBubbles(this);\n\t }\n\t },\n\t\n\t inputValue: {\n\t get: function get() {\n\t return this.editor.inputValue();\n\t }\n\t },\n\t\n\t setContent: {\n\t value: function value(data) {\n\t return this.editor.setContent(data);\n\t }\n\t },\n\t\n\t addBubble: {\n\t value: function value(bubbleText, data) {\n\t return this.editor.addBubble(bubbleText, data);\n\t }\n\t },\n\t\n\t removeBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.removeBubble(nodeBubble);\n\t }\n\t },\n\t\n\t editBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.editBubble(nodeBubble);\n\t }\n\t }\n\t});\n\t\n\tmodule.exports = context.document.registerElement('x-bubbles', {\n\t extends: 'div',\n\t prototype: XBubbles\n\t});\n\t\n\tvar OPTIONS_PREPARE = {\n\t func: function func(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return new Function('context', 'return context.' + value + ';')(context);\n\t\n\t case 'function':\n\t return value;\n\t }\n\t },\n\t bool: function bool(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return value === 'true' || value === 'on';\n\t\n\t case 'boolean':\n\t return value;\n\t }\n\t },\n\t noop: function noop(value) {\n\t return value;\n\t },\n\t reg: function reg(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t if (value) {\n\t var match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n\t if (match) {\n\t return new RegExp(match[1], match[2]);\n\t }\n\t }\n\t\n\t return null;\n\t\n\t case 'object':\n\t if (value instanceof context.RegExp) {\n\t return value;\n\t }\n\t }\n\t },\n\t str: function str(value) {\n\t if (typeof value !== 'undefined') {\n\t return value ? String(value) : '';\n\t }\n\t }\n\t};\n\t\n\tfunction optionsPrepare(options) {\n\t for (var name in OPTIONS) {\n\t var _OPTIONS$name = _slicedToArray(OPTIONS[name], 2),\n\t type = _OPTIONS$name[0],\n\t def = _OPTIONS$name[1];\n\t\n\t options[name] = OPTIONS_PREPARE[type](options[name]);\n\t if (typeof options[name] === 'undefined') {\n\t options[name] = def;\n\t }\n\t }\n\t}\n\t\n\tfunction initEditor(node) {\n\t if (!node.editor) {\n\t Object.defineProperty(node, 'editor', {\n\t configurable: true,\n\t value: editor.init(node)\n\t });\n\t }\n\t}\n\t\n\tfunction destroyEditor(node) {\n\t if (node.editor) {\n\t editor.destroy(node);\n\t delete node.editor;\n\t }\n\t}\n\t\n\tfunction bubbleCopyOption(list) {\n\t return list.map(function (item) {\n\t return item.innerHTML;\n\t }).join(', ');\n\t}\n\t\n\tfunction checkBubblePasteOption() {\n\t return true;\n\t}\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function () {\n\t /* eslint no-eval: 0 */\n\t return this || (1, eval)('this');\n\t}();\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar native = __webpack_require__(3);\n\tvar mouse = __webpack_require__(17);\n\t\n\tvar _require = __webpack_require__(8),\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.init = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.init(nodeSet);\n\t }\n\t\n\t return mouse.init(nodeSet);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.destroy(nodeSet);\n\t }\n\t\n\t return mouse.destroy(nodeSet);\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar events = __webpack_require__(12);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar EVENTS = {\n\t dragend: onDragend,\n\t dragenter: onDragenter,\n\t dragleave: onDragleave,\n\t dragover: onDragover,\n\t dragstart: onDragstart,\n\t drop: onDrop\n\t};\n\t\n\tvar currentDragSet = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, EVENTS);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, EVENTS);\n\t};\n\t\n\tfunction onDragstart(event) {\n\t event.stopPropagation();\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (!nodeSet || !nodeBubble) {\n\t event.preventDefault();\n\t return;\n\t }\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = nodeSet;\n\t nodeSet.classList.add(CLS.DRAGSTART);\n\t select.add(nodeBubble);\n\t\n\t event.dataTransfer.effectAllowed = 'move';\n\t event.dataTransfer.setData('text/plain', '');\n\t\n\t var list = select.get(currentDragSet);\n\t if (list.length > 1) {\n\t event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n\t }\n\t}\n\t\n\tfunction onDrop(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet || nodeSet === currentDragSet) {\n\t return;\n\t }\n\t\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t}\n\t\n\tfunction onDragover(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t event.dataTransfer.dropEffect = 'move';\n\t}\n\t\n\tfunction onDragenter(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragleave(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragend(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t currentDragSet.classList.remove(CLS.DRAGSTART);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t\n\t currentDragSet = null;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar slice = Array.prototype.slice;\n\tvar PATH_SELECTED = '[bubble][selected]';\n\tvar PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\t\n\texports.all = all;\n\texports.add = add;\n\texports.clear = clear;\n\texports.get = get;\n\texports.uniq = uniq;\n\texports.head = head;\n\texports.last = last;\n\texports.has = has;\n\texports.range = range;\n\texports.toggleUniq = toggleUniq;\n\t\n\tfunction range(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return;\n\t }\n\t\n\t var set = node.parentNode;\n\t var list = get(set);\n\t\n\t if (!list.length) {\n\t uniq(node);\n\t return;\n\t }\n\t\n\t clear(set);\n\t\n\t var headList = list[0];\n\t var lastList = list[list.length - 1];\n\t\n\t if (headList === lastList || !set.startRangeSelect) {\n\t set.startRangeSelect = headList;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var position = node.compareDocumentPosition(set.startRangeSelect);\n\t\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t fromNode = set.startRangeSelect;\n\t toNode = node;\n\t } else {\n\t fromNode = node;\n\t toNode = set.startRangeSelect;\n\t }\n\t\n\t if (fromNode && toNode) {\n\t var item = fromNode;\n\t\n\t while (item) {\n\t if (!setSelected(item)) {\n\t break;\n\t }\n\t\n\t if (item === toNode) {\n\t break;\n\t }\n\t\n\t item = item.nextSibling;\n\t }\n\t\n\t bubble.bubbling(set);\n\t }\n\t}\n\t\n\tfunction all(nodeSet) {\n\t slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(function (item) {\n\t return setSelected(item);\n\t });\n\t nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\t\n\t bubble.bubbling(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t}\n\t\n\tfunction has(nodeSet) {\n\t return Boolean(nodeSet.querySelector(PATH_SELECTED));\n\t}\n\t\n\tfunction head(set) {\n\t return get(set)[0];\n\t}\n\t\n\tfunction last(set) {\n\t var list = get(set);\n\t return list[list.length - 1];\n\t}\n\t\n\tfunction get(nodeSet) {\n\t return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n\t}\n\t\n\tfunction clear(nodeSet) {\n\t get(nodeSet).forEach(function (item) {\n\t return item.removeAttribute('selected');\n\t });\n\t}\n\t\n\tfunction add(node) {\n\t if (setSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t nodeSet.startRangeSelect = node;\n\t // ???\n\t bubble.bubbling(nodeSet);\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction uniq(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return false;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t var selection = context.getSelection();\n\t\n\t selection && selection.removeAllRanges();\n\t clear(nodeSet);\n\t\n\t return add(node);\n\t}\n\t\n\tfunction toggleUniq(node) {\n\t if (isSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t if (get(nodeSet).length === 1) {\n\t return removeSelected(node);\n\t }\n\t }\n\t\n\t return uniq(node);\n\t}\n\t\n\tfunction isSelected(node) {\n\t return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n\t}\n\t\n\tfunction setSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.setAttribute('selected', '');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.removeAttribute('selected');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t escape = _require.escape,\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.isBubbleNode = isBubbleNode;\n\texports.bubbling = bubbling;\n\texports.create = create;\n\texports.edit = edit;\n\t\n\tfunction isBubbleNode(node) {\n\t if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n\t return false;\n\t }\n\t\n\t return node.hasAttribute('bubble');\n\t}\n\t\n\tfunction edit(nodeSet, nodeBubble) {\n\t if (nodeBubble.hasAttribute('readonly')) {\n\t return false;\n\t }\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection) {\n\t return false;\n\t }\n\t\n\t var bubbleDeformation = nodeSet.options('bubbleDeformation');\n\t var rangeParams = bubbleDeformation(nodeBubble);\n\t\n\t if (!rangeParams) {\n\t var dataText = text.textClean(nodeBubble.innerText);\n\t\n\t rangeParams = {\n\t text: dataText,\n\t startOffset: 0,\n\t endOffset: dataText.length\n\t };\n\t }\n\t\n\t var textFake = text.createZws();\n\t var textNode = context.document.createTextNode(rangeParams.text);\n\t\n\t nodeSet.fireEdit(nodeBubble);\n\t nodeSet.replaceChild(textNode, nodeBubble);\n\t nodeSet.insertBefore(textFake, textNode);\n\t\n\t var range = context.document.createRange();\n\t range.setStart(textNode, rangeParams.startOffset);\n\t range.setEnd(textNode, rangeParams.endOffset);\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t}\n\t\n\t/**\n\t * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n\t * @param {[type]} nodeSet [description]\n\t * @param {[type]} dataText [description]\n\t * @param {Object} [dataAttributes={}] [description]\n\t * @returns {[type]} [description]\n\t */\n\tfunction create(nodeSet, dataText) {\n\t var dataAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t dataText = text.textClean(dataText);\n\t\n\t if (!dataText) {\n\t return;\n\t }\n\t\n\t var bubbleFormation = nodeSet.options('bubbleFormation');\n\t var classBubble = nodeSet.options('classBubble');\n\t var draggable = canUseDrag && nodeSet.options('draggable');\n\t var wrap = nodeSet.ownerDocument.createElement('span');\n\t\n\t wrap.innerText = dataText;\n\t\n\t for (var key in dataAttributes) {\n\t if (dataAttributes[key]) {\n\t wrap.setAttribute('data-' + key, escape(dataAttributes[key]));\n\t }\n\t }\n\t\n\t bubbleFormation(wrap);\n\t\n\t if (classBubble) {\n\t var classes = String(classBubble).trim().split(/\\s+/);\n\t var len = classes.length;\n\t\n\t while (len--) {\n\t wrap.classList.add(classes[len]);\n\t }\n\t }\n\t\n\t wrap.setAttribute('bubble', '');\n\t wrap.setAttribute('contenteditable', 'false');\n\t draggable && wrap.setAttribute('draggable', 'true');\n\t\n\t return wrap;\n\t}\n\t\n\tfunction bubbling(nodeSet) {\n\t var begining = nodeSet.options('begining');\n\t var ending = nodeSet.options('ending');\n\t var separator = nodeSet.options('separator');\n\t var tokenizer = nodeSet.options('tokenizer');\n\t var ranges = getBubbleRanges(nodeSet);\n\t var nodes = [];\n\t\n\t ranges.forEach(function (range) {\n\t var dataText = text.textClean(range.toString());\n\t\n\t if (!dataText) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var textParts = [dataText];\n\t\n\t if (tokenizer) {\n\t textParts = tokenizer(dataText);\n\t } else {\n\t if (separator) {\n\t textParts = dataText.split(separator).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t\n\t if (ending) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByEnding(str, ending));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t } else if (begining) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByBeginning(str, begining));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t }\n\t\n\t if (!Array.isArray(textParts) || !textParts.length) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var fragment = context.document.createDocumentFragment();\n\t\n\t textParts.forEach(function (textPart) {\n\t var nodeBubble = create(nodeSet, textPart);\n\t if (nodeBubble) {\n\t fragment.appendChild(nodeBubble);\n\t nodes.push(nodeBubble);\n\t }\n\t });\n\t\n\t range.deleteContents();\n\t range.insertNode(fragment);\n\t });\n\t\n\t nodeSet.fireInput();\n\t\n\t if (nodes.length) {\n\t nodeSet.fireChange();\n\t }\n\t\n\t return nodes;\n\t}\n\t\n\tfunction getBubbleRanges(nodeSet) {\n\t var ranges = [];\n\t var children = nodeSet.childNodes;\n\t var range = void 0;\n\t var node = void 0;\n\t\n\t for (var i = 0; i < children.length; i++) {\n\t node = children[i];\n\t\n\t if (isBubbleNode(node)) {\n\t if (range) {\n\t range.setEndBefore(node);\n\t ranges.push(range);\n\t range = undefined;\n\t }\n\t } else {\n\t if (!range) {\n\t range = context.document.createRange();\n\t range.setStartBefore(node);\n\t }\n\t }\n\t }\n\t\n\t if (range) {\n\t range.setEndAfter(node);\n\t ranges.push(range);\n\t }\n\t\n\t return ranges;\n\t}\n\t\n\tfunction trimIterator(str) {\n\t return str.trim();\n\t}\n\t\n\tfunction nonEmptyIterator(str) {\n\t return Boolean(str);\n\t}\n\t\n\tfunction parseFragmentByEnding(str, reg) {\n\t var parts = [];\n\t var lastIndex = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while (reg.exec(str) !== null && loop) {\n\t loop--;\n\t parts.push(str.substring(lastIndex, reg.lastIndex));\n\t lastIndex = reg.lastIndex;\n\t }\n\t\n\t return parts;\n\t}\n\t\n\tfunction parseFragmentByBeginning(str, reg) {\n\t var parts = [];\n\t var res = void 0;\n\t var index = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while ((res = reg.exec(str)) !== null && loop) {\n\t loop--;\n\t if (index !== res.index) {\n\t parts.push(str.substring(index, res.index));\n\t index = res.index;\n\t }\n\t }\n\t\n\t parts.push(str.substring(index, str.length));\n\t return parts;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar _require = __webpack_require__(8),\n\t getSelection = _require.getSelection;\n\t\n\t/* eslint-disable max-len */\n\t\n\t\n\tvar REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991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04\\u0D0D\\u0D11\\u0D3B\\u0D3C\\u0D45\\u0D49\\u0D4F-\\u0D56\\u0D58-\\u0D5F\\u0D64\\u0D65\\u0D76-\\u0D78\\u0D80\\u0D81\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DF1\\u0DF5-\\u0E00\\u0E3B-\\u0E3E\\u0E5C-\\u0E80\\u0E83\\u0E85\\u0E86\\u0E89\\u0E8B\\u0E8C\\u0E8E-\\u0E93\\u0E98\\u0EA0\\u0EA4\\u0EA6\\u0EA8\\u0EA9\\u0EAC\\u0EBA\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1A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A-\\uA9DD\\uA9E0-\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A\\uAA5B\\uAA7C-\\uAA7F\\uAAC3-\\uAADA\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F-\\uABBF\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBC2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFE\\uFDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\n\tvar REG_ZWS = /\\u200B/;\n\tvar TEXT_ZWS = '\\u200B';\n\t\n\texports.arrowRight = arrowRight;\n\texports.arrowLeft = arrowLeft;\n\texports.remove = remove;\n\texports.html2text = html2text;\n\texports.currentTextRange = currentTextRange;\n\texports.text2bubble = text2bubble;\n\texports.replaceString = replaceString;\n\texports.selectAll = selectAll;\n\texports.textClean = textClean;\n\texports.checkZws = checkZws;\n\texports.createZws = createZws;\n\t\n\tfunction text2bubble(nodeEditor, nodeBubble) {\n\t var selection = getSelection(nodeEditor);\n\t var range = selection && currentTextRange(nodeEditor, selection);\n\t\n\t if (range) {\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t replace(selection, nodeBubble);\n\t } else {\n\t nodeEditor.appendChild(nodeBubble);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction currentTextRange(nodeEditor, selection) {\n\t selection = selection || getSelection(nodeEditor);\n\t if (!selection) {\n\t return;\n\t }\n\t\n\t var pointNode = selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE ? selection.focusNode : selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE ? selection.anchorNode : undefined;\n\t\n\t if (!pointNode) {\n\t return;\n\t }\n\t\n\t var startNode = pointNode;\n\t var endNode = pointNode;\n\t var item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t startNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t endNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var range = nodeEditor.ownerDocument.createRange();\n\t range.setStartBefore(startNode);\n\t range.setEndAfter(endNode);\n\t\n\t return range;\n\t}\n\t\n\tfunction remove(selection) {\n\t return replace(selection, createZws());\n\t}\n\t\n\tfunction replace(selection, node) {\n\t if (!selection || !selection.rangeCount) {\n\t return false;\n\t }\n\t\n\t var anchor = context.document.createElement('span');\n\t selection.getRangeAt(0).surroundContents(anchor);\n\t anchor.parentNode.replaceChild(node, anchor);\n\t\n\t selection.removeAllRanges();\n\t\n\t if (node.nodeType === Node.TEXT_NODE) {\n\t var range = context.document.createRange();\n\t // для ИЕ обязательно указывать node.nodeValue.length\n\t range.setStart(node, node.nodeValue.length);\n\t range.collapse(false);\n\t selection.addRange(range);\n\t } else {\n\t selection.collapse(node, 0);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction replaceString(data, selection) {\n\t data = textClean(data);\n\t if (!data) {\n\t return false;\n\t }\n\t\n\t selection = selection || context.getSelection();\n\t var textNode = context.document.createTextNode(data);\n\t\n\t if (!replace(selection, textNode)) {\n\t return false;\n\t }\n\t\n\t selection.collapse(textNode, textNode.nodeValue.length);\n\t return true;\n\t}\n\t\n\tfunction arrowLeft(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect = selectionCorrect(selection),\n\t startNode = _selectionCorrect.startNode,\n\t endNode = _selectionCorrect.endNode,\n\t startOffset = _selectionCorrect.startOffset,\n\t endOffset = _selectionCorrect.endOffset,\n\t revert = _selectionCorrect.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(startNode, startOffset);\n\t return true;\n\t }\n\t\n\t var isNativeExtend = Boolean(selection.extend);\n\t revert = isNativeExtend ? revert : !revert;\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t if (offset === null) {\n\t offset = node.nodeValue.length;\n\t }\n\t\n\t if (offset - 1 < 0) {\n\t node = node.previousSibling;\n\t offset = null;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset - 1, offset);\n\t\n\t if (checkZws(text)) {\n\t offset = offset - 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node || offset === null) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t if (isNativeExtend) {\n\t selection.extend(node, offset - 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset - 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset - 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset - 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction arrowRight(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.focusNode || selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect2 = selectionCorrect(selection),\n\t startNode = _selectionCorrect2.startNode,\n\t endNode = _selectionCorrect2.endNode,\n\t startOffset = _selectionCorrect2.startOffset,\n\t endOffset = _selectionCorrect2.endOffset,\n\t revert = _selectionCorrect2.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(endNode, endOffset);\n\t return true;\n\t }\n\t\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var len = node.nodeValue.length;\n\t\n\t if (offset + 1 > len) {\n\t node = node.nextSibling;\n\t offset = 0;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset, offset + 1);\n\t\n\t if (checkZws(text)) {\n\t offset = offset + 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t var isNativeExtend = Boolean(selection.extend);\n\t\n\t if (isNativeExtend) {\n\t selection.extend(node, offset + 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset + 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset + 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset + 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction html2text(value) {\n\t if (!value) {\n\t return '';\n\t }\n\t\n\t var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n\t DOMContainer.innerText = value;\n\t\n\t return DOMContainer.innerText.replace(/^[\\u0020\\u00a0]+$/gm, '').replace(/\\n/gm, ' ').trim();\n\t}\n\t\n\tfunction selectAll(selection, nodeSet) {\n\t selection = selection || context.getSelection();\n\t var node = selection && selection.anchorNode;\n\t\n\t if (!node || node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t fromNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t toNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var hasBubbles = bubbleset.hasBubbles(nodeSet);\n\t var range = context.document.createRange();\n\t range.setStartBefore(fromNode);\n\t range.setEndAfter(toNode);\n\t\n\t var dataText = textClean(range.toString());\n\t\n\t if (dataText || !dataText && !hasBubbles) {\n\t if (!dataText) {\n\t range.collapse();\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction createZws() {\n\t return context.document.createTextNode(TEXT_ZWS);\n\t}\n\t\n\tfunction checkZws(value) {\n\t return REG_ZWS.test(value);\n\t}\n\t\n\tfunction textClean(value) {\n\t return String(value || '').trim().replace(REG_REPLACE_NON_PRINTABLE, '');\n\t}\n\t\n\tfunction selectionCorrect(selection) {\n\t var startNode = selection.anchorNode;\n\t var endNode = selection.focusNode;\n\t var startOffset = selection.anchorOffset;\n\t var endOffset = selection.focusOffset;\n\t var revert = false;\n\t\n\t if (startNode === endNode) {\n\t startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n\t endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n\t revert = selection.anchorOffset > selection.focusOffset;\n\t } else {\n\t var position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t startNode = selection.focusNode;\n\t startOffset = selection.focusOffset;\n\t endNode = selection.anchorNode;\n\t endOffset = selection.anchorOffset;\n\t revert = true;\n\t }\n\t }\n\t\n\t return { startNode: startNode, endNode: endNode, startOffset: startOffset, endOffset: endOffset, revert: revert };\n\t}\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bubble = __webpack_require__(5);\n\tvar text = __webpack_require__(6);\n\t\n\texports.closestNodeBubble = closestNodeBubble;\n\texports.closestNodeSet = closestNodeSet;\n\texports.findBubbleLeft = findBubbleLeft;\n\texports.findBubbleRight = findBubbleRight;\n\texports.getBubbles = getBubbles;\n\texports.hasBubbles = hasBubbles;\n\texports.headBubble = headBubble;\n\texports.lastBubble = lastBubble;\n\texports.nextBubble = nextBubble;\n\texports.prevBubble = prevBubble;\n\t\n\tfunction lastBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:last-child');\n\t}\n\t\n\tfunction headBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:first-child');\n\t}\n\t\n\tfunction getBubbles(nodeSet) {\n\t return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n\t}\n\t\n\tfunction hasBubbles(nodeSet) {\n\t return Boolean(nodeSet.querySelector('[bubble]'));\n\t}\n\t\n\tfunction findBubbleLeft(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.previousSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.previousSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction findBubbleRight(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.nextSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.nextSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction closestNodeSet(node) {\n\t while (node) {\n\t if (isEditorNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction closestNodeBubble(node) {\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (isEditorNode(node)) {\n\t return;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction prevBubble(target) {\n\t var node = target && target.previousSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction nextBubble(target) {\n\t var node = target && target.nextSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction isEditorNode(node) {\n\t return node.nodeType === Node.ELEMENT_NODE && node.getAttribute('is') === 'x-bubbles';\n\t}\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\t\n\t/* eslint quotes: 0 */\n\t\n\tvar HTML_ESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '\"': '"',\n\t \"'\": ''',\n\t '`': '`'\n\t};\n\t\n\tvar HTML_UNESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '"': '\"',\n\t ''': \"'\",\n\t '`': '`'\n\t};\n\t\n\tvar REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\n\tvar REG_UNESCAPED_HTML = /[&<>\"'`]/g;\n\tvar REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\n\tvar REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\n\tvar REG_IE = /Trident|Edge/;\n\t\n\texports.getSelection = function (nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (selection && selection.anchorNode && nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n\t return selection;\n\t }\n\t};\n\t\n\texports.throttle = function (callback, runContext) {\n\t var throttle = 0;\n\t var animationCallback = function animationCallback() {\n\t throttle = 0;\n\t };\n\t\n\t return function () {\n\t if (throttle) {\n\t return;\n\t }\n\t\n\t throttle = raf(animationCallback);\n\t\n\t callback.apply(runContext || this, arguments);\n\t };\n\t};\n\t\n\texports.escape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n\t return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.unescape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n\t return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.canUseDrag = function () {\n\t return !REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\texports.isIE = function () {\n\t return REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\tfunction unescapeHtmlChar(chr) {\n\t return HTML_UNESCAPES[chr];\n\t}\n\t\n\tfunction escapeHtmlChar(chr) {\n\t return HTML_ESCAPES[chr];\n\t}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(10)\n\t , root = typeof window === 'undefined' ? global : window\n\t , vendors = ['moz', 'webkit']\n\t , suffix = 'AnimationFrame'\n\t , raf = root['request' + suffix]\n\t , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\t\n\tfor(var i = 0; !raf && i < vendors.length; i++) {\n\t raf = root[vendors[i] + 'Request' + suffix]\n\t caf = root[vendors[i] + 'Cancel' + suffix]\n\t || root[vendors[i] + 'CancelRequest' + suffix]\n\t}\n\t\n\t// Some versions of FF have rAF but not cAF\n\tif(!raf || !caf) {\n\t var last = 0\n\t , id = 0\n\t , queue = []\n\t , frameDuration = 1000 / 60\n\t\n\t raf = function(callback) {\n\t if(queue.length === 0) {\n\t var _now = now()\n\t , next = Math.max(0, frameDuration - (_now - last))\n\t last = next + _now\n\t setTimeout(function() {\n\t var cp = queue.slice(0)\n\t // Clear queue here to prevent\n\t // callbacks from appending listeners\n\t // to the current frame's queue\n\t queue.length = 0\n\t for(var i = 0; i < cp.length; i++) {\n\t if(!cp[i].cancelled) {\n\t try{\n\t cp[i].callback(last)\n\t } catch(e) {\n\t setTimeout(function() { throw e }, 0)\n\t }\n\t }\n\t }\n\t }, Math.round(next))\n\t }\n\t queue.push({\n\t handle: ++id,\n\t callback: callback,\n\t cancelled: false\n\t })\n\t return id\n\t }\n\t\n\t caf = function(handle) {\n\t for(var i = 0; i < queue.length; i++) {\n\t if(queue[i].handle === handle) {\n\t queue[i].cancelled = true\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = function(fn) {\n\t // Wrap in a new function to prevent\n\t // `cancel` potentially being assigned\n\t // to the native rAF function\n\t return raf.call(root, fn)\n\t}\n\tmodule.exports.cancel = function() {\n\t caf.apply(root, arguments)\n\t}\n\tmodule.exports.polyfill = function() {\n\t root.requestAnimationFrame = raf\n\t root.cancelAnimationFrame = caf\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1\n\t(function() {\n\t var getNanoSeconds, hrtime, loadTime;\n\t\n\t if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n\t module.exports = function() {\n\t return performance.now();\n\t };\n\t } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n\t module.exports = function() {\n\t return (getNanoSeconds() - loadTime) / 1e6;\n\t };\n\t hrtime = process.hrtime;\n\t getNanoSeconds = function() {\n\t var hr;\n\t hr = hrtime();\n\t return hr[0] * 1e9 + hr[1];\n\t };\n\t loadTime = getNanoSeconds();\n\t } else if (Date.now) {\n\t module.exports = function() {\n\t return Date.now() - loadTime;\n\t };\n\t loadTime = Date.now();\n\t } else {\n\t module.exports = function() {\n\t return new Date().getTime() - loadTime;\n\t };\n\t loadTime = new Date().getTime();\n\t }\n\t\n\t}).call(this);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction _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; }\n\t\n\t/**\n\t * @module x-bubbles/event\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar CustomEventCommon = __webpack_require__(13);\n\t\n\texports.scrollX = scrollX;\n\texports.scrollY = scrollY;\n\texports.dispatch = dispatch;\n\t\n\texports.keyCode = function (event) {\n\t return event.charCode || event.keyCode;\n\t};\n\t\n\texports.metaKey = function (event) {\n\t return event.ctrlKey || event.metaKey;\n\t};\n\t\n\texports.pageX = function (event) {\n\t return event.pageX === null && event.clientX !== null ? event.clientX + scrollX() : event.pageX;\n\t};\n\t\n\texports.pageY = function (event) {\n\t return event.pageY === null && event.clientY !== null ? event.clientY + scrollY() : event.pageY;\n\t};\n\t\n\texports.one = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, oneCallback(target, name, events[name]));\n\t }\n\t};\n\t\n\texports.on = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.off = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.removeEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.prevent = function (event) {\n\t event.cancelBubble = true;\n\t event.returnValue = false;\n\t event.stopImmediatePropagation();\n\t event.stopPropagation();\n\t event.preventDefault();\n\t return false;\n\t};\n\t\n\tfunction scrollX() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n\t}\n\t\n\tfunction scrollY() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n\t}\n\t\n\t/**\n\t * Designer events.\n\t *\n\t * @example\n\t * const { Custom } = require('event');\n\t *\n\t * new Custom('custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event~Custom\n\t * @constructor\n\t */\n\tvar Custom = function () {\n\t if (typeof context.CustomEvent === 'function') {\n\t return context.CustomEvent;\n\t }\n\t\n\t return CustomEventCommon;\n\t}();\n\t\n\t/**\n\t * Dispatch event.\n\t *\n\t * @example\n\t * const { dispatch } = require('event');\n\t * dispatch(node, 'custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event.dispatch\n\t * @param {HTMLElement} element node events\n\t * @param {string} name event name\n\t * @param {Object} params the event parameters\n\t * @param {boolean} [params.bubbles=false]\n\t * @param {boolean} [params.cancelable=false]\n\t * @param {*} [params.detail]\n\t */\n\tfunction dispatch(element, name) {\n\t var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t element.dispatchEvent(new Custom(name, params));\n\t}\n\t\n\tfunction oneCallback(target, eventName, callback) {\n\t return function _callback(event) {\n\t target.removeEventListener(eventName, _callback);\n\t callback(event);\n\t };\n\t}\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\t\n\t/**\n\t * @constant {Document}\n\t * @private\n\t */\n\tvar doc = context.document;\n\t\n\t/**\n\t * @constant {Object}\n\t * @private\n\t */\n\tvar protoEvent = context.Event.prototype;\n\t\n\tvar issetCustomEvent = false;\n\t\n\ttry {\n\t issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n\t} catch (e) {}\n\t// do nothing\n\t\n\t\n\t/**\n\t * The original function \"stopImmediatePropagation\"\n\t * @constant {function}\n\t * @private\n\t */\n\tvar stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\t\n\t/**\n\t * Override function to set properties \"immediatePropagationStopped\"\n\t */\n\tprotoEvent.stopImmediatePropagation = function () {\n\t this.immediatePropagationStopped = true;\n\t\n\t if (stopImmediatePropagation) {\n\t stopImmediatePropagation.call(this);\n\t } else {\n\t this.stopPropagation();\n\t }\n\t};\n\t\n\tvar CustomEventCommon = function () {\n\t if (issetCustomEvent) {\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('CustomEvent');\n\t\n\t evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\t\n\t return evt;\n\t };\n\t }\n\t\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('Event');\n\t\n\t evt.initEvent(eventName, bubbles, cancelable);\n\t evt.detail = params.detail;\n\t\n\t return evt;\n\t };\n\t}();\n\t\n\tCustomEventCommon.prototype = protoEvent;\n\t\n\tmodule.exports = CustomEventCommon;\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\texports.KEY = {\n\t a: 65,\n\t Backspace: 8,\n\t Bottom: 40,\n\t c: 67,\n\t Cmd: 91,\n\t Comma: 44, // ,\n\t Delete: 46,\n\t Enter: 13, // Enter\n\t Esc: 27,\n\t Left: 37,\n\t Right: 39,\n\t Semicolon: 59, // ;\n\t Space: 32,\n\t Tab: 9,\n\t Top: 38,\n\t x: 88\n\t};\n\t\n\texports.CLS = {\n\t DRAGSTART: 'drag',\n\t DROPZONE: 'dropzone'\n\t};\n\t\n\texports.EV = {\n\t BUBBLE_EDIT: 'bubble-edit',\n\t BUBBLE_INPUT: 'bubble-input',\n\t CHANGE: 'change',\n\t DRAGEND: 'dragend',\n\t DRAGENTER: 'dragenter',\n\t DRAGLEAVE: 'dragleave',\n\t DRAGSTART: 'dragstart',\n\t DROP: 'drop'\n\t};\n\t\n\texports.PROPS = {\n\t BUBBLE_VALUE: '_bubbleValue',\n\t CLICK_TIME: '_clickTime',\n\t LOCK_COPY: '_lockCopy'\n\t};\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar DRAG_IMG = { w: 16, h: 16 };\n\t\n\tvar dragImage = null;\n\t\n\texports.DRAG_IMG = DRAG_IMG;\n\t\n\texports.getDragImage = function () {\n\t if (!dragImage) {\n\t dragImage = new Image();\n\t dragImage.src = __webpack_require__(16);\n\t }\n\t\n\t return dragImage;\n\t};\n\t\n\texports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n\t fromNodeSet.fireChange();\n\t toNodeSet.focus();\n\t toNodeSet.fireChange();\n\t};\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar Modernizr = __webpack_require__(18);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS,\n\t EV = _require.EV;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar currentDragSet = null;\n\tvar currentMoveSet = null;\n\tvar currentDragElement = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\tfunction onMousedown(event) {\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t if (!nodeBubble) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t event.preventDefault();\n\t nodeSet.focus();\n\t\n\t var drag = nodeSet.__drag__ = {\n\t onMouseup: onMouseup.bind(this, nodeSet),\n\t onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n\t onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n\t nodeOffsetX: event.offsetX,\n\t nodeOffsetY: event.offsetY,\n\t x: 0,\n\t y: 0\n\t };\n\t\n\t currentDragSet = null;\n\t currentMoveSet = null;\n\t currentDragElement = null;\n\t\n\t events.one(document, 'mouseup', drag.onMouseup);\n\t events.on(document, 'mousemove', drag.onMousemove);\n\t events.on(document, 'scroll', drag.onScroll);\n\t}\n\t\n\tfunction onMouseup(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t events.off(document, 'mousemove', drag.onMousemove);\n\t events.off(document, 'scroll', drag.onScroll);\n\t delete dragSet.__drag__;\n\t\n\t if (currentDragElement) {\n\t currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n\t currentDragElement = null;\n\t }\n\t\n\t if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t\n\t if (currentDragSet) {\n\t (function () {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t }\n\t\n\t var _ = currentDragSet;\n\t currentDragSet = null;\n\t\n\t _.classList.remove(CLS.DRAGSTART);\n\t events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n\t events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n\t })();\n\t }\n\t}\n\t\n\tfunction onMousemove(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t if (!currentDragSet) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = dragSet;\n\t currentDragSet.classList.add(CLS.DRAGSTART);\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t var moveElement = void 0;\n\t\n\t if (nodeBubble) {\n\t select.add(nodeBubble);\n\t if (select.get(currentDragSet).length === 1) {\n\t moveElement = nodeBubble.cloneNode(true);\n\t }\n\t }\n\t\n\t if (!moveElement) {\n\t moveElement = getDragImage();\n\t drag.nodeOffsetX = DRAG_IMG.w;\n\t drag.nodeOffsetY = DRAG_IMG.h;\n\t }\n\t\n\t currentDragElement = document.body.appendChild(document.createElement('div'));\n\t currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n\t currentDragElement.appendChild(moveElement);\n\t\n\t events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n\t }\n\t\n\t drag.x = event.clientX;\n\t drag.y = event.clientY;\n\t onScroll(dragSet);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t if (currentMoveSet && currentMoveSet !== nodeSet) {\n\t currentMoveSet.classList.remove(CLS.DROPZONE);\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t } else if (!currentMoveSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t }\n\t } else if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t}\n\t\n\tfunction onScroll(dragSet) {\n\t var drag = dragSet.__drag__;\n\t if (!drag || !currentDragElement) {\n\t return;\n\t }\n\t\n\t var x = drag.x - drag.nodeOffsetX + events.scrollX();\n\t var y = drag.y - drag.nodeOffsetY + events.scrollY();\n\t\n\t if (Modernizr.csstransforms3d) {\n\t currentDragElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';\n\t } else if (Modernizr.csstransforms) {\n\t currentDragElement.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\n\t } else {\n\t currentDragElement.style.top = y + 'px';\n\t currentDragElement.style.left = x + 'px';\n\t }\n\t}\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t;(function(window){\n\t/*!\n\t * modernizr v3.3.1\n\t * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n\t *\n\t * Copyright (c)\n\t * Faruk Ates\n\t * Paul Irish\n\t * Alex Sexton\n\t * Ryan Seddon\n\t * Patrick Kettner\n\t * Stu Cox\n\t * Richard Herrera\n\t\n\t * MIT License\n\t */\n\t\n\t/*\n\t * Modernizr tests which native CSS3 and HTML5 features are available in the\n\t * current UA and makes the results available to you in two ways: as properties on\n\t * a global `Modernizr` object, and as classes on the `` element. This\n\t * information allows you to progressively enhance your pages with a granular level\n\t * of control over the experience.\n\t*/\n\t\n\t;(function(window, document, undefined){\n\t var tests = [];\n\t \n\t\n\t /**\n\t *\n\t * ModernizrProto is the constructor for Modernizr\n\t *\n\t * @class\n\t * @access public\n\t */\n\t\n\t var ModernizrProto = {\n\t // The current version, dummy\n\t _version: '3.3.1',\n\t\n\t // Any settings that don't work as separate modules\n\t // can go in here as configuration.\n\t _config: {\n\t 'classPrefix': '',\n\t 'enableClasses': true,\n\t 'enableJSClass': true,\n\t 'usePrefixes': true\n\t },\n\t\n\t // Queue of tests\n\t _q: [],\n\t\n\t // Stub these for people who are listening\n\t on: function(test, cb) {\n\t // I don't really think people should do this, but we can\n\t // safe guard it a bit.\n\t // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n\t // This is in case people listen to synchronous tests. I would leave it out,\n\t // but the code to *disallow* sync tests in the real version of this\n\t // function is actually larger than this.\n\t var self = this;\n\t setTimeout(function() {\n\t cb(self[test]);\n\t }, 0);\n\t },\n\t\n\t addTest: function(name, fn, options) {\n\t tests.push({name: name, fn: fn, options: options});\n\t },\n\t\n\t addAsyncTest: function(fn) {\n\t tests.push({name: null, fn: fn});\n\t }\n\t };\n\t\n\t \n\t\n\t // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n\t var Modernizr = function() {};\n\t Modernizr.prototype = ModernizrProto;\n\t\n\t // Leak modernizr globally when you `require` it rather than force it here.\n\t // Overwrite name so constructor name is nicer :D\n\t Modernizr = new Modernizr();\n\t\n\t \n\t\n\t var classes = [];\n\t \n\t\n\t /**\n\t * is returns a boolean if the typeof an obj is exactly type.\n\t *\n\t * @access private\n\t * @function is\n\t * @param {*} obj - A thing we want to check the type of\n\t * @param {string} type - A string to compare the typeof against\n\t * @returns {boolean}\n\t */\n\t\n\t function is(obj, type) {\n\t return typeof obj === type;\n\t }\n\t ;\n\t\n\t /**\n\t * Run through all tests and detect their support in the current UA.\n\t *\n\t * @access private\n\t */\n\t\n\t function testRunner() {\n\t var featureNames;\n\t var feature;\n\t var aliasIdx;\n\t var result;\n\t var nameIdx;\n\t var featureName;\n\t var featureNameSplit;\n\t\n\t for (var featureIdx in tests) {\n\t if (tests.hasOwnProperty(featureIdx)) {\n\t featureNames = [];\n\t feature = tests[featureIdx];\n\t // run the test, throw the return value into the Modernizr,\n\t // then based on that boolean, define an appropriate className\n\t // and push it into an array of classes we'll join later.\n\t //\n\t // If there is no name, it's an 'async' test that is run,\n\t // but not directly added to the object. That should\n\t // be done with a post-run addTest call.\n\t if (feature.name) {\n\t featureNames.push(feature.name.toLowerCase());\n\t\n\t if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n\t // Add all the aliases into the names list\n\t for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n\t featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n\t }\n\t }\n\t }\n\t\n\t // Run the test, or use the raw value if it's not a function\n\t result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\t\n\t\n\t // Set each of the names on the Modernizr object\n\t for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n\t featureName = featureNames[nameIdx];\n\t // Support dot properties as sub tests. We don't do checking to make sure\n\t // that the implied parent tests have been added. You must call them in\n\t // order (either in the test, or make the parent test a dependency).\n\t //\n\t // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n\t // hashtag famous last words\n\t featureNameSplit = featureName.split('.');\n\t\n\t if (featureNameSplit.length === 1) {\n\t Modernizr[featureNameSplit[0]] = result;\n\t } else {\n\t // cast to a Boolean, if not one already\n\t /* jshint -W053 */\n\t if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n\t Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n\t }\n\t\n\t Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n\t }\n\t\n\t classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n\t }\n\t }\n\t }\n\t }\n\t ;\n\t\n\t /**\n\t * If the browsers follow the spec, then they would expose vendor-specific style as:\n\t * elem.style.WebkitBorderRadius\n\t * instead of something like the following, which would be technically incorrect:\n\t * elem.style.webkitBorderRadius\n\t\n\t * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n\t * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n\t * erik.eae.net/archives/2008/03/10/21.48.10/\n\t\n\t * More here: github.com/Modernizr/Modernizr/issues/issue/21\n\t *\n\t * @access private\n\t * @returns {string} The string representing the vendor-specific style properties\n\t */\n\t\n\t var omPrefixes = 'Moz O ms Webkit';\n\t \n\t\n\t var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n\t ModernizrProto._cssomPrefixes = cssomPrefixes;\n\t \n\t\n\t\n\t /**\n\t * contains checks to see if a string contains another string\n\t *\n\t * @access private\n\t * @function contains\n\t * @param {string} str - The string we want to check for substrings\n\t * @param {string} substr - The substring we want to search the first string for\n\t * @returns {boolean}\n\t */\n\t\n\t function contains(str, substr) {\n\t return !!~('' + str).indexOf(substr);\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * docElement is a convenience wrapper to grab the root element of the document\n\t *\n\t * @access private\n\t * @returns {HTMLElement|SVGElement} The root element of the document\n\t */\n\t\n\t var docElement = document.documentElement;\n\t \n\t\n\t /**\n\t * A convenience helper to check if the document we are running in is an SVG document\n\t *\n\t * @access private\n\t * @returns {boolean}\n\t */\n\t\n\t var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n\t \n\t\n\t /**\n\t * createElement is a convenience wrapper around document.createElement. Since we\n\t * use createElement all over the place, this allows for (slightly) smaller code\n\t * as well as abstracting away issues with creating elements in contexts other than\n\t * HTML documents (e.g. SVG documents).\n\t *\n\t * @access private\n\t * @function createElement\n\t * @returns {HTMLElement|SVGElement} An HTML or SVG element\n\t */\n\t\n\t function createElement() {\n\t if (typeof document.createElement !== 'function') {\n\t // This is the case in IE7, where the type of createElement is \"object\".\n\t // For this reason, we cannot call apply() as Object is not a Function.\n\t return document.createElement(arguments[0]);\n\t } else if (isSVG) {\n\t return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n\t } else {\n\t return document.createElement.apply(document, arguments);\n\t }\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * Create our \"modernizr\" element that we do most feature tests on.\n\t *\n\t * @access private\n\t */\n\t\n\t var modElem = {\n\t elem: createElement('modernizr')\n\t };\n\t\n\t // Clean up this element\n\t Modernizr._q.push(function() {\n\t delete modElem.elem;\n\t });\n\t\n\t \n\t\n\t var mStyle = {\n\t style: modElem.elem.style\n\t };\n\t\n\t // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n\t // the front of the queue.\n\t Modernizr._q.unshift(function() {\n\t delete mStyle.style;\n\t });\n\t\n\t \n\t\n\t /**\n\t * getBody returns the body of a document, or an element that can stand in for\n\t * the body if a real body does not exist\n\t *\n\t * @access private\n\t * @function getBody\n\t * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n\t * artificially created element that stands in for the body\n\t */\n\t\n\t function getBody() {\n\t // After page load injecting a fake body doesn't work so check if body exists\n\t var body = document.body;\n\t\n\t if (!body) {\n\t // Can't use the real body create a fake one.\n\t body = createElement(isSVG ? 'svg' : 'body');\n\t body.fake = true;\n\t }\n\t\n\t return body;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * injectElementWithStyles injects an element with style element and some CSS rules\n\t *\n\t * @access private\n\t * @function injectElementWithStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t */\n\t\n\t function injectElementWithStyles(rule, callback, nodes, testnames) {\n\t var mod = 'modernizr';\n\t var style;\n\t var ret;\n\t var node;\n\t var docOverflow;\n\t var div = createElement('div');\n\t var body = getBody();\n\t\n\t if (parseInt(nodes, 10)) {\n\t // In order not to give false positives we create a node for each test\n\t // This also allows the method to scale for unspecified uses\n\t while (nodes--) {\n\t node = createElement('div');\n\t node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n\t div.appendChild(node);\n\t }\n\t }\n\t\n\t style = createElement('style');\n\t style.type = 'text/css';\n\t style.id = 's' + mod;\n\t\n\t // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n\t // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n\t (!body.fake ? div : body).appendChild(style);\n\t body.appendChild(div);\n\t\n\t if (style.styleSheet) {\n\t style.styleSheet.cssText = rule;\n\t } else {\n\t style.appendChild(document.createTextNode(rule));\n\t }\n\t div.id = mod;\n\t\n\t if (body.fake) {\n\t //avoid crashing IE8, if background image is used\n\t body.style.background = '';\n\t //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n\t body.style.overflow = 'hidden';\n\t docOverflow = docElement.style.overflow;\n\t docElement.style.overflow = 'hidden';\n\t docElement.appendChild(body);\n\t }\n\t\n\t ret = callback(div, rule);\n\t // If this is done after page load we don't want to remove the body so check if body exists\n\t if (body.fake) {\n\t body.parentNode.removeChild(body);\n\t docElement.style.overflow = docOverflow;\n\t // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n\t docElement.offsetHeight;\n\t } else {\n\t div.parentNode.removeChild(div);\n\t }\n\t\n\t return !!ret;\n\t\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * domToCSS takes a camelCase string and converts it to kebab-case\n\t * e.g. boxSizing -> box-sizing\n\t *\n\t * @access private\n\t * @function domToCSS\n\t * @param {string} name - String name of camelCase prop we want to convert\n\t * @returns {string} The kebab-case version of the supplied name\n\t */\n\t\n\t function domToCSS(name) {\n\t return name.replace(/([A-Z])/g, function(str, m1) {\n\t return '-' + m1.toLowerCase();\n\t }).replace(/^ms-/, '-ms-');\n\t }\n\t ;\n\t\n\t /**\n\t * nativeTestProps allows for us to use native feature detection functionality if available.\n\t * some prefixed form, or false, in the case of an unsupported rule\n\t *\n\t * @access private\n\t * @function nativeTestProps\n\t * @param {array} props - An array of property names\n\t * @param {string} value - A string representing the value we want to check via @supports\n\t * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n\t */\n\t\n\t // Accepts a list of property names and a single value\n\t // Returns `undefined` if native detection not available\n\t function nativeTestProps(props, value) {\n\t var i = props.length;\n\t // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n\t if ('CSS' in window && 'supports' in window.CSS) {\n\t // Try every prefixed variant of the property\n\t while (i--) {\n\t if (window.CSS.supports(domToCSS(props[i]), value)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t }\n\t // Otherwise fall back to at-rule (for Opera 12.x)\n\t else if ('CSSSupportsRule' in window) {\n\t // Build a condition string for every prefixed variant\n\t var conditionText = [];\n\t while (i--) {\n\t conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n\t }\n\t conditionText = conditionText.join(' or ');\n\t return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n\t return getComputedStyle(node, null).position == 'absolute';\n\t });\n\t }\n\t return undefined;\n\t }\n\t ;\n\t\n\t /**\n\t * cssToDOM takes a kebab-case string and converts it to camelCase\n\t * e.g. box-sizing -> boxSizing\n\t *\n\t * @access private\n\t * @function cssToDOM\n\t * @param {string} name - String name of kebab-case prop we want to convert\n\t * @returns {string} The camelCase version of the supplied name\n\t */\n\t\n\t function cssToDOM(name) {\n\t return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n\t return m1 + m2.toUpperCase();\n\t }).replace(/^-/, '');\n\t }\n\t ;\n\t\n\t // testProps is a generic CSS / DOM property test.\n\t\n\t // In testing support for a given CSS property, it's legit to test:\n\t // `elem.style[styleName] !== undefined`\n\t // If the property is supported it will return an empty string,\n\t // if unsupported it will return undefined.\n\t\n\t // We'll take advantage of this quick test and skip setting a style\n\t // on our modernizr element, but instead just testing undefined vs\n\t // empty string.\n\t\n\t // Property names can be provided in either camelCase or kebab-case.\n\t\n\t function testProps(props, prefixed, value, skipValueTest) {\n\t skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\t\n\t // Try native detect first\n\t if (!is(value, 'undefined')) {\n\t var result = nativeTestProps(props, value);\n\t if (!is(result, 'undefined')) {\n\t return result;\n\t }\n\t }\n\t\n\t // Otherwise do it properly\n\t var afterInit, i, propsLength, prop, before;\n\t\n\t // If we don't have a style element, that means we're running async or after\n\t // the core tests, so we'll need to create our own elements to use\n\t\n\t // inside of an SVG element, in certain browsers, the `style` element is only\n\t // defined for valid tags. Therefore, if `modernizr` does not have one, we\n\t // fall back to a less used element and hope for the best.\n\t var elems = ['modernizr', 'tspan'];\n\t while (!mStyle.style) {\n\t afterInit = true;\n\t mStyle.modElem = createElement(elems.shift());\n\t mStyle.style = mStyle.modElem.style;\n\t }\n\t\n\t // Delete the objects if we created them.\n\t function cleanElems() {\n\t if (afterInit) {\n\t delete mStyle.style;\n\t delete mStyle.modElem;\n\t }\n\t }\n\t\n\t propsLength = props.length;\n\t for (i = 0; i < propsLength; i++) {\n\t prop = props[i];\n\t before = mStyle.style[prop];\n\t\n\t if (contains(prop, '-')) {\n\t prop = cssToDOM(prop);\n\t }\n\t\n\t if (mStyle.style[prop] !== undefined) {\n\t\n\t // If value to test has been passed in, do a set-and-check test.\n\t // 0 (integer) is a valid property value, so check that `value` isn't\n\t // undefined, rather than just checking it's truthy.\n\t if (!skipValueTest && !is(value, 'undefined')) {\n\t\n\t // Needs a try catch block because of old IE. This is slow, but will\n\t // be avoided in most cases because `skipValueTest` will be used.\n\t try {\n\t mStyle.style[prop] = value;\n\t } catch (e) {}\n\t\n\t // If the property value has changed, we assume the value used is\n\t // supported. If `value` is empty string, it'll fail here (because\n\t // it hasn't changed), which matches how browsers have implemented\n\t // CSS.supports()\n\t if (mStyle.style[prop] != before) {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t // Otherwise just return true, or the property name if this is a\n\t // `prefixed()` call\n\t else {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t }\n\t cleanElems();\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * List of JavaScript DOM values used for tests\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr._domPrefixes\n\t * @optionName Modernizr._domPrefixes\n\t * @optionProp domPrefixes\n\t * @access public\n\t * @example\n\t *\n\t * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n\t * than kebab-case properties, all properties are their Capitalized variant\n\t *\n\t * ```js\n\t * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n\t * ```\n\t */\n\t\n\t var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n\t ModernizrProto._domPrefixes = domPrefixes;\n\t \n\t\n\t /**\n\t * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n\t *\n\t * @access private\n\t * @function fnBind\n\t * @param {function} fn - a function you want to change `this` reference to\n\t * @param {object} that - the `this` you want to call the function with\n\t * @returns {function} The wrapped version of the supplied function\n\t */\n\t\n\t function fnBind(fn, that) {\n\t return function() {\n\t return fn.apply(that, arguments);\n\t };\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testDOMProps is a generic DOM property test; if a browser supports\n\t * a certain property, it won't return undefined for it.\n\t *\n\t * @access private\n\t * @function testDOMProps\n\t * @param {array.} props - An array of properties to test for\n\t * @param {object} obj - An object or Element you want to use to test the parameters again\n\t * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n\t */\n\t function testDOMProps(props, obj, elem) {\n\t var item;\n\t\n\t for (var i in props) {\n\t if (props[i] in obj) {\n\t\n\t // return the property name as a string\n\t if (elem === false) {\n\t return props[i];\n\t }\n\t\n\t item = obj[props[i]];\n\t\n\t // let's bind a function\n\t if (is(item, 'function')) {\n\t // bind to obj unless overriden\n\t return fnBind(item, elem || obj);\n\t }\n\t\n\t // return the unbound function or obj or value\n\t return item;\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testPropsAll tests a list of DOM properties we want to check against.\n\t * We specify literally ALL possible (known and/or likely) properties on\n\t * the element including the non-vendor prefixed one, for forward-\n\t * compatibility.\n\t *\n\t * @access private\n\t * @function testPropsAll\n\t * @param {string} prop - A string of the property to test for\n\t * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n\t * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n\t * @param {string} [value] - A string of a css value\n\t * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n\t */\n\t function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\t\n\t var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n\t props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\t\n\t // did they call .prefixed('boxSizing') or are we just testing a prop?\n\t if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n\t return testProps(props, prefixed, value, skipValueTest);\n\t\n\t // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n\t } else {\n\t props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n\t return testDOMProps(props, prefixed, elem);\n\t }\n\t }\n\t\n\t // Modernizr.testAllProps() investigates whether a given style property,\n\t // or any of its vendor-prefixed variants, is recognized\n\t //\n\t // Note that the property names must be provided in the camelCase variant.\n\t // Modernizr.testAllProps('boxSizing')\n\t ModernizrProto.testAllProps = testPropsAll;\n\t\n\t \n\t\n\t /**\n\t * testAllProps determines whether a given CSS property is supported in the browser\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testAllProps\n\t * @optionName Modernizr.testAllProps()\n\t * @optionProp testAllProps\n\t * @access public\n\t * @function testAllProps\n\t * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n\t * @param {string} [value] - String of the value to test\n\t * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n\t * @example\n\t *\n\t * testAllProps determines whether a given CSS property, in some prefixed form,\n\t * is supported by the browser.\n\t *\n\t * ```js\n\t * testAllProps('boxSizing') // true\n\t * ```\n\t *\n\t * It can optionally be given a CSS value in string form to test if a property\n\t * value is valid\n\t *\n\t * ```js\n\t * testAllProps('display', 'block') // true\n\t * testAllProps('display', 'penguin') // false\n\t * ```\n\t *\n\t * A boolean can be passed as a third parameter to skip the value check when\n\t * native detection (@supports) isn't available.\n\t *\n\t * ```js\n\t * testAllProps('shapeOutside', 'content-box', true);\n\t * ```\n\t */\n\t\n\t function testAllProps(prop, value, skipValueTest) {\n\t return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n\t }\n\t ModernizrProto.testAllProps = testAllProps;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Transforms\",\n\t \"property\": \"csstransforms\",\n\t \"caniuse\": \"transforms2d\",\n\t \"tags\": [\"css\"]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms', function() {\n\t // Android < 3.0 is buggy, so we sniff and blacklist\n\t // http://git.io/hHzL7w\n\t return navigator.userAgent.indexOf('Android 2.') === -1 &&\n\t testAllProps('transform', 'scale(1)', true);\n\t });\n\t\n\t\n\t /**\n\t * testStyles injects an element with style element and some CSS rules\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testStyles\n\t * @optionName Modernizr.testStyles()\n\t * @optionProp testStyles\n\t * @access public\n\t * @function testStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t * @example\n\t *\n\t * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n\t * along with (possibly multiple) DOM elements. This lets you check for features\n\t * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n\t * // elem is the first DOM node in the page (by default #modernizr)\n\t * // rule is the first argument you supplied - the CSS rule in string form\n\t *\n\t * addTest('widthworks', elem.style.width === '9px')\n\t * });\n\t * ```\n\t *\n\t * If your test requires multiple nodes, you can include a third argument\n\t * indicating how many additional div elements to include on the page. The\n\t * additional nodes are injected as children of the `elem` that is returned as\n\t * the first argument to the callback.\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n\t * document.getElementById('modernizr').style.width === '1px'; // true\n\t * document.getElementById('modernizr2').style.width === '2px'; // true\n\t * elem.firstChild === document.getElementById('modernizr2'); // true\n\t * }, 1);\n\t * ```\n\t *\n\t * By default, all of the additional elements have an ID of `modernizr[n]`, where\n\t * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n\t * the second additional is `#modernizr3`, etc.).\n\t * If you want to have more meaningful IDs for your function, you can provide\n\t * them as the fourth argument, as an array of strings\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n\t * elem.firstChild === document.getElementById('foo'); // true\n\t * elem.lastChild === document.getElementById('bar'); // true\n\t * }, 2, ['foo', 'bar']);\n\t * ```\n\t *\n\t */\n\t\n\t var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Supports\",\n\t \"property\": \"supports\",\n\t \"caniuse\": \"css-featurequeries\",\n\t \"tags\": [\"css\"],\n\t \"builderAliases\": [\"css_supports\"],\n\t \"notes\": [{\n\t \"name\": \"W3 Spec\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n\t },{\n\t \"name\": \"Related Github Issue\",\n\t \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n\t },{\n\t \"name\": \"W3 Info\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n\t }]\n\t}\n\t!*/\n\t\n\t var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n\t var oldSyntax = 'supportsCSS' in window;\n\t Modernizr.addTest('supports', newSyntax || oldSyntax);\n\t\n\t/*!\n\t{\n\t \"name\": \"CSS Transforms 3D\",\n\t \"property\": \"csstransforms3d\",\n\t \"caniuse\": \"transforms3d\",\n\t \"tags\": [\"css\"],\n\t \"warnings\": [\n\t \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n\t ]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms3d', function() {\n\t var ret = !!testAllProps('perspective', '1px', true);\n\t var usePrefix = Modernizr._config.usePrefixes;\n\t\n\t // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n\t // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n\t // some conditions. As a result, Webkit typically recognizes the syntax but\n\t // will sometimes throw a false positive, thus we must do a more thorough check:\n\t if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n\t var mq;\n\t var defaultStyle = '#modernizr{width:0;height:0}';\n\t // Use CSS Conditional Rules if available\n\t if (Modernizr.supports) {\n\t mq = '@supports (perspective: 1px)';\n\t } else {\n\t // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n\t // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n\t mq = '@media (transform-3d)';\n\t if (usePrefix) {\n\t mq += ',(-webkit-transform-3d)';\n\t }\n\t }\n\t\n\t mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\t\n\t testStyles(defaultStyle + mq, function(elem) {\n\t ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n\t });\n\t }\n\t\n\t return ret;\n\t });\n\t\n\t\n\t // Run each test\n\t testRunner();\n\t\n\t delete ModernizrProto.addTest;\n\t delete ModernizrProto.addAsyncTest;\n\t\n\t // Run the things that are supposed to run after the tests\n\t for (var i = 0; i < Modernizr._q.length; i++) {\n\t Modernizr._q[i]();\n\t }\n\t\n\t // Leak Modernizr namespace\n\t window.Modernizr = Modernizr;\n\t\n\t\n\t;\n\t\n\t})(window, document);\n\tmodule.exports = window.Modernizr;\n\t})(window);\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t KEY = _require.KEY,\n\t EV = _require.EV,\n\t PROPS = _require.PROPS;\n\t\n\tvar text = __webpack_require__(6);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar eventCopy = __webpack_require__(21);\n\tvar eventPaste = __webpack_require__(22);\n\tvar eventBackspace = __webpack_require__(23);\n\tvar eventDelete = __webpack_require__(24);\n\t\n\tvar EVENTS = {\n\t blur: onBlur,\n\t click: onClick,\n\t focus: onFocus,\n\t keydown: onKeydown,\n\t keypress: onKeypress,\n\t keyup: onKeyup,\n\t mscontrolselect: events.prevent,\n\t paste: eventPaste,\n\t resize: events.prevent,\n\t resizestart: events.prevent\n\t};\n\t\n\texports.init = function (nodeWrap) {\n\t var nodeEditor = nodeWrap;\n\t nodeEditor.setAttribute('contenteditable', 'true');\n\t nodeEditor.setAttribute('spellcheck', 'false');\n\t\n\t nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n\t nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n\t nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\t\n\t events.on(nodeEditor, EVENTS);\n\t\n\t return {\n\t addBubble: addBubble.bind(nodeEditor),\n\t editBubble: editBubble.bind(nodeEditor),\n\t inputValue: inputValue.bind(nodeEditor),\n\t removeBubble: removeBubble.bind(nodeEditor),\n\t setContent: setContent.bind(nodeEditor)\n\t };\n\t};\n\t\n\texports.destroy = function (nodeEditor) {\n\t events.off(nodeEditor, EVENTS);\n\t};\n\t\n\tfunction onBlur(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t return events.prevent(event);\n\t }\n\t\n\t select.clear(nodeEditor);\n\t bubble.bubbling(nodeEditor);\n\t}\n\t\n\tfunction onFocus(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t events.prevent(event);\n\t delete nodeEditor[PROPS.LOCK_COPY];\n\t\n\t // Safary 10 не сбрасывает курсор без задержки\n\t raf(function () {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t });\n\t\n\t return false;\n\t }\n\t\n\t cursor.restore(nodeEditor);\n\t}\n\t\n\tfunction onKeyup(event) {\n\t var nodeEditor = event.currentTarget;\n\t var code = events.keyCode(event);\n\t var isPrintableChar = event.key ? event.key.length === 1 : (code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd;\n\t\n\t if (isPrintableChar) {\n\t nodeEditor.fireInput();\n\t }\n\t}\n\t\n\tfunction onKeypress(event) {\n\t var code = events.keyCode(event);\n\t var nodeEditor = event.currentTarget;\n\t\n\t /* eslint no-case-declarations: 0 */\n\t switch (code) {\n\t case KEY.Enter:\n\t event.preventDefault();\n\t if (!nodeEditor.options('disableControls')) {\n\t if (!editBubbleKeyboardEvent(nodeEditor)) {\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.Space:\n\t if (editBubbleKeyboardEvent(nodeEditor)) {\n\t event.preventDefault();\n\t }\n\t break;\n\t\n\t default:\n\t var separator = nodeEditor.options('separator');\n\t if (separator && separator.test(String.fromCharCode(code))) {\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t}\n\t\n\tfunction onKeydown(event) {\n\t var code = events.keyCode(event);\n\t var metaKey = events.metaKey(event);\n\t var nodeEditor = event.currentTarget;\n\t var enable = !nodeEditor.options('disableControls');\n\t\n\t switch (code) {\n\t case KEY.Esc:\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t break;\n\t\n\t case KEY.Backspace:\n\t event.preventDefault();\n\t eventBackspace(event);\n\t break;\n\t\n\t case KEY.Delete:\n\t event.preventDefault();\n\t eventDelete(event);\n\t break;\n\t\n\t case KEY.Left:\n\t event.preventDefault();\n\t arrowLeft(event);\n\t break;\n\t\n\t // сдвигаем курсор в начало списка\n\t case KEY.Top:\n\t event.preventDefault();\n\t if (enable) {\n\t var headBubble = bubbleset.headBubble(nodeEditor);\n\t headBubble && select.uniq(headBubble);\n\t }\n\t break;\n\t\n\t case KEY.Right:\n\t event.preventDefault();\n\t arrowRight(event);\n\t break;\n\t\n\t // сдвигаем курсор в конец списка\n\t // case KEY.Tab:\n\t case KEY.Bottom:\n\t event.preventDefault();\n\t if (enable && select.has(nodeEditor)) {\n\t cursor.restore(nodeEditor);\n\t }\n\t break;\n\t\n\t case KEY.a:\n\t if (metaKey) {\n\t event.preventDefault();\n\t\n\t if (!text.selectAll(null, event.currentTarget)) {\n\t select.all(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.c:\n\t if (metaKey) {\n\t eventCopy(event);\n\t }\n\t break;\n\t\n\t case KEY.x:\n\t if (metaKey) {\n\t eventCopy(event, function () {\n\t return eventDelete(event);\n\t });\n\t }\n\t break;\n\t }\n\t}\n\t\n\tfunction arrowLeft(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowLeft(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[0] === nodeSet.startRangeSelect ? list[list.length - 1] : list[0];\n\t\n\t var node = bubbleset.prevBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t }\n\t}\n\t\n\tfunction arrowRight(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowRight(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.nextBubble(selection.focusNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[list.length - 1] === nodeSet.startRangeSelect ? list[0] : list[list.length - 1];\n\t\n\t var node = bubbleset.nextBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n\t select.clear(nodeSet);\n\t selection.collapse(begin.nextSibling, 0);\n\t } else {\n\t cursor.restore(nodeSet);\n\t }\n\t}\n\t\n\tfunction onClick(event) {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (nodeBubble) {\n\t var clickTime = Date.now();\n\t var isDblclick = nodeSet[PROPS.CLICK_TIME] && clickTime - nodeSet[PROPS.CLICK_TIME] < 200;\n\t\n\t nodeSet[PROPS.CLICK_TIME] = clickTime;\n\t\n\t if (events.metaKey(event)) {\n\t select.add(nodeBubble);\n\t } else if (event.shiftKey) {\n\t if (!nodeSet.startRangeSelect) {\n\t select.uniq(nodeBubble);\n\t } else {\n\t select.range(nodeBubble);\n\t }\n\t } else if (isDblclick) {\n\t bubble.edit(nodeSet, nodeBubble);\n\t } else {\n\t select.toggleUniq(nodeBubble);\n\t }\n\t } else {\n\t select.clear(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t cursor.restore(nodeSet);\n\t }\n\t }\n\t}\n\t\n\tfunction editBubbleKeyboardEvent(nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.rangeCount) {\n\t var list = select.get(nodeEditor);\n\t\n\t if (list.length === 1) {\n\t return bubble.edit(nodeEditor, list[0]);\n\t }\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction setContent(data) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t while (this.firstChild) {\n\t this.removeChild(this.firstChild);\n\t }\n\t\n\t data = text.html2text(data);\n\t this.appendChild(this.ownerDocument.createTextNode(data));\n\t bubble.bubbling(this);\n\t cursor.restore(this);\n\t}\n\t\n\tfunction addBubble(bubbleText, dataAttributes) {\n\t var nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n\t if (!nodeBubble) {\n\t return false;\n\t }\n\t\n\t if (text.text2bubble(this, nodeBubble)) {\n\t this.fireInput();\n\t this.fireChange();\n\t cursor.restore(this);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t this.removeChild(nodeBubble);\n\t this.fireChange();\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction editBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t return bubble.edit(this, nodeBubble);\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction inputValue() {\n\t var textRange = text.currentTextRange(this);\n\t return textRange && text.textClean(textRange.toString()) || '';\n\t}\n\t\n\t/**\n\t * Генерация события редактирования бабла.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireEdit\n\t * @param {HTMLElement} nodeBubble нода бабл\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireEdit(nodeBubble) {\n\t events.dispatch(this, EV.BUBBLE_EDIT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: nodeBubble }\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события изменения набора баблов.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireChange\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireChange() {\n\t events.dispatch(this, EV.CHANGE, {\n\t bubbles: false,\n\t cancelable: false\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события ввода текста.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireInput\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireInput() {\n\t var editText = inputValue.call(this);\n\t\n\t if (this[PROPS.BUBBLE_VALUE] !== editText) {\n\t this[PROPS.BUBBLE_VALUE] = editText;\n\t\n\t events.dispatch(this, EV.BUBBLE_INPUT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: editText }\n\t });\n\t }\n\t}\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * @module x-bubbles/cursor\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\tvar select = __webpack_require__(4);\n\t\n\texports.restore = restore;\n\texports.restoreBasis = restoreBasis;\n\t\n\t/**\n\t * Reset the cursor position to the end of the input field.\n\t * @alias module:x-bubbles/cursor.restore\n\t * @param {HTMLElement} nodeSet\n\t */\n\tfunction restore(nodeSet) {\n\t select.clear(nodeSet);\n\t var basis = restoreBasis(nodeSet);\n\t var selection = context.getSelection();\n\t selection.removeAllRanges();\n\t selection.collapse(basis, 1);\n\t}\n\t\n\t/**\n\t * The creation of the fake text at the end childNodes\n\t * @alias module:x-bubbles/cursor.restoreBasis\n\t * @param {HTMLElement} nodeSet\n\t * @returns {HTMLTextElement} fake text node\n\t */\n\tfunction restoreBasis(nodeSet) {\n\t var fakeText = text.createZws();\n\t\n\t if (nodeSet.hasChildNodes()) {\n\t var lastNode = nodeSet.childNodes[nodeSet.childNodes.length - 1];\n\t\n\t if (lastNode.isEqualNode(fakeText)) {\n\t fakeText = lastNode;\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t\n\t return fakeText;\n\t}\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar events = __webpack_require__(12);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t PROPS = _require.PROPS;\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = function (event) {\n\t var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\t\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t return false;\n\t }\n\t\n\t var list = select.get(nodeEditor);\n\t\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var bubbleCopy = nodeEditor.options('bubbleCopy');\n\t var value = bubbleCopy(list);\n\t\n\t if (!value) {\n\t return false;\n\t }\n\t\n\t nodeEditor[PROPS.LOCK_COPY] = true;\n\t\n\t var target = nodeEditor.ownerDocument.createElement('input');\n\t target.value = value;\n\t target.style.cssText = '\\n position: absolute;\\n left: -9999px;\\n width: 1px;\\n height: 1px;\\n margin: 0;\\n padding: 0;\\n border: none;';\n\t\n\t nodeEditor.parentNode.appendChild(target);\n\t\n\t events.one(target, {\n\t keyup: function keyup() {\n\t return nodeEditor.focus();\n\t },\n\t blur: function blur() {\n\t removeNode(target);\n\t raf(callback);\n\t }\n\t });\n\t\n\t target.select();\n\t return true;\n\t};\n\t\n\tfunction removeNode(node) {\n\t node && node.parentNode && node.parentNode.removeChild(node);\n\t}\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t isIE = _require.isIE;\n\t\n\tmodule.exports = function (event) {\n\t event.preventDefault();\n\t var nodeEditor = event.currentTarget;\n\t\n\t if (context.clipboardData && context.clipboardData.getData) {\n\t onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\t } else if (event.clipboardData) {\n\t (function () {\n\t var contentType = 'text/plain';\n\t var clipboardData = event.clipboardData;\n\t var data = clipboardData.getData && clipboardData.getData(contentType);\n\t\n\t if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n\t Array.prototype.slice.call(clipboardData.items).filter(function (item) {\n\t return item.kind === 'string' && item.type === contentType;\n\t }).some(function (item) {\n\t item.getAsString(function (dataText) {\n\t onPasteSuccess(nodeEditor, dataText);\n\t });\n\t\n\t return true;\n\t });\n\t }\n\t })();\n\t }\n\t};\n\t\n\tfunction onPasteSuccess(nodeEditor, dataText) {\n\t var checkBubblePaste = nodeEditor.options('checkBubblePaste');\n\t var selection = context.getSelection();\n\t var isBubbling = dataText && selection.isCollapsed && !nodeEditor.inputValue ? checkBubblePaste(dataText) : false;\n\t\n\t if (text.replaceString(dataText, selection)) {\n\t if (isBubbling) {\n\t if (isIE) {\n\t raf(function () {\n\t return onReplaceSuccess(nodeEditor);\n\t });\n\t } else {\n\t onReplaceSuccess(nodeEditor);\n\t }\n\t } else {\n\t nodeEditor.fireInput();\n\t }\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction onReplaceSuccess(nodeEditor) {\n\t bubble.bubbling(nodeEditor);\n\t nodeEditor.focus();\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t}\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Backspace.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowLeft(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleLeft(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Delete.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowRight(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleRight(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** x-bubbles.min.js\n **/"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap b69a07b3119acb8c195e\n **/","const context = require('./context');\nconst drag = require('./core/drag');\nconst editor = require('./core/editor');\nconst bubble = require('./core/bubble');\nconst bubbleset = require('./core/bubbleset');\n\nconst OPTIONS = {\n begining: [ 'reg', null, 'begining' ],\n bubbleCopy: [ 'func', bubbleCopyOption, 'bubble-copy' ],\n bubbleDeformation: [ 'func', function () {}, 'bubble-deformation' ],\n bubbleFormation: [ 'func', function () {}, 'bubble-formation' ],\n checkBubblePaste: [ 'func', checkBubblePasteOption, 'check-bubble-paste' ],\n classBubble: [ 'str', 'bubble', 'class-bubble' ],\n disableControls: [ 'bool', false, 'disable-controls' ],\n draggable: [ 'bool', true, 'draggable' ],\n ending: [ 'reg', null, 'ending' ], // /\\@ya\\.ru/g;\n separator: [ 'reg', /[,;]/, 'separator' ],\n tokenizer: [ 'func', null, 'tokenizer' ],\n};\n\nconst XBubbles = Object.create(HTMLDivElement.prototype, {\n createdCallback: {\n value: function () {\n initEditor(this);\n }\n },\n\n attachedCallback: {\n value: function () {\n initEditor(this);\n drag.init(this);\n bubble.bubbling(this);\n }\n },\n\n detachedCallback: {\n value: function () {\n drag.destroy(this);\n destroyEditor(this);\n }\n },\n\n /*\n attributeChangedCallback: {\n value: function (name, prevValue, value) {}\n },\n */\n\n options: {\n value: function (name, value) {\n if (!this._options) {\n this._options = {};\n\n for (const optionName in OPTIONS) {\n this._options[ optionName ] = undefined;\n\n const attrName = `data-${OPTIONS[ optionName ][2]}`;\n if (this.hasAttribute(attrName)) {\n this._options[ optionName ] = this.getAttribute(attrName);\n }\n }\n\n optionsPrepare(this._options);\n }\n\n if (typeof value !== 'undefined') {\n this._options[ name ] = value;\n optionsPrepare(this._options);\n\n } else {\n return this._options[ name ];\n }\n }\n },\n\n items: {\n get: function () {\n return bubbleset.getBubbles(this);\n }\n },\n\n inputValue: {\n get: function () {\n return this.editor.inputValue();\n }\n },\n\n setContent: {\n value: function (data) {\n return this.editor.setContent(data);\n }\n },\n\n addBubble: {\n value: function (bubbleText, data) {\n return this.editor.addBubble(bubbleText, data);\n }\n },\n\n removeBubble: {\n value: function (nodeBubble) {\n return this.editor.removeBubble(nodeBubble);\n }\n },\n\n editBubble: {\n value: function (nodeBubble) {\n return this.editor.editBubble(nodeBubble);\n }\n }\n});\n\nmodule.exports = context.document.registerElement('x-bubbles', {\n extends: 'div',\n prototype: XBubbles\n});\n\nconst OPTIONS_PREPARE = {\n func: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return new Function('context', `return context.${value};`)(context);\n\n case 'function':\n return value;\n }\n },\n bool: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return (value === 'true' || value === 'on');\n\n case 'boolean':\n return value;\n }\n },\n noop: function (value) {\n return value;\n },\n reg: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n if (value) {\n const match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n if (match) {\n return new RegExp(match[1], match[2]);\n }\n }\n\n return null;\n\n case 'object':\n if (value instanceof context.RegExp) {\n return value;\n }\n }\n },\n str: function (value) {\n if (typeof value !== 'undefined') {\n return value ? String(value) : '';\n }\n },\n};\n\nfunction optionsPrepare(options) {\n for (let name in OPTIONS) {\n const [ type, def ] = OPTIONS[ name ];\n options[ name ] = OPTIONS_PREPARE[ type ](options[ name ]);\n if (typeof options[ name ] === 'undefined') {\n options[ name ] = def;\n }\n }\n}\n\nfunction initEditor(node) {\n if (!node.editor) {\n Object.defineProperty(node, 'editor', {\n configurable: true,\n value: editor.init(node)\n });\n }\n}\n\nfunction destroyEditor(node) {\n if (node.editor) {\n editor.destroy(node);\n delete node.editor;\n }\n}\n\nfunction bubbleCopyOption(list) {\n return list.map(item => item.innerHTML).join(', ');\n}\n\nfunction checkBubblePasteOption() {\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","module.exports = (function () {\n /* eslint no-eval: 0 */\n return this || (1, eval)('this');\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./context.js\n **/","const native = require('./drag/native');\nconst mouse = require('./drag/mouse');\nconst { canUseDrag } = require('./utils');\n\nexports.init = function (nodeSet) {\n if (canUseDrag) {\n return native.init(nodeSet);\n }\n\n return mouse.init(nodeSet);\n};\n\nexports.destroy = function (nodeSet) {\n if (canUseDrag) {\n return native.destroy(nodeSet);\n }\n\n return mouse.destroy(nodeSet);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag.js\n **/","const context = require('../../context');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst events = require('../events');\nconst { CLS } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nconst EVENTS = {\n dragend: onDragend,\n dragenter: onDragenter,\n dragleave: onDragleave,\n dragover: onDragover,\n dragstart: onDragstart,\n drop: onDrop,\n};\n\nlet currentDragSet = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, EVENTS);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, EVENTS);\n};\n\nfunction onDragstart(event) {\n event.stopPropagation();\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (!nodeSet || !nodeBubble) {\n event.preventDefault();\n return;\n }\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = nodeSet;\n nodeSet.classList.add(CLS.DRAGSTART);\n select.add(nodeBubble);\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', '');\n\n const list = select.get(currentDragSet);\n if (list.length > 1) {\n event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n }\n}\n\nfunction onDrop(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet || nodeSet === currentDragSet) {\n return;\n }\n\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n}\n\nfunction onDragover(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n event.dataTransfer.dropEffect = 'move';\n}\n\nfunction onDragenter(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n }\n}\n\nfunction onDragleave(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n}\n\nfunction onDragend(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n currentDragSet.classList.remove(CLS.DRAGSTART);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n\n currentDragSet = null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/native.js\n **/","const context = require('../context');\nconst bubble = require('./bubble');\nconst bubbleset = require('./bubbleset');\n\nconst slice = Array.prototype.slice;\nconst PATH_SELECTED = '[bubble][selected]';\nconst PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\nexports.all = all;\nexports.add = add;\nexports.clear = clear;\nexports.get = get;\nexports.uniq = uniq;\nexports.head = head;\nexports.last = last;\nexports.has = has;\nexports.range = range;\nexports.toggleUniq = toggleUniq;\n\nfunction range(node) {\n if (!bubble.isBubbleNode(node)) {\n return;\n }\n\n const set = node.parentNode;\n const list = get(set);\n\n if (!list.length) {\n uniq(node);\n return;\n }\n\n clear(set);\n\n const headList = list[0];\n const lastList = list[ list.length - 1 ];\n\n if (headList === lastList || !set.startRangeSelect) {\n set.startRangeSelect = headList;\n }\n\n let fromNode;\n let toNode;\n const position = node.compareDocumentPosition(set.startRangeSelect);\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n fromNode = set.startRangeSelect;\n toNode = node;\n\n } else {\n fromNode = node;\n toNode = set.startRangeSelect;\n }\n\n if (fromNode && toNode) {\n let item = fromNode;\n\n while (item) {\n if (!setSelected(item)) {\n break;\n }\n\n if (item === toNode) {\n break;\n }\n\n item = item.nextSibling;\n }\n\n bubble.bubbling(set);\n }\n}\n\nfunction all(nodeSet) {\n slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(item => setSelected(item));\n nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\n bubble.bubbling(nodeSet);\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n}\n\nfunction has(nodeSet) {\n return Boolean(nodeSet.querySelector(PATH_SELECTED));\n}\n\nfunction head(set) {\n return get(set)[0];\n}\n\nfunction last(set) {\n const list = get(set);\n return list[ list.length - 1 ];\n}\n\nfunction get(nodeSet) {\n return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n}\n\nfunction clear(nodeSet) {\n get(nodeSet).forEach(item => item.removeAttribute('selected'));\n}\n\nfunction add(node) {\n if (setSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n nodeSet.startRangeSelect = node;\n // ???\n bubble.bubbling(nodeSet);\n\n return true;\n }\n\n return false;\n}\n\nfunction uniq(node) {\n if (!bubble.isBubbleNode(node)) {\n return false;\n }\n\n const nodeSet = bubbleset.closestNodeSet(node);\n const selection = context.getSelection();\n\n selection && selection.removeAllRanges();\n clear(nodeSet);\n\n return add(node);\n}\n\nfunction toggleUniq(node) {\n if (isSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n if (get(nodeSet).length === 1) {\n return removeSelected(node);\n }\n }\n\n return uniq(node);\n}\n\nfunction isSelected(node) {\n return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n}\n\nfunction setSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.setAttribute('selected', '');\n return true;\n }\n\n return false;\n}\n\nfunction removeSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.removeAttribute('selected');\n return true;\n }\n\n return false;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/select.js\n **/","const context = require('../context');\nconst text = require('./text');\nconst { escape, canUseDrag } = require('./utils');\n\nexports.isBubbleNode = isBubbleNode;\nexports.bubbling = bubbling;\nexports.create = create;\nexports.edit = edit;\n\nfunction isBubbleNode(node) {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n\n return node.hasAttribute('bubble');\n}\n\nfunction edit(nodeSet, nodeBubble) {\n if (nodeBubble.hasAttribute('readonly')) {\n return false;\n }\n\n const selection = context.getSelection();\n\n if (!selection) {\n return false;\n }\n\n const bubbleDeformation = nodeSet.options('bubbleDeformation');\n let rangeParams = bubbleDeformation(nodeBubble);\n\n if (!rangeParams) {\n const dataText = text.textClean(nodeBubble.innerText);\n\n rangeParams = {\n text: dataText,\n startOffset: 0,\n endOffset: dataText.length\n };\n }\n\n const textFake = text.createZws();\n const textNode = context.document.createTextNode(rangeParams.text);\n\n nodeSet.fireEdit(nodeBubble);\n nodeSet.replaceChild(textNode, nodeBubble);\n nodeSet.insertBefore(textFake, textNode);\n\n const range = context.document.createRange();\n range.setStart(textNode, rangeParams.startOffset);\n range.setEnd(textNode, rangeParams.endOffset);\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n}\n\n/**\n * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n * @param {[type]} nodeSet [description]\n * @param {[type]} dataText [description]\n * @param {Object} [dataAttributes={}] [description]\n * @returns {[type]} [description]\n */\nfunction create(nodeSet, dataText, dataAttributes = {}) {\n dataText = text.textClean(dataText);\n\n if (!dataText) {\n return;\n }\n\n const bubbleFormation = nodeSet.options('bubbleFormation');\n const classBubble = nodeSet.options('classBubble');\n const draggable = canUseDrag && nodeSet.options('draggable');\n const wrap = nodeSet.ownerDocument.createElement('span');\n\n wrap.innerText = dataText;\n\n for (let key in dataAttributes) {\n if (dataAttributes[ key ]) {\n wrap.setAttribute(`data-${key}`, escape(dataAttributes[ key ]));\n }\n }\n\n bubbleFormation(wrap);\n\n if (classBubble) {\n const classes = String(classBubble).trim().split(/\\s+/);\n let len = classes.length;\n\n while (len--) {\n wrap.classList.add(classes[ len ]);\n }\n }\n\n wrap.setAttribute('bubble', '');\n wrap.setAttribute('contenteditable', 'false');\n draggable && wrap.setAttribute('draggable', 'true');\n\n return wrap;\n}\n\nfunction bubbling(nodeSet) {\n const begining = nodeSet.options('begining');\n const ending = nodeSet.options('ending');\n const separator = nodeSet.options('separator');\n const tokenizer = nodeSet.options('tokenizer');\n const ranges = getBubbleRanges(nodeSet);\n const nodes = [];\n\n ranges.forEach(function (range) {\n const dataText = text.textClean(range.toString());\n\n if (!dataText) {\n range.deleteContents();\n return;\n }\n\n let textParts = [ dataText ];\n\n if (tokenizer) {\n textParts = tokenizer(dataText);\n\n } else {\n if (separator) {\n textParts = dataText\n .split(separator)\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n\n if (ending) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByEnding(str, ending)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n\n } else if (begining) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByBeginning(str, begining)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n }\n\n if (!Array.isArray(textParts) || !textParts.length) {\n range.deleteContents();\n return;\n }\n\n const fragment = context.document.createDocumentFragment();\n\n textParts.forEach(function (textPart) {\n const nodeBubble = create(nodeSet, textPart);\n if (nodeBubble) {\n fragment.appendChild(nodeBubble);\n nodes.push(nodeBubble);\n }\n });\n\n range.deleteContents();\n range.insertNode(fragment);\n });\n\n nodeSet.fireInput();\n\n if (nodes.length) {\n nodeSet.fireChange();\n }\n\n return nodes;\n}\n\nfunction getBubbleRanges(nodeSet) {\n const ranges = [];\n const children = nodeSet.childNodes;\n let range;\n let node;\n\n for (let i = 0; i < children.length; i++) {\n node = children[ i ];\n\n if (isBubbleNode(node)) {\n if (range) {\n range.setEndBefore(node);\n ranges.push(range);\n range = undefined;\n }\n\n } else {\n if (!range) {\n range = context.document.createRange();\n range.setStartBefore(node);\n }\n }\n }\n\n if (range) {\n range.setEndAfter(node);\n ranges.push(range);\n }\n\n return ranges;\n}\n\nfunction trimIterator(str) {\n return str.trim();\n}\n\nfunction nonEmptyIterator(str) {\n return Boolean(str);\n}\n\nfunction parseFragmentByEnding(str, reg) {\n const parts = [];\n let lastIndex = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while (reg.exec(str) !== null && loop) {\n loop--;\n parts.push(str.substring(lastIndex, reg.lastIndex));\n lastIndex = reg.lastIndex;\n }\n\n return parts;\n}\n\nfunction parseFragmentByBeginning(str, reg) {\n const parts = [];\n let res;\n let index = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while ((res = reg.exec(str)) !== null && loop) {\n loop--;\n if (index !== res.index) {\n parts.push(str.substring(index, res.index));\n index = res.index;\n }\n }\n\n parts.push(str.substring(index, str.length));\n return parts;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubble.js\n **/","const context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst { getSelection } = require('./utils');\n\n/* eslint-disable max-len */\nconst REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u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CF0\\u0CF3-\\u0D01\\u0D04\\u0D0D\\u0D11\\u0D3B\\u0D3C\\u0D45\\u0D49\\u0D4F-\\u0D56\\u0D58-\\u0D5F\\u0D64\\u0D65\\u0D76-\\u0D78\\u0D80\\u0D81\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DF1\\u0DF5-\\u0E00\\u0E3B-\\u0E3E\\u0E5C-\\u0E80\\u0E83\\u0E85\\u0E86\\u0E89\\u0E8B\\u0E8C\\u0E8E-\\u0E93\\u0E98\\u0EA0\\u0EA4\\u0EA6\\u0EA8\\u0EA9\\u0EAC\\u0EBA\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A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97D-\\uA97F\\uA9CE\\uA9DA-\\uA9DD\\uA9E0-\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A\\uAA5B\\uAA7C-\\uAA7F\\uAAC3-\\uAADA\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F-\\uABBF\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBC2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFE\\uFDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\nconst REG_ZWS = /\\u200B/;\nconst TEXT_ZWS = '\\u200B';\n\nexports.arrowRight = arrowRight;\nexports.arrowLeft = arrowLeft;\nexports.remove = remove;\nexports.html2text = html2text;\nexports.currentTextRange = currentTextRange;\nexports.text2bubble = text2bubble;\nexports.replaceString = replaceString;\nexports.selectAll = selectAll;\nexports.textClean = textClean;\nexports.checkZws = checkZws;\nexports.createZws = createZws;\n\nfunction text2bubble(nodeEditor, nodeBubble) {\n const selection = getSelection(nodeEditor);\n const range = selection && currentTextRange(nodeEditor, selection);\n\n if (range) {\n selection.removeAllRanges();\n selection.addRange(range);\n replace(selection, nodeBubble);\n\n } else {\n nodeEditor.appendChild(nodeBubble);\n }\n\n return true;\n}\n\nfunction currentTextRange(nodeEditor, selection) {\n selection = selection || getSelection(nodeEditor);\n if (!selection) {\n return;\n }\n\n const pointNode = do {\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n selection.focusNode;\n\n } else if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n selection.anchorNode;\n\n } else {\n undefined;\n }\n };\n\n if (!pointNode) {\n return;\n }\n\n let startNode = pointNode;\n let endNode = pointNode;\n let item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n startNode = item;\n item = item.previousSibling;\n }\n\n item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n endNode = item;\n item = item.nextSibling;\n }\n\n const range = nodeEditor.ownerDocument.createRange();\n range.setStartBefore(startNode);\n range.setEndAfter(endNode);\n\n return range;\n}\n\nfunction remove(selection) {\n return replace(selection, createZws());\n}\n\nfunction replace(selection, node) {\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const anchor = context.document.createElement('span');\n selection.getRangeAt(0).surroundContents(anchor);\n anchor.parentNode.replaceChild(node, anchor);\n\n selection.removeAllRanges();\n\n if (node.nodeType === Node.TEXT_NODE) {\n const range = context.document.createRange();\n // для ИЕ обязательно указывать node.nodeValue.length\n range.setStart(node, node.nodeValue.length);\n range.collapse(false);\n selection.addRange(range);\n\n } else {\n selection.collapse(node, 0);\n }\n\n return true;\n}\n\nfunction replaceString(data, selection) {\n data = textClean(data);\n if (!data) {\n return false;\n }\n\n selection = selection || context.getSelection();\n const textNode = context.document.createTextNode(data);\n\n if (!replace(selection, textNode)) {\n return false;\n }\n\n selection.collapse(textNode, textNode.nodeValue.length);\n return true;\n}\n\nfunction arrowLeft(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(startNode, startOffset);\n return true;\n }\n\n const isNativeExtend = Boolean(selection.extend);\n revert = isNativeExtend ? revert : !revert;\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n if (offset === null) {\n offset = node.nodeValue.length;\n }\n\n if (offset - 1 < 0) {\n node = node.previousSibling;\n offset = null;\n continue;\n }\n\n const text = node.nodeValue.substring(offset - 1, offset);\n\n if (checkZws(text)) {\n offset = offset - 1;\n continue;\n }\n\n break;\n }\n\n if (!node || offset === null) {\n return false;\n }\n\n if (extend) {\n if (isNativeExtend) {\n selection.extend(node, offset - 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset - 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset - 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset - 1);\n }\n\n return true;\n}\n\nfunction arrowRight(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.focusNode ||\n selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(endNode, endOffset);\n return true;\n }\n\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n const len = node.nodeValue.length;\n\n if (offset + 1 > len) {\n node = node.nextSibling;\n offset = 0;\n continue;\n }\n\n const text = node.nodeValue.substring(offset, offset + 1);\n\n if (checkZws(text)) {\n offset = offset + 1;\n continue;\n }\n\n break;\n }\n\n if (!node) {\n return false;\n }\n\n if (extend) {\n const isNativeExtend = Boolean(selection.extend);\n\n if (isNativeExtend) {\n selection.extend(node, offset + 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset + 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset + 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset + 1);\n }\n\n return true;\n}\n\nfunction html2text(value) {\n if (!value) {\n return '';\n }\n\n var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n DOMContainer.innerText = value;\n\n return DOMContainer.innerText\n .replace(/^[\\u0020\\u00a0]+$/gm, '')\n .replace(/\\n/gm, ' ')\n .trim();\n}\n\nfunction selectAll(selection, nodeSet) {\n selection = selection || context.getSelection();\n const node = selection && selection.anchorNode;\n\n if (!node || node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n let fromNode;\n let toNode;\n let item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n fromNode = item;\n item = item.previousSibling;\n }\n\n item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n toNode = item;\n item = item.nextSibling;\n }\n\n const hasBubbles = bubbleset.hasBubbles(nodeSet);\n const range = context.document.createRange();\n range.setStartBefore(fromNode);\n range.setEndAfter(toNode);\n\n const dataText = textClean(range.toString());\n\n if (dataText || (!dataText && !hasBubbles)) {\n if (!dataText) {\n range.collapse();\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n }\n\n return false;\n}\n\nfunction createZws() {\n return context.document.createTextNode(TEXT_ZWS);\n}\n\nfunction checkZws(value) {\n return REG_ZWS.test(value);\n}\n\nfunction textClean(value) {\n return String(value || '')\n .trim()\n .replace(REG_REPLACE_NON_PRINTABLE, '');\n}\n\nfunction selectionCorrect(selection) {\n let startNode = selection.anchorNode;\n let endNode = selection.focusNode;\n let startOffset = selection.anchorOffset;\n let endOffset = selection.focusOffset;\n let revert = false;\n\n if (startNode === endNode) {\n startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n revert = selection.anchorOffset > selection.focusOffset;\n\n } else {\n const position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n startNode = selection.focusNode;\n startOffset = selection.focusOffset;\n endNode = selection.anchorNode;\n endOffset = selection.anchorOffset;\n revert = true;\n }\n }\n\n return { startNode, endNode, startOffset, endOffset, revert };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/text.js\n **/","const bubble = require('./bubble');\nconst text = require('./text');\n\nexports.closestNodeBubble = closestNodeBubble;\nexports.closestNodeSet = closestNodeSet;\nexports.findBubbleLeft = findBubbleLeft;\nexports.findBubbleRight = findBubbleRight;\nexports.getBubbles = getBubbles;\nexports.hasBubbles = hasBubbles;\nexports.headBubble = headBubble;\nexports.lastBubble = lastBubble;\nexports.nextBubble = nextBubble;\nexports.prevBubble = prevBubble;\n\nfunction lastBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:last-child');\n}\n\nfunction headBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:first-child');\n}\n\nfunction getBubbles(nodeSet) {\n return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n}\n\nfunction hasBubbles(nodeSet) {\n return Boolean(nodeSet.querySelector('[bubble]'));\n}\n\nfunction findBubbleLeft(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.previousSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.previousSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction findBubbleRight(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.nextSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.nextSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction closestNodeSet(node) {\n while (node) {\n if (isEditorNode(node)) {\n return node;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction closestNodeBubble(node) {\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (isEditorNode(node)) {\n return;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction prevBubble(target) {\n let node = target && target.previousSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction nextBubble(target) {\n let node = target && target.nextSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction isEditorNode(node) {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n node.getAttribute('is') === 'x-bubbles'\n );\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubbleset.js\n **/","const raf = require('raf');\nconst context = require('../context');\n\n/* eslint quotes: 0 */\n\nconst HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n\nconst HTML_UNESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n};\n\nconst REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\nconst REG_UNESCAPED_HTML = /[&<>\"'`]/g;\nconst REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\nconst REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\nconst REG_IE = /Trident|Edge/;\n\nexports.getSelection = function (nodeEditor) {\n const selection = context.getSelection();\n\n if (selection && selection.anchorNode && (nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n return selection;\n }\n};\n\nexports.throttle = function (callback, runContext) {\n let throttle = 0;\n const animationCallback = function () {\n throttle = 0;\n };\n\n return function () {\n if (throttle) {\n return;\n }\n\n throttle = raf(animationCallback);\n\n callback.apply(runContext || this, arguments);\n };\n};\n\nexports.escape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n }\n\n return data;\n};\n\nexports.unescape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n }\n\n return data;\n};\n\nexports.canUseDrag = (function () {\n return !REG_IE.test(context.navigator.userAgent);\n})();\n\nexports.isIE = (function () {\n return REG_IE.test(context.navigator.userAgent);\n})();\n\nfunction unescapeHtmlChar(chr) {\n return HTML_UNESCAPES[ chr ];\n}\n\nfunction escapeHtmlChar(chr) {\n return HTML_ESCAPES[ chr ];\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/utils.js\n **/","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/raf/index.js\n ** module id = 9\n ** module chunks = 0\n **/","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/performance-now/lib/performance-now.js\n ** module id = 10\n ** module chunks = 0\n **/","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * @module x-bubbles/event\n */\n\nconst context = require('../context');\nconst CustomEventCommon = require('../polyfills/CustomEventCommon');\n\nexports.scrollX = scrollX;\nexports.scrollY = scrollY;\nexports.dispatch = dispatch;\n\nexports.keyCode = function (event) {\n return event.charCode || event.keyCode;\n};\n\nexports.metaKey = function (event) {\n return event.ctrlKey || event.metaKey;\n};\n\nexports.pageX = function (event) {\n return (event.pageX === null && event.clientX !== null) ?\n event.clientX + scrollX() :\n event.pageX;\n};\n\nexports.pageY = function (event) {\n return (event.pageY === null && event.clientY !== null) ?\n event.clientY + scrollY() :\n event.pageY;\n};\n\nexports.one = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, oneCallback(target, name, events[ name ]));\n }\n};\n\nexports.on = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, events[ name ]);\n }\n};\n\nexports.off = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.removeEventListener(name, events[ name ]);\n }\n};\n\nexports.prevent = function (event) {\n event.cancelBubble = true;\n event.returnValue = false;\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n return false;\n};\n\nfunction scrollX() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n}\n\nfunction scrollY() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n}\n\n/**\n * Designer events.\n *\n * @example\n * const { Custom } = require('event');\n *\n * new Custom('custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event~Custom\n * @constructor\n */\nconst Custom = (function () {\n if (typeof context.CustomEvent === 'function') {\n return context.CustomEvent;\n }\n\n return CustomEventCommon;\n}());\n\n/**\n * Dispatch event.\n *\n * @example\n * const { dispatch } = require('event');\n * dispatch(node, 'custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event.dispatch\n * @param {HTMLElement} element node events\n * @param {string} name event name\n * @param {Object} params the event parameters\n * @param {boolean} [params.bubbles=false]\n * @param {boolean} [params.cancelable=false]\n * @param {*} [params.detail]\n */\nfunction dispatch(element, name, params = {}) {\n element.dispatchEvent(new Custom(name, params));\n}\n\nfunction oneCallback(target, eventName, callback) {\n return function _callback(event) {\n target.removeEventListener(eventName, _callback);\n callback(event);\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/events.js\n **/","const context = require('../context');\n\n/**\n * @constant {Document}\n * @private\n */\nconst doc = context.document;\n\n/**\n * @constant {Object}\n * @private\n */\nconst protoEvent = context.Event.prototype;\n\nlet issetCustomEvent = false;\n\ntry {\n issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n} catch (e) {\n // do nothing\n}\n\n/**\n * The original function \"stopImmediatePropagation\"\n * @constant {function}\n * @private\n */\nconst stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\n/**\n * Override function to set properties \"immediatePropagationStopped\"\n */\nprotoEvent.stopImmediatePropagation = function () {\n this.immediatePropagationStopped = true;\n\n if (stopImmediatePropagation) {\n stopImmediatePropagation.call(this);\n\n } else {\n this.stopPropagation();\n }\n};\n\nlet CustomEventCommon = (function () {\n if (issetCustomEvent) {\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('CustomEvent');\n\n evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\n return evt;\n };\n }\n\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('Event');\n\n evt.initEvent(eventName, bubbles, cancelable);\n evt.detail = params.detail;\n\n return evt;\n };\n}());\n\nCustomEventCommon.prototype = protoEvent;\n\nmodule.exports = CustomEventCommon;\n\n\n\n/** WEBPACK FOOTER **\n ** ./polyfills/CustomEventCommon.js\n **/","exports.KEY = {\n a: 65,\n Backspace: 8,\n Bottom: 40,\n c: 67,\n Cmd: 91,\n Comma: 44, // ,\n Delete: 46,\n Enter: 13, // Enter\n Esc: 27,\n Left: 37,\n Right: 39,\n Semicolon: 59, // ;\n Space: 32,\n Tab: 9,\n Top: 38,\n x: 88,\n};\n\nexports.CLS = {\n DRAGSTART: 'drag',\n DROPZONE: 'dropzone',\n};\n\nexports.EV = {\n BUBBLE_EDIT: 'bubble-edit',\n BUBBLE_INPUT: 'bubble-input',\n CHANGE: 'change',\n DRAGEND: 'dragend',\n DRAGENTER: 'dragenter',\n DRAGLEAVE: 'dragleave',\n DRAGSTART: 'dragstart',\n DROP: 'drop',\n};\n\nexports.PROPS = {\n BUBBLE_VALUE: '_bubbleValue',\n CLICK_TIME: '_clickTime',\n LOCK_COPY: '_lockCopy',\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/constant.js\n **/","const DRAG_IMG = { w: 16, h: 16 };\n\nlet dragImage = null;\n\nexports.DRAG_IMG = DRAG_IMG;\n\nexports.getDragImage = function () {\n if (!dragImage) {\n dragImage = new Image();\n dragImage.src = require('url?mimetype=image/png!./bubbles.png');\n }\n\n return dragImage;\n};\n\nexports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n fromNodeSet.fireChange();\n toNodeSet.focus();\n toNodeSet.fireChange();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/common.js\n **/","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/url-loader?mimetype=image/png!./core/drag/bubbles.png\n ** module id = 16\n ** module chunks = 0\n **/","const context = require('../../context');\nconst events = require('../events');\nconst utils = require('../utils');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst Modernizr = require('modernizr');\nconst { CLS, EV } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nlet currentDragSet = null;\nlet currentMoveSet = null;\nlet currentDragElement = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, 'mousedown', onMousedown);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, 'mousedown', onMousedown);\n};\n\nfunction onMousedown(event) {\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n if (!nodeBubble) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (!nodeSet) {\n return;\n }\n\n event.preventDefault();\n nodeSet.focus();\n\n const drag = nodeSet.__drag__ = {\n onMouseup: onMouseup.bind(this, nodeSet),\n onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n nodeOffsetX: event.offsetX,\n nodeOffsetY: event.offsetY,\n x: 0,\n y: 0\n };\n\n currentDragSet = null;\n currentMoveSet = null;\n currentDragElement = null;\n\n events.one(document, 'mouseup', drag.onMouseup);\n events.on(document, 'mousemove', drag.onMousemove);\n events.on(document, 'scroll', drag.onScroll);\n}\n\nfunction onMouseup(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n events.off(document, 'mousemove', drag.onMousemove);\n events.off(document, 'scroll', drag.onScroll);\n delete dragSet.__drag__;\n\n if (currentDragElement) {\n currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n currentDragElement = null;\n }\n\n if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n\n if (currentDragSet) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n }\n\n const _ = currentDragSet;\n currentDragSet = null;\n\n _.classList.remove(CLS.DRAGSTART);\n events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onMousemove(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n if (!currentDragSet) {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = dragSet;\n currentDragSet.classList.add(CLS.DRAGSTART);\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n let moveElement;\n\n if (nodeBubble) {\n select.add(nodeBubble);\n if (select.get(currentDragSet).length === 1) {\n moveElement = nodeBubble.cloneNode(true);\n }\n }\n\n if (!moveElement) {\n moveElement = getDragImage();\n drag.nodeOffsetX = DRAG_IMG.w;\n drag.nodeOffsetY = DRAG_IMG.h;\n }\n\n currentDragElement = document.body.appendChild(document.createElement('div'));\n currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n currentDragElement.appendChild(moveElement);\n\n events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n }\n\n drag.x = event.clientX;\n drag.y = event.clientY;\n onScroll(dragSet);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n if (currentMoveSet && currentMoveSet !== nodeSet) {\n currentMoveSet.classList.remove(CLS.DROPZONE);\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\n } else if (!currentMoveSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n }\n\n } else if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onScroll(dragSet) {\n const drag = dragSet.__drag__;\n if (!drag || !currentDragElement) {\n return;\n }\n\n const x = drag.x - drag.nodeOffsetX + events.scrollX();\n const y = drag.y - drag.nodeOffsetY + events.scrollY();\n\n if (Modernizr.csstransforms3d) {\n currentDragElement.style.transform = `translate3d(${x}px, ${y}px, 0px)`;\n\n } else if (Modernizr.csstransforms) {\n currentDragElement.style.transform = `translate(${x}px, ${y}px)`;\n\n } else {\n currentDragElement.style.top = `${y}px`;\n currentDragElement.style.left = `${x}px`;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/mouse.js\n **/",";(function(window){\n/*!\n * modernizr v3.3.1\n * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n *\n * Copyright (c)\n * Faruk Ates\n * Paul Irish\n * Alex Sexton\n * Ryan Seddon\n * Patrick Kettner\n * Stu Cox\n * Richard Herrera\n\n * MIT License\n */\n\n/*\n * Modernizr tests which native CSS3 and HTML5 features are available in the\n * current UA and makes the results available to you in two ways: as properties on\n * a global `Modernizr` object, and as classes on the `` element. This\n * information allows you to progressively enhance your pages with a granular level\n * of control over the experience.\n*/\n\n;(function(window, document, undefined){\n var tests = [];\n \n\n /**\n *\n * ModernizrProto is the constructor for Modernizr\n *\n * @class\n * @access public\n */\n\n var ModernizrProto = {\n // The current version, dummy\n _version: '3.3.1',\n\n // Any settings that don't work as separate modules\n // can go in here as configuration.\n _config: {\n 'classPrefix': '',\n 'enableClasses': true,\n 'enableJSClass': true,\n 'usePrefixes': true\n },\n\n // Queue of tests\n _q: [],\n\n // Stub these for people who are listening\n on: function(test, cb) {\n // I don't really think people should do this, but we can\n // safe guard it a bit.\n // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n // This is in case people listen to synchronous tests. I would leave it out,\n // but the code to *disallow* sync tests in the real version of this\n // function is actually larger than this.\n var self = this;\n setTimeout(function() {\n cb(self[test]);\n }, 0);\n },\n\n addTest: function(name, fn, options) {\n tests.push({name: name, fn: fn, options: options});\n },\n\n addAsyncTest: function(fn) {\n tests.push({name: null, fn: fn});\n }\n };\n\n \n\n // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n var Modernizr = function() {};\n Modernizr.prototype = ModernizrProto;\n\n // Leak modernizr globally when you `require` it rather than force it here.\n // Overwrite name so constructor name is nicer :D\n Modernizr = new Modernizr();\n\n \n\n var classes = [];\n \n\n /**\n * is returns a boolean if the typeof an obj is exactly type.\n *\n * @access private\n * @function is\n * @param {*} obj - A thing we want to check the type of\n * @param {string} type - A string to compare the typeof against\n * @returns {boolean}\n */\n\n function is(obj, type) {\n return typeof obj === type;\n }\n ;\n\n /**\n * Run through all tests and detect their support in the current UA.\n *\n * @access private\n */\n\n function testRunner() {\n var featureNames;\n var feature;\n var aliasIdx;\n var result;\n var nameIdx;\n var featureName;\n var featureNameSplit;\n\n for (var featureIdx in tests) {\n if (tests.hasOwnProperty(featureIdx)) {\n featureNames = [];\n feature = tests[featureIdx];\n // run the test, throw the return value into the Modernizr,\n // then based on that boolean, define an appropriate className\n // and push it into an array of classes we'll join later.\n //\n // If there is no name, it's an 'async' test that is run,\n // but not directly added to the object. That should\n // be done with a post-run addTest call.\n if (feature.name) {\n featureNames.push(feature.name.toLowerCase());\n\n if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n // Add all the aliases into the names list\n for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n }\n }\n }\n\n // Run the test, or use the raw value if it's not a function\n result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\n\n // Set each of the names on the Modernizr object\n for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n featureName = featureNames[nameIdx];\n // Support dot properties as sub tests. We don't do checking to make sure\n // that the implied parent tests have been added. You must call them in\n // order (either in the test, or make the parent test a dependency).\n //\n // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n // hashtag famous last words\n featureNameSplit = featureName.split('.');\n\n if (featureNameSplit.length === 1) {\n Modernizr[featureNameSplit[0]] = result;\n } else {\n // cast to a Boolean, if not one already\n /* jshint -W053 */\n if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n }\n\n Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n }\n\n classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n }\n }\n }\n }\n ;\n\n /**\n * If the browsers follow the spec, then they would expose vendor-specific style as:\n * elem.style.WebkitBorderRadius\n * instead of something like the following, which would be technically incorrect:\n * elem.style.webkitBorderRadius\n\n * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n * erik.eae.net/archives/2008/03/10/21.48.10/\n\n * More here: github.com/Modernizr/Modernizr/issues/issue/21\n *\n * @access private\n * @returns {string} The string representing the vendor-specific style properties\n */\n\n var omPrefixes = 'Moz O ms Webkit';\n \n\n var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n ModernizrProto._cssomPrefixes = cssomPrefixes;\n \n\n\n /**\n * contains checks to see if a string contains another string\n *\n * @access private\n * @function contains\n * @param {string} str - The string we want to check for substrings\n * @param {string} substr - The substring we want to search the first string for\n * @returns {boolean}\n */\n\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n ;\n\n /**\n * docElement is a convenience wrapper to grab the root element of the document\n *\n * @access private\n * @returns {HTMLElement|SVGElement} The root element of the document\n */\n\n var docElement = document.documentElement;\n \n\n /**\n * A convenience helper to check if the document we are running in is an SVG document\n *\n * @access private\n * @returns {boolean}\n */\n\n var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n \n\n /**\n * createElement is a convenience wrapper around document.createElement. Since we\n * use createElement all over the place, this allows for (slightly) smaller code\n * as well as abstracting away issues with creating elements in contexts other than\n * HTML documents (e.g. SVG documents).\n *\n * @access private\n * @function createElement\n * @returns {HTMLElement|SVGElement} An HTML or SVG element\n */\n\n function createElement() {\n if (typeof document.createElement !== 'function') {\n // This is the case in IE7, where the type of createElement is \"object\".\n // For this reason, we cannot call apply() as Object is not a Function.\n return document.createElement(arguments[0]);\n } else if (isSVG) {\n return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n } else {\n return document.createElement.apply(document, arguments);\n }\n }\n\n ;\n\n /**\n * Create our \"modernizr\" element that we do most feature tests on.\n *\n * @access private\n */\n\n var modElem = {\n elem: createElement('modernizr')\n };\n\n // Clean up this element\n Modernizr._q.push(function() {\n delete modElem.elem;\n });\n\n \n\n var mStyle = {\n style: modElem.elem.style\n };\n\n // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n // the front of the queue.\n Modernizr._q.unshift(function() {\n delete mStyle.style;\n });\n\n \n\n /**\n * getBody returns the body of a document, or an element that can stand in for\n * the body if a real body does not exist\n *\n * @access private\n * @function getBody\n * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n * artificially created element that stands in for the body\n */\n\n function getBody() {\n // After page load injecting a fake body doesn't work so check if body exists\n var body = document.body;\n\n if (!body) {\n // Can't use the real body create a fake one.\n body = createElement(isSVG ? 'svg' : 'body');\n body.fake = true;\n }\n\n return body;\n }\n\n ;\n\n /**\n * injectElementWithStyles injects an element with style element and some CSS rules\n *\n * @access private\n * @function injectElementWithStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n */\n\n function injectElementWithStyles(rule, callback, nodes, testnames) {\n var mod = 'modernizr';\n var style;\n var ret;\n var node;\n var docOverflow;\n var div = createElement('div');\n var body = getBody();\n\n if (parseInt(nodes, 10)) {\n // In order not to give false positives we create a node for each test\n // This also allows the method to scale for unspecified uses\n while (nodes--) {\n node = createElement('div');\n node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n div.appendChild(node);\n }\n }\n\n style = createElement('style');\n style.type = 'text/css';\n style.id = 's' + mod;\n\n // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n (!body.fake ? div : body).appendChild(style);\n body.appendChild(div);\n\n if (style.styleSheet) {\n style.styleSheet.cssText = rule;\n } else {\n style.appendChild(document.createTextNode(rule));\n }\n div.id = mod;\n\n if (body.fake) {\n //avoid crashing IE8, if background image is used\n body.style.background = '';\n //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n body.style.overflow = 'hidden';\n docOverflow = docElement.style.overflow;\n docElement.style.overflow = 'hidden';\n docElement.appendChild(body);\n }\n\n ret = callback(div, rule);\n // If this is done after page load we don't want to remove the body so check if body exists\n if (body.fake) {\n body.parentNode.removeChild(body);\n docElement.style.overflow = docOverflow;\n // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n docElement.offsetHeight;\n } else {\n div.parentNode.removeChild(div);\n }\n\n return !!ret;\n\n }\n\n ;\n\n /**\n * domToCSS takes a camelCase string and converts it to kebab-case\n * e.g. boxSizing -> box-sizing\n *\n * @access private\n * @function domToCSS\n * @param {string} name - String name of camelCase prop we want to convert\n * @returns {string} The kebab-case version of the supplied name\n */\n\n function domToCSS(name) {\n return name.replace(/([A-Z])/g, function(str, m1) {\n return '-' + m1.toLowerCase();\n }).replace(/^ms-/, '-ms-');\n }\n ;\n\n /**\n * nativeTestProps allows for us to use native feature detection functionality if available.\n * some prefixed form, or false, in the case of an unsupported rule\n *\n * @access private\n * @function nativeTestProps\n * @param {array} props - An array of property names\n * @param {string} value - A string representing the value we want to check via @supports\n * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n */\n\n // Accepts a list of property names and a single value\n // Returns `undefined` if native detection not available\n function nativeTestProps(props, value) {\n var i = props.length;\n // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n if ('CSS' in window && 'supports' in window.CSS) {\n // Try every prefixed variant of the property\n while (i--) {\n if (window.CSS.supports(domToCSS(props[i]), value)) {\n return true;\n }\n }\n return false;\n }\n // Otherwise fall back to at-rule (for Opera 12.x)\n else if ('CSSSupportsRule' in window) {\n // Build a condition string for every prefixed variant\n var conditionText = [];\n while (i--) {\n conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n }\n conditionText = conditionText.join(' or ');\n return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n return getComputedStyle(node, null).position == 'absolute';\n });\n }\n return undefined;\n }\n ;\n\n /**\n * cssToDOM takes a kebab-case string and converts it to camelCase\n * e.g. box-sizing -> boxSizing\n *\n * @access private\n * @function cssToDOM\n * @param {string} name - String name of kebab-case prop we want to convert\n * @returns {string} The camelCase version of the supplied name\n */\n\n function cssToDOM(name) {\n return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n return m1 + m2.toUpperCase();\n }).replace(/^-/, '');\n }\n ;\n\n // testProps is a generic CSS / DOM property test.\n\n // In testing support for a given CSS property, it's legit to test:\n // `elem.style[styleName] !== undefined`\n // If the property is supported it will return an empty string,\n // if unsupported it will return undefined.\n\n // We'll take advantage of this quick test and skip setting a style\n // on our modernizr element, but instead just testing undefined vs\n // empty string.\n\n // Property names can be provided in either camelCase or kebab-case.\n\n function testProps(props, prefixed, value, skipValueTest) {\n skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\n // Try native detect first\n if (!is(value, 'undefined')) {\n var result = nativeTestProps(props, value);\n if (!is(result, 'undefined')) {\n return result;\n }\n }\n\n // Otherwise do it properly\n var afterInit, i, propsLength, prop, before;\n\n // If we don't have a style element, that means we're running async or after\n // the core tests, so we'll need to create our own elements to use\n\n // inside of an SVG element, in certain browsers, the `style` element is only\n // defined for valid tags. Therefore, if `modernizr` does not have one, we\n // fall back to a less used element and hope for the best.\n var elems = ['modernizr', 'tspan'];\n while (!mStyle.style) {\n afterInit = true;\n mStyle.modElem = createElement(elems.shift());\n mStyle.style = mStyle.modElem.style;\n }\n\n // Delete the objects if we created them.\n function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }\n\n propsLength = props.length;\n for (i = 0; i < propsLength; i++) {\n prop = props[i];\n before = mStyle.style[prop];\n\n if (contains(prop, '-')) {\n prop = cssToDOM(prop);\n }\n\n if (mStyle.style[prop] !== undefined) {\n\n // If value to test has been passed in, do a set-and-check test.\n // 0 (integer) is a valid property value, so check that `value` isn't\n // undefined, rather than just checking it's truthy.\n if (!skipValueTest && !is(value, 'undefined')) {\n\n // Needs a try catch block because of old IE. This is slow, but will\n // be avoided in most cases because `skipValueTest` will be used.\n try {\n mStyle.style[prop] = value;\n } catch (e) {}\n\n // If the property value has changed, we assume the value used is\n // supported. If `value` is empty string, it'll fail here (because\n // it hasn't changed), which matches how browsers have implemented\n // CSS.supports()\n if (mStyle.style[prop] != before) {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n // Otherwise just return true, or the property name if this is a\n // `prefixed()` call\n else {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n }\n cleanElems();\n return false;\n }\n\n ;\n\n /**\n * List of JavaScript DOM values used for tests\n *\n * @memberof Modernizr\n * @name Modernizr._domPrefixes\n * @optionName Modernizr._domPrefixes\n * @optionProp domPrefixes\n * @access public\n * @example\n *\n * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n * than kebab-case properties, all properties are their Capitalized variant\n *\n * ```js\n * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n * ```\n */\n\n var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n ModernizrProto._domPrefixes = domPrefixes;\n \n\n /**\n * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n *\n * @access private\n * @function fnBind\n * @param {function} fn - a function you want to change `this` reference to\n * @param {object} that - the `this` you want to call the function with\n * @returns {function} The wrapped version of the supplied function\n */\n\n function fnBind(fn, that) {\n return function() {\n return fn.apply(that, arguments);\n };\n }\n\n ;\n\n /**\n * testDOMProps is a generic DOM property test; if a browser supports\n * a certain property, it won't return undefined for it.\n *\n * @access private\n * @function testDOMProps\n * @param {array.} props - An array of properties to test for\n * @param {object} obj - An object or Element you want to use to test the parameters again\n * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n */\n function testDOMProps(props, obj, elem) {\n var item;\n\n for (var i in props) {\n if (props[i] in obj) {\n\n // return the property name as a string\n if (elem === false) {\n return props[i];\n }\n\n item = obj[props[i]];\n\n // let's bind a function\n if (is(item, 'function')) {\n // bind to obj unless overriden\n return fnBind(item, elem || obj);\n }\n\n // return the unbound function or obj or value\n return item;\n }\n }\n return false;\n }\n\n ;\n\n /**\n * testPropsAll tests a list of DOM properties we want to check against.\n * We specify literally ALL possible (known and/or likely) properties on\n * the element including the non-vendor prefixed one, for forward-\n * compatibility.\n *\n * @access private\n * @function testPropsAll\n * @param {string} prop - A string of the property to test for\n * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n * @param {string} [value] - A string of a css value\n * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n */\n function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\n var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\n // did they call .prefixed('boxSizing') or are we just testing a prop?\n if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n return testProps(props, prefixed, value, skipValueTest);\n\n // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n } else {\n props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n return testDOMProps(props, prefixed, elem);\n }\n }\n\n // Modernizr.testAllProps() investigates whether a given style property,\n // or any of its vendor-prefixed variants, is recognized\n //\n // Note that the property names must be provided in the camelCase variant.\n // Modernizr.testAllProps('boxSizing')\n ModernizrProto.testAllProps = testPropsAll;\n\n \n\n /**\n * testAllProps determines whether a given CSS property is supported in the browser\n *\n * @memberof Modernizr\n * @name Modernizr.testAllProps\n * @optionName Modernizr.testAllProps()\n * @optionProp testAllProps\n * @access public\n * @function testAllProps\n * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n * @param {string} [value] - String of the value to test\n * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n * @example\n *\n * testAllProps determines whether a given CSS property, in some prefixed form,\n * is supported by the browser.\n *\n * ```js\n * testAllProps('boxSizing') // true\n * ```\n *\n * It can optionally be given a CSS value in string form to test if a property\n * value is valid\n *\n * ```js\n * testAllProps('display', 'block') // true\n * testAllProps('display', 'penguin') // false\n * ```\n *\n * A boolean can be passed as a third parameter to skip the value check when\n * native detection (@supports) isn't available.\n *\n * ```js\n * testAllProps('shapeOutside', 'content-box', true);\n * ```\n */\n\n function testAllProps(prop, value, skipValueTest) {\n return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n }\n ModernizrProto.testAllProps = testAllProps;\n \n/*!\n{\n \"name\": \"CSS Transforms\",\n \"property\": \"csstransforms\",\n \"caniuse\": \"transforms2d\",\n \"tags\": [\"css\"]\n}\n!*/\n\n Modernizr.addTest('csstransforms', function() {\n // Android < 3.0 is buggy, so we sniff and blacklist\n // http://git.io/hHzL7w\n return navigator.userAgent.indexOf('Android 2.') === -1 &&\n testAllProps('transform', 'scale(1)', true);\n });\n\n\n /**\n * testStyles injects an element with style element and some CSS rules\n *\n * @memberof Modernizr\n * @name Modernizr.testStyles\n * @optionName Modernizr.testStyles()\n * @optionProp testStyles\n * @access public\n * @function testStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n * @example\n *\n * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n * along with (possibly multiple) DOM elements. This lets you check for features\n * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n *\n * ```js\n * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n * // elem is the first DOM node in the page (by default #modernizr)\n * // rule is the first argument you supplied - the CSS rule in string form\n *\n * addTest('widthworks', elem.style.width === '9px')\n * });\n * ```\n *\n * If your test requires multiple nodes, you can include a third argument\n * indicating how many additional div elements to include on the page. The\n * additional nodes are injected as children of the `elem` that is returned as\n * the first argument to the callback.\n *\n * ```js\n * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n * document.getElementById('modernizr').style.width === '1px'; // true\n * document.getElementById('modernizr2').style.width === '2px'; // true\n * elem.firstChild === document.getElementById('modernizr2'); // true\n * }, 1);\n * ```\n *\n * By default, all of the additional elements have an ID of `modernizr[n]`, where\n * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n * the second additional is `#modernizr3`, etc.).\n * If you want to have more meaningful IDs for your function, you can provide\n * them as the fourth argument, as an array of strings\n *\n * ```js\n * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n * elem.firstChild === document.getElementById('foo'); // true\n * elem.lastChild === document.getElementById('bar'); // true\n * }, 2, ['foo', 'bar']);\n * ```\n *\n */\n\n var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n \n/*!\n{\n \"name\": \"CSS Supports\",\n \"property\": \"supports\",\n \"caniuse\": \"css-featurequeries\",\n \"tags\": [\"css\"],\n \"builderAliases\": [\"css_supports\"],\n \"notes\": [{\n \"name\": \"W3 Spec\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n },{\n \"name\": \"Related Github Issue\",\n \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n },{\n \"name\": \"W3 Info\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n }]\n}\n!*/\n\n var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n var oldSyntax = 'supportsCSS' in window;\n Modernizr.addTest('supports', newSyntax || oldSyntax);\n\n/*!\n{\n \"name\": \"CSS Transforms 3D\",\n \"property\": \"csstransforms3d\",\n \"caniuse\": \"transforms3d\",\n \"tags\": [\"css\"],\n \"warnings\": [\n \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n ]\n}\n!*/\n\n Modernizr.addTest('csstransforms3d', function() {\n var ret = !!testAllProps('perspective', '1px', true);\n var usePrefix = Modernizr._config.usePrefixes;\n\n // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n // some conditions. As a result, Webkit typically recognizes the syntax but\n // will sometimes throw a false positive, thus we must do a more thorough check:\n if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n var mq;\n var defaultStyle = '#modernizr{width:0;height:0}';\n // Use CSS Conditional Rules if available\n if (Modernizr.supports) {\n mq = '@supports (perspective: 1px)';\n } else {\n // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n mq = '@media (transform-3d)';\n if (usePrefix) {\n mq += ',(-webkit-transform-3d)';\n }\n }\n\n mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\n testStyles(defaultStyle + mq, function(elem) {\n ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n });\n }\n\n return ret;\n });\n\n\n // Run each test\n testRunner();\n\n delete ModernizrProto.addTest;\n delete ModernizrProto.addAsyncTest;\n\n // Run the things that are supposed to run after the tests\n for (var i = 0; i < Modernizr._q.length; i++) {\n Modernizr._q[i]();\n }\n\n // Leak Modernizr namespace\n window.Modernizr = Modernizr;\n\n\n;\n\n})(window, document);\nmodule.exports = window.Modernizr;\n})(window);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../.modernizrrc\n ** module id = 18\n ** module chunks = 0\n **/","const raf = require('raf');\nconst context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst bubble = require('./bubble');\nconst cursor = require('./cursor');\nconst select = require('./select');\nconst { KEY, EV, PROPS } = require('./constant');\nconst text = require('./text');\nconst events = require('./events');\nconst utils = require('./utils');\n\nconst eventCopy = require('./editor/copy');\nconst eventPaste = require('./editor/paste');\nconst eventBackspace = require('./editor/backspace');\nconst eventDelete = require('./editor/delete');\n\nconst EVENTS = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n keydown: onKeydown,\n keypress: onKeypress,\n keyup: onKeyup,\n mscontrolselect: events.prevent,\n paste: eventPaste,\n resize: events.prevent,\n resizestart: events.prevent,\n};\n\nexports.init = function (nodeWrap) {\n const nodeEditor = nodeWrap;\n nodeEditor.setAttribute('contenteditable', 'true');\n nodeEditor.setAttribute('spellcheck', 'false');\n\n nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\n events.on(nodeEditor, EVENTS);\n\n return {\n addBubble: addBubble.bind(nodeEditor),\n editBubble: editBubble.bind(nodeEditor),\n inputValue: inputValue.bind(nodeEditor),\n removeBubble: removeBubble.bind(nodeEditor),\n setContent: setContent.bind(nodeEditor),\n };\n};\n\nexports.destroy = function (nodeEditor) {\n events.off(nodeEditor, EVENTS);\n};\n\nfunction onBlur(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n return events.prevent(event);\n }\n\n select.clear(nodeEditor);\n bubble.bubbling(nodeEditor);\n}\n\nfunction onFocus(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n events.prevent(event);\n delete nodeEditor[ PROPS.LOCK_COPY ];\n\n // Safary 10 не сбрасывает курсор без задержки\n raf(() => {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n });\n\n return false;\n }\n\n cursor.restore(nodeEditor);\n}\n\nfunction onKeyup(event) {\n const nodeEditor = event.currentTarget;\n const code = events.keyCode(event);\n const isPrintableChar = do {\n if (event.key) {\n event.key.length === 1;\n\n } else {\n ((code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd);\n }\n };\n\n if (isPrintableChar) {\n nodeEditor.fireInput();\n }\n}\n\nfunction onKeypress(event) {\n const code = events.keyCode(event);\n const nodeEditor = event.currentTarget;\n\n /* eslint no-case-declarations: 0 */\n switch (code) {\n case KEY.Enter:\n event.preventDefault();\n if (!nodeEditor.options('disableControls')) {\n if (!editBubbleKeyboardEvent(nodeEditor)) {\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n break;\n\n case KEY.Space:\n if (editBubbleKeyboardEvent(nodeEditor)) {\n event.preventDefault();\n }\n break;\n\n default:\n const separator = nodeEditor.options('separator');\n if (separator && separator.test(String.fromCharCode(code))) {\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n}\n\nfunction onKeydown(event) {\n const code = events.keyCode(event);\n const metaKey = events.metaKey(event);\n const nodeEditor = event.currentTarget;\n const enable = !nodeEditor.options('disableControls');\n\n switch (code) {\n case KEY.Esc:\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n break;\n\n case KEY.Backspace:\n event.preventDefault();\n eventBackspace(event);\n break;\n\n case KEY.Delete:\n event.preventDefault();\n eventDelete(event);\n break;\n\n case KEY.Left:\n event.preventDefault();\n arrowLeft(event);\n break;\n\n // сдвигаем курсор в начало списка\n case KEY.Top:\n event.preventDefault();\n if (enable) {\n const headBubble = bubbleset.headBubble(nodeEditor);\n headBubble && select.uniq(headBubble);\n }\n break;\n\n case KEY.Right:\n event.preventDefault();\n arrowRight(event);\n break;\n\n // сдвигаем курсор в конец списка\n // case KEY.Tab:\n case KEY.Bottom:\n event.preventDefault();\n if (enable && select.has(nodeEditor)) {\n cursor.restore(nodeEditor);\n }\n break;\n\n case KEY.a:\n if (metaKey) {\n event.preventDefault();\n\n if (!text.selectAll(null, event.currentTarget)) {\n select.all(nodeEditor);\n }\n }\n break;\n\n case KEY.c:\n if (metaKey) {\n eventCopy(event);\n }\n break;\n\n case KEY.x:\n if (metaKey) {\n eventCopy(event, () => eventDelete(event));\n }\n break;\n }\n}\n\nfunction arrowLeft(event) {\n const selection = context.getSelection();\n\n if (text.arrowLeft(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ 0 ] === nodeSet.startRangeSelect) {\n list[ list.length - 1 ];\n\n } else {\n list[ 0 ];\n }\n };\n\n const node = bubbleset.prevBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n }\n}\n\nfunction arrowRight(event) {\n const selection = context.getSelection();\n\n if (text.arrowRight(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.nextBubble(selection.focusNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ list.length - 1 ] === nodeSet.startRangeSelect) {\n list[ 0 ];\n\n } else {\n list[ list.length - 1 ];\n }\n };\n\n const node = bubbleset.nextBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n\n } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n select.clear(nodeSet);\n selection.collapse(begin.nextSibling, 0);\n\n } else {\n cursor.restore(nodeSet);\n }\n}\n\nfunction onClick(event) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet) {\n return;\n }\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (nodeBubble) {\n const clickTime = Date.now();\n const isDblclick = nodeSet[ PROPS.CLICK_TIME ] && (clickTime - nodeSet[ PROPS.CLICK_TIME ]) < 200;\n\n nodeSet[ PROPS.CLICK_TIME ] = clickTime;\n\n if (events.metaKey(event)) {\n select.add(nodeBubble);\n\n } else if (event.shiftKey) {\n if (!nodeSet.startRangeSelect) {\n select.uniq(nodeBubble);\n\n } else {\n select.range(nodeBubble);\n }\n\n } else if (isDblclick) {\n bubble.edit(nodeSet, nodeBubble);\n\n } else {\n select.toggleUniq(nodeBubble);\n }\n\n } else {\n select.clear(nodeSet);\n\n const selection = context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n cursor.restore(nodeSet);\n }\n }\n}\n\nfunction editBubbleKeyboardEvent(nodeEditor) {\n const selection = context.getSelection();\n\n if (!selection || !selection.rangeCount) {\n const list = select.get(nodeEditor);\n\n if (list.length === 1) {\n return bubble.edit(nodeEditor, list[0]);\n }\n }\n\n return false;\n}\n\nfunction setContent(data) {\n var selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n data = text.html2text(data);\n this.appendChild(this.ownerDocument.createTextNode(data));\n bubble.bubbling(this);\n cursor.restore(this);\n}\n\nfunction addBubble(bubbleText, dataAttributes) {\n const nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n if (!nodeBubble) {\n return false;\n }\n\n if (text.text2bubble(this, nodeBubble)) {\n this.fireInput();\n this.fireChange();\n cursor.restore(this);\n return true;\n }\n\n return false;\n}\n\nfunction removeBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n this.removeChild(nodeBubble);\n this.fireChange();\n return true;\n }\n\n return false;\n}\n\nfunction editBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n return bubble.edit(this, nodeBubble);\n }\n\n return false;\n}\n\nfunction inputValue() {\n const textRange = text.currentTextRange(this);\n return textRange && text.textClean(textRange.toString()) || '';\n}\n\n/**\n * Генерация события редактирования бабла.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireEdit\n * @param {HTMLElement} nodeBubble нода бабл\n * @this HTMLElement\n * @private\n */\nfunction fireEdit(nodeBubble) {\n events.dispatch(this, EV.BUBBLE_EDIT, {\n bubbles: false,\n cancelable: false,\n detail: { data: nodeBubble }\n });\n}\n\n/**\n * Генерация события изменения набора баблов.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireChange\n * @this HTMLElement\n * @private\n */\nfunction fireChange() {\n events.dispatch(this, EV.CHANGE, {\n bubbles: false,\n cancelable: false\n });\n}\n\n/**\n * Генерация события ввода текста.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireInput\n * @this HTMLElement\n * @private\n */\nfunction fireInput() {\n const editText = inputValue.call(this);\n\n if (this[ PROPS.BUBBLE_VALUE ] !== editText) {\n this[ PROPS.BUBBLE_VALUE ] = editText;\n\n events.dispatch(this, EV.BUBBLE_INPUT, {\n bubbles: false,\n cancelable: false,\n detail: { data: editText }\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor.js\n **/","/**\n * @module x-bubbles/cursor\n */\n\nconst context = require('../context');\nconst text = require('./text');\nconst select = require('./select');\n\nexports.restore = restore;\nexports.restoreBasis = restoreBasis;\n\n/**\n * Reset the cursor position to the end of the input field.\n * @alias module:x-bubbles/cursor.restore\n * @param {HTMLElement} nodeSet\n */\nfunction restore(nodeSet) {\n select.clear(nodeSet);\n const basis = restoreBasis(nodeSet);\n const selection = context.getSelection();\n selection.removeAllRanges();\n selection.collapse(basis, 1);\n}\n\n/**\n * The creation of the fake text at the end childNodes\n * @alias module:x-bubbles/cursor.restoreBasis\n * @param {HTMLElement} nodeSet\n * @returns {HTMLTextElement} fake text node\n */\nfunction restoreBasis(nodeSet) {\n let fakeText = text.createZws();\n\n if (nodeSet.hasChildNodes()) {\n const lastNode = nodeSet.childNodes[ nodeSet.childNodes.length - 1 ];\n\n if (lastNode.isEqualNode(fakeText)) {\n fakeText = lastNode;\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n return fakeText;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/cursor.js\n **/","const raf = require('raf');\nconst events = require('../events');\nconst select = require('../select');\nconst { PROPS } = require('../constant');\nconst utils = require('../utils');\n\nmodule.exports = function (event, callback = function () {}) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n return false;\n }\n\n const list = select.get(nodeEditor);\n\n if (!list.length) {\n return false;\n }\n\n const bubbleCopy = nodeEditor.options('bubbleCopy');\n const value = bubbleCopy(list);\n\n if (!value) {\n return false;\n }\n\n nodeEditor[ PROPS.LOCK_COPY ] = true;\n\n const target = nodeEditor.ownerDocument.createElement('input');\n target.value = value;\n target.style.cssText = `\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;`;\n\n nodeEditor.parentNode.appendChild(target);\n\n events.one(target, {\n keyup: () => nodeEditor.focus(),\n blur: () => {\n removeNode(target);\n raf(callback);\n }\n });\n\n target.select();\n return true;\n};\n\nfunction removeNode(node) {\n node && node.parentNode && node.parentNode.removeChild(node);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/copy.js\n **/","const raf = require('raf');\nconst context = require('../../context');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst text = require('../text');\nconst { isIE } = require('../utils');\n\nmodule.exports = function (event) {\n event.preventDefault();\n const nodeEditor = event.currentTarget;\n\n if (context.clipboardData && context.clipboardData.getData) {\n onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\n } else if (event.clipboardData) {\n const contentType = 'text/plain';\n const clipboardData = event.clipboardData;\n const data = clipboardData.getData && clipboardData.getData(contentType);\n\n if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n Array.prototype.slice.call(clipboardData.items)\n .filter(item => item.kind === 'string' && item.type === contentType)\n .some(function (item) {\n item.getAsString(function (dataText) {\n onPasteSuccess(nodeEditor, dataText);\n });\n\n return true;\n });\n }\n }\n};\n\nfunction onPasteSuccess(nodeEditor, dataText) {\n const checkBubblePaste = nodeEditor.options('checkBubblePaste');\n const selection = context.getSelection();\n const isBubbling = do {\n if (dataText && selection.isCollapsed && !nodeEditor.inputValue) {\n checkBubblePaste(dataText);\n\n } else {\n false;\n }\n };\n\n if (text.replaceString(dataText, selection)) {\n if (isBubbling) {\n if (isIE) {\n raf(() => onReplaceSuccess(nodeEditor));\n\n } else {\n onReplaceSuccess(nodeEditor);\n }\n\n } else {\n nodeEditor.fireInput();\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction onReplaceSuccess(nodeEditor) {\n bubble.bubbling(nodeEditor);\n nodeEditor.focus();\n raf(() => cursor.restore(nodeEditor));\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/paste.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Backspace.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowLeft(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleLeft(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/backspace.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Delete.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowRight(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleRight(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/delete.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///x-bubbles.min.js","webpack:///webpack/bootstrap 97b5e590f2bc754a9c50","webpack:///./index.js","webpack:///./context.js","webpack:///./core/drag.js","webpack:///./core/drag/native.js","webpack:///./core/select.js","webpack:///./core/bubble.js","webpack:///./core/text.js","webpack:///./core/bubbleset.js","webpack:///./core/utils.js","webpack:///../~/raf/index.js","webpack:///../~/performance-now/lib/performance-now.js","webpack:///../~/process/browser.js","webpack:///./core/events.js","webpack:///./polyfills/CustomEventCommon.js","webpack:///./core/constant.js","webpack:///./core/drag/common.js","webpack:///./core/drag/bubbles.png","webpack:///./core/drag/mouse.js","webpack:///../.modernizrrc","webpack:///./core/editor.js","webpack:///./core/cursor.js","webpack:///./core/editor/copy.js","webpack:///./core/editor/paste.js","webpack:///./core/editor/backspace.js","webpack:///./core/editor/delete.js"],"names":["XBubbles","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","optionsPrepare","options","name","OPTIONS","_OPTIONS$name","_slicedToArray","type","def","OPTIONS_PREPARE","initEditor","node","editor","Object","defineProperty","configurable","value","init","destroyEditor","destroy","bubbleCopyOption","list","map","item","innerHTML","join","checkBubblePasteOption","sliceIterator","arr","i","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","_typeof","obj","constructor","prototype","context","drag","bubble","bubbleset","begining","bubbleCopy","bubbleDeformation","bubbleFormation","checkBubblePaste","classBubble","disableControls","draggable","ending","separator","tokenizer","create","HTMLDivElement","createdCallback","this","attachedCallback","bubbling","detachedCallback","_options","optionName","attrName","hasAttribute","getAttribute","items","get","getBubbles","inputValue","setContent","data","addBubble","bubbleText","removeBubble","nodeBubble","editBubble","document","registerElement","extends","func","Function","bool","noop","reg","match","RegExp","str","String","eval","native","mouse","_require","canUseDrag","nodeSet","onDragstart","event","stopPropagation","closestNodeSet","target","closestNodeBubble","preventDefault","selection","getSelection","removeAllRanges","currentDragSet","classList","add","CLS","DRAGSTART","select","dataTransfer","effectAllowed","setData","setDragImage","getDragImage","DRAG_IMG","w","h","onDrop","forEach","appendChild","setTimeout","onDropSuccess","onDragover","dropEffect","onDragenter","DROPZONE","onDragleave","remove","onDragend","events","_require2","EVENTS","dragend","dragenter","dragleave","dragover","dragstart","drop","on","off","range","isBubbleNode","set","parentNode","uniq","clear","headList","lastList","startRangeSelect","fromNode","toNode","position","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","setSelected","nextSibling","all","slice","querySelectorAll","PATH_NOT_SELECTED","querySelector","PATH_SELECTED","has","Boolean","head","last","removeAttribute","toggleUniq","isSelected","removeSelected","setAttribute","nodeType","ELEMENT_NODE","edit","rangeParams","dataText","text","textClean","innerText","startOffset","endOffset","textFake","createZws","textNode","createTextNode","fireEdit","replaceChild","insertBefore","createRange","setStart","setEnd","addRange","dataAttributes","arguments","wrap","ownerDocument","createElement","key","escape","classes","trim","split","len","ranges","getBubbleRanges","nodes","toString","deleteContents","textParts","trimIterator","filter","nonEmptyIterator","reduce","parts","concat","parseFragmentByEnding","parseFragmentByBeginning","fragment","createDocumentFragment","textPart","insertNode","fireInput","fireChange","children","childNodes","setEndBefore","setStartBefore","setEndAfter","lastIndex","loop","exec","substring","res","index","text2bubble","nodeEditor","currentTextRange","replace","pointNode","focusNode","TEXT_NODE","anchorNode","startNode","endNode","previousSibling","rangeCount","anchor","getRangeAt","surroundContents","nodeValue","collapse","replaceString","arrowLeft","extend","_selectionCorrect","selectionCorrect","revert","isCollapsed","isNativeExtend","offset","checkZws","arrowRight","_selectionCorrect2","html2text","DOMContainer","implementation","createHTMLDocument","body","selectAll","hasBubbles","TEXT_ZWS","REG_ZWS","test","REG_REPLACE_NON_PRINTABLE","anchorOffset","focusOffset","Math","min","max","lastBubble","headBubble","findBubbleLeft","DOCUMENT_POSITION_FOLLOWING","findBubbleRight","isEditorNode","prevBubble","nextBubble","unescapeHtmlChar","chr","HTML_UNESCAPES","escapeHtmlChar","HTML_ESCAPES","raf","&","<",">","\"","'","`","&","<",">",""","'","`","REG_ESCAPED_HTML","REG_UNESCAPED_HTML","REG_HAS_ESCAPED_HTML","source","REG_HAS_UNESCAPED_HTML","REG_IE","DOCUMENT_POSITION_CONTAINED_BY","throttle","callback","runContext","animationCallback","apply","unescape","navigator","userAgent","isIE","global","now","root","window","vendors","suffix","caf","queue","frameDuration","_now","cp","cancelled","e","round","handle","fn","cancel","polyfill","requestAnimationFrame","cancelAnimationFrame","process","getNanoSeconds","hrtime","loadTime","performance","hr","Date","getTime","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","array","nextTick","args","title","browser","env","argv","version","versions","addListener","once","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","_defineProperty","enumerable","writable","scrollX","html","documentElement","scrollLeft","clientLeft","scrollY","scrollTop","clientTop","dispatch","element","params","dispatchEvent","Custom","oneCallback","eventName","_callback","removeEventListener","CustomEventCommon","keyCode","charCode","metaKey","ctrlKey","pageX","clientX","pageY","clientY","one","addEventListener","prevent","cancelBubble","returnValue","stopImmediatePropagation","CustomEvent","doc","protoEvent","Event","issetCustomEvent","createEvent","immediatePropagationStopped","bubbles","cancelable","evt","initCustomEvent","detail","initEvent","KEY","a","Backspace","Bottom","Cmd","Comma","Delete","Enter","Esc","Left","Right","Semicolon","Space","Tab","Top","x","EV","BUBBLE_EDIT","BUBBLE_INPUT","CHANGE","DRAGEND","DRAGENTER","DRAGLEAVE","DROP","PROPS","BUBBLE_VALUE","CLICK_TIME","LOCK_COPY","dragImage","Image","src","fromNodeSet","toNodeSet","focus","onMousedown","__drag__","onMouseup","bind","onMousemove","utils","onScroll","nodeOffsetX","offsetX","nodeOffsetY","offsetY","y","currentMoveSet","currentDragElement","dragSet","removeChild","_","moveElement","cloneNode","style","cssText","Modernizr","csstransforms3d","transform","csstransforms","top","left","is","testRunner","featureNames","feature","aliasIdx","result","nameIdx","featureName","featureNameSplit","featureIdx","tests","hasOwnProperty","toLowerCase","aliases","contains","substr","indexOf","isSVG","createElementNS","getBody","fake","injectElementWithStyles","rule","testnames","ret","docOverflow","mod","div","parseInt","styleSheet","background","overflow","docElement","offsetHeight","domToCSS","m1","nativeTestProps","props","CSS","supports","conditionText","getComputedStyle","cssToDOM","m2","toUpperCase","testProps","prefixed","skipValueTest","cleanElems","afterInit","mStyle","modElem","propsLength","prop","before","elems","shift","fnBind","that","testDOMProps","elem","testPropsAll","ucProp","charAt","cssomPrefixes","testAllProps","ModernizrProto","_version","_config","classPrefix","enableClasses","enableJSClass","usePrefixes","_q","cb","self","addTest","addAsyncTest","omPrefixes","_cssomPrefixes","nodeName","unshift","domPrefixes","_domPrefixes","testStyles","newSyntax","oldSyntax","usePrefix","mq","defaultStyle","offsetWidth","onBlur","currentTarget","onFocus","cursor","restore","onKeyup","code","isPrintableChar","onKeypress","editBubbleKeyboardEvent","fromCharCode","onKeydown","enable","eventBackspace","eventDelete","eventCopy","shiftKey","begin","onClick","clickTime","isDblclick","firstChild","textRange","editText","eventPaste","blur","click","keydown","keypress","keyup","mscontrolselect","paste","resize","resizestart","nodeWrap","basis","restoreBasis","fakeText","hasChildNodes","lastNode","isEqualNode","removeNode","onPasteSuccess","isBubbling","onReplaceSuccess","clipboardData","getData","contentType","kind","some","getAsString","removeBubbles"],"mappings":"AAAA,GAAIA,UACK,SAAUC,GCGnB,QAAAC,GAAAC,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MsE,GAAM7T,EAAQ,GACdoI,EAASpI,EAAQ,GACjByM,EAAOzM,EAAQ,GACfgE,EAAYhE,EAAQ,GACpB+D,EAAS/D,EAAQ,GACjBsmB,EAAStmB,EAAQ,IACjBkf,EAAQlf,EAAQ,EAOtBI,GAAOD,QAAU,SAAUmH,GACvB,GAAM8I,GAAa9I,EAAMG,OACnBG,EAAYsX,EAAMrX,aAAauI,EAErC,IAAIxI,EACA,GAAKA,EAAU8J,YAIR,GAAIjF,EAAKqF,WAAWlK,GAAW,GAClC6E,EAAKlD,OAAO3B,GACZwI,EAAWd,gBAER,CACH,GAAMrJ,GAAajC,EAAUoP,gBAAgBxL,EAC7C3B,IAAcmC,EAAOoC,KAAKvE,OAT1BwG,GAAKlD,OAAO3B,GACZwI,EAAWd,gBAWPga,GAAclZ,KACtBA,EAAWwO,QAEX/K,EAAI,iBAAMyS,GAAOC,QAAQnW","file":"x-bubbles.min.js","sourcesContent":["var XBubbles =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _slicedToArray = function () { function sliceIterator(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\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar context = __webpack_require__(1);\n\tvar drag = __webpack_require__(2);\n\tvar editor = __webpack_require__(19);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar OPTIONS = {\n\t begining: ['reg', null, 'begining'],\n\t bubbleCopy: ['func', bubbleCopyOption, 'bubble-copy'],\n\t bubbleDeformation: ['func', function () {}, 'bubble-deformation'],\n\t bubbleFormation: ['func', function () {}, 'bubble-formation'],\n\t checkBubblePaste: ['func', checkBubblePasteOption, 'check-bubble-paste'],\n\t classBubble: ['str', 'bubble', 'class-bubble'],\n\t disableControls: ['bool', false, 'disable-controls'],\n\t draggable: ['bool', true, 'draggable'],\n\t ending: ['reg', null, 'ending'], // /\\@ya\\.ru/g;\n\t separator: ['reg', /[,;]/, 'separator'],\n\t tokenizer: ['func', null, 'tokenizer']\n\t};\n\t\n\tvar XBubbles = Object.create(HTMLDivElement.prototype, {\n\t createdCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t }\n\t },\n\t\n\t attachedCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t drag.init(this);\n\t bubble.bubbling(this);\n\t }\n\t },\n\t\n\t detachedCallback: {\n\t value: function value() {\n\t drag.destroy(this);\n\t destroyEditor(this);\n\t }\n\t },\n\t\n\t /*\n\t attributeChangedCallback: {\n\t value: function (name, prevValue, value) {}\n\t },\n\t */\n\t\n\t options: {\n\t value: function value(name, _value) {\n\t if (!this._options) {\n\t this._options = {};\n\t\n\t for (var optionName in OPTIONS) {\n\t this._options[optionName] = undefined;\n\t\n\t var attrName = 'data-' + OPTIONS[optionName][2];\n\t if (this.hasAttribute(attrName)) {\n\t this._options[optionName] = this.getAttribute(attrName);\n\t }\n\t }\n\t\n\t optionsPrepare(this._options);\n\t }\n\t\n\t if (typeof _value !== 'undefined') {\n\t this._options[name] = _value;\n\t optionsPrepare(this._options);\n\t } else {\n\t return this._options[name];\n\t }\n\t }\n\t },\n\t\n\t items: {\n\t get: function get() {\n\t return bubbleset.getBubbles(this);\n\t }\n\t },\n\t\n\t inputValue: {\n\t get: function get() {\n\t return this.editor.inputValue();\n\t }\n\t },\n\t\n\t setContent: {\n\t value: function value(data) {\n\t return this.editor.setContent(data);\n\t }\n\t },\n\t\n\t addBubble: {\n\t value: function value(bubbleText, data) {\n\t return this.editor.addBubble(bubbleText, data);\n\t }\n\t },\n\t\n\t removeBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.removeBubble(nodeBubble);\n\t }\n\t },\n\t\n\t editBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.editBubble(nodeBubble);\n\t }\n\t }\n\t});\n\t\n\tmodule.exports = context.document.registerElement('x-bubbles', {\n\t extends: 'div',\n\t prototype: XBubbles\n\t});\n\t\n\tvar OPTIONS_PREPARE = {\n\t func: function func(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return new Function('context', 'return context.' + value + ';')(context);\n\t\n\t case 'function':\n\t return value;\n\t }\n\t },\n\t bool: function bool(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return value === 'true' || value === 'on';\n\t\n\t case 'boolean':\n\t return value;\n\t }\n\t },\n\t noop: function noop(value) {\n\t return value;\n\t },\n\t reg: function reg(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t if (value) {\n\t var match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n\t if (match) {\n\t return new RegExp(match[1], match[2]);\n\t }\n\t }\n\t\n\t return null;\n\t\n\t case 'object':\n\t if (value instanceof context.RegExp || value === null) {\n\t return value;\n\t }\n\t }\n\t },\n\t str: function str(value) {\n\t if (typeof value !== 'undefined') {\n\t return value ? String(value) : '';\n\t }\n\t }\n\t};\n\t\n\tfunction optionsPrepare(options) {\n\t for (var name in OPTIONS) {\n\t var _OPTIONS$name = _slicedToArray(OPTIONS[name], 2),\n\t type = _OPTIONS$name[0],\n\t def = _OPTIONS$name[1];\n\t\n\t options[name] = OPTIONS_PREPARE[type](options[name]);\n\t if (typeof options[name] === 'undefined') {\n\t options[name] = def;\n\t }\n\t }\n\t}\n\t\n\tfunction initEditor(node) {\n\t if (!node.editor) {\n\t Object.defineProperty(node, 'editor', {\n\t configurable: true,\n\t value: editor.init(node)\n\t });\n\t }\n\t}\n\t\n\tfunction destroyEditor(node) {\n\t if (node.editor) {\n\t editor.destroy(node);\n\t delete node.editor;\n\t }\n\t}\n\t\n\tfunction bubbleCopyOption(list) {\n\t return list.map(function (item) {\n\t return item.innerHTML;\n\t }).join(', ');\n\t}\n\t\n\tfunction checkBubblePasteOption() {\n\t return true;\n\t}\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function () {\n\t /* eslint no-eval: 0 */\n\t return this || (1, eval)('this');\n\t}();\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar native = __webpack_require__(3);\n\tvar mouse = __webpack_require__(17);\n\t\n\tvar _require = __webpack_require__(8),\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.init = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.init(nodeSet);\n\t }\n\t\n\t return mouse.init(nodeSet);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.destroy(nodeSet);\n\t }\n\t\n\t return mouse.destroy(nodeSet);\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar events = __webpack_require__(12);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar EVENTS = {\n\t dragend: onDragend,\n\t dragenter: onDragenter,\n\t dragleave: onDragleave,\n\t dragover: onDragover,\n\t dragstart: onDragstart,\n\t drop: onDrop\n\t};\n\t\n\tvar currentDragSet = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, EVENTS);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, EVENTS);\n\t};\n\t\n\tfunction onDragstart(event) {\n\t event.stopPropagation();\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (!nodeSet || !nodeBubble) {\n\t event.preventDefault();\n\t return;\n\t }\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = nodeSet;\n\t nodeSet.classList.add(CLS.DRAGSTART);\n\t select.add(nodeBubble);\n\t\n\t event.dataTransfer.effectAllowed = 'move';\n\t event.dataTransfer.setData('text/plain', '');\n\t\n\t var list = select.get(currentDragSet);\n\t if (list.length > 1) {\n\t event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n\t }\n\t}\n\t\n\tfunction onDrop(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet || nodeSet === currentDragSet) {\n\t return;\n\t }\n\t\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t}\n\t\n\tfunction onDragover(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t event.dataTransfer.dropEffect = 'move';\n\t}\n\t\n\tfunction onDragenter(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragleave(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragend(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t currentDragSet.classList.remove(CLS.DRAGSTART);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t\n\t currentDragSet = null;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar slice = Array.prototype.slice;\n\tvar PATH_SELECTED = '[bubble][selected]';\n\tvar PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\t\n\texports.all = all;\n\texports.add = add;\n\texports.clear = clear;\n\texports.get = get;\n\texports.uniq = uniq;\n\texports.head = head;\n\texports.last = last;\n\texports.has = has;\n\texports.range = range;\n\texports.toggleUniq = toggleUniq;\n\t\n\tfunction range(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return;\n\t }\n\t\n\t var set = node.parentNode;\n\t var list = get(set);\n\t\n\t if (!list.length) {\n\t uniq(node);\n\t return;\n\t }\n\t\n\t clear(set);\n\t\n\t var headList = list[0];\n\t var lastList = list[list.length - 1];\n\t\n\t if (headList === lastList || !set.startRangeSelect) {\n\t set.startRangeSelect = headList;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var position = node.compareDocumentPosition(set.startRangeSelect);\n\t\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t fromNode = set.startRangeSelect;\n\t toNode = node;\n\t } else {\n\t fromNode = node;\n\t toNode = set.startRangeSelect;\n\t }\n\t\n\t if (fromNode && toNode) {\n\t var item = fromNode;\n\t\n\t while (item) {\n\t if (!setSelected(item)) {\n\t break;\n\t }\n\t\n\t if (item === toNode) {\n\t break;\n\t }\n\t\n\t item = item.nextSibling;\n\t }\n\t\n\t bubble.bubbling(set);\n\t }\n\t}\n\t\n\tfunction all(nodeSet) {\n\t slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(function (item) {\n\t return setSelected(item);\n\t });\n\t nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\t\n\t bubble.bubbling(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t}\n\t\n\tfunction has(nodeSet) {\n\t return Boolean(nodeSet.querySelector(PATH_SELECTED));\n\t}\n\t\n\tfunction head(set) {\n\t return get(set)[0];\n\t}\n\t\n\tfunction last(set) {\n\t var list = get(set);\n\t return list[list.length - 1];\n\t}\n\t\n\tfunction get(nodeSet) {\n\t return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n\t}\n\t\n\tfunction clear(nodeSet) {\n\t get(nodeSet).forEach(function (item) {\n\t return item.removeAttribute('selected');\n\t });\n\t}\n\t\n\tfunction add(node) {\n\t if (setSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t nodeSet.startRangeSelect = node;\n\t // ???\n\t bubble.bubbling(nodeSet);\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction uniq(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return false;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t var selection = context.getSelection();\n\t\n\t selection && selection.removeAllRanges();\n\t clear(nodeSet);\n\t\n\t return add(node);\n\t}\n\t\n\tfunction toggleUniq(node) {\n\t if (isSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t if (get(nodeSet).length === 1) {\n\t return removeSelected(node);\n\t }\n\t }\n\t\n\t return uniq(node);\n\t}\n\t\n\tfunction isSelected(node) {\n\t return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n\t}\n\t\n\tfunction setSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.setAttribute('selected', '');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.removeAttribute('selected');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t escape = _require.escape,\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.isBubbleNode = isBubbleNode;\n\texports.bubbling = bubbling;\n\texports.create = create;\n\texports.edit = edit;\n\t\n\tfunction isBubbleNode(node) {\n\t if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n\t return false;\n\t }\n\t\n\t return node.hasAttribute('bubble');\n\t}\n\t\n\tfunction edit(nodeSet, nodeBubble) {\n\t if (nodeBubble.hasAttribute('readonly')) {\n\t return false;\n\t }\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection) {\n\t return false;\n\t }\n\t\n\t var bubbleDeformation = nodeSet.options('bubbleDeformation');\n\t var rangeParams = bubbleDeformation(nodeBubble);\n\t\n\t if (!rangeParams) {\n\t var dataText = text.textClean(nodeBubble.innerText);\n\t\n\t rangeParams = {\n\t text: dataText,\n\t startOffset: 0,\n\t endOffset: dataText.length\n\t };\n\t }\n\t\n\t var textFake = text.createZws();\n\t var textNode = context.document.createTextNode(rangeParams.text);\n\t\n\t nodeSet.fireEdit(nodeBubble);\n\t nodeSet.replaceChild(textNode, nodeBubble);\n\t nodeSet.insertBefore(textFake, textNode);\n\t\n\t var range = context.document.createRange();\n\t range.setStart(textNode, rangeParams.startOffset);\n\t range.setEnd(textNode, rangeParams.endOffset);\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t}\n\t\n\t/**\n\t * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n\t * @param {[type]} nodeSet [description]\n\t * @param {[type]} dataText [description]\n\t * @param {Object} [dataAttributes={}] [description]\n\t * @returns {[type]} [description]\n\t */\n\tfunction create(nodeSet, dataText) {\n\t var dataAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t dataText = text.textClean(dataText);\n\t\n\t if (!dataText) {\n\t return;\n\t }\n\t\n\t var bubbleFormation = nodeSet.options('bubbleFormation');\n\t var classBubble = nodeSet.options('classBubble');\n\t var draggable = canUseDrag && nodeSet.options('draggable');\n\t var wrap = nodeSet.ownerDocument.createElement('span');\n\t\n\t wrap.innerText = dataText;\n\t\n\t for (var key in dataAttributes) {\n\t if (dataAttributes[key]) {\n\t wrap.setAttribute('data-' + key, escape(dataAttributes[key]));\n\t }\n\t }\n\t\n\t bubbleFormation(wrap);\n\t\n\t if (classBubble) {\n\t var classes = String(classBubble).trim().split(/\\s+/);\n\t var len = classes.length;\n\t\n\t while (len--) {\n\t wrap.classList.add(classes[len]);\n\t }\n\t }\n\t\n\t wrap.setAttribute('bubble', '');\n\t wrap.setAttribute('contenteditable', 'false');\n\t draggable && wrap.setAttribute('draggable', 'true');\n\t\n\t return wrap;\n\t}\n\t\n\tfunction bubbling(nodeSet) {\n\t var begining = nodeSet.options('begining');\n\t var ending = nodeSet.options('ending');\n\t var separator = nodeSet.options('separator');\n\t var tokenizer = nodeSet.options('tokenizer');\n\t var ranges = getBubbleRanges(nodeSet);\n\t var nodes = [];\n\t\n\t ranges.forEach(function (range) {\n\t var dataText = text.textClean(range.toString());\n\t\n\t if (!dataText) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var textParts = [dataText];\n\t\n\t if (tokenizer) {\n\t textParts = tokenizer(dataText);\n\t } else {\n\t if (separator) {\n\t textParts = dataText.split(separator).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t\n\t if (ending) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByEnding(str, ending));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t } else if (begining) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByBeginning(str, begining));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t }\n\t\n\t if (!Array.isArray(textParts) || !textParts.length) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var fragment = context.document.createDocumentFragment();\n\t\n\t textParts.forEach(function (textPart) {\n\t var nodeBubble = create(nodeSet, textPart);\n\t if (nodeBubble) {\n\t fragment.appendChild(nodeBubble);\n\t nodes.push(nodeBubble);\n\t }\n\t });\n\t\n\t range.deleteContents();\n\t range.insertNode(fragment);\n\t });\n\t\n\t nodeSet.fireInput();\n\t\n\t if (nodes.length) {\n\t nodeSet.fireChange();\n\t }\n\t\n\t return nodes;\n\t}\n\t\n\tfunction getBubbleRanges(nodeSet) {\n\t var ranges = [];\n\t var children = nodeSet.childNodes;\n\t var range = void 0;\n\t var node = void 0;\n\t\n\t for (var i = 0; i < children.length; i++) {\n\t node = children[i];\n\t\n\t if (isBubbleNode(node)) {\n\t if (range) {\n\t range.setEndBefore(node);\n\t ranges.push(range);\n\t range = undefined;\n\t }\n\t } else {\n\t if (!range) {\n\t range = context.document.createRange();\n\t range.setStartBefore(node);\n\t }\n\t }\n\t }\n\t\n\t if (range) {\n\t range.setEndAfter(node);\n\t ranges.push(range);\n\t }\n\t\n\t return ranges;\n\t}\n\t\n\tfunction trimIterator(str) {\n\t return str.trim();\n\t}\n\t\n\tfunction nonEmptyIterator(str) {\n\t return Boolean(str);\n\t}\n\t\n\tfunction parseFragmentByEnding(str, reg) {\n\t var parts = [];\n\t var lastIndex = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while (reg.exec(str) !== null && loop) {\n\t loop--;\n\t parts.push(str.substring(lastIndex, reg.lastIndex));\n\t lastIndex = reg.lastIndex;\n\t }\n\t\n\t return parts;\n\t}\n\t\n\tfunction parseFragmentByBeginning(str, reg) {\n\t var parts = [];\n\t var res = void 0;\n\t var index = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while ((res = reg.exec(str)) !== null && loop) {\n\t loop--;\n\t if (index !== res.index) {\n\t parts.push(str.substring(index, res.index));\n\t index = res.index;\n\t }\n\t }\n\t\n\t parts.push(str.substring(index, str.length));\n\t return parts;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar _require = __webpack_require__(8),\n\t getSelection = _require.getSelection;\n\t\n\t/* eslint-disable max-len */\n\t\n\t\n\tvar REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09FC-\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF2-\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31\\u0B34\\u0B3A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CD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1AAE-\\u1AFF\\u1B4C-\\u1B4F\\u1B7D-\\u1B7F\\u1BF4-\\u1BFB\\u1C38-\\u1C3A\\u1C4A-\\u1C4C\\u1C80-\\u1CBF\\u1CC8-\\u1CCF\\u1CF7-\\u1CFF\\u1DE7-\\u1DFB\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FC5\\u1FD4\\u1FD5\\u1FDC\\u1FF0\\u1FF1\\u1FF5\\u1FFF\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u2072\\u2073\\u208F\\u209D-\\u209F\\u20BB-\\u20CF\\u20F1-\\u20FF\\u218A-\\u218F\\u23F4-\\u23FF\\u2427-\\u243F\\u244B-\\u245F\\u2700\\u2B4D-\\u2B4F\\u2B5A-\\u2BFF\\u2C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00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\n\tvar REG_ZWS = /\\u200B/;\n\tvar TEXT_ZWS = '\\u200B';\n\t\n\texports.arrowRight = arrowRight;\n\texports.arrowLeft = arrowLeft;\n\texports.remove = remove;\n\texports.html2text = html2text;\n\texports.currentTextRange = currentTextRange;\n\texports.text2bubble = text2bubble;\n\texports.replaceString = replaceString;\n\texports.selectAll = selectAll;\n\texports.textClean = textClean;\n\texports.checkZws = checkZws;\n\texports.createZws = createZws;\n\t\n\tfunction text2bubble(nodeEditor, nodeBubble) {\n\t var selection = getSelection(nodeEditor);\n\t var range = selection && currentTextRange(nodeEditor, selection);\n\t\n\t if (range) {\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t replace(selection, nodeBubble);\n\t } else {\n\t nodeEditor.appendChild(nodeBubble);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction currentTextRange(nodeEditor, selection) {\n\t selection = selection || getSelection(nodeEditor);\n\t if (!selection) {\n\t return;\n\t }\n\t\n\t var pointNode = selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE ? selection.focusNode : selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE ? selection.anchorNode : undefined;\n\t\n\t if (!pointNode) {\n\t return;\n\t }\n\t\n\t var startNode = pointNode;\n\t var endNode = pointNode;\n\t var item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t startNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t endNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var range = nodeEditor.ownerDocument.createRange();\n\t range.setStartBefore(startNode);\n\t range.setEndAfter(endNode);\n\t\n\t return range;\n\t}\n\t\n\tfunction remove(selection) {\n\t return replace(selection, createZws());\n\t}\n\t\n\tfunction replace(selection, node) {\n\t if (!selection || !selection.rangeCount) {\n\t return false;\n\t }\n\t\n\t var anchor = context.document.createElement('span');\n\t selection.getRangeAt(0).surroundContents(anchor);\n\t anchor.parentNode.replaceChild(node, anchor);\n\t\n\t selection.removeAllRanges();\n\t\n\t if (node.nodeType === Node.TEXT_NODE) {\n\t var range = context.document.createRange();\n\t // для ИЕ обязательно указывать node.nodeValue.length\n\t range.setStart(node, node.nodeValue.length);\n\t range.collapse(false);\n\t selection.addRange(range);\n\t } else {\n\t selection.collapse(node, 0);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction replaceString(data, selection) {\n\t data = textClean(data);\n\t if (!data) {\n\t return false;\n\t }\n\t\n\t selection = selection || context.getSelection();\n\t var textNode = context.document.createTextNode(data);\n\t\n\t if (!replace(selection, textNode)) {\n\t return false;\n\t }\n\t\n\t selection.collapse(textNode, textNode.nodeValue.length);\n\t return true;\n\t}\n\t\n\tfunction arrowLeft(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect = selectionCorrect(selection),\n\t startNode = _selectionCorrect.startNode,\n\t endNode = _selectionCorrect.endNode,\n\t startOffset = _selectionCorrect.startOffset,\n\t endOffset = _selectionCorrect.endOffset,\n\t revert = _selectionCorrect.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(startNode, startOffset);\n\t return true;\n\t }\n\t\n\t var isNativeExtend = Boolean(selection.extend);\n\t revert = isNativeExtend ? revert : !revert;\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t if (offset === null) {\n\t offset = node.nodeValue.length;\n\t }\n\t\n\t if (offset - 1 < 0) {\n\t node = node.previousSibling;\n\t offset = null;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset - 1, offset);\n\t\n\t if (checkZws(text)) {\n\t offset = offset - 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node || offset === null) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t if (isNativeExtend) {\n\t selection.extend(node, offset - 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset - 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset - 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset - 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction arrowRight(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.focusNode || selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect2 = selectionCorrect(selection),\n\t startNode = _selectionCorrect2.startNode,\n\t endNode = _selectionCorrect2.endNode,\n\t startOffset = _selectionCorrect2.startOffset,\n\t endOffset = _selectionCorrect2.endOffset,\n\t revert = _selectionCorrect2.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(endNode, endOffset);\n\t return true;\n\t }\n\t\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var len = node.nodeValue.length;\n\t\n\t if (offset + 1 > len) {\n\t node = node.nextSibling;\n\t offset = 0;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset, offset + 1);\n\t\n\t if (checkZws(text)) {\n\t offset = offset + 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t var isNativeExtend = Boolean(selection.extend);\n\t\n\t if (isNativeExtend) {\n\t selection.extend(node, offset + 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset + 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset + 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset + 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction html2text(value) {\n\t if (!value) {\n\t return '';\n\t }\n\t\n\t var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n\t DOMContainer.innerText = value;\n\t\n\t return DOMContainer.innerText.replace(/^[\\u0020\\u00a0]+$/gm, '').replace(/\\n/gm, ' ').trim();\n\t}\n\t\n\tfunction selectAll(selection, nodeSet) {\n\t selection = selection || context.getSelection();\n\t var node = selection && selection.anchorNode;\n\t\n\t if (!node || node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t fromNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t toNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var hasBubbles = bubbleset.hasBubbles(nodeSet);\n\t var range = context.document.createRange();\n\t range.setStartBefore(fromNode);\n\t range.setEndAfter(toNode);\n\t\n\t var dataText = textClean(range.toString());\n\t\n\t if (dataText || !dataText && !hasBubbles) {\n\t if (!dataText) {\n\t range.collapse();\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction createZws() {\n\t return context.document.createTextNode(TEXT_ZWS);\n\t}\n\t\n\tfunction checkZws(value) {\n\t return REG_ZWS.test(value);\n\t}\n\t\n\tfunction textClean(value) {\n\t return String(value || '').trim().replace(REG_REPLACE_NON_PRINTABLE, '');\n\t}\n\t\n\tfunction selectionCorrect(selection) {\n\t var startNode = selection.anchorNode;\n\t var endNode = selection.focusNode;\n\t var startOffset = selection.anchorOffset;\n\t var endOffset = selection.focusOffset;\n\t var revert = false;\n\t\n\t if (startNode === endNode) {\n\t startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n\t endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n\t revert = selection.anchorOffset > selection.focusOffset;\n\t } else {\n\t var position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t startNode = selection.focusNode;\n\t startOffset = selection.focusOffset;\n\t endNode = selection.anchorNode;\n\t endOffset = selection.anchorOffset;\n\t revert = true;\n\t }\n\t }\n\t\n\t return { startNode: startNode, endNode: endNode, startOffset: startOffset, endOffset: endOffset, revert: revert };\n\t}\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bubble = __webpack_require__(5);\n\tvar text = __webpack_require__(6);\n\t\n\texports.closestNodeBubble = closestNodeBubble;\n\texports.closestNodeSet = closestNodeSet;\n\texports.findBubbleLeft = findBubbleLeft;\n\texports.findBubbleRight = findBubbleRight;\n\texports.getBubbles = getBubbles;\n\texports.hasBubbles = hasBubbles;\n\texports.headBubble = headBubble;\n\texports.lastBubble = lastBubble;\n\texports.nextBubble = nextBubble;\n\texports.prevBubble = prevBubble;\n\t\n\tfunction lastBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:last-child');\n\t}\n\t\n\tfunction headBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:first-child');\n\t}\n\t\n\tfunction getBubbles(nodeSet) {\n\t return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n\t}\n\t\n\tfunction hasBubbles(nodeSet) {\n\t return Boolean(nodeSet.querySelector('[bubble]'));\n\t}\n\t\n\tfunction findBubbleLeft(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.previousSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.previousSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction findBubbleRight(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.nextSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.nextSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction closestNodeSet(node) {\n\t while (node) {\n\t if (isEditorNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction closestNodeBubble(node) {\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (isEditorNode(node)) {\n\t return;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction prevBubble(target) {\n\t var node = target && target.previousSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction nextBubble(target) {\n\t var node = target && target.nextSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction isEditorNode(node) {\n\t return node.nodeType === Node.ELEMENT_NODE && node.getAttribute('is') === 'x-bubbles';\n\t}\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\t\n\t/* eslint quotes: 0 */\n\t\n\tvar HTML_ESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '\"': '"',\n\t \"'\": ''',\n\t '`': '`'\n\t};\n\t\n\tvar HTML_UNESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '"': '\"',\n\t ''': \"'\",\n\t '`': '`'\n\t};\n\t\n\tvar REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\n\tvar REG_UNESCAPED_HTML = /[&<>\"'`]/g;\n\tvar REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\n\tvar REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\n\tvar REG_IE = /Trident|Edge/;\n\t\n\texports.getSelection = function (nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (selection && selection.anchorNode && nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n\t return selection;\n\t }\n\t};\n\t\n\texports.throttle = function (callback, runContext) {\n\t var throttle = 0;\n\t var animationCallback = function animationCallback() {\n\t throttle = 0;\n\t };\n\t\n\t return function () {\n\t if (throttle) {\n\t return;\n\t }\n\t\n\t throttle = raf(animationCallback);\n\t\n\t callback.apply(runContext || this, arguments);\n\t };\n\t};\n\t\n\texports.escape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n\t return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.unescape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n\t return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.canUseDrag = function () {\n\t return !REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\texports.isIE = function () {\n\t return REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\tfunction unescapeHtmlChar(chr) {\n\t return HTML_UNESCAPES[chr];\n\t}\n\t\n\tfunction escapeHtmlChar(chr) {\n\t return HTML_ESCAPES[chr];\n\t}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(10)\n\t , root = typeof window === 'undefined' ? global : window\n\t , vendors = ['moz', 'webkit']\n\t , suffix = 'AnimationFrame'\n\t , raf = root['request' + suffix]\n\t , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\t\n\tfor(var i = 0; !raf && i < vendors.length; i++) {\n\t raf = root[vendors[i] + 'Request' + suffix]\n\t caf = root[vendors[i] + 'Cancel' + suffix]\n\t || root[vendors[i] + 'CancelRequest' + suffix]\n\t}\n\t\n\t// Some versions of FF have rAF but not cAF\n\tif(!raf || !caf) {\n\t var last = 0\n\t , id = 0\n\t , queue = []\n\t , frameDuration = 1000 / 60\n\t\n\t raf = function(callback) {\n\t if(queue.length === 0) {\n\t var _now = now()\n\t , next = Math.max(0, frameDuration - (_now - last))\n\t last = next + _now\n\t setTimeout(function() {\n\t var cp = queue.slice(0)\n\t // Clear queue here to prevent\n\t // callbacks from appending listeners\n\t // to the current frame's queue\n\t queue.length = 0\n\t for(var i = 0; i < cp.length; i++) {\n\t if(!cp[i].cancelled) {\n\t try{\n\t cp[i].callback(last)\n\t } catch(e) {\n\t setTimeout(function() { throw e }, 0)\n\t }\n\t }\n\t }\n\t }, Math.round(next))\n\t }\n\t queue.push({\n\t handle: ++id,\n\t callback: callback,\n\t cancelled: false\n\t })\n\t return id\n\t }\n\t\n\t caf = function(handle) {\n\t for(var i = 0; i < queue.length; i++) {\n\t if(queue[i].handle === handle) {\n\t queue[i].cancelled = true\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = function(fn) {\n\t // Wrap in a new function to prevent\n\t // `cancel` potentially being assigned\n\t // to the native rAF function\n\t return raf.call(root, fn)\n\t}\n\tmodule.exports.cancel = function() {\n\t caf.apply(root, arguments)\n\t}\n\tmodule.exports.polyfill = function() {\n\t root.requestAnimationFrame = raf\n\t root.cancelAnimationFrame = caf\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1\n\t(function() {\n\t var getNanoSeconds, hrtime, loadTime;\n\t\n\t if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n\t module.exports = function() {\n\t return performance.now();\n\t };\n\t } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n\t module.exports = function() {\n\t return (getNanoSeconds() - loadTime) / 1e6;\n\t };\n\t hrtime = process.hrtime;\n\t getNanoSeconds = function() {\n\t var hr;\n\t hr = hrtime();\n\t return hr[0] * 1e9 + hr[1];\n\t };\n\t loadTime = getNanoSeconds();\n\t } else if (Date.now) {\n\t module.exports = function() {\n\t return Date.now() - loadTime;\n\t };\n\t loadTime = Date.now();\n\t } else {\n\t module.exports = function() {\n\t return new Date().getTime() - loadTime;\n\t };\n\t loadTime = new Date().getTime();\n\t }\n\t\n\t}).call(this);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction _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; }\n\t\n\t/**\n\t * @module x-bubbles/event\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar CustomEventCommon = __webpack_require__(13);\n\t\n\texports.scrollX = scrollX;\n\texports.scrollY = scrollY;\n\texports.dispatch = dispatch;\n\t\n\texports.keyCode = function (event) {\n\t return event.charCode || event.keyCode;\n\t};\n\t\n\texports.metaKey = function (event) {\n\t return event.ctrlKey || event.metaKey;\n\t};\n\t\n\texports.pageX = function (event) {\n\t return event.pageX === null && event.clientX !== null ? event.clientX + scrollX() : event.pageX;\n\t};\n\t\n\texports.pageY = function (event) {\n\t return event.pageY === null && event.clientY !== null ? event.clientY + scrollY() : event.pageY;\n\t};\n\t\n\texports.one = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, oneCallback(target, name, events[name]));\n\t }\n\t};\n\t\n\texports.on = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.off = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.removeEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.prevent = function (event) {\n\t event.cancelBubble = true;\n\t event.returnValue = false;\n\t event.stopImmediatePropagation();\n\t event.stopPropagation();\n\t event.preventDefault();\n\t return false;\n\t};\n\t\n\tfunction scrollX() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n\t}\n\t\n\tfunction scrollY() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n\t}\n\t\n\t/**\n\t * Designer events.\n\t *\n\t * @example\n\t * const { Custom } = require('event');\n\t *\n\t * new Custom('custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event~Custom\n\t * @constructor\n\t */\n\tvar Custom = function () {\n\t if (typeof context.CustomEvent === 'function') {\n\t return context.CustomEvent;\n\t }\n\t\n\t return CustomEventCommon;\n\t}();\n\t\n\t/**\n\t * Dispatch event.\n\t *\n\t * @example\n\t * const { dispatch } = require('event');\n\t * dispatch(node, 'custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event.dispatch\n\t * @param {HTMLElement} element node events\n\t * @param {string} name event name\n\t * @param {Object} params the event parameters\n\t * @param {boolean} [params.bubbles=false]\n\t * @param {boolean} [params.cancelable=false]\n\t * @param {*} [params.detail]\n\t */\n\tfunction dispatch(element, name) {\n\t var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t element.dispatchEvent(new Custom(name, params));\n\t}\n\t\n\tfunction oneCallback(target, eventName, callback) {\n\t return function _callback(event) {\n\t target.removeEventListener(eventName, _callback);\n\t callback(event);\n\t };\n\t}\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\t\n\t/**\n\t * @constant {Document}\n\t * @private\n\t */\n\tvar doc = context.document;\n\t\n\t/**\n\t * @constant {Object}\n\t * @private\n\t */\n\tvar protoEvent = context.Event.prototype;\n\t\n\tvar issetCustomEvent = false;\n\t\n\ttry {\n\t issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n\t} catch (e) {}\n\t// do nothing\n\t\n\t\n\t/**\n\t * The original function \"stopImmediatePropagation\"\n\t * @constant {function}\n\t * @private\n\t */\n\tvar stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\t\n\t/**\n\t * Override function to set properties \"immediatePropagationStopped\"\n\t */\n\tprotoEvent.stopImmediatePropagation = function () {\n\t this.immediatePropagationStopped = true;\n\t\n\t if (stopImmediatePropagation) {\n\t stopImmediatePropagation.call(this);\n\t } else {\n\t this.stopPropagation();\n\t }\n\t};\n\t\n\tvar CustomEventCommon = function () {\n\t if (issetCustomEvent) {\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('CustomEvent');\n\t\n\t evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\t\n\t return evt;\n\t };\n\t }\n\t\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('Event');\n\t\n\t evt.initEvent(eventName, bubbles, cancelable);\n\t evt.detail = params.detail;\n\t\n\t return evt;\n\t };\n\t}();\n\t\n\tCustomEventCommon.prototype = protoEvent;\n\t\n\tmodule.exports = CustomEventCommon;\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\texports.KEY = {\n\t a: 65,\n\t Backspace: 8,\n\t Bottom: 40,\n\t c: 67,\n\t Cmd: 91,\n\t Comma: 44, // ,\n\t Delete: 46,\n\t Enter: 13, // Enter\n\t Esc: 27,\n\t Left: 37,\n\t Right: 39,\n\t Semicolon: 59, // ;\n\t Space: 32,\n\t Tab: 9,\n\t Top: 38,\n\t x: 88\n\t};\n\t\n\texports.CLS = {\n\t DRAGSTART: 'drag',\n\t DROPZONE: 'dropzone'\n\t};\n\t\n\texports.EV = {\n\t BUBBLE_EDIT: 'bubble-edit',\n\t BUBBLE_INPUT: 'bubble-input',\n\t CHANGE: 'change',\n\t DRAGEND: 'dragend',\n\t DRAGENTER: 'dragenter',\n\t DRAGLEAVE: 'dragleave',\n\t DRAGSTART: 'dragstart',\n\t DROP: 'drop'\n\t};\n\t\n\texports.PROPS = {\n\t BUBBLE_VALUE: '_bubbleValue',\n\t CLICK_TIME: '_clickTime',\n\t LOCK_COPY: '_lockCopy'\n\t};\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar DRAG_IMG = { w: 16, h: 16 };\n\t\n\tvar dragImage = null;\n\t\n\texports.DRAG_IMG = DRAG_IMG;\n\t\n\texports.getDragImage = function () {\n\t if (!dragImage) {\n\t dragImage = new Image();\n\t dragImage.src = __webpack_require__(16);\n\t }\n\t\n\t return dragImage;\n\t};\n\t\n\texports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n\t fromNodeSet.fireChange();\n\t toNodeSet.focus();\n\t toNodeSet.fireChange();\n\t};\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar Modernizr = __webpack_require__(18);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS,\n\t EV = _require.EV;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar currentDragSet = null;\n\tvar currentMoveSet = null;\n\tvar currentDragElement = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\tfunction onMousedown(event) {\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t if (!nodeBubble) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t event.preventDefault();\n\t nodeSet.focus();\n\t\n\t var drag = nodeSet.__drag__ = {\n\t onMouseup: onMouseup.bind(this, nodeSet),\n\t onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n\t onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n\t nodeOffsetX: event.offsetX,\n\t nodeOffsetY: event.offsetY,\n\t x: 0,\n\t y: 0\n\t };\n\t\n\t currentDragSet = null;\n\t currentMoveSet = null;\n\t currentDragElement = null;\n\t\n\t events.one(document, 'mouseup', drag.onMouseup);\n\t events.on(document, 'mousemove', drag.onMousemove);\n\t events.on(document, 'scroll', drag.onScroll);\n\t}\n\t\n\tfunction onMouseup(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t events.off(document, 'mousemove', drag.onMousemove);\n\t events.off(document, 'scroll', drag.onScroll);\n\t delete dragSet.__drag__;\n\t\n\t if (currentDragElement) {\n\t currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n\t currentDragElement = null;\n\t }\n\t\n\t if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t\n\t if (currentDragSet) {\n\t (function () {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t }\n\t\n\t var _ = currentDragSet;\n\t currentDragSet = null;\n\t\n\t _.classList.remove(CLS.DRAGSTART);\n\t events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n\t events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n\t })();\n\t }\n\t}\n\t\n\tfunction onMousemove(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t if (!currentDragSet) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = dragSet;\n\t currentDragSet.classList.add(CLS.DRAGSTART);\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t var moveElement = void 0;\n\t\n\t if (nodeBubble) {\n\t select.add(nodeBubble);\n\t if (select.get(currentDragSet).length === 1) {\n\t moveElement = nodeBubble.cloneNode(true);\n\t }\n\t }\n\t\n\t if (!moveElement) {\n\t moveElement = getDragImage();\n\t drag.nodeOffsetX = DRAG_IMG.w;\n\t drag.nodeOffsetY = DRAG_IMG.h;\n\t }\n\t\n\t currentDragElement = document.body.appendChild(document.createElement('div'));\n\t currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n\t currentDragElement.appendChild(moveElement);\n\t\n\t events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n\t }\n\t\n\t drag.x = event.clientX;\n\t drag.y = event.clientY;\n\t onScroll(dragSet);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t if (currentMoveSet && currentMoveSet !== nodeSet) {\n\t currentMoveSet.classList.remove(CLS.DROPZONE);\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t } else if (!currentMoveSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t }\n\t } else if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t}\n\t\n\tfunction onScroll(dragSet) {\n\t var drag = dragSet.__drag__;\n\t if (!drag || !currentDragElement) {\n\t return;\n\t }\n\t\n\t var x = drag.x - drag.nodeOffsetX + events.scrollX();\n\t var y = drag.y - drag.nodeOffsetY + events.scrollY();\n\t\n\t if (Modernizr.csstransforms3d) {\n\t currentDragElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';\n\t } else if (Modernizr.csstransforms) {\n\t currentDragElement.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\n\t } else {\n\t currentDragElement.style.top = y + 'px';\n\t currentDragElement.style.left = x + 'px';\n\t }\n\t}\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t;(function(window){\n\t/*!\n\t * modernizr v3.3.1\n\t * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n\t *\n\t * Copyright (c)\n\t * Faruk Ates\n\t * Paul Irish\n\t * Alex Sexton\n\t * Ryan Seddon\n\t * Patrick Kettner\n\t * Stu Cox\n\t * Richard Herrera\n\t\n\t * MIT License\n\t */\n\t\n\t/*\n\t * Modernizr tests which native CSS3 and HTML5 features are available in the\n\t * current UA and makes the results available to you in two ways: as properties on\n\t * a global `Modernizr` object, and as classes on the `` element. This\n\t * information allows you to progressively enhance your pages with a granular level\n\t * of control over the experience.\n\t*/\n\t\n\t;(function(window, document, undefined){\n\t var tests = [];\n\t \n\t\n\t /**\n\t *\n\t * ModernizrProto is the constructor for Modernizr\n\t *\n\t * @class\n\t * @access public\n\t */\n\t\n\t var ModernizrProto = {\n\t // The current version, dummy\n\t _version: '3.3.1',\n\t\n\t // Any settings that don't work as separate modules\n\t // can go in here as configuration.\n\t _config: {\n\t 'classPrefix': '',\n\t 'enableClasses': true,\n\t 'enableJSClass': true,\n\t 'usePrefixes': true\n\t },\n\t\n\t // Queue of tests\n\t _q: [],\n\t\n\t // Stub these for people who are listening\n\t on: function(test, cb) {\n\t // I don't really think people should do this, but we can\n\t // safe guard it a bit.\n\t // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n\t // This is in case people listen to synchronous tests. I would leave it out,\n\t // but the code to *disallow* sync tests in the real version of this\n\t // function is actually larger than this.\n\t var self = this;\n\t setTimeout(function() {\n\t cb(self[test]);\n\t }, 0);\n\t },\n\t\n\t addTest: function(name, fn, options) {\n\t tests.push({name: name, fn: fn, options: options});\n\t },\n\t\n\t addAsyncTest: function(fn) {\n\t tests.push({name: null, fn: fn});\n\t }\n\t };\n\t\n\t \n\t\n\t // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n\t var Modernizr = function() {};\n\t Modernizr.prototype = ModernizrProto;\n\t\n\t // Leak modernizr globally when you `require` it rather than force it here.\n\t // Overwrite name so constructor name is nicer :D\n\t Modernizr = new Modernizr();\n\t\n\t \n\t\n\t var classes = [];\n\t \n\t\n\t /**\n\t * is returns a boolean if the typeof an obj is exactly type.\n\t *\n\t * @access private\n\t * @function is\n\t * @param {*} obj - A thing we want to check the type of\n\t * @param {string} type - A string to compare the typeof against\n\t * @returns {boolean}\n\t */\n\t\n\t function is(obj, type) {\n\t return typeof obj === type;\n\t }\n\t ;\n\t\n\t /**\n\t * Run through all tests and detect their support in the current UA.\n\t *\n\t * @access private\n\t */\n\t\n\t function testRunner() {\n\t var featureNames;\n\t var feature;\n\t var aliasIdx;\n\t var result;\n\t var nameIdx;\n\t var featureName;\n\t var featureNameSplit;\n\t\n\t for (var featureIdx in tests) {\n\t if (tests.hasOwnProperty(featureIdx)) {\n\t featureNames = [];\n\t feature = tests[featureIdx];\n\t // run the test, throw the return value into the Modernizr,\n\t // then based on that boolean, define an appropriate className\n\t // and push it into an array of classes we'll join later.\n\t //\n\t // If there is no name, it's an 'async' test that is run,\n\t // but not directly added to the object. That should\n\t // be done with a post-run addTest call.\n\t if (feature.name) {\n\t featureNames.push(feature.name.toLowerCase());\n\t\n\t if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n\t // Add all the aliases into the names list\n\t for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n\t featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n\t }\n\t }\n\t }\n\t\n\t // Run the test, or use the raw value if it's not a function\n\t result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\t\n\t\n\t // Set each of the names on the Modernizr object\n\t for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n\t featureName = featureNames[nameIdx];\n\t // Support dot properties as sub tests. We don't do checking to make sure\n\t // that the implied parent tests have been added. You must call them in\n\t // order (either in the test, or make the parent test a dependency).\n\t //\n\t // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n\t // hashtag famous last words\n\t featureNameSplit = featureName.split('.');\n\t\n\t if (featureNameSplit.length === 1) {\n\t Modernizr[featureNameSplit[0]] = result;\n\t } else {\n\t // cast to a Boolean, if not one already\n\t /* jshint -W053 */\n\t if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n\t Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n\t }\n\t\n\t Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n\t }\n\t\n\t classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n\t }\n\t }\n\t }\n\t }\n\t ;\n\t\n\t /**\n\t * If the browsers follow the spec, then they would expose vendor-specific style as:\n\t * elem.style.WebkitBorderRadius\n\t * instead of something like the following, which would be technically incorrect:\n\t * elem.style.webkitBorderRadius\n\t\n\t * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n\t * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n\t * erik.eae.net/archives/2008/03/10/21.48.10/\n\t\n\t * More here: github.com/Modernizr/Modernizr/issues/issue/21\n\t *\n\t * @access private\n\t * @returns {string} The string representing the vendor-specific style properties\n\t */\n\t\n\t var omPrefixes = 'Moz O ms Webkit';\n\t \n\t\n\t var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n\t ModernizrProto._cssomPrefixes = cssomPrefixes;\n\t \n\t\n\t\n\t /**\n\t * contains checks to see if a string contains another string\n\t *\n\t * @access private\n\t * @function contains\n\t * @param {string} str - The string we want to check for substrings\n\t * @param {string} substr - The substring we want to search the first string for\n\t * @returns {boolean}\n\t */\n\t\n\t function contains(str, substr) {\n\t return !!~('' + str).indexOf(substr);\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * docElement is a convenience wrapper to grab the root element of the document\n\t *\n\t * @access private\n\t * @returns {HTMLElement|SVGElement} The root element of the document\n\t */\n\t\n\t var docElement = document.documentElement;\n\t \n\t\n\t /**\n\t * A convenience helper to check if the document we are running in is an SVG document\n\t *\n\t * @access private\n\t * @returns {boolean}\n\t */\n\t\n\t var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n\t \n\t\n\t /**\n\t * createElement is a convenience wrapper around document.createElement. Since we\n\t * use createElement all over the place, this allows for (slightly) smaller code\n\t * as well as abstracting away issues with creating elements in contexts other than\n\t * HTML documents (e.g. SVG documents).\n\t *\n\t * @access private\n\t * @function createElement\n\t * @returns {HTMLElement|SVGElement} An HTML or SVG element\n\t */\n\t\n\t function createElement() {\n\t if (typeof document.createElement !== 'function') {\n\t // This is the case in IE7, where the type of createElement is \"object\".\n\t // For this reason, we cannot call apply() as Object is not a Function.\n\t return document.createElement(arguments[0]);\n\t } else if (isSVG) {\n\t return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n\t } else {\n\t return document.createElement.apply(document, arguments);\n\t }\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * Create our \"modernizr\" element that we do most feature tests on.\n\t *\n\t * @access private\n\t */\n\t\n\t var modElem = {\n\t elem: createElement('modernizr')\n\t };\n\t\n\t // Clean up this element\n\t Modernizr._q.push(function() {\n\t delete modElem.elem;\n\t });\n\t\n\t \n\t\n\t var mStyle = {\n\t style: modElem.elem.style\n\t };\n\t\n\t // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n\t // the front of the queue.\n\t Modernizr._q.unshift(function() {\n\t delete mStyle.style;\n\t });\n\t\n\t \n\t\n\t /**\n\t * getBody returns the body of a document, or an element that can stand in for\n\t * the body if a real body does not exist\n\t *\n\t * @access private\n\t * @function getBody\n\t * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n\t * artificially created element that stands in for the body\n\t */\n\t\n\t function getBody() {\n\t // After page load injecting a fake body doesn't work so check if body exists\n\t var body = document.body;\n\t\n\t if (!body) {\n\t // Can't use the real body create a fake one.\n\t body = createElement(isSVG ? 'svg' : 'body');\n\t body.fake = true;\n\t }\n\t\n\t return body;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * injectElementWithStyles injects an element with style element and some CSS rules\n\t *\n\t * @access private\n\t * @function injectElementWithStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t */\n\t\n\t function injectElementWithStyles(rule, callback, nodes, testnames) {\n\t var mod = 'modernizr';\n\t var style;\n\t var ret;\n\t var node;\n\t var docOverflow;\n\t var div = createElement('div');\n\t var body = getBody();\n\t\n\t if (parseInt(nodes, 10)) {\n\t // In order not to give false positives we create a node for each test\n\t // This also allows the method to scale for unspecified uses\n\t while (nodes--) {\n\t node = createElement('div');\n\t node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n\t div.appendChild(node);\n\t }\n\t }\n\t\n\t style = createElement('style');\n\t style.type = 'text/css';\n\t style.id = 's' + mod;\n\t\n\t // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n\t // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n\t (!body.fake ? div : body).appendChild(style);\n\t body.appendChild(div);\n\t\n\t if (style.styleSheet) {\n\t style.styleSheet.cssText = rule;\n\t } else {\n\t style.appendChild(document.createTextNode(rule));\n\t }\n\t div.id = mod;\n\t\n\t if (body.fake) {\n\t //avoid crashing IE8, if background image is used\n\t body.style.background = '';\n\t //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n\t body.style.overflow = 'hidden';\n\t docOverflow = docElement.style.overflow;\n\t docElement.style.overflow = 'hidden';\n\t docElement.appendChild(body);\n\t }\n\t\n\t ret = callback(div, rule);\n\t // If this is done after page load we don't want to remove the body so check if body exists\n\t if (body.fake) {\n\t body.parentNode.removeChild(body);\n\t docElement.style.overflow = docOverflow;\n\t // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n\t docElement.offsetHeight;\n\t } else {\n\t div.parentNode.removeChild(div);\n\t }\n\t\n\t return !!ret;\n\t\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * domToCSS takes a camelCase string and converts it to kebab-case\n\t * e.g. boxSizing -> box-sizing\n\t *\n\t * @access private\n\t * @function domToCSS\n\t * @param {string} name - String name of camelCase prop we want to convert\n\t * @returns {string} The kebab-case version of the supplied name\n\t */\n\t\n\t function domToCSS(name) {\n\t return name.replace(/([A-Z])/g, function(str, m1) {\n\t return '-' + m1.toLowerCase();\n\t }).replace(/^ms-/, '-ms-');\n\t }\n\t ;\n\t\n\t /**\n\t * nativeTestProps allows for us to use native feature detection functionality if available.\n\t * some prefixed form, or false, in the case of an unsupported rule\n\t *\n\t * @access private\n\t * @function nativeTestProps\n\t * @param {array} props - An array of property names\n\t * @param {string} value - A string representing the value we want to check via @supports\n\t * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n\t */\n\t\n\t // Accepts a list of property names and a single value\n\t // Returns `undefined` if native detection not available\n\t function nativeTestProps(props, value) {\n\t var i = props.length;\n\t // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n\t if ('CSS' in window && 'supports' in window.CSS) {\n\t // Try every prefixed variant of the property\n\t while (i--) {\n\t if (window.CSS.supports(domToCSS(props[i]), value)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t }\n\t // Otherwise fall back to at-rule (for Opera 12.x)\n\t else if ('CSSSupportsRule' in window) {\n\t // Build a condition string for every prefixed variant\n\t var conditionText = [];\n\t while (i--) {\n\t conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n\t }\n\t conditionText = conditionText.join(' or ');\n\t return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n\t return getComputedStyle(node, null).position == 'absolute';\n\t });\n\t }\n\t return undefined;\n\t }\n\t ;\n\t\n\t /**\n\t * cssToDOM takes a kebab-case string and converts it to camelCase\n\t * e.g. box-sizing -> boxSizing\n\t *\n\t * @access private\n\t * @function cssToDOM\n\t * @param {string} name - String name of kebab-case prop we want to convert\n\t * @returns {string} The camelCase version of the supplied name\n\t */\n\t\n\t function cssToDOM(name) {\n\t return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n\t return m1 + m2.toUpperCase();\n\t }).replace(/^-/, '');\n\t }\n\t ;\n\t\n\t // testProps is a generic CSS / DOM property test.\n\t\n\t // In testing support for a given CSS property, it's legit to test:\n\t // `elem.style[styleName] !== undefined`\n\t // If the property is supported it will return an empty string,\n\t // if unsupported it will return undefined.\n\t\n\t // We'll take advantage of this quick test and skip setting a style\n\t // on our modernizr element, but instead just testing undefined vs\n\t // empty string.\n\t\n\t // Property names can be provided in either camelCase or kebab-case.\n\t\n\t function testProps(props, prefixed, value, skipValueTest) {\n\t skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\t\n\t // Try native detect first\n\t if (!is(value, 'undefined')) {\n\t var result = nativeTestProps(props, value);\n\t if (!is(result, 'undefined')) {\n\t return result;\n\t }\n\t }\n\t\n\t // Otherwise do it properly\n\t var afterInit, i, propsLength, prop, before;\n\t\n\t // If we don't have a style element, that means we're running async or after\n\t // the core tests, so we'll need to create our own elements to use\n\t\n\t // inside of an SVG element, in certain browsers, the `style` element is only\n\t // defined for valid tags. Therefore, if `modernizr` does not have one, we\n\t // fall back to a less used element and hope for the best.\n\t var elems = ['modernizr', 'tspan'];\n\t while (!mStyle.style) {\n\t afterInit = true;\n\t mStyle.modElem = createElement(elems.shift());\n\t mStyle.style = mStyle.modElem.style;\n\t }\n\t\n\t // Delete the objects if we created them.\n\t function cleanElems() {\n\t if (afterInit) {\n\t delete mStyle.style;\n\t delete mStyle.modElem;\n\t }\n\t }\n\t\n\t propsLength = props.length;\n\t for (i = 0; i < propsLength; i++) {\n\t prop = props[i];\n\t before = mStyle.style[prop];\n\t\n\t if (contains(prop, '-')) {\n\t prop = cssToDOM(prop);\n\t }\n\t\n\t if (mStyle.style[prop] !== undefined) {\n\t\n\t // If value to test has been passed in, do a set-and-check test.\n\t // 0 (integer) is a valid property value, so check that `value` isn't\n\t // undefined, rather than just checking it's truthy.\n\t if (!skipValueTest && !is(value, 'undefined')) {\n\t\n\t // Needs a try catch block because of old IE. This is slow, but will\n\t // be avoided in most cases because `skipValueTest` will be used.\n\t try {\n\t mStyle.style[prop] = value;\n\t } catch (e) {}\n\t\n\t // If the property value has changed, we assume the value used is\n\t // supported. If `value` is empty string, it'll fail here (because\n\t // it hasn't changed), which matches how browsers have implemented\n\t // CSS.supports()\n\t if (mStyle.style[prop] != before) {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t // Otherwise just return true, or the property name if this is a\n\t // `prefixed()` call\n\t else {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t }\n\t cleanElems();\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * List of JavaScript DOM values used for tests\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr._domPrefixes\n\t * @optionName Modernizr._domPrefixes\n\t * @optionProp domPrefixes\n\t * @access public\n\t * @example\n\t *\n\t * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n\t * than kebab-case properties, all properties are their Capitalized variant\n\t *\n\t * ```js\n\t * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n\t * ```\n\t */\n\t\n\t var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n\t ModernizrProto._domPrefixes = domPrefixes;\n\t \n\t\n\t /**\n\t * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n\t *\n\t * @access private\n\t * @function fnBind\n\t * @param {function} fn - a function you want to change `this` reference to\n\t * @param {object} that - the `this` you want to call the function with\n\t * @returns {function} The wrapped version of the supplied function\n\t */\n\t\n\t function fnBind(fn, that) {\n\t return function() {\n\t return fn.apply(that, arguments);\n\t };\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testDOMProps is a generic DOM property test; if a browser supports\n\t * a certain property, it won't return undefined for it.\n\t *\n\t * @access private\n\t * @function testDOMProps\n\t * @param {array.} props - An array of properties to test for\n\t * @param {object} obj - An object or Element you want to use to test the parameters again\n\t * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n\t */\n\t function testDOMProps(props, obj, elem) {\n\t var item;\n\t\n\t for (var i in props) {\n\t if (props[i] in obj) {\n\t\n\t // return the property name as a string\n\t if (elem === false) {\n\t return props[i];\n\t }\n\t\n\t item = obj[props[i]];\n\t\n\t // let's bind a function\n\t if (is(item, 'function')) {\n\t // bind to obj unless overriden\n\t return fnBind(item, elem || obj);\n\t }\n\t\n\t // return the unbound function or obj or value\n\t return item;\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testPropsAll tests a list of DOM properties we want to check against.\n\t * We specify literally ALL possible (known and/or likely) properties on\n\t * the element including the non-vendor prefixed one, for forward-\n\t * compatibility.\n\t *\n\t * @access private\n\t * @function testPropsAll\n\t * @param {string} prop - A string of the property to test for\n\t * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n\t * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n\t * @param {string} [value] - A string of a css value\n\t * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n\t */\n\t function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\t\n\t var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n\t props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\t\n\t // did they call .prefixed('boxSizing') or are we just testing a prop?\n\t if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n\t return testProps(props, prefixed, value, skipValueTest);\n\t\n\t // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n\t } else {\n\t props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n\t return testDOMProps(props, prefixed, elem);\n\t }\n\t }\n\t\n\t // Modernizr.testAllProps() investigates whether a given style property,\n\t // or any of its vendor-prefixed variants, is recognized\n\t //\n\t // Note that the property names must be provided in the camelCase variant.\n\t // Modernizr.testAllProps('boxSizing')\n\t ModernizrProto.testAllProps = testPropsAll;\n\t\n\t \n\t\n\t /**\n\t * testAllProps determines whether a given CSS property is supported in the browser\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testAllProps\n\t * @optionName Modernizr.testAllProps()\n\t * @optionProp testAllProps\n\t * @access public\n\t * @function testAllProps\n\t * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n\t * @param {string} [value] - String of the value to test\n\t * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n\t * @example\n\t *\n\t * testAllProps determines whether a given CSS property, in some prefixed form,\n\t * is supported by the browser.\n\t *\n\t * ```js\n\t * testAllProps('boxSizing') // true\n\t * ```\n\t *\n\t * It can optionally be given a CSS value in string form to test if a property\n\t * value is valid\n\t *\n\t * ```js\n\t * testAllProps('display', 'block') // true\n\t * testAllProps('display', 'penguin') // false\n\t * ```\n\t *\n\t * A boolean can be passed as a third parameter to skip the value check when\n\t * native detection (@supports) isn't available.\n\t *\n\t * ```js\n\t * testAllProps('shapeOutside', 'content-box', true);\n\t * ```\n\t */\n\t\n\t function testAllProps(prop, value, skipValueTest) {\n\t return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n\t }\n\t ModernizrProto.testAllProps = testAllProps;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Transforms\",\n\t \"property\": \"csstransforms\",\n\t \"caniuse\": \"transforms2d\",\n\t \"tags\": [\"css\"]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms', function() {\n\t // Android < 3.0 is buggy, so we sniff and blacklist\n\t // http://git.io/hHzL7w\n\t return navigator.userAgent.indexOf('Android 2.') === -1 &&\n\t testAllProps('transform', 'scale(1)', true);\n\t });\n\t\n\t\n\t /**\n\t * testStyles injects an element with style element and some CSS rules\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testStyles\n\t * @optionName Modernizr.testStyles()\n\t * @optionProp testStyles\n\t * @access public\n\t * @function testStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t * @example\n\t *\n\t * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n\t * along with (possibly multiple) DOM elements. This lets you check for features\n\t * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n\t * // elem is the first DOM node in the page (by default #modernizr)\n\t * // rule is the first argument you supplied - the CSS rule in string form\n\t *\n\t * addTest('widthworks', elem.style.width === '9px')\n\t * });\n\t * ```\n\t *\n\t * If your test requires multiple nodes, you can include a third argument\n\t * indicating how many additional div elements to include on the page. The\n\t * additional nodes are injected as children of the `elem` that is returned as\n\t * the first argument to the callback.\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n\t * document.getElementById('modernizr').style.width === '1px'; // true\n\t * document.getElementById('modernizr2').style.width === '2px'; // true\n\t * elem.firstChild === document.getElementById('modernizr2'); // true\n\t * }, 1);\n\t * ```\n\t *\n\t * By default, all of the additional elements have an ID of `modernizr[n]`, where\n\t * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n\t * the second additional is `#modernizr3`, etc.).\n\t * If you want to have more meaningful IDs for your function, you can provide\n\t * them as the fourth argument, as an array of strings\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n\t * elem.firstChild === document.getElementById('foo'); // true\n\t * elem.lastChild === document.getElementById('bar'); // true\n\t * }, 2, ['foo', 'bar']);\n\t * ```\n\t *\n\t */\n\t\n\t var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Supports\",\n\t \"property\": \"supports\",\n\t \"caniuse\": \"css-featurequeries\",\n\t \"tags\": [\"css\"],\n\t \"builderAliases\": [\"css_supports\"],\n\t \"notes\": [{\n\t \"name\": \"W3 Spec\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n\t },{\n\t \"name\": \"Related Github Issue\",\n\t \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n\t },{\n\t \"name\": \"W3 Info\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n\t }]\n\t}\n\t!*/\n\t\n\t var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n\t var oldSyntax = 'supportsCSS' in window;\n\t Modernizr.addTest('supports', newSyntax || oldSyntax);\n\t\n\t/*!\n\t{\n\t \"name\": \"CSS Transforms 3D\",\n\t \"property\": \"csstransforms3d\",\n\t \"caniuse\": \"transforms3d\",\n\t \"tags\": [\"css\"],\n\t \"warnings\": [\n\t \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n\t ]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms3d', function() {\n\t var ret = !!testAllProps('perspective', '1px', true);\n\t var usePrefix = Modernizr._config.usePrefixes;\n\t\n\t // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n\t // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n\t // some conditions. As a result, Webkit typically recognizes the syntax but\n\t // will sometimes throw a false positive, thus we must do a more thorough check:\n\t if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n\t var mq;\n\t var defaultStyle = '#modernizr{width:0;height:0}';\n\t // Use CSS Conditional Rules if available\n\t if (Modernizr.supports) {\n\t mq = '@supports (perspective: 1px)';\n\t } else {\n\t // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n\t // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n\t mq = '@media (transform-3d)';\n\t if (usePrefix) {\n\t mq += ',(-webkit-transform-3d)';\n\t }\n\t }\n\t\n\t mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\t\n\t testStyles(defaultStyle + mq, function(elem) {\n\t ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n\t });\n\t }\n\t\n\t return ret;\n\t });\n\t\n\t\n\t // Run each test\n\t testRunner();\n\t\n\t delete ModernizrProto.addTest;\n\t delete ModernizrProto.addAsyncTest;\n\t\n\t // Run the things that are supposed to run after the tests\n\t for (var i = 0; i < Modernizr._q.length; i++) {\n\t Modernizr._q[i]();\n\t }\n\t\n\t // Leak Modernizr namespace\n\t window.Modernizr = Modernizr;\n\t\n\t\n\t;\n\t\n\t})(window, document);\n\tmodule.exports = window.Modernizr;\n\t})(window);\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t KEY = _require.KEY,\n\t EV = _require.EV,\n\t PROPS = _require.PROPS;\n\t\n\tvar text = __webpack_require__(6);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar eventCopy = __webpack_require__(21);\n\tvar eventPaste = __webpack_require__(22);\n\tvar eventBackspace = __webpack_require__(23);\n\tvar eventDelete = __webpack_require__(24);\n\t\n\tvar EVENTS = {\n\t blur: onBlur,\n\t click: onClick,\n\t focus: onFocus,\n\t keydown: onKeydown,\n\t keypress: onKeypress,\n\t keyup: onKeyup,\n\t mscontrolselect: events.prevent,\n\t paste: eventPaste,\n\t resize: events.prevent,\n\t resizestart: events.prevent\n\t};\n\t\n\texports.init = function (nodeWrap) {\n\t var nodeEditor = nodeWrap;\n\t nodeEditor.setAttribute('contenteditable', 'true');\n\t nodeEditor.setAttribute('spellcheck', 'false');\n\t\n\t nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n\t nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n\t nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\t\n\t events.on(nodeEditor, EVENTS);\n\t\n\t return {\n\t addBubble: addBubble.bind(nodeEditor),\n\t editBubble: editBubble.bind(nodeEditor),\n\t inputValue: inputValue.bind(nodeEditor),\n\t removeBubble: removeBubble.bind(nodeEditor),\n\t setContent: setContent.bind(nodeEditor)\n\t };\n\t};\n\t\n\texports.destroy = function (nodeEditor) {\n\t events.off(nodeEditor, EVENTS);\n\t};\n\t\n\tfunction onBlur(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t return events.prevent(event);\n\t }\n\t\n\t select.clear(nodeEditor);\n\t bubble.bubbling(nodeEditor);\n\t}\n\t\n\tfunction onFocus(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t events.prevent(event);\n\t delete nodeEditor[PROPS.LOCK_COPY];\n\t\n\t // Safary 10 не сбрасывает курсор без задержки\n\t raf(function () {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t });\n\t\n\t return false;\n\t }\n\t\n\t cursor.restore(nodeEditor);\n\t}\n\t\n\tfunction onKeyup(event) {\n\t var nodeEditor = event.currentTarget;\n\t var code = events.keyCode(event);\n\t var isPrintableChar = event.key ? event.key.length === 1 : (code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd;\n\t\n\t if (isPrintableChar) {\n\t nodeEditor.fireInput();\n\t }\n\t}\n\t\n\tfunction onKeypress(event) {\n\t var code = events.keyCode(event);\n\t var nodeEditor = event.currentTarget;\n\t\n\t /* eslint no-case-declarations: 0 */\n\t switch (code) {\n\t case KEY.Enter:\n\t event.preventDefault();\n\t if (!nodeEditor.options('disableControls')) {\n\t if (!editBubbleKeyboardEvent(nodeEditor)) {\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.Space:\n\t if (editBubbleKeyboardEvent(nodeEditor)) {\n\t event.preventDefault();\n\t }\n\t break;\n\t\n\t default:\n\t var separator = nodeEditor.options('separator');\n\t if (separator && separator.test(String.fromCharCode(code))) {\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t}\n\t\n\tfunction onKeydown(event) {\n\t var code = events.keyCode(event);\n\t var metaKey = events.metaKey(event);\n\t var nodeEditor = event.currentTarget;\n\t var enable = !nodeEditor.options('disableControls');\n\t\n\t switch (code) {\n\t case KEY.Esc:\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t break;\n\t\n\t case KEY.Backspace:\n\t event.preventDefault();\n\t eventBackspace(event);\n\t break;\n\t\n\t case KEY.Delete:\n\t event.preventDefault();\n\t eventDelete(event);\n\t break;\n\t\n\t case KEY.Left:\n\t event.preventDefault();\n\t arrowLeft(event);\n\t break;\n\t\n\t // сдвигаем курсор в начало списка\n\t case KEY.Top:\n\t event.preventDefault();\n\t if (enable) {\n\t var headBubble = bubbleset.headBubble(nodeEditor);\n\t headBubble && select.uniq(headBubble);\n\t }\n\t break;\n\t\n\t case KEY.Right:\n\t event.preventDefault();\n\t arrowRight(event);\n\t break;\n\t\n\t // сдвигаем курсор в конец списка\n\t // case KEY.Tab:\n\t case KEY.Bottom:\n\t event.preventDefault();\n\t if (enable && select.has(nodeEditor)) {\n\t cursor.restore(nodeEditor);\n\t }\n\t break;\n\t\n\t case KEY.a:\n\t if (metaKey) {\n\t event.preventDefault();\n\t\n\t if (!text.selectAll(null, event.currentTarget)) {\n\t select.all(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.c:\n\t if (metaKey) {\n\t eventCopy(event);\n\t }\n\t break;\n\t\n\t case KEY.x:\n\t if (metaKey) {\n\t eventCopy(event, function () {\n\t return eventDelete(event);\n\t });\n\t }\n\t break;\n\t }\n\t}\n\t\n\tfunction arrowLeft(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowLeft(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[0] === nodeSet.startRangeSelect ? list[list.length - 1] : list[0];\n\t\n\t var node = bubbleset.prevBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t }\n\t}\n\t\n\tfunction arrowRight(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowRight(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.nextBubble(selection.focusNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[list.length - 1] === nodeSet.startRangeSelect ? list[0] : list[list.length - 1];\n\t\n\t var node = bubbleset.nextBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n\t select.clear(nodeSet);\n\t selection.collapse(begin.nextSibling, 0);\n\t } else {\n\t cursor.restore(nodeSet);\n\t }\n\t}\n\t\n\tfunction onClick(event) {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (nodeBubble) {\n\t var clickTime = Date.now();\n\t var isDblclick = nodeSet[PROPS.CLICK_TIME] && clickTime - nodeSet[PROPS.CLICK_TIME] < 200;\n\t\n\t nodeSet[PROPS.CLICK_TIME] = clickTime;\n\t\n\t if (events.metaKey(event)) {\n\t select.add(nodeBubble);\n\t } else if (event.shiftKey) {\n\t if (!nodeSet.startRangeSelect) {\n\t select.uniq(nodeBubble);\n\t } else {\n\t select.range(nodeBubble);\n\t }\n\t } else if (isDblclick) {\n\t bubble.edit(nodeSet, nodeBubble);\n\t } else {\n\t select.toggleUniq(nodeBubble);\n\t }\n\t } else {\n\t select.clear(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t cursor.restore(nodeSet);\n\t }\n\t }\n\t}\n\t\n\tfunction editBubbleKeyboardEvent(nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.rangeCount) {\n\t var list = select.get(nodeEditor);\n\t\n\t if (list.length === 1) {\n\t return bubble.edit(nodeEditor, list[0]);\n\t }\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction setContent(data) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t while (this.firstChild) {\n\t this.removeChild(this.firstChild);\n\t }\n\t\n\t data = text.html2text(data);\n\t this.appendChild(this.ownerDocument.createTextNode(data));\n\t bubble.bubbling(this);\n\t cursor.restore(this);\n\t}\n\t\n\tfunction addBubble(bubbleText, dataAttributes) {\n\t var nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n\t if (!nodeBubble) {\n\t return false;\n\t }\n\t\n\t if (text.text2bubble(this, nodeBubble)) {\n\t this.fireInput();\n\t this.fireChange();\n\t cursor.restore(this);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t this.removeChild(nodeBubble);\n\t this.fireChange();\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction editBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t return bubble.edit(this, nodeBubble);\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction inputValue() {\n\t var textRange = text.currentTextRange(this);\n\t return textRange && text.textClean(textRange.toString()) || '';\n\t}\n\t\n\t/**\n\t * Генерация события редактирования бабла.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireEdit\n\t * @param {HTMLElement} nodeBubble нода бабл\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireEdit(nodeBubble) {\n\t events.dispatch(this, EV.BUBBLE_EDIT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: nodeBubble }\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события изменения набора баблов.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireChange\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireChange() {\n\t events.dispatch(this, EV.CHANGE, {\n\t bubbles: false,\n\t cancelable: false\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события ввода текста.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireInput\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireInput() {\n\t var editText = inputValue.call(this);\n\t\n\t if (this[PROPS.BUBBLE_VALUE] !== editText) {\n\t this[PROPS.BUBBLE_VALUE] = editText;\n\t\n\t events.dispatch(this, EV.BUBBLE_INPUT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: editText }\n\t });\n\t }\n\t}\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * @module x-bubbles/cursor\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\tvar select = __webpack_require__(4);\n\t\n\texports.restore = restore;\n\texports.restoreBasis = restoreBasis;\n\t\n\t/**\n\t * Reset the cursor position to the end of the input field.\n\t * @alias module:x-bubbles/cursor.restore\n\t * @param {HTMLElement} nodeSet\n\t */\n\tfunction restore(nodeSet) {\n\t select.clear(nodeSet);\n\t var basis = restoreBasis(nodeSet);\n\t var selection = context.getSelection();\n\t selection.removeAllRanges();\n\t selection.collapse(basis, 1);\n\t}\n\t\n\t/**\n\t * The creation of the fake text at the end childNodes\n\t * @alias module:x-bubbles/cursor.restoreBasis\n\t * @param {HTMLElement} nodeSet\n\t * @returns {HTMLTextElement} fake text node\n\t */\n\tfunction restoreBasis(nodeSet) {\n\t var fakeText = text.createZws();\n\t\n\t if (nodeSet.hasChildNodes()) {\n\t var lastNode = nodeSet.childNodes[nodeSet.childNodes.length - 1];\n\t\n\t if (lastNode.isEqualNode(fakeText)) {\n\t fakeText = lastNode;\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t\n\t return fakeText;\n\t}\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar events = __webpack_require__(12);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t PROPS = _require.PROPS;\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = function (event) {\n\t var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\t\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t return false;\n\t }\n\t\n\t var list = select.get(nodeEditor);\n\t\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var bubbleCopy = nodeEditor.options('bubbleCopy');\n\t var value = bubbleCopy(list);\n\t\n\t if (!value) {\n\t return false;\n\t }\n\t\n\t nodeEditor[PROPS.LOCK_COPY] = true;\n\t\n\t var target = nodeEditor.ownerDocument.createElement('input');\n\t target.value = value;\n\t target.style.cssText = '\\n position: absolute;\\n left: -9999px;\\n width: 1px;\\n height: 1px;\\n margin: 0;\\n padding: 0;\\n border: none;';\n\t\n\t nodeEditor.parentNode.appendChild(target);\n\t\n\t events.one(target, {\n\t keyup: function keyup() {\n\t return nodeEditor.focus();\n\t },\n\t blur: function blur() {\n\t removeNode(target);\n\t raf(callback);\n\t }\n\t });\n\t\n\t target.select();\n\t return true;\n\t};\n\t\n\tfunction removeNode(node) {\n\t node && node.parentNode && node.parentNode.removeChild(node);\n\t}\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t isIE = _require.isIE;\n\t\n\tmodule.exports = function (event) {\n\t event.preventDefault();\n\t var nodeEditor = event.currentTarget;\n\t\n\t if (context.clipboardData && context.clipboardData.getData) {\n\t onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\t } else if (event.clipboardData) {\n\t (function () {\n\t var contentType = 'text/plain';\n\t var clipboardData = event.clipboardData;\n\t var data = clipboardData.getData && clipboardData.getData(contentType);\n\t\n\t if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n\t Array.prototype.slice.call(clipboardData.items).filter(function (item) {\n\t return item.kind === 'string' && item.type === contentType;\n\t }).some(function (item) {\n\t item.getAsString(function (dataText) {\n\t onPasteSuccess(nodeEditor, dataText);\n\t });\n\t\n\t return true;\n\t });\n\t }\n\t })();\n\t }\n\t};\n\t\n\tfunction onPasteSuccess(nodeEditor, dataText) {\n\t var checkBubblePaste = nodeEditor.options('checkBubblePaste');\n\t var selection = context.getSelection();\n\t var isBubbling = dataText && selection.isCollapsed && !nodeEditor.inputValue ? checkBubblePaste(dataText) : false;\n\t\n\t if (text.replaceString(dataText, selection)) {\n\t if (isBubbling) {\n\t if (isIE) {\n\t raf(function () {\n\t return onReplaceSuccess(nodeEditor);\n\t });\n\t } else {\n\t onReplaceSuccess(nodeEditor);\n\t }\n\t } else {\n\t nodeEditor.fireInput();\n\t }\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction onReplaceSuccess(nodeEditor) {\n\t bubble.bubbling(nodeEditor);\n\t nodeEditor.focus();\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t}\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Backspace.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowLeft(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleLeft(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Delete.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowRight(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleRight(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** x-bubbles.min.js\n **/"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 97b5e590f2bc754a9c50\n **/","const context = require('./context');\nconst drag = require('./core/drag');\nconst editor = require('./core/editor');\nconst bubble = require('./core/bubble');\nconst bubbleset = require('./core/bubbleset');\n\nconst OPTIONS = {\n begining: [ 'reg', null, 'begining' ],\n bubbleCopy: [ 'func', bubbleCopyOption, 'bubble-copy' ],\n bubbleDeformation: [ 'func', function () {}, 'bubble-deformation' ],\n bubbleFormation: [ 'func', function () {}, 'bubble-formation' ],\n checkBubblePaste: [ 'func', checkBubblePasteOption, 'check-bubble-paste' ],\n classBubble: [ 'str', 'bubble', 'class-bubble' ],\n disableControls: [ 'bool', false, 'disable-controls' ],\n draggable: [ 'bool', true, 'draggable' ],\n ending: [ 'reg', null, 'ending' ], // /\\@ya\\.ru/g;\n separator: [ 'reg', /[,;]/, 'separator' ],\n tokenizer: [ 'func', null, 'tokenizer' ],\n};\n\nconst XBubbles = Object.create(HTMLDivElement.prototype, {\n createdCallback: {\n value: function () {\n initEditor(this);\n }\n },\n\n attachedCallback: {\n value: function () {\n initEditor(this);\n drag.init(this);\n bubble.bubbling(this);\n }\n },\n\n detachedCallback: {\n value: function () {\n drag.destroy(this);\n destroyEditor(this);\n }\n },\n\n /*\n attributeChangedCallback: {\n value: function (name, prevValue, value) {}\n },\n */\n\n options: {\n value: function (name, value) {\n if (!this._options) {\n this._options = {};\n\n for (const optionName in OPTIONS) {\n this._options[ optionName ] = undefined;\n\n const attrName = `data-${OPTIONS[ optionName ][2]}`;\n if (this.hasAttribute(attrName)) {\n this._options[ optionName ] = this.getAttribute(attrName);\n }\n }\n\n optionsPrepare(this._options);\n }\n\n if (typeof value !== 'undefined') {\n this._options[ name ] = value;\n optionsPrepare(this._options);\n\n } else {\n return this._options[ name ];\n }\n }\n },\n\n items: {\n get: function () {\n return bubbleset.getBubbles(this);\n }\n },\n\n inputValue: {\n get: function () {\n return this.editor.inputValue();\n }\n },\n\n setContent: {\n value: function (data) {\n return this.editor.setContent(data);\n }\n },\n\n addBubble: {\n value: function (bubbleText, data) {\n return this.editor.addBubble(bubbleText, data);\n }\n },\n\n removeBubble: {\n value: function (nodeBubble) {\n return this.editor.removeBubble(nodeBubble);\n }\n },\n\n editBubble: {\n value: function (nodeBubble) {\n return this.editor.editBubble(nodeBubble);\n }\n }\n});\n\nmodule.exports = context.document.registerElement('x-bubbles', {\n extends: 'div',\n prototype: XBubbles\n});\n\nconst OPTIONS_PREPARE = {\n func: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return new Function('context', `return context.${value};`)(context);\n\n case 'function':\n return value;\n }\n },\n bool: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return (value === 'true' || value === 'on');\n\n case 'boolean':\n return value;\n }\n },\n noop: function (value) {\n return value;\n },\n reg: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n if (value) {\n const match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n if (match) {\n return new RegExp(match[1], match[2]);\n }\n }\n\n return null;\n\n case 'object':\n if (value instanceof context.RegExp || value === null) {\n return value;\n }\n }\n },\n str: function (value) {\n if (typeof value !== 'undefined') {\n return value ? String(value) : '';\n }\n },\n};\n\nfunction optionsPrepare(options) {\n for (let name in OPTIONS) {\n const [ type, def ] = OPTIONS[ name ];\n options[ name ] = OPTIONS_PREPARE[ type ](options[ name ]);\n if (typeof options[ name ] === 'undefined') {\n options[ name ] = def;\n }\n }\n}\n\nfunction initEditor(node) {\n if (!node.editor) {\n Object.defineProperty(node, 'editor', {\n configurable: true,\n value: editor.init(node)\n });\n }\n}\n\nfunction destroyEditor(node) {\n if (node.editor) {\n editor.destroy(node);\n delete node.editor;\n }\n}\n\nfunction bubbleCopyOption(list) {\n return list.map(item => item.innerHTML).join(', ');\n}\n\nfunction checkBubblePasteOption() {\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","module.exports = (function () {\n /* eslint no-eval: 0 */\n return this || (1, eval)('this');\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./context.js\n **/","const native = require('./drag/native');\nconst mouse = require('./drag/mouse');\nconst { canUseDrag } = require('./utils');\n\nexports.init = function (nodeSet) {\n if (canUseDrag) {\n return native.init(nodeSet);\n }\n\n return mouse.init(nodeSet);\n};\n\nexports.destroy = function (nodeSet) {\n if (canUseDrag) {\n return native.destroy(nodeSet);\n }\n\n return mouse.destroy(nodeSet);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag.js\n **/","const context = require('../../context');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst events = require('../events');\nconst { CLS } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nconst EVENTS = {\n dragend: onDragend,\n dragenter: onDragenter,\n dragleave: onDragleave,\n dragover: onDragover,\n dragstart: onDragstart,\n drop: onDrop,\n};\n\nlet currentDragSet = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, EVENTS);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, EVENTS);\n};\n\nfunction onDragstart(event) {\n event.stopPropagation();\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (!nodeSet || !nodeBubble) {\n event.preventDefault();\n return;\n }\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = nodeSet;\n nodeSet.classList.add(CLS.DRAGSTART);\n select.add(nodeBubble);\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', '');\n\n const list = select.get(currentDragSet);\n if (list.length > 1) {\n event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n }\n}\n\nfunction onDrop(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet || nodeSet === currentDragSet) {\n return;\n }\n\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n}\n\nfunction onDragover(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n event.dataTransfer.dropEffect = 'move';\n}\n\nfunction onDragenter(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n }\n}\n\nfunction onDragleave(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n}\n\nfunction onDragend(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n currentDragSet.classList.remove(CLS.DRAGSTART);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n\n currentDragSet = null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/native.js\n **/","const context = require('../context');\nconst bubble = require('./bubble');\nconst bubbleset = require('./bubbleset');\n\nconst slice = Array.prototype.slice;\nconst PATH_SELECTED = '[bubble][selected]';\nconst PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\nexports.all = all;\nexports.add = add;\nexports.clear = clear;\nexports.get = get;\nexports.uniq = uniq;\nexports.head = head;\nexports.last = last;\nexports.has = has;\nexports.range = range;\nexports.toggleUniq = toggleUniq;\n\nfunction range(node) {\n if (!bubble.isBubbleNode(node)) {\n return;\n }\n\n const set = node.parentNode;\n const list = get(set);\n\n if (!list.length) {\n uniq(node);\n return;\n }\n\n clear(set);\n\n const headList = list[0];\n const lastList = list[ list.length - 1 ];\n\n if (headList === lastList || !set.startRangeSelect) {\n set.startRangeSelect = headList;\n }\n\n let fromNode;\n let toNode;\n const position = node.compareDocumentPosition(set.startRangeSelect);\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n fromNode = set.startRangeSelect;\n toNode = node;\n\n } else {\n fromNode = node;\n toNode = set.startRangeSelect;\n }\n\n if (fromNode && toNode) {\n let item = fromNode;\n\n while (item) {\n if (!setSelected(item)) {\n break;\n }\n\n if (item === toNode) {\n break;\n }\n\n item = item.nextSibling;\n }\n\n bubble.bubbling(set);\n }\n}\n\nfunction all(nodeSet) {\n slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(item => setSelected(item));\n nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\n bubble.bubbling(nodeSet);\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n}\n\nfunction has(nodeSet) {\n return Boolean(nodeSet.querySelector(PATH_SELECTED));\n}\n\nfunction head(set) {\n return get(set)[0];\n}\n\nfunction last(set) {\n const list = get(set);\n return list[ list.length - 1 ];\n}\n\nfunction get(nodeSet) {\n return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n}\n\nfunction clear(nodeSet) {\n get(nodeSet).forEach(item => item.removeAttribute('selected'));\n}\n\nfunction add(node) {\n if (setSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n nodeSet.startRangeSelect = node;\n // ???\n bubble.bubbling(nodeSet);\n\n return true;\n }\n\n return false;\n}\n\nfunction uniq(node) {\n if (!bubble.isBubbleNode(node)) {\n return false;\n }\n\n const nodeSet = bubbleset.closestNodeSet(node);\n const selection = context.getSelection();\n\n selection && selection.removeAllRanges();\n clear(nodeSet);\n\n return add(node);\n}\n\nfunction toggleUniq(node) {\n if (isSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n if (get(nodeSet).length === 1) {\n return removeSelected(node);\n }\n }\n\n return uniq(node);\n}\n\nfunction isSelected(node) {\n return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n}\n\nfunction setSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.setAttribute('selected', '');\n return true;\n }\n\n return false;\n}\n\nfunction removeSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.removeAttribute('selected');\n return true;\n }\n\n return false;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/select.js\n **/","const context = require('../context');\nconst text = require('./text');\nconst { escape, canUseDrag } = require('./utils');\n\nexports.isBubbleNode = isBubbleNode;\nexports.bubbling = bubbling;\nexports.create = create;\nexports.edit = edit;\n\nfunction isBubbleNode(node) {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n\n return node.hasAttribute('bubble');\n}\n\nfunction edit(nodeSet, nodeBubble) {\n if (nodeBubble.hasAttribute('readonly')) {\n return false;\n }\n\n const selection = context.getSelection();\n\n if (!selection) {\n return false;\n }\n\n const bubbleDeformation = nodeSet.options('bubbleDeformation');\n let rangeParams = bubbleDeformation(nodeBubble);\n\n if (!rangeParams) {\n const dataText = text.textClean(nodeBubble.innerText);\n\n rangeParams = {\n text: dataText,\n startOffset: 0,\n endOffset: dataText.length\n };\n }\n\n const textFake = text.createZws();\n const textNode = context.document.createTextNode(rangeParams.text);\n\n nodeSet.fireEdit(nodeBubble);\n nodeSet.replaceChild(textNode, nodeBubble);\n nodeSet.insertBefore(textFake, textNode);\n\n const range = context.document.createRange();\n range.setStart(textNode, rangeParams.startOffset);\n range.setEnd(textNode, rangeParams.endOffset);\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n}\n\n/**\n * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n * @param {[type]} nodeSet [description]\n * @param {[type]} dataText [description]\n * @param {Object} [dataAttributes={}] [description]\n * @returns {[type]} [description]\n */\nfunction create(nodeSet, dataText, dataAttributes = {}) {\n dataText = text.textClean(dataText);\n\n if (!dataText) {\n return;\n }\n\n const bubbleFormation = nodeSet.options('bubbleFormation');\n const classBubble = nodeSet.options('classBubble');\n const draggable = canUseDrag && nodeSet.options('draggable');\n const wrap = nodeSet.ownerDocument.createElement('span');\n\n wrap.innerText = dataText;\n\n for (let key in dataAttributes) {\n if (dataAttributes[ key ]) {\n wrap.setAttribute(`data-${key}`, escape(dataAttributes[ key ]));\n }\n }\n\n bubbleFormation(wrap);\n\n if (classBubble) {\n const classes = String(classBubble).trim().split(/\\s+/);\n let len = classes.length;\n\n while (len--) {\n wrap.classList.add(classes[ len ]);\n }\n }\n\n wrap.setAttribute('bubble', '');\n wrap.setAttribute('contenteditable', 'false');\n draggable && wrap.setAttribute('draggable', 'true');\n\n return wrap;\n}\n\nfunction bubbling(nodeSet) {\n const begining = nodeSet.options('begining');\n const ending = nodeSet.options('ending');\n const separator = nodeSet.options('separator');\n const tokenizer = nodeSet.options('tokenizer');\n const ranges = getBubbleRanges(nodeSet);\n const nodes = [];\n\n ranges.forEach(function (range) {\n const dataText = text.textClean(range.toString());\n\n if (!dataText) {\n range.deleteContents();\n return;\n }\n\n let textParts = [ dataText ];\n\n if (tokenizer) {\n textParts = tokenizer(dataText);\n\n } else {\n if (separator) {\n textParts = dataText\n .split(separator)\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n\n if (ending) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByEnding(str, ending)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n\n } else if (begining) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByBeginning(str, begining)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n }\n\n if (!Array.isArray(textParts) || !textParts.length) {\n range.deleteContents();\n return;\n }\n\n const fragment = context.document.createDocumentFragment();\n\n textParts.forEach(function (textPart) {\n const nodeBubble = create(nodeSet, textPart);\n if (nodeBubble) {\n fragment.appendChild(nodeBubble);\n nodes.push(nodeBubble);\n }\n });\n\n range.deleteContents();\n range.insertNode(fragment);\n });\n\n nodeSet.fireInput();\n\n if (nodes.length) {\n nodeSet.fireChange();\n }\n\n return nodes;\n}\n\nfunction getBubbleRanges(nodeSet) {\n const ranges = [];\n const children = nodeSet.childNodes;\n let range;\n let node;\n\n for (let i = 0; i < children.length; i++) {\n node = children[ i ];\n\n if (isBubbleNode(node)) {\n if (range) {\n range.setEndBefore(node);\n ranges.push(range);\n range = undefined;\n }\n\n } else {\n if (!range) {\n range = context.document.createRange();\n range.setStartBefore(node);\n }\n }\n }\n\n if (range) {\n range.setEndAfter(node);\n ranges.push(range);\n }\n\n return ranges;\n}\n\nfunction trimIterator(str) {\n return str.trim();\n}\n\nfunction nonEmptyIterator(str) {\n return Boolean(str);\n}\n\nfunction parseFragmentByEnding(str, reg) {\n const parts = [];\n let lastIndex = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while (reg.exec(str) !== null && loop) {\n loop--;\n parts.push(str.substring(lastIndex, reg.lastIndex));\n lastIndex = reg.lastIndex;\n }\n\n return parts;\n}\n\nfunction parseFragmentByBeginning(str, reg) {\n const parts = [];\n let res;\n let index = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while ((res = reg.exec(str)) !== null && loop) {\n loop--;\n if (index !== res.index) {\n parts.push(str.substring(index, res.index));\n index = res.index;\n }\n }\n\n parts.push(str.substring(index, str.length));\n return parts;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubble.js\n **/","const context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst { getSelection } = require('./utils');\n\n/* eslint-disable max-len */\nconst REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09FC-\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF2-\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u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F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1AAE-\\u1AFF\\u1B4C-\\u1B4F\\u1B7D-\\u1B7F\\u1BF4-\\u1BFB\\u1C38-\\u1C3A\\u1C4A-\\u1C4C\\u1C80-\\u1CBF\\u1CC8-\\u1CCF\\u1CF7-\\u1CFF\\u1DE7-\\u1DFB\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FC5\\u1FD4\\u1FD5\\u1FDC\\u1FF0\\u1FF1\\u1FF5\\u1FFF\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u2072\\u2073\\u208F\\u209D-\\u209F\\u20BB-\\u20CF\\u20F1-\\u20FF\\u218A-\\u218F\\u23F4-\\u23FF\\u2427-\\u243F\\u244B-\\u245F\\u2700\\u2B4D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C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\nconst REG_ZWS = /\\u200B/;\nconst TEXT_ZWS = '\\u200B';\n\nexports.arrowRight = arrowRight;\nexports.arrowLeft = arrowLeft;\nexports.remove = remove;\nexports.html2text = html2text;\nexports.currentTextRange = currentTextRange;\nexports.text2bubble = text2bubble;\nexports.replaceString = replaceString;\nexports.selectAll = selectAll;\nexports.textClean = textClean;\nexports.checkZws = checkZws;\nexports.createZws = createZws;\n\nfunction text2bubble(nodeEditor, nodeBubble) {\n const selection = getSelection(nodeEditor);\n const range = selection && currentTextRange(nodeEditor, selection);\n\n if (range) {\n selection.removeAllRanges();\n selection.addRange(range);\n replace(selection, nodeBubble);\n\n } else {\n nodeEditor.appendChild(nodeBubble);\n }\n\n return true;\n}\n\nfunction currentTextRange(nodeEditor, selection) {\n selection = selection || getSelection(nodeEditor);\n if (!selection) {\n return;\n }\n\n const pointNode = do {\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n selection.focusNode;\n\n } else if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n selection.anchorNode;\n\n } else {\n undefined;\n }\n };\n\n if (!pointNode) {\n return;\n }\n\n let startNode = pointNode;\n let endNode = pointNode;\n let item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n startNode = item;\n item = item.previousSibling;\n }\n\n item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n endNode = item;\n item = item.nextSibling;\n }\n\n const range = nodeEditor.ownerDocument.createRange();\n range.setStartBefore(startNode);\n range.setEndAfter(endNode);\n\n return range;\n}\n\nfunction remove(selection) {\n return replace(selection, createZws());\n}\n\nfunction replace(selection, node) {\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const anchor = context.document.createElement('span');\n selection.getRangeAt(0).surroundContents(anchor);\n anchor.parentNode.replaceChild(node, anchor);\n\n selection.removeAllRanges();\n\n if (node.nodeType === Node.TEXT_NODE) {\n const range = context.document.createRange();\n // для ИЕ обязательно указывать node.nodeValue.length\n range.setStart(node, node.nodeValue.length);\n range.collapse(false);\n selection.addRange(range);\n\n } else {\n selection.collapse(node, 0);\n }\n\n return true;\n}\n\nfunction replaceString(data, selection) {\n data = textClean(data);\n if (!data) {\n return false;\n }\n\n selection = selection || context.getSelection();\n const textNode = context.document.createTextNode(data);\n\n if (!replace(selection, textNode)) {\n return false;\n }\n\n selection.collapse(textNode, textNode.nodeValue.length);\n return true;\n}\n\nfunction arrowLeft(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(startNode, startOffset);\n return true;\n }\n\n const isNativeExtend = Boolean(selection.extend);\n revert = isNativeExtend ? revert : !revert;\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n if (offset === null) {\n offset = node.nodeValue.length;\n }\n\n if (offset - 1 < 0) {\n node = node.previousSibling;\n offset = null;\n continue;\n }\n\n const text = node.nodeValue.substring(offset - 1, offset);\n\n if (checkZws(text)) {\n offset = offset - 1;\n continue;\n }\n\n break;\n }\n\n if (!node || offset === null) {\n return false;\n }\n\n if (extend) {\n if (isNativeExtend) {\n selection.extend(node, offset - 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset - 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset - 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset - 1);\n }\n\n return true;\n}\n\nfunction arrowRight(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.focusNode ||\n selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(endNode, endOffset);\n return true;\n }\n\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n const len = node.nodeValue.length;\n\n if (offset + 1 > len) {\n node = node.nextSibling;\n offset = 0;\n continue;\n }\n\n const text = node.nodeValue.substring(offset, offset + 1);\n\n if (checkZws(text)) {\n offset = offset + 1;\n continue;\n }\n\n break;\n }\n\n if (!node) {\n return false;\n }\n\n if (extend) {\n const isNativeExtend = Boolean(selection.extend);\n\n if (isNativeExtend) {\n selection.extend(node, offset + 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset + 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset + 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset + 1);\n }\n\n return true;\n}\n\nfunction html2text(value) {\n if (!value) {\n return '';\n }\n\n var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n DOMContainer.innerText = value;\n\n return DOMContainer.innerText\n .replace(/^[\\u0020\\u00a0]+$/gm, '')\n .replace(/\\n/gm, ' ')\n .trim();\n}\n\nfunction selectAll(selection, nodeSet) {\n selection = selection || context.getSelection();\n const node = selection && selection.anchorNode;\n\n if (!node || node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n let fromNode;\n let toNode;\n let item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n fromNode = item;\n item = item.previousSibling;\n }\n\n item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n toNode = item;\n item = item.nextSibling;\n }\n\n const hasBubbles = bubbleset.hasBubbles(nodeSet);\n const range = context.document.createRange();\n range.setStartBefore(fromNode);\n range.setEndAfter(toNode);\n\n const dataText = textClean(range.toString());\n\n if (dataText || (!dataText && !hasBubbles)) {\n if (!dataText) {\n range.collapse();\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n }\n\n return false;\n}\n\nfunction createZws() {\n return context.document.createTextNode(TEXT_ZWS);\n}\n\nfunction checkZws(value) {\n return REG_ZWS.test(value);\n}\n\nfunction textClean(value) {\n return String(value || '')\n .trim()\n .replace(REG_REPLACE_NON_PRINTABLE, '');\n}\n\nfunction selectionCorrect(selection) {\n let startNode = selection.anchorNode;\n let endNode = selection.focusNode;\n let startOffset = selection.anchorOffset;\n let endOffset = selection.focusOffset;\n let revert = false;\n\n if (startNode === endNode) {\n startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n revert = selection.anchorOffset > selection.focusOffset;\n\n } else {\n const position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n startNode = selection.focusNode;\n startOffset = selection.focusOffset;\n endNode = selection.anchorNode;\n endOffset = selection.anchorOffset;\n revert = true;\n }\n }\n\n return { startNode, endNode, startOffset, endOffset, revert };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/text.js\n **/","const bubble = require('./bubble');\nconst text = require('./text');\n\nexports.closestNodeBubble = closestNodeBubble;\nexports.closestNodeSet = closestNodeSet;\nexports.findBubbleLeft = findBubbleLeft;\nexports.findBubbleRight = findBubbleRight;\nexports.getBubbles = getBubbles;\nexports.hasBubbles = hasBubbles;\nexports.headBubble = headBubble;\nexports.lastBubble = lastBubble;\nexports.nextBubble = nextBubble;\nexports.prevBubble = prevBubble;\n\nfunction lastBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:last-child');\n}\n\nfunction headBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:first-child');\n}\n\nfunction getBubbles(nodeSet) {\n return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n}\n\nfunction hasBubbles(nodeSet) {\n return Boolean(nodeSet.querySelector('[bubble]'));\n}\n\nfunction findBubbleLeft(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.previousSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.previousSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction findBubbleRight(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.nextSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.nextSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction closestNodeSet(node) {\n while (node) {\n if (isEditorNode(node)) {\n return node;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction closestNodeBubble(node) {\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (isEditorNode(node)) {\n return;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction prevBubble(target) {\n let node = target && target.previousSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction nextBubble(target) {\n let node = target && target.nextSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction isEditorNode(node) {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n node.getAttribute('is') === 'x-bubbles'\n );\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubbleset.js\n **/","const raf = require('raf');\nconst context = require('../context');\n\n/* eslint quotes: 0 */\n\nconst HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n\nconst HTML_UNESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n};\n\nconst REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\nconst REG_UNESCAPED_HTML = /[&<>\"'`]/g;\nconst REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\nconst REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\nconst REG_IE = /Trident|Edge/;\n\nexports.getSelection = function (nodeEditor) {\n const selection = context.getSelection();\n\n if (selection && selection.anchorNode && (nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n return selection;\n }\n};\n\nexports.throttle = function (callback, runContext) {\n let throttle = 0;\n const animationCallback = function () {\n throttle = 0;\n };\n\n return function () {\n if (throttle) {\n return;\n }\n\n throttle = raf(animationCallback);\n\n callback.apply(runContext || this, arguments);\n };\n};\n\nexports.escape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n }\n\n return data;\n};\n\nexports.unescape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n }\n\n return data;\n};\n\nexports.canUseDrag = (function () {\n return !REG_IE.test(context.navigator.userAgent);\n})();\n\nexports.isIE = (function () {\n return REG_IE.test(context.navigator.userAgent);\n})();\n\nfunction unescapeHtmlChar(chr) {\n return HTML_UNESCAPES[ chr ];\n}\n\nfunction escapeHtmlChar(chr) {\n return HTML_ESCAPES[ chr ];\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/utils.js\n **/","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/raf/index.js\n ** module id = 9\n ** module chunks = 0\n **/","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/performance-now/lib/performance-now.js\n ** module id = 10\n ** module chunks = 0\n **/","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * @module x-bubbles/event\n */\n\nconst context = require('../context');\nconst CustomEventCommon = require('../polyfills/CustomEventCommon');\n\nexports.scrollX = scrollX;\nexports.scrollY = scrollY;\nexports.dispatch = dispatch;\n\nexports.keyCode = function (event) {\n return event.charCode || event.keyCode;\n};\n\nexports.metaKey = function (event) {\n return event.ctrlKey || event.metaKey;\n};\n\nexports.pageX = function (event) {\n return (event.pageX === null && event.clientX !== null) ?\n event.clientX + scrollX() :\n event.pageX;\n};\n\nexports.pageY = function (event) {\n return (event.pageY === null && event.clientY !== null) ?\n event.clientY + scrollY() :\n event.pageY;\n};\n\nexports.one = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, oneCallback(target, name, events[ name ]));\n }\n};\n\nexports.on = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, events[ name ]);\n }\n};\n\nexports.off = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.removeEventListener(name, events[ name ]);\n }\n};\n\nexports.prevent = function (event) {\n event.cancelBubble = true;\n event.returnValue = false;\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n return false;\n};\n\nfunction scrollX() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n}\n\nfunction scrollY() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n}\n\n/**\n * Designer events.\n *\n * @example\n * const { Custom } = require('event');\n *\n * new Custom('custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event~Custom\n * @constructor\n */\nconst Custom = (function () {\n if (typeof context.CustomEvent === 'function') {\n return context.CustomEvent;\n }\n\n return CustomEventCommon;\n}());\n\n/**\n * Dispatch event.\n *\n * @example\n * const { dispatch } = require('event');\n * dispatch(node, 'custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event.dispatch\n * @param {HTMLElement} element node events\n * @param {string} name event name\n * @param {Object} params the event parameters\n * @param {boolean} [params.bubbles=false]\n * @param {boolean} [params.cancelable=false]\n * @param {*} [params.detail]\n */\nfunction dispatch(element, name, params = {}) {\n element.dispatchEvent(new Custom(name, params));\n}\n\nfunction oneCallback(target, eventName, callback) {\n return function _callback(event) {\n target.removeEventListener(eventName, _callback);\n callback(event);\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/events.js\n **/","const context = require('../context');\n\n/**\n * @constant {Document}\n * @private\n */\nconst doc = context.document;\n\n/**\n * @constant {Object}\n * @private\n */\nconst protoEvent = context.Event.prototype;\n\nlet issetCustomEvent = false;\n\ntry {\n issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n} catch (e) {\n // do nothing\n}\n\n/**\n * The original function \"stopImmediatePropagation\"\n * @constant {function}\n * @private\n */\nconst stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\n/**\n * Override function to set properties \"immediatePropagationStopped\"\n */\nprotoEvent.stopImmediatePropagation = function () {\n this.immediatePropagationStopped = true;\n\n if (stopImmediatePropagation) {\n stopImmediatePropagation.call(this);\n\n } else {\n this.stopPropagation();\n }\n};\n\nlet CustomEventCommon = (function () {\n if (issetCustomEvent) {\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('CustomEvent');\n\n evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\n return evt;\n };\n }\n\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('Event');\n\n evt.initEvent(eventName, bubbles, cancelable);\n evt.detail = params.detail;\n\n return evt;\n };\n}());\n\nCustomEventCommon.prototype = protoEvent;\n\nmodule.exports = CustomEventCommon;\n\n\n\n/** WEBPACK FOOTER **\n ** ./polyfills/CustomEventCommon.js\n **/","exports.KEY = {\n a: 65,\n Backspace: 8,\n Bottom: 40,\n c: 67,\n Cmd: 91,\n Comma: 44, // ,\n Delete: 46,\n Enter: 13, // Enter\n Esc: 27,\n Left: 37,\n Right: 39,\n Semicolon: 59, // ;\n Space: 32,\n Tab: 9,\n Top: 38,\n x: 88,\n};\n\nexports.CLS = {\n DRAGSTART: 'drag',\n DROPZONE: 'dropzone',\n};\n\nexports.EV = {\n BUBBLE_EDIT: 'bubble-edit',\n BUBBLE_INPUT: 'bubble-input',\n CHANGE: 'change',\n DRAGEND: 'dragend',\n DRAGENTER: 'dragenter',\n DRAGLEAVE: 'dragleave',\n DRAGSTART: 'dragstart',\n DROP: 'drop',\n};\n\nexports.PROPS = {\n BUBBLE_VALUE: '_bubbleValue',\n CLICK_TIME: '_clickTime',\n LOCK_COPY: '_lockCopy',\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/constant.js\n **/","const DRAG_IMG = { w: 16, h: 16 };\n\nlet dragImage = null;\n\nexports.DRAG_IMG = DRAG_IMG;\n\nexports.getDragImage = function () {\n if (!dragImage) {\n dragImage = new Image();\n dragImage.src = require('url?mimetype=image/png!./bubbles.png');\n }\n\n return dragImage;\n};\n\nexports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n fromNodeSet.fireChange();\n toNodeSet.focus();\n toNodeSet.fireChange();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/common.js\n **/","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/url-loader?mimetype=image/png!./core/drag/bubbles.png\n ** module id = 16\n ** module chunks = 0\n **/","const context = require('../../context');\nconst events = require('../events');\nconst utils = require('../utils');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst Modernizr = require('modernizr');\nconst { CLS, EV } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nlet currentDragSet = null;\nlet currentMoveSet = null;\nlet currentDragElement = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, 'mousedown', onMousedown);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, 'mousedown', onMousedown);\n};\n\nfunction onMousedown(event) {\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n if (!nodeBubble) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (!nodeSet) {\n return;\n }\n\n event.preventDefault();\n nodeSet.focus();\n\n const drag = nodeSet.__drag__ = {\n onMouseup: onMouseup.bind(this, nodeSet),\n onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n nodeOffsetX: event.offsetX,\n nodeOffsetY: event.offsetY,\n x: 0,\n y: 0\n };\n\n currentDragSet = null;\n currentMoveSet = null;\n currentDragElement = null;\n\n events.one(document, 'mouseup', drag.onMouseup);\n events.on(document, 'mousemove', drag.onMousemove);\n events.on(document, 'scroll', drag.onScroll);\n}\n\nfunction onMouseup(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n events.off(document, 'mousemove', drag.onMousemove);\n events.off(document, 'scroll', drag.onScroll);\n delete dragSet.__drag__;\n\n if (currentDragElement) {\n currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n currentDragElement = null;\n }\n\n if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n\n if (currentDragSet) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n }\n\n const _ = currentDragSet;\n currentDragSet = null;\n\n _.classList.remove(CLS.DRAGSTART);\n events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onMousemove(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n if (!currentDragSet) {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = dragSet;\n currentDragSet.classList.add(CLS.DRAGSTART);\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n let moveElement;\n\n if (nodeBubble) {\n select.add(nodeBubble);\n if (select.get(currentDragSet).length === 1) {\n moveElement = nodeBubble.cloneNode(true);\n }\n }\n\n if (!moveElement) {\n moveElement = getDragImage();\n drag.nodeOffsetX = DRAG_IMG.w;\n drag.nodeOffsetY = DRAG_IMG.h;\n }\n\n currentDragElement = document.body.appendChild(document.createElement('div'));\n currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n currentDragElement.appendChild(moveElement);\n\n events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n }\n\n drag.x = event.clientX;\n drag.y = event.clientY;\n onScroll(dragSet);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n if (currentMoveSet && currentMoveSet !== nodeSet) {\n currentMoveSet.classList.remove(CLS.DROPZONE);\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\n } else if (!currentMoveSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n }\n\n } else if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onScroll(dragSet) {\n const drag = dragSet.__drag__;\n if (!drag || !currentDragElement) {\n return;\n }\n\n const x = drag.x - drag.nodeOffsetX + events.scrollX();\n const y = drag.y - drag.nodeOffsetY + events.scrollY();\n\n if (Modernizr.csstransforms3d) {\n currentDragElement.style.transform = `translate3d(${x}px, ${y}px, 0px)`;\n\n } else if (Modernizr.csstransforms) {\n currentDragElement.style.transform = `translate(${x}px, ${y}px)`;\n\n } else {\n currentDragElement.style.top = `${y}px`;\n currentDragElement.style.left = `${x}px`;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/mouse.js\n **/",";(function(window){\n/*!\n * modernizr v3.3.1\n * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n *\n * Copyright (c)\n * Faruk Ates\n * Paul Irish\n * Alex Sexton\n * Ryan Seddon\n * Patrick Kettner\n * Stu Cox\n * Richard Herrera\n\n * MIT License\n */\n\n/*\n * Modernizr tests which native CSS3 and HTML5 features are available in the\n * current UA and makes the results available to you in two ways: as properties on\n * a global `Modernizr` object, and as classes on the `` element. This\n * information allows you to progressively enhance your pages with a granular level\n * of control over the experience.\n*/\n\n;(function(window, document, undefined){\n var tests = [];\n \n\n /**\n *\n * ModernizrProto is the constructor for Modernizr\n *\n * @class\n * @access public\n */\n\n var ModernizrProto = {\n // The current version, dummy\n _version: '3.3.1',\n\n // Any settings that don't work as separate modules\n // can go in here as configuration.\n _config: {\n 'classPrefix': '',\n 'enableClasses': true,\n 'enableJSClass': true,\n 'usePrefixes': true\n },\n\n // Queue of tests\n _q: [],\n\n // Stub these for people who are listening\n on: function(test, cb) {\n // I don't really think people should do this, but we can\n // safe guard it a bit.\n // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n // This is in case people listen to synchronous tests. I would leave it out,\n // but the code to *disallow* sync tests in the real version of this\n // function is actually larger than this.\n var self = this;\n setTimeout(function() {\n cb(self[test]);\n }, 0);\n },\n\n addTest: function(name, fn, options) {\n tests.push({name: name, fn: fn, options: options});\n },\n\n addAsyncTest: function(fn) {\n tests.push({name: null, fn: fn});\n }\n };\n\n \n\n // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n var Modernizr = function() {};\n Modernizr.prototype = ModernizrProto;\n\n // Leak modernizr globally when you `require` it rather than force it here.\n // Overwrite name so constructor name is nicer :D\n Modernizr = new Modernizr();\n\n \n\n var classes = [];\n \n\n /**\n * is returns a boolean if the typeof an obj is exactly type.\n *\n * @access private\n * @function is\n * @param {*} obj - A thing we want to check the type of\n * @param {string} type - A string to compare the typeof against\n * @returns {boolean}\n */\n\n function is(obj, type) {\n return typeof obj === type;\n }\n ;\n\n /**\n * Run through all tests and detect their support in the current UA.\n *\n * @access private\n */\n\n function testRunner() {\n var featureNames;\n var feature;\n var aliasIdx;\n var result;\n var nameIdx;\n var featureName;\n var featureNameSplit;\n\n for (var featureIdx in tests) {\n if (tests.hasOwnProperty(featureIdx)) {\n featureNames = [];\n feature = tests[featureIdx];\n // run the test, throw the return value into the Modernizr,\n // then based on that boolean, define an appropriate className\n // and push it into an array of classes we'll join later.\n //\n // If there is no name, it's an 'async' test that is run,\n // but not directly added to the object. That should\n // be done with a post-run addTest call.\n if (feature.name) {\n featureNames.push(feature.name.toLowerCase());\n\n if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n // Add all the aliases into the names list\n for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n }\n }\n }\n\n // Run the test, or use the raw value if it's not a function\n result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\n\n // Set each of the names on the Modernizr object\n for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n featureName = featureNames[nameIdx];\n // Support dot properties as sub tests. We don't do checking to make sure\n // that the implied parent tests have been added. You must call them in\n // order (either in the test, or make the parent test a dependency).\n //\n // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n // hashtag famous last words\n featureNameSplit = featureName.split('.');\n\n if (featureNameSplit.length === 1) {\n Modernizr[featureNameSplit[0]] = result;\n } else {\n // cast to a Boolean, if not one already\n /* jshint -W053 */\n if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n }\n\n Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n }\n\n classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n }\n }\n }\n }\n ;\n\n /**\n * If the browsers follow the spec, then they would expose vendor-specific style as:\n * elem.style.WebkitBorderRadius\n * instead of something like the following, which would be technically incorrect:\n * elem.style.webkitBorderRadius\n\n * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n * erik.eae.net/archives/2008/03/10/21.48.10/\n\n * More here: github.com/Modernizr/Modernizr/issues/issue/21\n *\n * @access private\n * @returns {string} The string representing the vendor-specific style properties\n */\n\n var omPrefixes = 'Moz O ms Webkit';\n \n\n var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n ModernizrProto._cssomPrefixes = cssomPrefixes;\n \n\n\n /**\n * contains checks to see if a string contains another string\n *\n * @access private\n * @function contains\n * @param {string} str - The string we want to check for substrings\n * @param {string} substr - The substring we want to search the first string for\n * @returns {boolean}\n */\n\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n ;\n\n /**\n * docElement is a convenience wrapper to grab the root element of the document\n *\n * @access private\n * @returns {HTMLElement|SVGElement} The root element of the document\n */\n\n var docElement = document.documentElement;\n \n\n /**\n * A convenience helper to check if the document we are running in is an SVG document\n *\n * @access private\n * @returns {boolean}\n */\n\n var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n \n\n /**\n * createElement is a convenience wrapper around document.createElement. Since we\n * use createElement all over the place, this allows for (slightly) smaller code\n * as well as abstracting away issues with creating elements in contexts other than\n * HTML documents (e.g. SVG documents).\n *\n * @access private\n * @function createElement\n * @returns {HTMLElement|SVGElement} An HTML or SVG element\n */\n\n function createElement() {\n if (typeof document.createElement !== 'function') {\n // This is the case in IE7, where the type of createElement is \"object\".\n // For this reason, we cannot call apply() as Object is not a Function.\n return document.createElement(arguments[0]);\n } else if (isSVG) {\n return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n } else {\n return document.createElement.apply(document, arguments);\n }\n }\n\n ;\n\n /**\n * Create our \"modernizr\" element that we do most feature tests on.\n *\n * @access private\n */\n\n var modElem = {\n elem: createElement('modernizr')\n };\n\n // Clean up this element\n Modernizr._q.push(function() {\n delete modElem.elem;\n });\n\n \n\n var mStyle = {\n style: modElem.elem.style\n };\n\n // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n // the front of the queue.\n Modernizr._q.unshift(function() {\n delete mStyle.style;\n });\n\n \n\n /**\n * getBody returns the body of a document, or an element that can stand in for\n * the body if a real body does not exist\n *\n * @access private\n * @function getBody\n * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n * artificially created element that stands in for the body\n */\n\n function getBody() {\n // After page load injecting a fake body doesn't work so check if body exists\n var body = document.body;\n\n if (!body) {\n // Can't use the real body create a fake one.\n body = createElement(isSVG ? 'svg' : 'body');\n body.fake = true;\n }\n\n return body;\n }\n\n ;\n\n /**\n * injectElementWithStyles injects an element with style element and some CSS rules\n *\n * @access private\n * @function injectElementWithStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n */\n\n function injectElementWithStyles(rule, callback, nodes, testnames) {\n var mod = 'modernizr';\n var style;\n var ret;\n var node;\n var docOverflow;\n var div = createElement('div');\n var body = getBody();\n\n if (parseInt(nodes, 10)) {\n // In order not to give false positives we create a node for each test\n // This also allows the method to scale for unspecified uses\n while (nodes--) {\n node = createElement('div');\n node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n div.appendChild(node);\n }\n }\n\n style = createElement('style');\n style.type = 'text/css';\n style.id = 's' + mod;\n\n // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n (!body.fake ? div : body).appendChild(style);\n body.appendChild(div);\n\n if (style.styleSheet) {\n style.styleSheet.cssText = rule;\n } else {\n style.appendChild(document.createTextNode(rule));\n }\n div.id = mod;\n\n if (body.fake) {\n //avoid crashing IE8, if background image is used\n body.style.background = '';\n //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n body.style.overflow = 'hidden';\n docOverflow = docElement.style.overflow;\n docElement.style.overflow = 'hidden';\n docElement.appendChild(body);\n }\n\n ret = callback(div, rule);\n // If this is done after page load we don't want to remove the body so check if body exists\n if (body.fake) {\n body.parentNode.removeChild(body);\n docElement.style.overflow = docOverflow;\n // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n docElement.offsetHeight;\n } else {\n div.parentNode.removeChild(div);\n }\n\n return !!ret;\n\n }\n\n ;\n\n /**\n * domToCSS takes a camelCase string and converts it to kebab-case\n * e.g. boxSizing -> box-sizing\n *\n * @access private\n * @function domToCSS\n * @param {string} name - String name of camelCase prop we want to convert\n * @returns {string} The kebab-case version of the supplied name\n */\n\n function domToCSS(name) {\n return name.replace(/([A-Z])/g, function(str, m1) {\n return '-' + m1.toLowerCase();\n }).replace(/^ms-/, '-ms-');\n }\n ;\n\n /**\n * nativeTestProps allows for us to use native feature detection functionality if available.\n * some prefixed form, or false, in the case of an unsupported rule\n *\n * @access private\n * @function nativeTestProps\n * @param {array} props - An array of property names\n * @param {string} value - A string representing the value we want to check via @supports\n * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n */\n\n // Accepts a list of property names and a single value\n // Returns `undefined` if native detection not available\n function nativeTestProps(props, value) {\n var i = props.length;\n // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n if ('CSS' in window && 'supports' in window.CSS) {\n // Try every prefixed variant of the property\n while (i--) {\n if (window.CSS.supports(domToCSS(props[i]), value)) {\n return true;\n }\n }\n return false;\n }\n // Otherwise fall back to at-rule (for Opera 12.x)\n else if ('CSSSupportsRule' in window) {\n // Build a condition string for every prefixed variant\n var conditionText = [];\n while (i--) {\n conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n }\n conditionText = conditionText.join(' or ');\n return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n return getComputedStyle(node, null).position == 'absolute';\n });\n }\n return undefined;\n }\n ;\n\n /**\n * cssToDOM takes a kebab-case string and converts it to camelCase\n * e.g. box-sizing -> boxSizing\n *\n * @access private\n * @function cssToDOM\n * @param {string} name - String name of kebab-case prop we want to convert\n * @returns {string} The camelCase version of the supplied name\n */\n\n function cssToDOM(name) {\n return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n return m1 + m2.toUpperCase();\n }).replace(/^-/, '');\n }\n ;\n\n // testProps is a generic CSS / DOM property test.\n\n // In testing support for a given CSS property, it's legit to test:\n // `elem.style[styleName] !== undefined`\n // If the property is supported it will return an empty string,\n // if unsupported it will return undefined.\n\n // We'll take advantage of this quick test and skip setting a style\n // on our modernizr element, but instead just testing undefined vs\n // empty string.\n\n // Property names can be provided in either camelCase or kebab-case.\n\n function testProps(props, prefixed, value, skipValueTest) {\n skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\n // Try native detect first\n if (!is(value, 'undefined')) {\n var result = nativeTestProps(props, value);\n if (!is(result, 'undefined')) {\n return result;\n }\n }\n\n // Otherwise do it properly\n var afterInit, i, propsLength, prop, before;\n\n // If we don't have a style element, that means we're running async or after\n // the core tests, so we'll need to create our own elements to use\n\n // inside of an SVG element, in certain browsers, the `style` element is only\n // defined for valid tags. Therefore, if `modernizr` does not have one, we\n // fall back to a less used element and hope for the best.\n var elems = ['modernizr', 'tspan'];\n while (!mStyle.style) {\n afterInit = true;\n mStyle.modElem = createElement(elems.shift());\n mStyle.style = mStyle.modElem.style;\n }\n\n // Delete the objects if we created them.\n function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }\n\n propsLength = props.length;\n for (i = 0; i < propsLength; i++) {\n prop = props[i];\n before = mStyle.style[prop];\n\n if (contains(prop, '-')) {\n prop = cssToDOM(prop);\n }\n\n if (mStyle.style[prop] !== undefined) {\n\n // If value to test has been passed in, do a set-and-check test.\n // 0 (integer) is a valid property value, so check that `value` isn't\n // undefined, rather than just checking it's truthy.\n if (!skipValueTest && !is(value, 'undefined')) {\n\n // Needs a try catch block because of old IE. This is slow, but will\n // be avoided in most cases because `skipValueTest` will be used.\n try {\n mStyle.style[prop] = value;\n } catch (e) {}\n\n // If the property value has changed, we assume the value used is\n // supported. If `value` is empty string, it'll fail here (because\n // it hasn't changed), which matches how browsers have implemented\n // CSS.supports()\n if (mStyle.style[prop] != before) {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n // Otherwise just return true, or the property name if this is a\n // `prefixed()` call\n else {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n }\n cleanElems();\n return false;\n }\n\n ;\n\n /**\n * List of JavaScript DOM values used for tests\n *\n * @memberof Modernizr\n * @name Modernizr._domPrefixes\n * @optionName Modernizr._domPrefixes\n * @optionProp domPrefixes\n * @access public\n * @example\n *\n * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n * than kebab-case properties, all properties are their Capitalized variant\n *\n * ```js\n * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n * ```\n */\n\n var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n ModernizrProto._domPrefixes = domPrefixes;\n \n\n /**\n * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n *\n * @access private\n * @function fnBind\n * @param {function} fn - a function you want to change `this` reference to\n * @param {object} that - the `this` you want to call the function with\n * @returns {function} The wrapped version of the supplied function\n */\n\n function fnBind(fn, that) {\n return function() {\n return fn.apply(that, arguments);\n };\n }\n\n ;\n\n /**\n * testDOMProps is a generic DOM property test; if a browser supports\n * a certain property, it won't return undefined for it.\n *\n * @access private\n * @function testDOMProps\n * @param {array.} props - An array of properties to test for\n * @param {object} obj - An object or Element you want to use to test the parameters again\n * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n */\n function testDOMProps(props, obj, elem) {\n var item;\n\n for (var i in props) {\n if (props[i] in obj) {\n\n // return the property name as a string\n if (elem === false) {\n return props[i];\n }\n\n item = obj[props[i]];\n\n // let's bind a function\n if (is(item, 'function')) {\n // bind to obj unless overriden\n return fnBind(item, elem || obj);\n }\n\n // return the unbound function or obj or value\n return item;\n }\n }\n return false;\n }\n\n ;\n\n /**\n * testPropsAll tests a list of DOM properties we want to check against.\n * We specify literally ALL possible (known and/or likely) properties on\n * the element including the non-vendor prefixed one, for forward-\n * compatibility.\n *\n * @access private\n * @function testPropsAll\n * @param {string} prop - A string of the property to test for\n * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n * @param {string} [value] - A string of a css value\n * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n */\n function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\n var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\n // did they call .prefixed('boxSizing') or are we just testing a prop?\n if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n return testProps(props, prefixed, value, skipValueTest);\n\n // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n } else {\n props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n return testDOMProps(props, prefixed, elem);\n }\n }\n\n // Modernizr.testAllProps() investigates whether a given style property,\n // or any of its vendor-prefixed variants, is recognized\n //\n // Note that the property names must be provided in the camelCase variant.\n // Modernizr.testAllProps('boxSizing')\n ModernizrProto.testAllProps = testPropsAll;\n\n \n\n /**\n * testAllProps determines whether a given CSS property is supported in the browser\n *\n * @memberof Modernizr\n * @name Modernizr.testAllProps\n * @optionName Modernizr.testAllProps()\n * @optionProp testAllProps\n * @access public\n * @function testAllProps\n * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n * @param {string} [value] - String of the value to test\n * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n * @example\n *\n * testAllProps determines whether a given CSS property, in some prefixed form,\n * is supported by the browser.\n *\n * ```js\n * testAllProps('boxSizing') // true\n * ```\n *\n * It can optionally be given a CSS value in string form to test if a property\n * value is valid\n *\n * ```js\n * testAllProps('display', 'block') // true\n * testAllProps('display', 'penguin') // false\n * ```\n *\n * A boolean can be passed as a third parameter to skip the value check when\n * native detection (@supports) isn't available.\n *\n * ```js\n * testAllProps('shapeOutside', 'content-box', true);\n * ```\n */\n\n function testAllProps(prop, value, skipValueTest) {\n return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n }\n ModernizrProto.testAllProps = testAllProps;\n \n/*!\n{\n \"name\": \"CSS Transforms\",\n \"property\": \"csstransforms\",\n \"caniuse\": \"transforms2d\",\n \"tags\": [\"css\"]\n}\n!*/\n\n Modernizr.addTest('csstransforms', function() {\n // Android < 3.0 is buggy, so we sniff and blacklist\n // http://git.io/hHzL7w\n return navigator.userAgent.indexOf('Android 2.') === -1 &&\n testAllProps('transform', 'scale(1)', true);\n });\n\n\n /**\n * testStyles injects an element with style element and some CSS rules\n *\n * @memberof Modernizr\n * @name Modernizr.testStyles\n * @optionName Modernizr.testStyles()\n * @optionProp testStyles\n * @access public\n * @function testStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n * @example\n *\n * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n * along with (possibly multiple) DOM elements. This lets you check for features\n * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n *\n * ```js\n * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n * // elem is the first DOM node in the page (by default #modernizr)\n * // rule is the first argument you supplied - the CSS rule in string form\n *\n * addTest('widthworks', elem.style.width === '9px')\n * });\n * ```\n *\n * If your test requires multiple nodes, you can include a third argument\n * indicating how many additional div elements to include on the page. The\n * additional nodes are injected as children of the `elem` that is returned as\n * the first argument to the callback.\n *\n * ```js\n * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n * document.getElementById('modernizr').style.width === '1px'; // true\n * document.getElementById('modernizr2').style.width === '2px'; // true\n * elem.firstChild === document.getElementById('modernizr2'); // true\n * }, 1);\n * ```\n *\n * By default, all of the additional elements have an ID of `modernizr[n]`, where\n * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n * the second additional is `#modernizr3`, etc.).\n * If you want to have more meaningful IDs for your function, you can provide\n * them as the fourth argument, as an array of strings\n *\n * ```js\n * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n * elem.firstChild === document.getElementById('foo'); // true\n * elem.lastChild === document.getElementById('bar'); // true\n * }, 2, ['foo', 'bar']);\n * ```\n *\n */\n\n var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n \n/*!\n{\n \"name\": \"CSS Supports\",\n \"property\": \"supports\",\n \"caniuse\": \"css-featurequeries\",\n \"tags\": [\"css\"],\n \"builderAliases\": [\"css_supports\"],\n \"notes\": [{\n \"name\": \"W3 Spec\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n },{\n \"name\": \"Related Github Issue\",\n \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n },{\n \"name\": \"W3 Info\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n }]\n}\n!*/\n\n var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n var oldSyntax = 'supportsCSS' in window;\n Modernizr.addTest('supports', newSyntax || oldSyntax);\n\n/*!\n{\n \"name\": \"CSS Transforms 3D\",\n \"property\": \"csstransforms3d\",\n \"caniuse\": \"transforms3d\",\n \"tags\": [\"css\"],\n \"warnings\": [\n \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n ]\n}\n!*/\n\n Modernizr.addTest('csstransforms3d', function() {\n var ret = !!testAllProps('perspective', '1px', true);\n var usePrefix = Modernizr._config.usePrefixes;\n\n // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n // some conditions. As a result, Webkit typically recognizes the syntax but\n // will sometimes throw a false positive, thus we must do a more thorough check:\n if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n var mq;\n var defaultStyle = '#modernizr{width:0;height:0}';\n // Use CSS Conditional Rules if available\n if (Modernizr.supports) {\n mq = '@supports (perspective: 1px)';\n } else {\n // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n mq = '@media (transform-3d)';\n if (usePrefix) {\n mq += ',(-webkit-transform-3d)';\n }\n }\n\n mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\n testStyles(defaultStyle + mq, function(elem) {\n ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n });\n }\n\n return ret;\n });\n\n\n // Run each test\n testRunner();\n\n delete ModernizrProto.addTest;\n delete ModernizrProto.addAsyncTest;\n\n // Run the things that are supposed to run after the tests\n for (var i = 0; i < Modernizr._q.length; i++) {\n Modernizr._q[i]();\n }\n\n // Leak Modernizr namespace\n window.Modernizr = Modernizr;\n\n\n;\n\n})(window, document);\nmodule.exports = window.Modernizr;\n})(window);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../.modernizrrc\n ** module id = 18\n ** module chunks = 0\n **/","const raf = require('raf');\nconst context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst bubble = require('./bubble');\nconst cursor = require('./cursor');\nconst select = require('./select');\nconst { KEY, EV, PROPS } = require('./constant');\nconst text = require('./text');\nconst events = require('./events');\nconst utils = require('./utils');\n\nconst eventCopy = require('./editor/copy');\nconst eventPaste = require('./editor/paste');\nconst eventBackspace = require('./editor/backspace');\nconst eventDelete = require('./editor/delete');\n\nconst EVENTS = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n keydown: onKeydown,\n keypress: onKeypress,\n keyup: onKeyup,\n mscontrolselect: events.prevent,\n paste: eventPaste,\n resize: events.prevent,\n resizestart: events.prevent,\n};\n\nexports.init = function (nodeWrap) {\n const nodeEditor = nodeWrap;\n nodeEditor.setAttribute('contenteditable', 'true');\n nodeEditor.setAttribute('spellcheck', 'false');\n\n nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\n events.on(nodeEditor, EVENTS);\n\n return {\n addBubble: addBubble.bind(nodeEditor),\n editBubble: editBubble.bind(nodeEditor),\n inputValue: inputValue.bind(nodeEditor),\n removeBubble: removeBubble.bind(nodeEditor),\n setContent: setContent.bind(nodeEditor),\n };\n};\n\nexports.destroy = function (nodeEditor) {\n events.off(nodeEditor, EVENTS);\n};\n\nfunction onBlur(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n return events.prevent(event);\n }\n\n select.clear(nodeEditor);\n bubble.bubbling(nodeEditor);\n}\n\nfunction onFocus(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n events.prevent(event);\n delete nodeEditor[ PROPS.LOCK_COPY ];\n\n // Safary 10 не сбрасывает курсор без задержки\n raf(() => {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n });\n\n return false;\n }\n\n cursor.restore(nodeEditor);\n}\n\nfunction onKeyup(event) {\n const nodeEditor = event.currentTarget;\n const code = events.keyCode(event);\n const isPrintableChar = do {\n if (event.key) {\n event.key.length === 1;\n\n } else {\n ((code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd);\n }\n };\n\n if (isPrintableChar) {\n nodeEditor.fireInput();\n }\n}\n\nfunction onKeypress(event) {\n const code = events.keyCode(event);\n const nodeEditor = event.currentTarget;\n\n /* eslint no-case-declarations: 0 */\n switch (code) {\n case KEY.Enter:\n event.preventDefault();\n if (!nodeEditor.options('disableControls')) {\n if (!editBubbleKeyboardEvent(nodeEditor)) {\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n break;\n\n case KEY.Space:\n if (editBubbleKeyboardEvent(nodeEditor)) {\n event.preventDefault();\n }\n break;\n\n default:\n const separator = nodeEditor.options('separator');\n if (separator && separator.test(String.fromCharCode(code))) {\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n}\n\nfunction onKeydown(event) {\n const code = events.keyCode(event);\n const metaKey = events.metaKey(event);\n const nodeEditor = event.currentTarget;\n const enable = !nodeEditor.options('disableControls');\n\n switch (code) {\n case KEY.Esc:\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n break;\n\n case KEY.Backspace:\n event.preventDefault();\n eventBackspace(event);\n break;\n\n case KEY.Delete:\n event.preventDefault();\n eventDelete(event);\n break;\n\n case KEY.Left:\n event.preventDefault();\n arrowLeft(event);\n break;\n\n // сдвигаем курсор в начало списка\n case KEY.Top:\n event.preventDefault();\n if (enable) {\n const headBubble = bubbleset.headBubble(nodeEditor);\n headBubble && select.uniq(headBubble);\n }\n break;\n\n case KEY.Right:\n event.preventDefault();\n arrowRight(event);\n break;\n\n // сдвигаем курсор в конец списка\n // case KEY.Tab:\n case KEY.Bottom:\n event.preventDefault();\n if (enable && select.has(nodeEditor)) {\n cursor.restore(nodeEditor);\n }\n break;\n\n case KEY.a:\n if (metaKey) {\n event.preventDefault();\n\n if (!text.selectAll(null, event.currentTarget)) {\n select.all(nodeEditor);\n }\n }\n break;\n\n case KEY.c:\n if (metaKey) {\n eventCopy(event);\n }\n break;\n\n case KEY.x:\n if (metaKey) {\n eventCopy(event, () => eventDelete(event));\n }\n break;\n }\n}\n\nfunction arrowLeft(event) {\n const selection = context.getSelection();\n\n if (text.arrowLeft(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ 0 ] === nodeSet.startRangeSelect) {\n list[ list.length - 1 ];\n\n } else {\n list[ 0 ];\n }\n };\n\n const node = bubbleset.prevBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n }\n}\n\nfunction arrowRight(event) {\n const selection = context.getSelection();\n\n if (text.arrowRight(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.nextBubble(selection.focusNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ list.length - 1 ] === nodeSet.startRangeSelect) {\n list[ 0 ];\n\n } else {\n list[ list.length - 1 ];\n }\n };\n\n const node = bubbleset.nextBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n\n } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n select.clear(nodeSet);\n selection.collapse(begin.nextSibling, 0);\n\n } else {\n cursor.restore(nodeSet);\n }\n}\n\nfunction onClick(event) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet) {\n return;\n }\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (nodeBubble) {\n const clickTime = Date.now();\n const isDblclick = nodeSet[ PROPS.CLICK_TIME ] && (clickTime - nodeSet[ PROPS.CLICK_TIME ]) < 200;\n\n nodeSet[ PROPS.CLICK_TIME ] = clickTime;\n\n if (events.metaKey(event)) {\n select.add(nodeBubble);\n\n } else if (event.shiftKey) {\n if (!nodeSet.startRangeSelect) {\n select.uniq(nodeBubble);\n\n } else {\n select.range(nodeBubble);\n }\n\n } else if (isDblclick) {\n bubble.edit(nodeSet, nodeBubble);\n\n } else {\n select.toggleUniq(nodeBubble);\n }\n\n } else {\n select.clear(nodeSet);\n\n const selection = context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n cursor.restore(nodeSet);\n }\n }\n}\n\nfunction editBubbleKeyboardEvent(nodeEditor) {\n const selection = context.getSelection();\n\n if (!selection || !selection.rangeCount) {\n const list = select.get(nodeEditor);\n\n if (list.length === 1) {\n return bubble.edit(nodeEditor, list[0]);\n }\n }\n\n return false;\n}\n\nfunction setContent(data) {\n var selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n data = text.html2text(data);\n this.appendChild(this.ownerDocument.createTextNode(data));\n bubble.bubbling(this);\n cursor.restore(this);\n}\n\nfunction addBubble(bubbleText, dataAttributes) {\n const nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n if (!nodeBubble) {\n return false;\n }\n\n if (text.text2bubble(this, nodeBubble)) {\n this.fireInput();\n this.fireChange();\n cursor.restore(this);\n return true;\n }\n\n return false;\n}\n\nfunction removeBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n this.removeChild(nodeBubble);\n this.fireChange();\n return true;\n }\n\n return false;\n}\n\nfunction editBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n return bubble.edit(this, nodeBubble);\n }\n\n return false;\n}\n\nfunction inputValue() {\n const textRange = text.currentTextRange(this);\n return textRange && text.textClean(textRange.toString()) || '';\n}\n\n/**\n * Генерация события редактирования бабла.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireEdit\n * @param {HTMLElement} nodeBubble нода бабл\n * @this HTMLElement\n * @private\n */\nfunction fireEdit(nodeBubble) {\n events.dispatch(this, EV.BUBBLE_EDIT, {\n bubbles: false,\n cancelable: false,\n detail: { data: nodeBubble }\n });\n}\n\n/**\n * Генерация события изменения набора баблов.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireChange\n * @this HTMLElement\n * @private\n */\nfunction fireChange() {\n events.dispatch(this, EV.CHANGE, {\n bubbles: false,\n cancelable: false\n });\n}\n\n/**\n * Генерация события ввода текста.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireInput\n * @this HTMLElement\n * @private\n */\nfunction fireInput() {\n const editText = inputValue.call(this);\n\n if (this[ PROPS.BUBBLE_VALUE ] !== editText) {\n this[ PROPS.BUBBLE_VALUE ] = editText;\n\n events.dispatch(this, EV.BUBBLE_INPUT, {\n bubbles: false,\n cancelable: false,\n detail: { data: editText }\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor.js\n **/","/**\n * @module x-bubbles/cursor\n */\n\nconst context = require('../context');\nconst text = require('./text');\nconst select = require('./select');\n\nexports.restore = restore;\nexports.restoreBasis = restoreBasis;\n\n/**\n * Reset the cursor position to the end of the input field.\n * @alias module:x-bubbles/cursor.restore\n * @param {HTMLElement} nodeSet\n */\nfunction restore(nodeSet) {\n select.clear(nodeSet);\n const basis = restoreBasis(nodeSet);\n const selection = context.getSelection();\n selection.removeAllRanges();\n selection.collapse(basis, 1);\n}\n\n/**\n * The creation of the fake text at the end childNodes\n * @alias module:x-bubbles/cursor.restoreBasis\n * @param {HTMLElement} nodeSet\n * @returns {HTMLTextElement} fake text node\n */\nfunction restoreBasis(nodeSet) {\n let fakeText = text.createZws();\n\n if (nodeSet.hasChildNodes()) {\n const lastNode = nodeSet.childNodes[ nodeSet.childNodes.length - 1 ];\n\n if (lastNode.isEqualNode(fakeText)) {\n fakeText = lastNode;\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n return fakeText;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/cursor.js\n **/","const raf = require('raf');\nconst events = require('../events');\nconst select = require('../select');\nconst { PROPS } = require('../constant');\nconst utils = require('../utils');\n\nmodule.exports = function (event, callback = function () {}) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n return false;\n }\n\n const list = select.get(nodeEditor);\n\n if (!list.length) {\n return false;\n }\n\n const bubbleCopy = nodeEditor.options('bubbleCopy');\n const value = bubbleCopy(list);\n\n if (!value) {\n return false;\n }\n\n nodeEditor[ PROPS.LOCK_COPY ] = true;\n\n const target = nodeEditor.ownerDocument.createElement('input');\n target.value = value;\n target.style.cssText = `\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;`;\n\n nodeEditor.parentNode.appendChild(target);\n\n events.one(target, {\n keyup: () => nodeEditor.focus(),\n blur: () => {\n removeNode(target);\n raf(callback);\n }\n });\n\n target.select();\n return true;\n};\n\nfunction removeNode(node) {\n node && node.parentNode && node.parentNode.removeChild(node);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/copy.js\n **/","const raf = require('raf');\nconst context = require('../../context');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst text = require('../text');\nconst { isIE } = require('../utils');\n\nmodule.exports = function (event) {\n event.preventDefault();\n const nodeEditor = event.currentTarget;\n\n if (context.clipboardData && context.clipboardData.getData) {\n onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\n } else if (event.clipboardData) {\n const contentType = 'text/plain';\n const clipboardData = event.clipboardData;\n const data = clipboardData.getData && clipboardData.getData(contentType);\n\n if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n Array.prototype.slice.call(clipboardData.items)\n .filter(item => item.kind === 'string' && item.type === contentType)\n .some(function (item) {\n item.getAsString(function (dataText) {\n onPasteSuccess(nodeEditor, dataText);\n });\n\n return true;\n });\n }\n }\n};\n\nfunction onPasteSuccess(nodeEditor, dataText) {\n const checkBubblePaste = nodeEditor.options('checkBubblePaste');\n const selection = context.getSelection();\n const isBubbling = do {\n if (dataText && selection.isCollapsed && !nodeEditor.inputValue) {\n checkBubblePaste(dataText);\n\n } else {\n false;\n }\n };\n\n if (text.replaceString(dataText, selection)) {\n if (isBubbling) {\n if (isIE) {\n raf(() => onReplaceSuccess(nodeEditor));\n\n } else {\n onReplaceSuccess(nodeEditor);\n }\n\n } else {\n nodeEditor.fireInput();\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction onReplaceSuccess(nodeEditor) {\n bubble.bubbling(nodeEditor);\n nodeEditor.focus();\n raf(() => cursor.restore(nodeEditor));\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/paste.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Backspace.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowLeft(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleLeft(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/backspace.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Delete.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowRight(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleRight(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/delete.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/x-bubbles.min.js b/docs/x-bubbles.min.js index baa3bd6..1761caf 100644 --- a/docs/x-bubbles.min.js +++ b/docs/x-bubbles.min.js @@ -1,3 +1,3 @@ -var XBubbles=function(e){function t(u){if(n[u])return n[u].exports;var r=n[u]={exports:{},id:u,loaded:!1};return e[u].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function u(e){for(var t in g){var n=s(g[t],2),u=n[0],r=n[1];e[t]=h[u](e[t]),"undefined"==typeof e[t]&&(e[t]=r)}}function r(e){e.editor||Object.defineProperty(e,"editor",{configurable:!0,value:d.init(e)})}function o(e){e.editor&&(d.destroy(e),delete e.editor)}function i(e){return e.map(function(e){return e.innerHTML}).join(", ")}function a(){return!0}var s=function(){function e(e,t){var n=[],u=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(u=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);u=!0);}catch(s){r=!0,o=s}finally{try{!u&&a["return"]&&a["return"]()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=n(1),f=n(2),d=n(19),p=n(5),b=n(7),g={begining:["reg",null,"begining"],bubbleCopy:["func",i,"bubble-copy"],bubbleDeformation:["func",function(){},"bubble-deformation"],bubbleFormation:["func",function(){},"bubble-formation"],checkBubblePaste:["func",a,"check-bubble-paste"],classBubble:["str","bubble","class-bubble"],disableControls:["bool",!1,"disable-controls"],draggable:["bool",!0,"draggable"],ending:["reg",null,"ending"],separator:["reg",/[,;]/,"separator"],tokenizer:["func",null,"tokenizer"]},v=Object.create(HTMLDivElement.prototype,{createdCallback:{value:function(){r(this)}},attachedCallback:{value:function(){r(this),f.init(this),p.bubbling(this)}},detachedCallback:{value:function(){f.destroy(this),o(this)}},options:{value:function(e,t){if(!this._options){this._options={};for(var n in g){this._options[n]=void 0;var r="data-"+g[n][2];this.hasAttribute(r)&&(this._options[n]=this.getAttribute(r))}u(this._options)}return"undefined"==typeof t?this._options[e]:(this._options[e]=t,void u(this._options))}},items:{get:function(){return b.getBubbles(this)}},inputValue:{get:function(){return this.editor.inputValue()}},setContent:{value:function(e){return this.editor.setContent(e)}},addBubble:{value:function(e,t){return this.editor.addBubble(e,t)}},removeBubble:{value:function(e){return this.editor.removeBubble(e)}},editBubble:{value:function(e){return this.editor.editBubble(e)}}});e.exports=c.document.registerElement("x-bubbles",{"extends":"div",prototype:v});var h={func:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return new Function("context","return context."+e+";")(c);case"function":return e}},bool:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":return"true"===e||"on"===e;case"boolean":return e}},noop:function(e){return e},reg:function(e){var t="undefined"==typeof e?"undefined":l(e);switch(t){case"string":if(e){var n=e.match(/\/(.+)\/([gimy]{0,3})/i);if(n)return new RegExp(n[1],n[2])}return null;case"object":if(e instanceof c.RegExp)return e}},str:function(e){if("undefined"!=typeof e)return e?String(e):""}}},function(e,t){"use strict";e.exports=function(){return this||(0,eval)("this")}()},function(e,t,n){"use strict";var u=n(3),r=n(17),o=n(8),i=o.canUseDrag;t.init=function(e){return i?u.init(e):r.init(e)},t.destroy=function(e){return i?u.destroy(e):r.destroy(e)}},function(e,t,n){"use strict";function u(e){e.stopPropagation();var t=f.closestNodeSet(e.target),n=f.closestNodeBubble(e.target);if(!t||!n)return void e.preventDefault();var u=l.getSelection();u&&u.removeAllRanges(),E=t,t.classList.add(b.DRAGSTART),c.add(n),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain","");var r=c.get(E);r.length>1&&e.dataTransfer.setDragImage(v(),A.w,A.h)}function r(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);if(t&&t!==E){var n=c.get(E);n.length&&(n.forEach(function(e){return t.appendChild(e)}),l.setTimeout(h,0,E,t))}}}function o(e){e.stopPropagation(),e.preventDefault(),E&&(e.dataTransfer.dropEffect="move")}function i(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.add(b.DROPZONE)}}function a(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE)}}function s(e){if(e.stopPropagation(),e.preventDefault(),E){E.classList.remove(b.DRAGSTART);var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE),E=null}}var l=n(1),c=n(4),f=n(7),d=n(12),p=n(14),b=p.CLS,g=n(15),v=g.getDragImage,h=g.onDropSuccess,A=g.DRAG_IMG,F={dragend:s,dragenter:i,dragleave:a,dragover:o,dragstart:u,drop:r},E=null;t.init=function(e){d.on(e,F)},t.destroy=function(e){d.off(e,F)}},function(e,t,n){"use strict";function u(e){if(h.isBubbleNode(e)){var t=e.parentNode,n=s(t);if(!n.length)return void f(e);l(t);var u=n[0],r=n[n.length-1];u!==r&&t.startRangeSelect||(t.startRangeSelect=u);var o=void 0,i=void 0,a=e.compareDocumentPosition(t.startRangeSelect);if(a&Node.DOCUMENT_POSITION_PRECEDING?(o=t.startRangeSelect,i=e):(o=e,i=t.startRangeSelect),o&&i){for(var c=o;c&&b(c)&&c!==i;)c=c.nextSibling;h.bubbling(t)}}}function r(e){F.call(e.querySelectorAll(C)).forEach(function(e){return b(e)}),e.startRangeSelect=e.querySelector(E),h.bubbling(e);var t=v.getSelection();t&&t.removeAllRanges()}function o(e){return Boolean(e.querySelector(E))}function i(e){return s(e)[0]}function a(e){var t=s(e);return t[t.length-1]}function s(e){return F.call(e.querySelectorAll(E))}function l(e){s(e).forEach(function(e){return e.removeAttribute("selected")})}function c(e){if(b(e)){var t=A.closestNodeSet(e);return t.startRangeSelect=e,h.bubbling(t),!0}return!1}function f(e){if(!h.isBubbleNode(e))return!1;var t=A.closestNodeSet(e),n=v.getSelection();return n&&n.removeAllRanges(),l(t),c(e)}function d(e){if(p(e)){var t=A.closestNodeSet(e);if(1===s(t).length)return g(e)}return f(e)}function p(e){return h.isBubbleNode(e)&&e.hasAttribute("selected")||!1}function b(e){return!!h.isBubbleNode(e)&&(e.setAttribute("selected",""),!0)}function g(e){return!!h.isBubbleNode(e)&&(e.removeAttribute("selected"),!0)}var v=n(1),h=n(5),A=n(7),F=Array.prototype.slice,E="[bubble][selected]",C="[bubble]:not([selected])";t.all=r,t.add=c,t.clear=l,t.get=s,t.uniq=f,t.head=i,t.last=a,t.has=o,t.range=u,t.toggleUniq=d},function(e,t,n){"use strict";function u(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&e.hasAttribute("bubble")}function r(e,t){if(t.hasAttribute("readonly"))return!1;var n=d.getSelection();if(!n)return!1;var u=e.options("bubbleDeformation"),r=u(t);if(!r){var o=p.textClean(t.innerText);r={text:o,startOffset:0,endOffset:o.length}}var i=p.createZws(),a=d.document.createTextNode(r.text);e.fireEdit(t),e.replaceChild(a,t),e.insertBefore(i,a);var s=d.document.createRange();return s.setStart(a,r.startOffset),s.setEnd(a,r.endOffset),n.removeAllRanges(),n.addRange(s),!0}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t=p.textClean(t)){var u=e.options("bubbleFormation"),r=e.options("classBubble"),o=v&&e.options("draggable"),i=e.ownerDocument.createElement("span");i.innerText=t;for(var a in n)n[a]&&i.setAttribute("data-"+a,g(n[a]));if(u(i),r)for(var s=String(r).trim().split(/\s+/),l=s.length;l--;)i.classList.add(s[l]);return i.setAttribute("bubble",""),i.setAttribute("contenteditable","false"),o&&i.setAttribute("draggable","true"),i}}function i(e){var t=e.options("begining"),n=e.options("ending"),u=e.options("separator"),r=e.options("tokenizer"),i=a(e),b=[];return i.forEach(function(i){var a=p.textClean(i.toString());if(!a)return void i.deleteContents();var g=[a];if(r?g=r(a):(u&&(g=a.split(u).map(s).filter(l)),n?g=g.reduce(function(e,t){return e.concat(c(t,n))},[]).map(s).filter(l):t&&(g=g.reduce(function(e,n){return e.concat(f(n,t))},[]).map(s).filter(l))),!Array.isArray(g)||!g.length)return void i.deleteContents();var v=d.document.createDocumentFragment();g.forEach(function(t){var n=o(e,t);n&&(v.appendChild(n),b.push(n))}),i.deleteContents(),i.insertNode(v)}),e.fireInput(),b.length&&e.fireChange(),b}function a(e){for(var t=[],n=e.childNodes,r=void 0,o=void 0,i=0;ic)s=s.nextSibling,l=0;else{var f=s.nodeValue.substring(l,l+1);if(!p(f))break;l+=1}}if(!s)return!1;if(t){var d=Boolean(e.extend);if(d)e.extend(s,l+1);else{var b=v.document.createRange();a?(b.setStart(s,l+1),b.setEnd(r,i)):(b.setStart(u,o),b.setEnd(s,l+1)),e.removeAllRanges(),e.addRange(b)}}else e.collapse(s,l+1);return!0}function c(e){if(!e)return"";var t=v.document.implementation.createHTMLDocument("").body;return t.innerText=e,t.innerText.replace(/^[\u0020\u00a0]+$/gm,"").replace(/\n/gm," ").trim()}function f(e,t){e=e||v.getSelection();var n=e&&e.anchorNode;if(!n||n.nodeType!==Node.TEXT_NODE)return!1;for(var u=void 0,r=void 0,o=n;o&&o.nodeType===Node.TEXT_NODE;)u=o,o=o.previousSibling;for(o=n;o&&o.nodeType===Node.TEXT_NODE;)r=o,o=o.nextSibling;var i=h.hasBubbles(t),a=v.document.createRange();a.setStartBefore(u),a.setEndAfter(r);var s=b(a.toString());return!(!s&&(s||i))&&(s||a.collapse(),e.removeAllRanges(),e.addRange(a),!0)}function d(){return v.document.createTextNode(D)}function p(e){return C.test(e)}function b(e){return String(e||"").trim().replace(E,"")}function g(e){var t=e.anchorNode,n=e.focusNode,u=e.anchorOffset,r=e.focusOffset,o=!1;if(t===n)u=Math.min(e.anchorOffset,e.focusOffset),r=Math.max(e.anchorOffset,e.focusOffset),o=e.anchorOffset>e.focusOffset;else{var i=e.anchorNode.compareDocumentPosition(e.focusNode);i&Node.DOCUMENT_POSITION_PRECEDING&&(t=e.focusNode,u=e.focusOffset,n=e.anchorNode,r=e.anchorOffset,o=!0)}return{startNode:t,endNode:n,startOffset:u,endOffset:r,revert:o}}var v=n(1),h=n(7),A=n(8),F=A.getSelection,E=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,C=/\u200B/,D="​";t.arrowRight=l,t.arrowLeft=s,t.remove=o,t.html2text=c,t.currentTextRange=r,t.text2bubble=u,t.replaceString=a,t.selectAll=f,t.textClean=b,t.checkZws=p,t.createZws=d},function(e,t,n){"use strict";function u(e){return e.querySelector("[bubble]:last-child")}function r(e){return e.querySelector("[bubble]:first-child")}function o(e){return Array.prototype.slice.call(e.querySelectorAll("[bubble]"))}function i(e){return Boolean(e.querySelector("[bubble]"))}function a(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.previousSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.previousSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.previousSibling}}}function s(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.nextSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.nextSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.nextSibling}}}function l(e){for(;e;){if(p(e))return e;e=e.parentNode}}function c(e){for(;e;){if(b.isBubbleNode(e))return e;if(p(e))return;e=e.parentNode}}function f(e){for(var t=e&&e.previousSibling;t;){if(b.isBubbleNode(t))return t;t=t.previousSibling}}function d(e){for(var t=e&&e.nextSibling;t;){if(b.isBubbleNode(t))return t;t=t.nextSibling}}function p(e){return e.nodeType===Node.ELEMENT_NODE&&"x-bubbles"===e.getAttribute("is")}var b=n(5),g=n(6);t.closestNodeBubble=c,t.closestNodeSet=l,t.findBubbleLeft=a,t.findBubbleRight=s,t.getBubbles=o,t.hasBubbles=i,t.headBubble=r,t.lastBubble=u,t.nextBubble=d,t.prevBubble=f},function(e,t,n){"use strict";function u(e){return s[e]}function r(e){return a[e]}var o=n(9),i=n(1),a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},s={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},l=/&(?:amp|lt|gt|quot|#39|#96);/g,c=/[&<>"'`]/g,f=RegExp(l.source),d=RegExp(c.source),p=/Trident|Edge/;t.getSelection=function(e){var t=i.getSelection();if(t&&t.anchorNode&&e.compareDocumentPosition(t.anchorNode)&Node.DOCUMENT_POSITION_CONTAINED_BY)return t},t.throttle=function(e,t){var n=0,u=function(){n=0};return function(){n||(n=o(u),e.apply(t||this,arguments))}},t.escape=function(e){return e=String(e),e&&d.test(e)?e.replace(c,r):e},t.unescape=function(e){return e=String(e),e&&f.test(e)?e.replace(l,u):e},t.canUseDrag=function(){return!p.test(i.navigator.userAgent)}(),t.isIE=function(){return p.test(i.navigator.userAgent)}()},function(e,t,n){(function(t){for(var u=n(10),r="undefined"==typeof window?t:window,o=["moz","webkit"],i="AnimationFrame",a=r["request"+i],s=r["cancel"+i]||r["cancelRequest"+i],l=0;!a&&l1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};e.dispatchEvent(new c(t,n))}function a(e,t,n){return function u(r){e.removeEventListener(t,u),n(r)}}var s=n(1),l=n(13);t.scrollX=r,t.scrollY=o,t.dispatch=i,t.keyCode=function(e){return e.charCode||e.keyCode},t.metaKey=function(e){return e.ctrlKey||e.metaKey},t.pageX=function(e){return null===e.pageX&&null!==e.clientX?e.clientX+r():e.pageX},t.pageY=function(e){return null===e.pageY&&null!==e.clientY?e.clientY+o():e.pageY},t.one=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,a(e,o,r[o]))},t.on=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,r[o])},t.off=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.removeEventListener(o,r[o])},t.prevent=function(e){return e.cancelBubble=!0,e.returnValue=!1,e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),!1};var c=function(){return"function"==typeof s.CustomEvent?s.CustomEvent:l}()},function(e,t,n){"use strict";var u=n(1),r=u.document,o=u.Event.prototype,i=!1;try{i=Boolean(r.createEvent("CustomEvent"))}catch(a){}var s=o.stopImmediatePropagation;o.stopImmediatePropagation=function(){this.immediatePropagationStopped=!0,s?s.call(this):this.stopPropagation()};var l=function(){return i?function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("CustomEvent");return o.initCustomEvent(e,n,u,t.detail),o}:function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("Event");return o.initEvent(e,n,u),o.detail=t.detail,o}}();l.prototype=o,e.exports=l},function(e,t){"use strict";t.KEY={a:65,Backspace:8,Bottom:40,c:67,Cmd:91,Comma:44,Delete:46,Enter:13,Esc:27,Left:37,Right:39,Semicolon:59,Space:32,Tab:9,Top:38,x:88},t.CLS={DRAGSTART:"drag",DROPZONE:"dropzone"},t.EV={BUBBLE_EDIT:"bubble-edit",BUBBLE_INPUT:"bubble-input",CHANGE:"change",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGLEAVE:"dragleave",DRAGSTART:"dragstart",DROP:"drop"},t.PROPS={BUBBLE_VALUE:"_bubbleValue",CLICK_TIME:"_clickTime",LOCK_COPY:"_lockCopy"}},function(e,t,n){"use strict";var u={w:16,h:16},r=null;t.DRAG_IMG=u,t.getDragImage=function(){return r||(r=new Image,r.src=n(16)),r},t.onDropSuccess=function(e,t){e.fireChange(),t.focus(),t.fireChange()}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function u(e){var t=f.closestNodeBubble(e.target);if(t){var n=f.closestNodeSet(e.target);if(n){e.preventDefault(),n.focus();var u=n.__drag__={onMouseup:r.bind(this,n),onMousemove:l.throttle(o.bind(this,n)),onScroll:l.throttle(i.bind(this,n)),nodeOffsetX:e.offsetX,nodeOffsetY:e.offsetY,x:0,y:0};E=null,C=null,D=null,s.one(document,"mouseup",u.onMouseup),s.on(document,"mousemove",u.onMousemove),s.on(document,"scroll",u.onScroll)}}}function r(e,t){var n=e.__drag__;if(n){if(s.off(document,"mousemove",n.onMousemove),s.off(document,"scroll",n.onScroll),delete e.__drag__,D&&(D.parentNode&&D.parentNode.removeChild(D),D=null),C){var u=C;C=null,u.classList.remove(b.DROPZONE),s.dispatch(u,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}E&&!function(){var e=f.closestNodeSet(t.target);if(e&&e!==E){var n=c.get(E);n.length&&(n.forEach(function(t){return e.appendChild(t)}),a.setTimeout(A,0,E,e))}var u=E;E=null,u.classList.remove(b.DRAGSTART),s.dispatch(u,g.DROP,{bubbles:!1,cancelable:!1}),s.dispatch(u,g.DRAGEND,{bubbles:!1,cancelable:!1})}()}}function o(e,t){var n=e.__drag__;if(n){if(!E){var u=a.getSelection();u&&u.removeAllRanges(),E=e,E.classList.add(b.DRAGSTART);var r=f.closestNodeBubble(t.target),o=void 0;r&&(c.add(r),1===c.get(E).length&&(o=r.cloneNode(!0))),o||(o=h(),n.nodeOffsetX=F.w,n.nodeOffsetY=F.h),D=document.body.appendChild(document.createElement("div")),D.style.cssText="position:absolute;z-index:9999;pointer-events:none;top:0;left:0;",D.appendChild(o),s.dispatch(E,g.DRAGSTART,{bubbles:!1,cancelable:!1})}n.x=t.clientX,n.y=t.clientY,i(e);var l=f.closestNodeSet(t.target);if(l&&l!==E)C&&C!==l?(C.classList.remove(b.DROPZONE),l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1})):C||(l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1}));else if(C){var d=C;C=null,d.classList.remove(b.DROPZONE),s.dispatch(d,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}}}function i(e){var t=e.__drag__;if(t&&D){var n=t.x-t.nodeOffsetX+s.scrollX(),u=t.y-t.nodeOffsetY+s.scrollY();d.csstransforms3d?D.style.transform="translate3d("+n+"px, "+u+"px, 0px)":d.csstransforms?D.style.transform="translate("+n+"px, "+u+"px)":(D.style.top=u+"px",D.style.left=n+"px")}}var a=n(1),s=n(12),l=n(8),c=n(4),f=n(7),d=n(18),p=n(14),b=p.CLS,g=p.EV,v=n(15),h=v.getDragImage,A=v.onDropSuccess,F=v.DRAG_IMG,E=null,C=null,D=null;t.init=function(e){s.on(e,"mousedown",u)},t.destroy=function(e){s.off(e,"mousedown",u)}},function(e,t){!function(t){!function(e,t,n){function u(e,t){return typeof e===t}function r(){var e,t,n,r,o,i,a;for(var s in h)if(h.hasOwnProperty(s)){if(e=[],t=h[s],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n1&&e.dataTransfer.setDragImage(v(),A.w,A.h)}function r(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);if(t&&t!==E){var n=c.get(E);n.length&&(n.forEach(function(e){return t.appendChild(e)}),l.setTimeout(h,0,E,t))}}}function o(e){e.stopPropagation(),e.preventDefault(),E&&(e.dataTransfer.dropEffect="move")}function i(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.add(b.DROPZONE)}}function a(e){if(e.stopPropagation(),e.preventDefault(),E){var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE)}}function s(e){if(e.stopPropagation(),e.preventDefault(),E){E.classList.remove(b.DRAGSTART);var t=f.closestNodeSet(e.target);t&&t!==E&&t.classList.remove(b.DROPZONE),E=null}}var l=n(1),c=n(4),f=n(7),d=n(12),p=n(14),b=p.CLS,g=n(15),v=g.getDragImage,h=g.onDropSuccess,A=g.DRAG_IMG,F={dragend:s,dragenter:i,dragleave:a,dragover:o,dragstart:u,drop:r},E=null;t.init=function(e){d.on(e,F)},t.destroy=function(e){d.off(e,F)}},function(e,t,n){"use strict";function u(e){if(h.isBubbleNode(e)){var t=e.parentNode,n=s(t);if(!n.length)return void f(e);l(t);var u=n[0],r=n[n.length-1];u!==r&&t.startRangeSelect||(t.startRangeSelect=u);var o=void 0,i=void 0,a=e.compareDocumentPosition(t.startRangeSelect);if(a&Node.DOCUMENT_POSITION_PRECEDING?(o=t.startRangeSelect,i=e):(o=e,i=t.startRangeSelect),o&&i){for(var c=o;c&&b(c)&&c!==i;)c=c.nextSibling;h.bubbling(t)}}}function r(e){F.call(e.querySelectorAll(C)).forEach(function(e){return b(e)}),e.startRangeSelect=e.querySelector(E),h.bubbling(e);var t=v.getSelection();t&&t.removeAllRanges()}function o(e){return Boolean(e.querySelector(E))}function i(e){return s(e)[0]}function a(e){var t=s(e);return t[t.length-1]}function s(e){return F.call(e.querySelectorAll(E))}function l(e){s(e).forEach(function(e){return e.removeAttribute("selected")})}function c(e){if(b(e)){var t=A.closestNodeSet(e);return t.startRangeSelect=e,h.bubbling(t),!0}return!1}function f(e){if(!h.isBubbleNode(e))return!1;var t=A.closestNodeSet(e),n=v.getSelection();return n&&n.removeAllRanges(),l(t),c(e)}function d(e){if(p(e)){var t=A.closestNodeSet(e);if(1===s(t).length)return g(e)}return f(e)}function p(e){return h.isBubbleNode(e)&&e.hasAttribute("selected")||!1}function b(e){return!!h.isBubbleNode(e)&&(e.setAttribute("selected",""),!0)}function g(e){return!!h.isBubbleNode(e)&&(e.removeAttribute("selected"),!0)}var v=n(1),h=n(5),A=n(7),F=Array.prototype.slice,E="[bubble][selected]",C="[bubble]:not([selected])";t.all=r,t.add=c,t.clear=l,t.get=s,t.uniq=f,t.head=i,t.last=a,t.has=o,t.range=u,t.toggleUniq=d},function(e,t,n){"use strict";function u(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&e.hasAttribute("bubble")}function r(e,t){if(t.hasAttribute("readonly"))return!1;var n=d.getSelection();if(!n)return!1;var u=e.options("bubbleDeformation"),r=u(t);if(!r){var o=p.textClean(t.innerText);r={text:o,startOffset:0,endOffset:o.length}}var i=p.createZws(),a=d.document.createTextNode(r.text);e.fireEdit(t),e.replaceChild(a,t),e.insertBefore(i,a);var s=d.document.createRange();return s.setStart(a,r.startOffset),s.setEnd(a,r.endOffset),n.removeAllRanges(),n.addRange(s),!0}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t=p.textClean(t)){var u=e.options("bubbleFormation"),r=e.options("classBubble"),o=v&&e.options("draggable"),i=e.ownerDocument.createElement("span");i.innerText=t;for(var a in n)n[a]&&i.setAttribute("data-"+a,g(n[a]));if(u(i),r)for(var s=String(r).trim().split(/\s+/),l=s.length;l--;)i.classList.add(s[l]);return i.setAttribute("bubble",""),i.setAttribute("contenteditable","false"),o&&i.setAttribute("draggable","true"),i}}function i(e){var t=e.options("begining"),n=e.options("ending"),u=e.options("separator"),r=e.options("tokenizer"),i=a(e),b=[];return i.forEach(function(i){var a=p.textClean(i.toString());if(!a)return void i.deleteContents();var g=[a];if(r?g=r(a):(u&&(g=a.split(u).map(s).filter(l)),n?g=g.reduce(function(e,t){return e.concat(c(t,n))},[]).map(s).filter(l):t&&(g=g.reduce(function(e,n){return e.concat(f(n,t))},[]).map(s).filter(l))),!Array.isArray(g)||!g.length)return void i.deleteContents();var v=d.document.createDocumentFragment();g.forEach(function(t){var n=o(e,t);n&&(v.appendChild(n),b.push(n))}),i.deleteContents(),i.insertNode(v)}),e.fireInput(),b.length&&e.fireChange(),b}function a(e){for(var t=[],n=e.childNodes,r=void 0,o=void 0,i=0;ic)s=s.nextSibling,l=0;else{var f=s.nodeValue.substring(l,l+1);if(!p(f))break;l+=1}}if(!s)return!1;if(t){var d=Boolean(e.extend);if(d)e.extend(s,l+1);else{var b=v.document.createRange();a?(b.setStart(s,l+1),b.setEnd(r,i)):(b.setStart(u,o),b.setEnd(s,l+1)),e.removeAllRanges(),e.addRange(b)}}else e.collapse(s,l+1);return!0}function c(e){if(!e)return"";var t=v.document.implementation.createHTMLDocument("").body;return t.innerText=e,t.innerText.replace(/^[\u0020\u00a0]+$/gm,"").replace(/\n/gm," ").trim()}function f(e,t){e=e||v.getSelection();var n=e&&e.anchorNode;if(!n||n.nodeType!==Node.TEXT_NODE)return!1;for(var u=void 0,r=void 0,o=n;o&&o.nodeType===Node.TEXT_NODE;)u=o,o=o.previousSibling;for(o=n;o&&o.nodeType===Node.TEXT_NODE;)r=o,o=o.nextSibling;var i=h.hasBubbles(t),a=v.document.createRange();a.setStartBefore(u),a.setEndAfter(r);var s=b(a.toString());return!(!s&&(s||i))&&(s||a.collapse(),e.removeAllRanges(),e.addRange(a),!0)}function d(){return v.document.createTextNode(D)}function p(e){return C.test(e)}function b(e){return String(e||"").trim().replace(E,"")}function g(e){var t=e.anchorNode,n=e.focusNode,u=e.anchorOffset,r=e.focusOffset,o=!1;if(t===n)u=Math.min(e.anchorOffset,e.focusOffset),r=Math.max(e.anchorOffset,e.focusOffset),o=e.anchorOffset>e.focusOffset;else{var i=e.anchorNode.compareDocumentPosition(e.focusNode);i&Node.DOCUMENT_POSITION_PRECEDING&&(t=e.focusNode,u=e.focusOffset,n=e.anchorNode,r=e.anchorOffset,o=!0)}return{startNode:t,endNode:n,startOffset:u,endOffset:r,revert:o}}var v=n(1),h=n(7),A=n(8),F=A.getSelection,E=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0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C9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u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DD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,C=/\u200B/,D="​";t.arrowRight=l,t.arrowLeft=s,t.remove=o,t.html2text=c,t.currentTextRange=r,t.text2bubble=u,t.replaceString=a,t.selectAll=f,t.textClean=b,t.checkZws=p,t.createZws=d},function(e,t,n){"use strict";function u(e){return e.querySelector("[bubble]:last-child")}function r(e){return e.querySelector("[bubble]:first-child")}function o(e){return Array.prototype.slice.call(e.querySelectorAll("[bubble]"))}function i(e){return Boolean(e.querySelector("[bubble]"))}function a(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.previousSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.previousSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.previousSibling}}}function s(e){if(e.focusNode&&e.anchorNode){var t=e.focusNode.nextSibling;for(e.anchorNode!==e.focusNode&&e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING&&(t=e.anchorNode.nextSibling);t;){if(b.isBubbleNode(t))return t;if(t.nodeType===Node.TEXT_NODE&&g.textClean(t.nodeValue))return;t=t.nextSibling}}}function l(e){for(;e;){if(p(e))return e;e=e.parentNode}}function c(e){for(;e;){if(b.isBubbleNode(e))return e;if(p(e))return;e=e.parentNode}}function f(e){for(var t=e&&e.previousSibling;t;){if(b.isBubbleNode(t))return t;t=t.previousSibling}}function d(e){for(var t=e&&e.nextSibling;t;){if(b.isBubbleNode(t))return t;t=t.nextSibling}}function p(e){return e.nodeType===Node.ELEMENT_NODE&&"x-bubbles"===e.getAttribute("is")}var b=n(5),g=n(6);t.closestNodeBubble=c,t.closestNodeSet=l,t.findBubbleLeft=a,t.findBubbleRight=s,t.getBubbles=o,t.hasBubbles=i,t.headBubble=r,t.lastBubble=u,t.nextBubble=d,t.prevBubble=f},function(e,t,n){"use strict";function u(e){return s[e]}function r(e){return a[e]}var o=n(9),i=n(1),a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},s={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},l=/&(?:amp|lt|gt|quot|#39|#96);/g,c=/[&<>"'`]/g,f=RegExp(l.source),d=RegExp(c.source),p=/Trident|Edge/;t.getSelection=function(e){var t=i.getSelection();if(t&&t.anchorNode&&e.compareDocumentPosition(t.anchorNode)&Node.DOCUMENT_POSITION_CONTAINED_BY)return t},t.throttle=function(e,t){var n=0,u=function(){n=0};return function(){n||(n=o(u),e.apply(t||this,arguments))}},t.escape=function(e){return e=String(e),e&&d.test(e)?e.replace(c,r):e},t.unescape=function(e){return e=String(e),e&&f.test(e)?e.replace(l,u):e},t.canUseDrag=function(){return!p.test(i.navigator.userAgent)}(),t.isIE=function(){return p.test(i.navigator.userAgent)}()},function(e,t,n){(function(t){for(var u=n(10),r="undefined"==typeof window?t:window,o=["moz","webkit"],i="AnimationFrame",a=r["request"+i],s=r["cancel"+i]||r["cancelRequest"+i],l=0;!a&&l1)for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};e.dispatchEvent(new c(t,n))}function a(e,t,n){return function u(r){e.removeEventListener(t,u),n(r)}}var s=n(1),l=n(13);t.scrollX=r,t.scrollY=o,t.dispatch=i,t.keyCode=function(e){return e.charCode||e.keyCode},t.metaKey=function(e){return e.ctrlKey||e.metaKey},t.pageX=function(e){return null===e.pageX&&null!==e.clientX?e.clientX+r():e.pageX},t.pageY=function(e){return null===e.pageY&&null!==e.clientY?e.clientY+o():e.pageY},t.one=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,a(e,o,r[o]))},t.on=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.addEventListener(o,r[o])},t.off=function(e,t,n){var r=n?u({},t,n):t;for(var o in r)e.removeEventListener(o,r[o])},t.prevent=function(e){return e.cancelBubble=!0,e.returnValue=!1,e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),!1};var c=function(){return"function"==typeof s.CustomEvent?s.CustomEvent:l}()},function(e,t,n){"use strict";var u=n(1),r=u.document,o=u.Event.prototype,i=!1;try{i=Boolean(r.createEvent("CustomEvent"))}catch(a){}var s=o.stopImmediatePropagation;o.stopImmediatePropagation=function(){this.immediatePropagationStopped=!0,s?s.call(this):this.stopPropagation()};var l=function(){return i?function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("CustomEvent");return o.initCustomEvent(e,n,u,t.detail),o}:function(e,t){t=t||{};var n=Boolean(t.bubbles),u=Boolean(t.cancelable),o=r.createEvent("Event");return o.initEvent(e,n,u),o.detail=t.detail,o}}();l.prototype=o,e.exports=l},function(e,t){"use strict";t.KEY={a:65,Backspace:8,Bottom:40,c:67,Cmd:91,Comma:44,Delete:46,Enter:13,Esc:27,Left:37,Right:39,Semicolon:59,Space:32,Tab:9,Top:38,x:88},t.CLS={DRAGSTART:"drag",DROPZONE:"dropzone"},t.EV={BUBBLE_EDIT:"bubble-edit",BUBBLE_INPUT:"bubble-input",CHANGE:"change",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGLEAVE:"dragleave",DRAGSTART:"dragstart",DROP:"drop"},t.PROPS={BUBBLE_VALUE:"_bubbleValue",CLICK_TIME:"_clickTime",LOCK_COPY:"_lockCopy"}},function(e,t,n){"use strict";var u={w:16,h:16},r=null;t.DRAG_IMG=u,t.getDragImage=function(){return r||(r=new Image,r.src=n(16)),r},t.onDropSuccess=function(e,t){e.fireChange(),t.focus(),t.fireChange()}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";function u(e){var t=f.closestNodeBubble(e.target);if(t){var n=f.closestNodeSet(e.target);if(n){e.preventDefault(),n.focus();var u=n.__drag__={onMouseup:r.bind(this,n),onMousemove:l.throttle(o.bind(this,n)),onScroll:l.throttle(i.bind(this,n)),nodeOffsetX:e.offsetX,nodeOffsetY:e.offsetY,x:0,y:0};E=null,C=null,D=null,s.one(document,"mouseup",u.onMouseup),s.on(document,"mousemove",u.onMousemove),s.on(document,"scroll",u.onScroll)}}}function r(e,t){var n=e.__drag__;if(n){if(s.off(document,"mousemove",n.onMousemove),s.off(document,"scroll",n.onScroll),delete e.__drag__,D&&(D.parentNode&&D.parentNode.removeChild(D),D=null),C){var u=C;C=null,u.classList.remove(b.DROPZONE),s.dispatch(u,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}E&&!function(){var e=f.closestNodeSet(t.target);if(e&&e!==E){var n=c.get(E);n.length&&(n.forEach(function(t){return e.appendChild(t)}),a.setTimeout(A,0,E,e))}var u=E;E=null,u.classList.remove(b.DRAGSTART),s.dispatch(u,g.DROP,{bubbles:!1,cancelable:!1}),s.dispatch(u,g.DRAGEND,{bubbles:!1,cancelable:!1})}()}}function o(e,t){var n=e.__drag__;if(n){if(!E){var u=a.getSelection();u&&u.removeAllRanges(),E=e,E.classList.add(b.DRAGSTART);var r=f.closestNodeBubble(t.target),o=void 0;r&&(c.add(r),1===c.get(E).length&&(o=r.cloneNode(!0))),o||(o=h(),n.nodeOffsetX=F.w,n.nodeOffsetY=F.h),D=document.body.appendChild(document.createElement("div")),D.style.cssText="position:absolute;z-index:9999;pointer-events:none;top:0;left:0;",D.appendChild(o),s.dispatch(E,g.DRAGSTART,{bubbles:!1,cancelable:!1})}n.x=t.clientX,n.y=t.clientY,i(e);var l=f.closestNodeSet(t.target);if(l&&l!==E)C&&C!==l?(C.classList.remove(b.DROPZONE),l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1})):C||(l.classList.add(b.DROPZONE),C=l,s.dispatch(C,g.DRAGENTER,{bubbles:!1,cancelable:!1}));else if(C){var d=C;C=null,d.classList.remove(b.DROPZONE),s.dispatch(d,g.DRAGLEAVE,{bubbles:!1,cancelable:!1})}}}function i(e){var t=e.__drag__;if(t&&D){var n=t.x-t.nodeOffsetX+s.scrollX(),u=t.y-t.nodeOffsetY+s.scrollY();d.csstransforms3d?D.style.transform="translate3d("+n+"px, "+u+"px, 0px)":d.csstransforms?D.style.transform="translate("+n+"px, "+u+"px)":(D.style.top=u+"px",D.style.left=n+"px")}}var a=n(1),s=n(12),l=n(8),c=n(4),f=n(7),d=n(18),p=n(14),b=p.CLS,g=p.EV,v=n(15),h=v.getDragImage,A=v.onDropSuccess,F=v.DRAG_IMG,E=null,C=null,D=null;t.init=function(e){s.on(e,"mousedown",u)},t.destroy=function(e){s.off(e,"mousedown",u)}},function(e,t){!function(t){!function(e,t,n){function u(e,t){return typeof e===t}function r(){var e,t,n,r,o,i,a;for(var s in h)if(h.hasOwnProperty(s)){if(e=[],t=h[s],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n47||n===T.Space||n===T.Backspace)&&n!==T.Cmd;u&&t.fireInput()}function i(e){var t=R.keyCode(e),n=e.currentTarget;switch(t){case T.Enter:e.preventDefault(),n.options("disableControls")||f(n)||(m.bubbling(n),B.restore(n));break;case T.Space:f(n)&&e.preventDefault();break;default:var u=n.options("separator");u&&u.test(String.fromCharCode(t))&&(e.preventDefault(),m.bubbling(n),B.restore(n))}}function a(e){var t=R.keyCode(e),n=R.metaKey(e),u=e.currentTarget,r=!u.options("disableControls");switch(t){case T.Esc:e.preventDefault(),m.bubbling(u),B.restore(u);break;case T.Backspace:e.preventDefault(),P(e);break;case T.Delete:e.preventDefault(),k(e);break;case T.Left:e.preventDefault(),s(e);break;case T.Top:if(e.preventDefault(),r){var o=D.headBubble(u);o&&N.uniq(o)}break;case T.Right:e.preventDefault(),l(e);break;case T.Bottom:e.preventDefault(),r&&N.has(u)&&B.restore(u);break;case T.a:n&&(e.preventDefault(),O.selectAll(null,e.currentTarget)||N.all(u));break;case T.c:n&&_(e);break;case T.x:n&&_(e,function(){return k(e)})}}function s(e){var t=C.getSelection();if(!O.arrowLeft(t,e.shiftKey)){if(t.anchorNode&&t.anchorNode.nodeType===Node.TEXT_NODE){var n=D.prevBubble(t.anchorNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[0]===u.startRangeSelect?r[r.length-1]:r[0],i=D.prevBubble(o);i&&(e.shiftKey?N.range(i):N.uniq(i))}}function l(e){var t=C.getSelection();if(!O.arrowRight(t,e.shiftKey)){if(t.focusNode&&t.focusNode.nodeType===Node.TEXT_NODE){var n=D.nextBubble(t.focusNode);return void(n&&N.uniq(n))}var u=e.currentTarget,r=N.get(u),o=r.length>1&&r[r.length-1]===u.startRangeSelect?r[0]:r[r.length-1],i=D.nextBubble(o);i?e.shiftKey?N.range(i):N.uniq(i):o&&o.nextSibling&&o.nextSibling.nodeType===Node.TEXT_NODE?(N.clear(u),t.collapse(o.nextSibling,0)):B.restore(u)}}function c(e){var t=D.closestNodeSet(e.target);if(t){var n=D.closestNodeBubble(e.target);if(n){var u=Date.now(),r=t[x.CLICK_TIME]&&u-t[x.CLICK_TIME]<200;t[x.CLICK_TIME]=u,R.metaKey(e)?N.add(n):e.shiftKey?t.startRangeSelect?N.range(n):N.uniq(n):r?m.edit(t,n):N.toggleUniq(n)}else{N.clear(t);var o=C.getSelection();o&&o.anchorNode&&o.anchorNode.nodeType===Node.TEXT_NODE||B.restore(t)}}}function f(e){var t=C.getSelection();if(!t||!t.rangeCount){var n=N.get(e);if(1===n.length)return m.edit(e,n[0])}return!1}function d(e){var t=C.getSelection();for(t&&t.removeAllRanges();this.firstChild;)this.removeChild(this.firstChild);e=O.html2text(e),this.appendChild(this.ownerDocument.createTextNode(e)),m.bubbling(this),B.restore(this)}function p(e,t){var n=m.create(this,e,t);return!!n&&(!!O.text2bubble(this,n)&&(this.fireInput(),this.fireChange(),B.restore(this),!0))}function b(e){return!!this.contains(e)&&(this.removeChild(e),this.fireChange(),!0)}function g(e){return!!this.contains(e)&&m.edit(this,e)}function v(){var e=O.currentTextRange(this);return e&&O.textClean(e.toString())||""}function h(e){R.dispatch(this,S.BUBBLE_EDIT,{bubbles:!1,cancelable:!1,detail:{data:e}})}function A(){R.dispatch(this,S.CHANGE,{bubbles:!1,cancelable:!1})}function F(){var e=v.call(this);this[x.BUBBLE_VALUE]!==e&&(this[x.BUBBLE_VALUE]=e,R.dispatch(this,S.BUBBLE_INPUT,{bubbles:!1,cancelable:!1,detail:{data:e}}))}var E=n(9),C=n(1),D=n(7),m=n(5),B=n(20),N=n(4),y=n(14),T=y.KEY,S=y.EV,x=y.PROPS,O=n(6),R=n(12),w=n(8),_=n(21),L=n(22),P=n(23),k=n(24),I={blur:u,click:c,focus:r,keydown:a,keypress:i,keyup:o,mscontrolselect:R.prevent,paste:L,resize:R.prevent,resizestart:R.prevent};t.init=function(e){var t=e;return t.setAttribute("contenteditable","true"),t.setAttribute("spellcheck","false"),t.fireChange=w.throttle(A,e),t.fireEdit=w.throttle(h,e),t.fireInput=w.throttle(F,e),R.on(t,I),{addBubble:p.bind(t),editBubble:g.bind(t),inputValue:v.bind(t),removeBubble:b.bind(t),setContent:d.bind(t)}},t.destroy=function(e){R.off(e,I)}},function(e,t,n){"use strict";function u(e){a.clear(e);var t=r(e),n=o.getSelection();n.removeAllRanges(),n.collapse(t,1)}function r(e){var t=i.createZws();if(e.hasChildNodes()){var n=e.childNodes[e.childNodes.length-1];n.isEqualNode(t)?t=n:e.appendChild(t)}else e.appendChild(t);return t}var o=n(1),i=n(6),a=n(4);t.restore=u,t.restoreBasis=r},function(e,t,n){"use strict";function u(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var r=n(9),o=n(12),i=n(4),a=n(14),s=a.PROPS,l=n(8);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=e.target,a=l.getSelection(n);if(a)return!1;var c=i.get(n);if(!c.length)return!1;var f=n.options("bubbleCopy"),d=f(c);if(!d)return!1;n[s.LOCK_COPY]=!0;var p=n.ownerDocument.createElement("input");return p.value=d,p.style.cssText="\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;",n.parentNode.appendChild(p),o.one(p,{keyup:function(){return n.focus()},blur:function(){u(p),r(t)}}),p.select(),!0}},function(e,t,n){"use strict";function u(e,t){var n=e.options("checkBubblePaste"),u=i.getSelection(),a=!(!t||!u.isCollapsed||e.inputValue)&&n(t);return!!l.replaceString(t,u)&&(a?f?o(function(){return r(e)}):r(e):e.fireInput(),!0)}function r(e){a.bubbling(e),e.focus(),o(function(){return s.restore(e)})}var o=n(9),i=n(1),a=n(5),s=n(20),l=n(6),c=n(8),f=c.isIE;e.exports=function(e){e.preventDefault();var t=e.currentTarget;i.clipboardData&&i.clipboardData.getData?u(t,i.clipboardData.getData("Text")):e.clipboardData&&!function(){var n="text/plain",r=e.clipboardData,o=r.getData&&r.getData(n);!u(t,o)&&r.items&&Array.prototype.slice.call(r.items).filter(function(e){return"string"===e.kind&&e.type===n}).some(function(e){return e.getAsString(function(e){u(t,e)}),!0})}()}},function(e,t,n){"use strict";function u(e){var t=o.get(e);if(!t.length)return!1;var n=t[0].previousSibling,u=t[t.length-1].nextSibling;return t.forEach(function(e){return e.parentNode.removeChild(e)}),s.isBubbleNode(n)?o.uniq(n):s.isBubbleNode(u)?o.uniq(u):(e.focus(),r(function(){return l.restore(e)})),e.fireChange(),!0}var r=n(9),o=n(4),i=n(6),a=n(7),s=n(5),l=n(20),c=n(8);e.exports=function(e){var t=e.target,n=c.getSelection(t);if(n)if(n.isCollapsed)if(i.arrowLeft(n,!0))i.remove(n),t.fireInput();else{var s=a.findBubbleLeft(n);s&&o.uniq(s)}else i.remove(n),t.fireInput();else u(t)||(t.focus(),r(function(){return l.restore(t)}))}},function(e,t,n){"use strict";function u(e){var t=o.get(e);if(!t.length)return!1;var n=t[0].previousSibling,u=t[t.length-1].nextSibling;return t.forEach(function(e){return e.parentNode.removeChild(e)}),s.isBubbleNode(u)?o.uniq(u):s.isBubbleNode(n)?o.uniq(n):(e.focus(),r(function(){return l.restore(e)})),e.fireChange(),!0}var r=n(9),o=n(4),i=n(6),a=n(7),s=n(5),l=n(20),c=n(8);e.exports=function(e){var t=e.target,n=c.getSelection(t);if(n)if(n.isCollapsed)if(i.arrowRight(n,!0))i.remove(n),t.fireInput();else{var s=a.findBubbleRight(n);s&&o.uniq(s)}else i.remove(n),t.fireInput();else u(t)||(t.focus(),r(function(){return l.restore(t)}))}}]); //# sourceMappingURL=x-bubbles.min.js.map \ No newline at end of file diff --git a/docs/x-bubbles.min.js.map b/docs/x-bubbles.min.js.map index ae3848c..0a4b7a8 100644 --- a/docs/x-bubbles.min.js.map +++ b/docs/x-bubbles.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///x-bubbles.min.js","webpack:///webpack/bootstrap b69a07b3119acb8c195e","webpack:///./index.js","webpack:///./context.js","webpack:///./core/drag.js","webpack:///./core/drag/native.js","webpack:///./core/select.js","webpack:///./core/bubble.js","webpack:///./core/text.js","webpack:///./core/bubbleset.js","webpack:///./core/utils.js","webpack:///../~/raf/index.js","webpack:///../~/performance-now/lib/performance-now.js","webpack:///../~/process/browser.js","webpack:///./core/events.js","webpack:///./polyfills/CustomEventCommon.js","webpack:///./core/constant.js","webpack:///./core/drag/common.js","webpack:///./core/drag/bubbles.png","webpack:///./core/drag/mouse.js","webpack:///../.modernizrrc","webpack:///./core/editor.js","webpack:///./core/cursor.js","webpack:///./core/editor/copy.js","webpack:///./core/editor/paste.js","webpack:///./core/editor/backspace.js","webpack:///./core/editor/delete.js"],"names":["XBubbles","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","optionsPrepare","options","name","OPTIONS","_OPTIONS$name","_slicedToArray","type","def","OPTIONS_PREPARE","initEditor","node","editor","Object","defineProperty","configurable","value","init","destroyEditor","destroy","bubbleCopyOption","list","map","item","innerHTML","join","checkBubblePasteOption","sliceIterator","arr","i","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","_typeof","obj","constructor","prototype","context","drag","bubble","bubbleset","begining","bubbleCopy","bubbleDeformation","bubbleFormation","checkBubblePaste","classBubble","disableControls","draggable","ending","separator","tokenizer","create","HTMLDivElement","createdCallback","this","attachedCallback","bubbling","detachedCallback","_options","optionName","attrName","hasAttribute","getAttribute","items","get","getBubbles","inputValue","setContent","data","addBubble","bubbleText","removeBubble","nodeBubble","editBubble","document","registerElement","extends","func","Function","bool","noop","reg","match","RegExp","str","String","eval","native","mouse","_require","canUseDrag","nodeSet","onDragstart","event","stopPropagation","closestNodeSet","target","closestNodeBubble","preventDefault","selection","getSelection","removeAllRanges","currentDragSet","classList","add","CLS","DRAGSTART","select","dataTransfer","effectAllowed","setData","setDragImage","getDragImage","DRAG_IMG","w","h","onDrop","forEach","appendChild","setTimeout","onDropSuccess","onDragover","dropEffect","onDragenter","DROPZONE","onDragleave","remove","onDragend","events","_require2","EVENTS","dragend","dragenter","dragleave","dragover","dragstart","drop","on","off","range","isBubbleNode","set","parentNode","uniq","clear","headList","lastList","startRangeSelect","fromNode","toNode","position","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","setSelected","nextSibling","all","slice","querySelectorAll","PATH_NOT_SELECTED","querySelector","PATH_SELECTED","has","Boolean","head","last","removeAttribute","toggleUniq","isSelected","removeSelected","setAttribute","nodeType","ELEMENT_NODE","edit","rangeParams","dataText","text","textClean","innerText","startOffset","endOffset","textFake","createZws","textNode","createTextNode","fireEdit","replaceChild","insertBefore","createRange","setStart","setEnd","addRange","dataAttributes","arguments","wrap","ownerDocument","createElement","key","escape","classes","trim","split","len","ranges","getBubbleRanges","nodes","toString","deleteContents","textParts","trimIterator","filter","nonEmptyIterator","reduce","parts","concat","parseFragmentByEnding","parseFragmentByBeginning","fragment","createDocumentFragment","textPart","insertNode","fireInput","fireChange","children","childNodes","setEndBefore","setStartBefore","setEndAfter","lastIndex","loop","exec","substring","res","index","text2bubble","nodeEditor","currentTextRange","replace","pointNode","focusNode","TEXT_NODE","anchorNode","startNode","endNode","previousSibling","rangeCount","anchor","getRangeAt","surroundContents","nodeValue","collapse","replaceString","arrowLeft","extend","_selectionCorrect","selectionCorrect","revert","isCollapsed","isNativeExtend","offset","checkZws","arrowRight","_selectionCorrect2","html2text","DOMContainer","implementation","createHTMLDocument","body","selectAll","hasBubbles","TEXT_ZWS","REG_ZWS","test","REG_REPLACE_NON_PRINTABLE","anchorOffset","focusOffset","Math","min","max","lastBubble","headBubble","findBubbleLeft","DOCUMENT_POSITION_FOLLOWING","findBubbleRight","isEditorNode","prevBubble","nextBubble","unescapeHtmlChar","chr","HTML_UNESCAPES","escapeHtmlChar","HTML_ESCAPES","raf","&","<",">","\"","'","`","&","<",">",""","'","`","REG_ESCAPED_HTML","REG_UNESCAPED_HTML","REG_HAS_ESCAPED_HTML","source","REG_HAS_UNESCAPED_HTML","REG_IE","DOCUMENT_POSITION_CONTAINED_BY","throttle","callback","runContext","animationCallback","apply","unescape","navigator","userAgent","isIE","global","now","root","window","vendors","suffix","caf","queue","frameDuration","_now","cp","cancelled","e","round","handle","fn","cancel","polyfill","requestAnimationFrame","cancelAnimationFrame","process","getNanoSeconds","hrtime","loadTime","performance","hr","Date","getTime","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","array","nextTick","args","title","browser","env","argv","version","versions","addListener","once","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","_defineProperty","enumerable","writable","scrollX","html","documentElement","scrollLeft","clientLeft","scrollY","scrollTop","clientTop","dispatch","element","params","dispatchEvent","Custom","oneCallback","eventName","_callback","removeEventListener","CustomEventCommon","keyCode","charCode","metaKey","ctrlKey","pageX","clientX","pageY","clientY","one","addEventListener","prevent","cancelBubble","returnValue","stopImmediatePropagation","CustomEvent","doc","protoEvent","Event","issetCustomEvent","createEvent","immediatePropagationStopped","bubbles","cancelable","evt","initCustomEvent","detail","initEvent","KEY","a","Backspace","Bottom","Cmd","Comma","Delete","Enter","Esc","Left","Right","Semicolon","Space","Tab","Top","x","EV","BUBBLE_EDIT","BUBBLE_INPUT","CHANGE","DRAGEND","DRAGENTER","DRAGLEAVE","DROP","PROPS","BUBBLE_VALUE","CLICK_TIME","LOCK_COPY","dragImage","Image","src","fromNodeSet","toNodeSet","focus","onMousedown","__drag__","onMouseup","bind","onMousemove","utils","onScroll","nodeOffsetX","offsetX","nodeOffsetY","offsetY","y","currentMoveSet","currentDragElement","dragSet","removeChild","_","moveElement","cloneNode","style","cssText","Modernizr","csstransforms3d","transform","csstransforms","top","left","is","testRunner","featureNames","feature","aliasIdx","result","nameIdx","featureName","featureNameSplit","featureIdx","tests","hasOwnProperty","toLowerCase","aliases","contains","substr","indexOf","isSVG","createElementNS","getBody","fake","injectElementWithStyles","rule","testnames","ret","docOverflow","mod","div","parseInt","styleSheet","background","overflow","docElement","offsetHeight","domToCSS","m1","nativeTestProps","props","CSS","supports","conditionText","getComputedStyle","cssToDOM","m2","toUpperCase","testProps","prefixed","skipValueTest","cleanElems","afterInit","mStyle","modElem","propsLength","prop","before","elems","shift","fnBind","that","testDOMProps","elem","testPropsAll","ucProp","charAt","cssomPrefixes","testAllProps","ModernizrProto","_version","_config","classPrefix","enableClasses","enableJSClass","usePrefixes","_q","cb","self","addTest","addAsyncTest","omPrefixes","_cssomPrefixes","nodeName","unshift","domPrefixes","_domPrefixes","testStyles","newSyntax","oldSyntax","usePrefix","mq","defaultStyle","offsetWidth","onBlur","currentTarget","onFocus","cursor","restore","onKeyup","code","isPrintableChar","onKeypress","editBubbleKeyboardEvent","fromCharCode","onKeydown","enable","eventBackspace","eventDelete","eventCopy","shiftKey","begin","onClick","clickTime","isDblclick","firstChild","textRange","editText","eventPaste","blur","click","keydown","keypress","keyup","mscontrolselect","paste","resize","resizestart","nodeWrap","basis","restoreBasis","fakeText","hasChildNodes","lastNode","isEqualNode","removeNode","onPasteSuccess","isBubbling","onReplaceSuccess","clipboardData","getData","contentType","kind","some","getAsString","removeBubbles"],"mappings":"AAAA,GAAIA,UACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAA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ACjByM,EAAOzM,EAAQ,GACfgE,EAAYhE,EAAQ,GACpB+D,EAAS/D,EAAQ,GACjBsmB,EAAStmB,EAAQ,IACjBkf,EAAQlf,EAAQ,EAOtBI,GAAOD,QAAU,SAAUmH,GACvB,GAAM8I,GAAa9I,EAAMG,OACnBG,EAAYsX,EAAMrX,aAAauI,EAErC,IAAIxI,EACA,GAAKA,EAAU8J,YAIR,GAAIjF,EAAKqF,WAAWlK,GAAW,GAClC6E,EAAKlD,OAAO3B,GACZwI,EAAWd,gBAER,CACH,GAAMrJ,GAAajC,EAAUoP,gBAAgBxL,EAC7C3B,IAAcmC,EAAOoC,KAAKvE,OAT1BwG,GAAKlD,OAAO3B,GACZwI,EAAWd,gBAWPga,GAAclZ,KACtBA,EAAWwO,QAEX/K,EAAI,iBAAMyS,GAAOC,QAAQnW","file":"x-bubbles.min.js","sourcesContent":["var XBubbles =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _slicedToArray = function () { function sliceIterator(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\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar context = __webpack_require__(1);\n\tvar drag = __webpack_require__(2);\n\tvar editor = __webpack_require__(19);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar OPTIONS = {\n\t begining: ['reg', null, 'begining'],\n\t bubbleCopy: ['func', bubbleCopyOption, 'bubble-copy'],\n\t bubbleDeformation: ['func', function () {}, 'bubble-deformation'],\n\t bubbleFormation: ['func', function () {}, 'bubble-formation'],\n\t checkBubblePaste: ['func', checkBubblePasteOption, 'check-bubble-paste'],\n\t classBubble: ['str', 'bubble', 'class-bubble'],\n\t disableControls: ['bool', false, 'disable-controls'],\n\t draggable: ['bool', true, 'draggable'],\n\t ending: ['reg', null, 'ending'], // /\\@ya\\.ru/g;\n\t separator: ['reg', /[,;]/, 'separator'],\n\t tokenizer: ['func', null, 'tokenizer']\n\t};\n\t\n\tvar XBubbles = Object.create(HTMLDivElement.prototype, {\n\t createdCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t }\n\t },\n\t\n\t attachedCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t drag.init(this);\n\t bubble.bubbling(this);\n\t }\n\t },\n\t\n\t detachedCallback: {\n\t value: function value() {\n\t drag.destroy(this);\n\t destroyEditor(this);\n\t }\n\t },\n\t\n\t /*\n\t attributeChangedCallback: {\n\t value: function (name, prevValue, value) {}\n\t },\n\t */\n\t\n\t options: {\n\t value: function value(name, _value) {\n\t if (!this._options) {\n\t this._options = {};\n\t\n\t for (var optionName in OPTIONS) {\n\t this._options[optionName] = undefined;\n\t\n\t var attrName = 'data-' + OPTIONS[optionName][2];\n\t if (this.hasAttribute(attrName)) {\n\t this._options[optionName] = this.getAttribute(attrName);\n\t }\n\t }\n\t\n\t optionsPrepare(this._options);\n\t }\n\t\n\t if (typeof _value !== 'undefined') {\n\t this._options[name] = _value;\n\t optionsPrepare(this._options);\n\t } else {\n\t return this._options[name];\n\t }\n\t }\n\t },\n\t\n\t items: {\n\t get: function get() {\n\t return bubbleset.getBubbles(this);\n\t }\n\t },\n\t\n\t inputValue: {\n\t get: function get() {\n\t return this.editor.inputValue();\n\t }\n\t },\n\t\n\t setContent: {\n\t value: function value(data) {\n\t return this.editor.setContent(data);\n\t }\n\t },\n\t\n\t addBubble: {\n\t value: function value(bubbleText, data) {\n\t return this.editor.addBubble(bubbleText, data);\n\t }\n\t },\n\t\n\t removeBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.removeBubble(nodeBubble);\n\t }\n\t },\n\t\n\t editBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.editBubble(nodeBubble);\n\t }\n\t }\n\t});\n\t\n\tmodule.exports = context.document.registerElement('x-bubbles', {\n\t extends: 'div',\n\t prototype: XBubbles\n\t});\n\t\n\tvar OPTIONS_PREPARE = {\n\t func: function func(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return new Function('context', 'return context.' + value + ';')(context);\n\t\n\t case 'function':\n\t return value;\n\t }\n\t },\n\t bool: function bool(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return value === 'true' || value === 'on';\n\t\n\t case 'boolean':\n\t return value;\n\t }\n\t },\n\t noop: function noop(value) {\n\t return value;\n\t },\n\t reg: function reg(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t if (value) {\n\t var match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n\t if (match) {\n\t return new RegExp(match[1], match[2]);\n\t }\n\t }\n\t\n\t return null;\n\t\n\t case 'object':\n\t if (value instanceof context.RegExp) {\n\t return value;\n\t }\n\t }\n\t },\n\t str: function str(value) {\n\t if (typeof value !== 'undefined') {\n\t return value ? String(value) : '';\n\t }\n\t }\n\t};\n\t\n\tfunction optionsPrepare(options) {\n\t for (var name in OPTIONS) {\n\t var _OPTIONS$name = _slicedToArray(OPTIONS[name], 2),\n\t type = _OPTIONS$name[0],\n\t def = _OPTIONS$name[1];\n\t\n\t options[name] = OPTIONS_PREPARE[type](options[name]);\n\t if (typeof options[name] === 'undefined') {\n\t options[name] = def;\n\t }\n\t }\n\t}\n\t\n\tfunction initEditor(node) {\n\t if (!node.editor) {\n\t Object.defineProperty(node, 'editor', {\n\t configurable: true,\n\t value: editor.init(node)\n\t });\n\t }\n\t}\n\t\n\tfunction destroyEditor(node) {\n\t if (node.editor) {\n\t editor.destroy(node);\n\t delete node.editor;\n\t }\n\t}\n\t\n\tfunction bubbleCopyOption(list) {\n\t return list.map(function (item) {\n\t return item.innerHTML;\n\t }).join(', ');\n\t}\n\t\n\tfunction checkBubblePasteOption() {\n\t return true;\n\t}\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function () {\n\t /* eslint no-eval: 0 */\n\t return this || (1, eval)('this');\n\t}();\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar native = __webpack_require__(3);\n\tvar mouse = __webpack_require__(17);\n\t\n\tvar _require = __webpack_require__(8),\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.init = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.init(nodeSet);\n\t }\n\t\n\t return mouse.init(nodeSet);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.destroy(nodeSet);\n\t }\n\t\n\t return mouse.destroy(nodeSet);\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar events = __webpack_require__(12);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar EVENTS = {\n\t dragend: onDragend,\n\t dragenter: onDragenter,\n\t dragleave: onDragleave,\n\t dragover: onDragover,\n\t dragstart: onDragstart,\n\t drop: onDrop\n\t};\n\t\n\tvar currentDragSet = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, EVENTS);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, EVENTS);\n\t};\n\t\n\tfunction onDragstart(event) {\n\t event.stopPropagation();\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (!nodeSet || !nodeBubble) {\n\t event.preventDefault();\n\t return;\n\t }\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = nodeSet;\n\t nodeSet.classList.add(CLS.DRAGSTART);\n\t select.add(nodeBubble);\n\t\n\t event.dataTransfer.effectAllowed = 'move';\n\t event.dataTransfer.setData('text/plain', '');\n\t\n\t var list = select.get(currentDragSet);\n\t if (list.length > 1) {\n\t event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n\t }\n\t}\n\t\n\tfunction onDrop(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet || nodeSet === currentDragSet) {\n\t return;\n\t }\n\t\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t}\n\t\n\tfunction onDragover(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t event.dataTransfer.dropEffect = 'move';\n\t}\n\t\n\tfunction onDragenter(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragleave(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragend(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t currentDragSet.classList.remove(CLS.DRAGSTART);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t\n\t currentDragSet = null;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar slice = Array.prototype.slice;\n\tvar PATH_SELECTED = '[bubble][selected]';\n\tvar PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\t\n\texports.all = all;\n\texports.add = add;\n\texports.clear = clear;\n\texports.get = get;\n\texports.uniq = uniq;\n\texports.head = head;\n\texports.last = last;\n\texports.has = has;\n\texports.range = range;\n\texports.toggleUniq = toggleUniq;\n\t\n\tfunction range(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return;\n\t }\n\t\n\t var set = node.parentNode;\n\t var list = get(set);\n\t\n\t if (!list.length) {\n\t uniq(node);\n\t return;\n\t }\n\t\n\t clear(set);\n\t\n\t var headList = list[0];\n\t var lastList = list[list.length - 1];\n\t\n\t if (headList === lastList || !set.startRangeSelect) {\n\t set.startRangeSelect = headList;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var position = node.compareDocumentPosition(set.startRangeSelect);\n\t\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t fromNode = set.startRangeSelect;\n\t toNode = node;\n\t } else {\n\t fromNode = node;\n\t toNode = set.startRangeSelect;\n\t }\n\t\n\t if (fromNode && toNode) {\n\t var item = fromNode;\n\t\n\t while (item) {\n\t if (!setSelected(item)) {\n\t break;\n\t }\n\t\n\t if (item === toNode) {\n\t break;\n\t }\n\t\n\t item = item.nextSibling;\n\t }\n\t\n\t bubble.bubbling(set);\n\t }\n\t}\n\t\n\tfunction all(nodeSet) {\n\t slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(function (item) {\n\t return setSelected(item);\n\t });\n\t nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\t\n\t bubble.bubbling(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t}\n\t\n\tfunction has(nodeSet) {\n\t return Boolean(nodeSet.querySelector(PATH_SELECTED));\n\t}\n\t\n\tfunction head(set) {\n\t return get(set)[0];\n\t}\n\t\n\tfunction last(set) {\n\t var list = get(set);\n\t return list[list.length - 1];\n\t}\n\t\n\tfunction get(nodeSet) {\n\t return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n\t}\n\t\n\tfunction clear(nodeSet) {\n\t get(nodeSet).forEach(function (item) {\n\t return item.removeAttribute('selected');\n\t });\n\t}\n\t\n\tfunction add(node) {\n\t if (setSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t nodeSet.startRangeSelect = node;\n\t // ???\n\t bubble.bubbling(nodeSet);\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction uniq(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return false;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t var selection = context.getSelection();\n\t\n\t selection && selection.removeAllRanges();\n\t clear(nodeSet);\n\t\n\t return add(node);\n\t}\n\t\n\tfunction toggleUniq(node) {\n\t if (isSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t if (get(nodeSet).length === 1) {\n\t return removeSelected(node);\n\t }\n\t }\n\t\n\t return uniq(node);\n\t}\n\t\n\tfunction isSelected(node) {\n\t return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n\t}\n\t\n\tfunction setSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.setAttribute('selected', '');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.removeAttribute('selected');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t escape = _require.escape,\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.isBubbleNode = isBubbleNode;\n\texports.bubbling = bubbling;\n\texports.create = create;\n\texports.edit = edit;\n\t\n\tfunction isBubbleNode(node) {\n\t if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n\t return false;\n\t }\n\t\n\t return node.hasAttribute('bubble');\n\t}\n\t\n\tfunction edit(nodeSet, nodeBubble) {\n\t if (nodeBubble.hasAttribute('readonly')) {\n\t return false;\n\t }\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection) {\n\t return false;\n\t }\n\t\n\t var bubbleDeformation = nodeSet.options('bubbleDeformation');\n\t var rangeParams = bubbleDeformation(nodeBubble);\n\t\n\t if (!rangeParams) {\n\t var dataText = text.textClean(nodeBubble.innerText);\n\t\n\t rangeParams = {\n\t text: dataText,\n\t startOffset: 0,\n\t endOffset: dataText.length\n\t };\n\t }\n\t\n\t var textFake = text.createZws();\n\t var textNode = context.document.createTextNode(rangeParams.text);\n\t\n\t nodeSet.fireEdit(nodeBubble);\n\t nodeSet.replaceChild(textNode, nodeBubble);\n\t nodeSet.insertBefore(textFake, textNode);\n\t\n\t var range = context.document.createRange();\n\t range.setStart(textNode, rangeParams.startOffset);\n\t range.setEnd(textNode, rangeParams.endOffset);\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t}\n\t\n\t/**\n\t * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n\t * @param {[type]} nodeSet [description]\n\t * @param {[type]} dataText [description]\n\t * @param {Object} [dataAttributes={}] [description]\n\t * @returns {[type]} [description]\n\t */\n\tfunction create(nodeSet, dataText) {\n\t var dataAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t dataText = text.textClean(dataText);\n\t\n\t if (!dataText) {\n\t return;\n\t }\n\t\n\t var bubbleFormation = nodeSet.options('bubbleFormation');\n\t var classBubble = nodeSet.options('classBubble');\n\t var draggable = canUseDrag && nodeSet.options('draggable');\n\t var wrap = nodeSet.ownerDocument.createElement('span');\n\t\n\t wrap.innerText = dataText;\n\t\n\t for (var key in dataAttributes) {\n\t if (dataAttributes[key]) {\n\t wrap.setAttribute('data-' + key, escape(dataAttributes[key]));\n\t }\n\t }\n\t\n\t bubbleFormation(wrap);\n\t\n\t if (classBubble) {\n\t var classes = String(classBubble).trim().split(/\\s+/);\n\t var len = classes.length;\n\t\n\t while (len--) {\n\t wrap.classList.add(classes[len]);\n\t }\n\t }\n\t\n\t wrap.setAttribute('bubble', '');\n\t wrap.setAttribute('contenteditable', 'false');\n\t draggable && wrap.setAttribute('draggable', 'true');\n\t\n\t return wrap;\n\t}\n\t\n\tfunction bubbling(nodeSet) {\n\t var begining = nodeSet.options('begining');\n\t var ending = nodeSet.options('ending');\n\t var separator = nodeSet.options('separator');\n\t var tokenizer = nodeSet.options('tokenizer');\n\t var ranges = getBubbleRanges(nodeSet);\n\t var nodes = [];\n\t\n\t ranges.forEach(function (range) {\n\t var dataText = text.textClean(range.toString());\n\t\n\t if (!dataText) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var textParts = [dataText];\n\t\n\t if (tokenizer) {\n\t textParts = tokenizer(dataText);\n\t } else {\n\t if (separator) {\n\t textParts = dataText.split(separator).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t\n\t if (ending) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByEnding(str, ending));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t } else if (begining) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByBeginning(str, begining));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t }\n\t\n\t if (!Array.isArray(textParts) || !textParts.length) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var fragment = context.document.createDocumentFragment();\n\t\n\t textParts.forEach(function (textPart) {\n\t var nodeBubble = create(nodeSet, textPart);\n\t if (nodeBubble) {\n\t fragment.appendChild(nodeBubble);\n\t nodes.push(nodeBubble);\n\t }\n\t });\n\t\n\t range.deleteContents();\n\t range.insertNode(fragment);\n\t });\n\t\n\t nodeSet.fireInput();\n\t\n\t if (nodes.length) {\n\t nodeSet.fireChange();\n\t }\n\t\n\t return nodes;\n\t}\n\t\n\tfunction getBubbleRanges(nodeSet) {\n\t var ranges = [];\n\t var children = nodeSet.childNodes;\n\t var range = void 0;\n\t var node = void 0;\n\t\n\t for (var i = 0; i < children.length; i++) {\n\t node = children[i];\n\t\n\t if (isBubbleNode(node)) {\n\t if (range) {\n\t range.setEndBefore(node);\n\t ranges.push(range);\n\t range = undefined;\n\t }\n\t } else {\n\t if (!range) {\n\t range = context.document.createRange();\n\t range.setStartBefore(node);\n\t }\n\t }\n\t }\n\t\n\t if (range) {\n\t range.setEndAfter(node);\n\t ranges.push(range);\n\t }\n\t\n\t return ranges;\n\t}\n\t\n\tfunction trimIterator(str) {\n\t return str.trim();\n\t}\n\t\n\tfunction nonEmptyIterator(str) {\n\t return Boolean(str);\n\t}\n\t\n\tfunction parseFragmentByEnding(str, reg) {\n\t var parts = [];\n\t var lastIndex = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while (reg.exec(str) !== null && loop) {\n\t loop--;\n\t parts.push(str.substring(lastIndex, reg.lastIndex));\n\t lastIndex = reg.lastIndex;\n\t }\n\t\n\t return parts;\n\t}\n\t\n\tfunction parseFragmentByBeginning(str, reg) {\n\t var parts = [];\n\t var res = void 0;\n\t var index = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while ((res = reg.exec(str)) !== null && loop) {\n\t loop--;\n\t if (index !== res.index) {\n\t parts.push(str.substring(index, res.index));\n\t index = res.index;\n\t }\n\t }\n\t\n\t parts.push(str.substring(index, str.length));\n\t return parts;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar _require = __webpack_require__(8),\n\t getSelection = _require.getSelection;\n\t\n\t/* eslint-disable max-len */\n\t\n\t\n\tvar REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09FC-\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF2-\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31\\u0B34\\u0B3A\\u0B3B\\u0B45\\u0B46\\u0B49\\u0B4A\\u0B4E-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CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1AAE-\\u1AFF\\u1B4C-\\u1B4F\\u1B7D-\\u1B7F\\u1BF4-\\u1BFB\\u1C38-\\u1C3A\\u1C4A-\\u1C4C\\u1C80-\\u1CBF\\u1CC8-\\u1CCF\\u1CF7-\\u1CFF\\u1DE7-\\u1DFB\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FC5\\u1FD4\\u1FD5\\u1FDC\\u1FF0\\u1FF1\\u1FF5\\u1FFF\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u2072\\u2073\\u208F\\u209D-\\u209F\\u20BB-\\u20CF\\u20F1-\\u20FF\\u218A-\\u218F\\u23F4-\\u23FF\\u2427-\\u243F\\u244B-\\u245F\\u2700\\u2B4D-\\u2B4F\\u2B5A-\\u2BFF\\u2C2F\\u2C5F\\u2CF4-\\u2CF8\\u2D26\\u2D28-\\u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FFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\n\tvar REG_ZWS = /\\u200B/;\n\tvar TEXT_ZWS = '\\u200B';\n\t\n\texports.arrowRight = arrowRight;\n\texports.arrowLeft = arrowLeft;\n\texports.remove = remove;\n\texports.html2text = html2text;\n\texports.currentTextRange = currentTextRange;\n\texports.text2bubble = text2bubble;\n\texports.replaceString = replaceString;\n\texports.selectAll = selectAll;\n\texports.textClean = textClean;\n\texports.checkZws = checkZws;\n\texports.createZws = createZws;\n\t\n\tfunction text2bubble(nodeEditor, nodeBubble) {\n\t var selection = getSelection(nodeEditor);\n\t var range = selection && currentTextRange(nodeEditor, selection);\n\t\n\t if (range) {\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t replace(selection, nodeBubble);\n\t } else {\n\t nodeEditor.appendChild(nodeBubble);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction currentTextRange(nodeEditor, selection) {\n\t selection = selection || getSelection(nodeEditor);\n\t if (!selection) {\n\t return;\n\t }\n\t\n\t var pointNode = selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE ? selection.focusNode : selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE ? selection.anchorNode : undefined;\n\t\n\t if (!pointNode) {\n\t return;\n\t }\n\t\n\t var startNode = pointNode;\n\t var endNode = pointNode;\n\t var item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t startNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t endNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var range = nodeEditor.ownerDocument.createRange();\n\t range.setStartBefore(startNode);\n\t range.setEndAfter(endNode);\n\t\n\t return range;\n\t}\n\t\n\tfunction remove(selection) {\n\t return replace(selection, createZws());\n\t}\n\t\n\tfunction replace(selection, node) {\n\t if (!selection || !selection.rangeCount) {\n\t return false;\n\t }\n\t\n\t var anchor = context.document.createElement('span');\n\t selection.getRangeAt(0).surroundContents(anchor);\n\t anchor.parentNode.replaceChild(node, anchor);\n\t\n\t selection.removeAllRanges();\n\t\n\t if (node.nodeType === Node.TEXT_NODE) {\n\t var range = context.document.createRange();\n\t // для ИЕ обязательно указывать node.nodeValue.length\n\t range.setStart(node, node.nodeValue.length);\n\t range.collapse(false);\n\t selection.addRange(range);\n\t } else {\n\t selection.collapse(node, 0);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction replaceString(data, selection) {\n\t data = textClean(data);\n\t if (!data) {\n\t return false;\n\t }\n\t\n\t selection = selection || context.getSelection();\n\t var textNode = context.document.createTextNode(data);\n\t\n\t if (!replace(selection, textNode)) {\n\t return false;\n\t }\n\t\n\t selection.collapse(textNode, textNode.nodeValue.length);\n\t return true;\n\t}\n\t\n\tfunction arrowLeft(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect = selectionCorrect(selection),\n\t startNode = _selectionCorrect.startNode,\n\t endNode = _selectionCorrect.endNode,\n\t startOffset = _selectionCorrect.startOffset,\n\t endOffset = _selectionCorrect.endOffset,\n\t revert = _selectionCorrect.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(startNode, startOffset);\n\t return true;\n\t }\n\t\n\t var isNativeExtend = Boolean(selection.extend);\n\t revert = isNativeExtend ? revert : !revert;\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t if (offset === null) {\n\t offset = node.nodeValue.length;\n\t }\n\t\n\t if (offset - 1 < 0) {\n\t node = node.previousSibling;\n\t offset = null;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset - 1, offset);\n\t\n\t if (checkZws(text)) {\n\t offset = offset - 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node || offset === null) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t if (isNativeExtend) {\n\t selection.extend(node, offset - 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset - 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset - 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset - 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction arrowRight(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.focusNode || selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect2 = selectionCorrect(selection),\n\t startNode = _selectionCorrect2.startNode,\n\t endNode = _selectionCorrect2.endNode,\n\t startOffset = _selectionCorrect2.startOffset,\n\t endOffset = _selectionCorrect2.endOffset,\n\t revert = _selectionCorrect2.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(endNode, endOffset);\n\t return true;\n\t }\n\t\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var len = node.nodeValue.length;\n\t\n\t if (offset + 1 > len) {\n\t node = node.nextSibling;\n\t offset = 0;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset, offset + 1);\n\t\n\t if (checkZws(text)) {\n\t offset = offset + 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t var isNativeExtend = Boolean(selection.extend);\n\t\n\t if (isNativeExtend) {\n\t selection.extend(node, offset + 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset + 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset + 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset + 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction html2text(value) {\n\t if (!value) {\n\t return '';\n\t }\n\t\n\t var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n\t DOMContainer.innerText = value;\n\t\n\t return DOMContainer.innerText.replace(/^[\\u0020\\u00a0]+$/gm, '').replace(/\\n/gm, ' ').trim();\n\t}\n\t\n\tfunction selectAll(selection, nodeSet) {\n\t selection = selection || context.getSelection();\n\t var node = selection && selection.anchorNode;\n\t\n\t if (!node || node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t fromNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t toNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var hasBubbles = bubbleset.hasBubbles(nodeSet);\n\t var range = context.document.createRange();\n\t range.setStartBefore(fromNode);\n\t range.setEndAfter(toNode);\n\t\n\t var dataText = textClean(range.toString());\n\t\n\t if (dataText || !dataText && !hasBubbles) {\n\t if (!dataText) {\n\t range.collapse();\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction createZws() {\n\t return context.document.createTextNode(TEXT_ZWS);\n\t}\n\t\n\tfunction checkZws(value) {\n\t return REG_ZWS.test(value);\n\t}\n\t\n\tfunction textClean(value) {\n\t return String(value || '').trim().replace(REG_REPLACE_NON_PRINTABLE, '');\n\t}\n\t\n\tfunction selectionCorrect(selection) {\n\t var startNode = selection.anchorNode;\n\t var endNode = selection.focusNode;\n\t var startOffset = selection.anchorOffset;\n\t var endOffset = selection.focusOffset;\n\t var revert = false;\n\t\n\t if (startNode === endNode) {\n\t startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n\t endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n\t revert = selection.anchorOffset > selection.focusOffset;\n\t } else {\n\t var position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t startNode = selection.focusNode;\n\t startOffset = selection.focusOffset;\n\t endNode = selection.anchorNode;\n\t endOffset = selection.anchorOffset;\n\t revert = true;\n\t }\n\t }\n\t\n\t return { startNode: startNode, endNode: endNode, startOffset: startOffset, endOffset: endOffset, revert: revert };\n\t}\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bubble = __webpack_require__(5);\n\tvar text = __webpack_require__(6);\n\t\n\texports.closestNodeBubble = closestNodeBubble;\n\texports.closestNodeSet = closestNodeSet;\n\texports.findBubbleLeft = findBubbleLeft;\n\texports.findBubbleRight = findBubbleRight;\n\texports.getBubbles = getBubbles;\n\texports.hasBubbles = hasBubbles;\n\texports.headBubble = headBubble;\n\texports.lastBubble = lastBubble;\n\texports.nextBubble = nextBubble;\n\texports.prevBubble = prevBubble;\n\t\n\tfunction lastBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:last-child');\n\t}\n\t\n\tfunction headBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:first-child');\n\t}\n\t\n\tfunction getBubbles(nodeSet) {\n\t return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n\t}\n\t\n\tfunction hasBubbles(nodeSet) {\n\t return Boolean(nodeSet.querySelector('[bubble]'));\n\t}\n\t\n\tfunction findBubbleLeft(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.previousSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.previousSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction findBubbleRight(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.nextSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.nextSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction closestNodeSet(node) {\n\t while (node) {\n\t if (isEditorNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction closestNodeBubble(node) {\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (isEditorNode(node)) {\n\t return;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction prevBubble(target) {\n\t var node = target && target.previousSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction nextBubble(target) {\n\t var node = target && target.nextSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction isEditorNode(node) {\n\t return node.nodeType === Node.ELEMENT_NODE && node.getAttribute('is') === 'x-bubbles';\n\t}\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\t\n\t/* eslint quotes: 0 */\n\t\n\tvar HTML_ESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '\"': '"',\n\t \"'\": ''',\n\t '`': '`'\n\t};\n\t\n\tvar HTML_UNESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '"': '\"',\n\t ''': \"'\",\n\t '`': '`'\n\t};\n\t\n\tvar REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\n\tvar REG_UNESCAPED_HTML = /[&<>\"'`]/g;\n\tvar REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\n\tvar REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\n\tvar REG_IE = /Trident|Edge/;\n\t\n\texports.getSelection = function (nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (selection && selection.anchorNode && nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n\t return selection;\n\t }\n\t};\n\t\n\texports.throttle = function (callback, runContext) {\n\t var throttle = 0;\n\t var animationCallback = function animationCallback() {\n\t throttle = 0;\n\t };\n\t\n\t return function () {\n\t if (throttle) {\n\t return;\n\t }\n\t\n\t throttle = raf(animationCallback);\n\t\n\t callback.apply(runContext || this, arguments);\n\t };\n\t};\n\t\n\texports.escape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n\t return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.unescape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n\t return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.canUseDrag = function () {\n\t return !REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\texports.isIE = function () {\n\t return REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\tfunction unescapeHtmlChar(chr) {\n\t return HTML_UNESCAPES[chr];\n\t}\n\t\n\tfunction escapeHtmlChar(chr) {\n\t return HTML_ESCAPES[chr];\n\t}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(10)\n\t , root = typeof window === 'undefined' ? global : window\n\t , vendors = ['moz', 'webkit']\n\t , suffix = 'AnimationFrame'\n\t , raf = root['request' + suffix]\n\t , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\t\n\tfor(var i = 0; !raf && i < vendors.length; i++) {\n\t raf = root[vendors[i] + 'Request' + suffix]\n\t caf = root[vendors[i] + 'Cancel' + suffix]\n\t || root[vendors[i] + 'CancelRequest' + suffix]\n\t}\n\t\n\t// Some versions of FF have rAF but not cAF\n\tif(!raf || !caf) {\n\t var last = 0\n\t , id = 0\n\t , queue = []\n\t , frameDuration = 1000 / 60\n\t\n\t raf = function(callback) {\n\t if(queue.length === 0) {\n\t var _now = now()\n\t , next = Math.max(0, frameDuration - (_now - last))\n\t last = next + _now\n\t setTimeout(function() {\n\t var cp = queue.slice(0)\n\t // Clear queue here to prevent\n\t // callbacks from appending listeners\n\t // to the current frame's queue\n\t queue.length = 0\n\t for(var i = 0; i < cp.length; i++) {\n\t if(!cp[i].cancelled) {\n\t try{\n\t cp[i].callback(last)\n\t } catch(e) {\n\t setTimeout(function() { throw e }, 0)\n\t }\n\t }\n\t }\n\t }, Math.round(next))\n\t }\n\t queue.push({\n\t handle: ++id,\n\t callback: callback,\n\t cancelled: false\n\t })\n\t return id\n\t }\n\t\n\t caf = function(handle) {\n\t for(var i = 0; i < queue.length; i++) {\n\t if(queue[i].handle === handle) {\n\t queue[i].cancelled = true\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = function(fn) {\n\t // Wrap in a new function to prevent\n\t // `cancel` potentially being assigned\n\t // to the native rAF function\n\t return raf.call(root, fn)\n\t}\n\tmodule.exports.cancel = function() {\n\t caf.apply(root, arguments)\n\t}\n\tmodule.exports.polyfill = function() {\n\t root.requestAnimationFrame = raf\n\t root.cancelAnimationFrame = caf\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1\n\t(function() {\n\t var getNanoSeconds, hrtime, loadTime;\n\t\n\t if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n\t module.exports = function() {\n\t return performance.now();\n\t };\n\t } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n\t module.exports = function() {\n\t return (getNanoSeconds() - loadTime) / 1e6;\n\t };\n\t hrtime = process.hrtime;\n\t getNanoSeconds = function() {\n\t var hr;\n\t hr = hrtime();\n\t return hr[0] * 1e9 + hr[1];\n\t };\n\t loadTime = getNanoSeconds();\n\t } else if (Date.now) {\n\t module.exports = function() {\n\t return Date.now() - loadTime;\n\t };\n\t loadTime = Date.now();\n\t } else {\n\t module.exports = function() {\n\t return new Date().getTime() - loadTime;\n\t };\n\t loadTime = new Date().getTime();\n\t }\n\t\n\t}).call(this);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction _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; }\n\t\n\t/**\n\t * @module x-bubbles/event\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar CustomEventCommon = __webpack_require__(13);\n\t\n\texports.scrollX = scrollX;\n\texports.scrollY = scrollY;\n\texports.dispatch = dispatch;\n\t\n\texports.keyCode = function (event) {\n\t return event.charCode || event.keyCode;\n\t};\n\t\n\texports.metaKey = function (event) {\n\t return event.ctrlKey || event.metaKey;\n\t};\n\t\n\texports.pageX = function (event) {\n\t return event.pageX === null && event.clientX !== null ? event.clientX + scrollX() : event.pageX;\n\t};\n\t\n\texports.pageY = function (event) {\n\t return event.pageY === null && event.clientY !== null ? event.clientY + scrollY() : event.pageY;\n\t};\n\t\n\texports.one = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, oneCallback(target, name, events[name]));\n\t }\n\t};\n\t\n\texports.on = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.off = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.removeEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.prevent = function (event) {\n\t event.cancelBubble = true;\n\t event.returnValue = false;\n\t event.stopImmediatePropagation();\n\t event.stopPropagation();\n\t event.preventDefault();\n\t return false;\n\t};\n\t\n\tfunction scrollX() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n\t}\n\t\n\tfunction scrollY() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n\t}\n\t\n\t/**\n\t * Designer events.\n\t *\n\t * @example\n\t * const { Custom } = require('event');\n\t *\n\t * new Custom('custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event~Custom\n\t * @constructor\n\t */\n\tvar Custom = function () {\n\t if (typeof context.CustomEvent === 'function') {\n\t return context.CustomEvent;\n\t }\n\t\n\t return CustomEventCommon;\n\t}();\n\t\n\t/**\n\t * Dispatch event.\n\t *\n\t * @example\n\t * const { dispatch } = require('event');\n\t * dispatch(node, 'custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event.dispatch\n\t * @param {HTMLElement} element node events\n\t * @param {string} name event name\n\t * @param {Object} params the event parameters\n\t * @param {boolean} [params.bubbles=false]\n\t * @param {boolean} [params.cancelable=false]\n\t * @param {*} [params.detail]\n\t */\n\tfunction dispatch(element, name) {\n\t var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t element.dispatchEvent(new Custom(name, params));\n\t}\n\t\n\tfunction oneCallback(target, eventName, callback) {\n\t return function _callback(event) {\n\t target.removeEventListener(eventName, _callback);\n\t callback(event);\n\t };\n\t}\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\t\n\t/**\n\t * @constant {Document}\n\t * @private\n\t */\n\tvar doc = context.document;\n\t\n\t/**\n\t * @constant {Object}\n\t * @private\n\t */\n\tvar protoEvent = context.Event.prototype;\n\t\n\tvar issetCustomEvent = false;\n\t\n\ttry {\n\t issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n\t} catch (e) {}\n\t// do nothing\n\t\n\t\n\t/**\n\t * The original function \"stopImmediatePropagation\"\n\t * @constant {function}\n\t * @private\n\t */\n\tvar stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\t\n\t/**\n\t * Override function to set properties \"immediatePropagationStopped\"\n\t */\n\tprotoEvent.stopImmediatePropagation = function () {\n\t this.immediatePropagationStopped = true;\n\t\n\t if (stopImmediatePropagation) {\n\t stopImmediatePropagation.call(this);\n\t } else {\n\t this.stopPropagation();\n\t }\n\t};\n\t\n\tvar CustomEventCommon = function () {\n\t if (issetCustomEvent) {\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('CustomEvent');\n\t\n\t evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\t\n\t return evt;\n\t };\n\t }\n\t\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('Event');\n\t\n\t evt.initEvent(eventName, bubbles, cancelable);\n\t evt.detail = params.detail;\n\t\n\t return evt;\n\t };\n\t}();\n\t\n\tCustomEventCommon.prototype = protoEvent;\n\t\n\tmodule.exports = CustomEventCommon;\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\texports.KEY = {\n\t a: 65,\n\t Backspace: 8,\n\t Bottom: 40,\n\t c: 67,\n\t Cmd: 91,\n\t Comma: 44, // ,\n\t Delete: 46,\n\t Enter: 13, // Enter\n\t Esc: 27,\n\t Left: 37,\n\t Right: 39,\n\t Semicolon: 59, // ;\n\t Space: 32,\n\t Tab: 9,\n\t Top: 38,\n\t x: 88\n\t};\n\t\n\texports.CLS = {\n\t DRAGSTART: 'drag',\n\t DROPZONE: 'dropzone'\n\t};\n\t\n\texports.EV = {\n\t BUBBLE_EDIT: 'bubble-edit',\n\t BUBBLE_INPUT: 'bubble-input',\n\t CHANGE: 'change',\n\t DRAGEND: 'dragend',\n\t DRAGENTER: 'dragenter',\n\t DRAGLEAVE: 'dragleave',\n\t DRAGSTART: 'dragstart',\n\t DROP: 'drop'\n\t};\n\t\n\texports.PROPS = {\n\t BUBBLE_VALUE: '_bubbleValue',\n\t CLICK_TIME: '_clickTime',\n\t LOCK_COPY: '_lockCopy'\n\t};\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar DRAG_IMG = { w: 16, h: 16 };\n\t\n\tvar dragImage = null;\n\t\n\texports.DRAG_IMG = DRAG_IMG;\n\t\n\texports.getDragImage = function () {\n\t if (!dragImage) {\n\t dragImage = new Image();\n\t dragImage.src = __webpack_require__(16);\n\t }\n\t\n\t return dragImage;\n\t};\n\t\n\texports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n\t fromNodeSet.fireChange();\n\t toNodeSet.focus();\n\t toNodeSet.fireChange();\n\t};\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar Modernizr = __webpack_require__(18);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS,\n\t EV = _require.EV;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar currentDragSet = null;\n\tvar currentMoveSet = null;\n\tvar currentDragElement = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\tfunction onMousedown(event) {\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t if (!nodeBubble) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t event.preventDefault();\n\t nodeSet.focus();\n\t\n\t var drag = nodeSet.__drag__ = {\n\t onMouseup: onMouseup.bind(this, nodeSet),\n\t onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n\t onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n\t nodeOffsetX: event.offsetX,\n\t nodeOffsetY: event.offsetY,\n\t x: 0,\n\t y: 0\n\t };\n\t\n\t currentDragSet = null;\n\t currentMoveSet = null;\n\t currentDragElement = null;\n\t\n\t events.one(document, 'mouseup', drag.onMouseup);\n\t events.on(document, 'mousemove', drag.onMousemove);\n\t events.on(document, 'scroll', drag.onScroll);\n\t}\n\t\n\tfunction onMouseup(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t events.off(document, 'mousemove', drag.onMousemove);\n\t events.off(document, 'scroll', drag.onScroll);\n\t delete dragSet.__drag__;\n\t\n\t if (currentDragElement) {\n\t currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n\t currentDragElement = null;\n\t }\n\t\n\t if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t\n\t if (currentDragSet) {\n\t (function () {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t }\n\t\n\t var _ = currentDragSet;\n\t currentDragSet = null;\n\t\n\t _.classList.remove(CLS.DRAGSTART);\n\t events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n\t events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n\t })();\n\t }\n\t}\n\t\n\tfunction onMousemove(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t if (!currentDragSet) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = dragSet;\n\t currentDragSet.classList.add(CLS.DRAGSTART);\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t var moveElement = void 0;\n\t\n\t if (nodeBubble) {\n\t select.add(nodeBubble);\n\t if (select.get(currentDragSet).length === 1) {\n\t moveElement = nodeBubble.cloneNode(true);\n\t }\n\t }\n\t\n\t if (!moveElement) {\n\t moveElement = getDragImage();\n\t drag.nodeOffsetX = DRAG_IMG.w;\n\t drag.nodeOffsetY = DRAG_IMG.h;\n\t }\n\t\n\t currentDragElement = document.body.appendChild(document.createElement('div'));\n\t currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n\t currentDragElement.appendChild(moveElement);\n\t\n\t events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n\t }\n\t\n\t drag.x = event.clientX;\n\t drag.y = event.clientY;\n\t onScroll(dragSet);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t if (currentMoveSet && currentMoveSet !== nodeSet) {\n\t currentMoveSet.classList.remove(CLS.DROPZONE);\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t } else if (!currentMoveSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t }\n\t } else if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t}\n\t\n\tfunction onScroll(dragSet) {\n\t var drag = dragSet.__drag__;\n\t if (!drag || !currentDragElement) {\n\t return;\n\t }\n\t\n\t var x = drag.x - drag.nodeOffsetX + events.scrollX();\n\t var y = drag.y - drag.nodeOffsetY + events.scrollY();\n\t\n\t if (Modernizr.csstransforms3d) {\n\t currentDragElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';\n\t } else if (Modernizr.csstransforms) {\n\t currentDragElement.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\n\t } else {\n\t currentDragElement.style.top = y + 'px';\n\t currentDragElement.style.left = x + 'px';\n\t }\n\t}\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t;(function(window){\n\t/*!\n\t * modernizr v3.3.1\n\t * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n\t *\n\t * Copyright (c)\n\t * Faruk Ates\n\t * Paul Irish\n\t * Alex Sexton\n\t * Ryan Seddon\n\t * Patrick Kettner\n\t * Stu Cox\n\t * Richard Herrera\n\t\n\t * MIT License\n\t */\n\t\n\t/*\n\t * Modernizr tests which native CSS3 and HTML5 features are available in the\n\t * current UA and makes the results available to you in two ways: as properties on\n\t * a global `Modernizr` object, and as classes on the `` element. This\n\t * information allows you to progressively enhance your pages with a granular level\n\t * of control over the experience.\n\t*/\n\t\n\t;(function(window, document, undefined){\n\t var tests = [];\n\t \n\t\n\t /**\n\t *\n\t * ModernizrProto is the constructor for Modernizr\n\t *\n\t * @class\n\t * @access public\n\t */\n\t\n\t var ModernizrProto = {\n\t // The current version, dummy\n\t _version: '3.3.1',\n\t\n\t // Any settings that don't work as separate modules\n\t // can go in here as configuration.\n\t _config: {\n\t 'classPrefix': '',\n\t 'enableClasses': true,\n\t 'enableJSClass': true,\n\t 'usePrefixes': true\n\t },\n\t\n\t // Queue of tests\n\t _q: [],\n\t\n\t // Stub these for people who are listening\n\t on: function(test, cb) {\n\t // I don't really think people should do this, but we can\n\t // safe guard it a bit.\n\t // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n\t // This is in case people listen to synchronous tests. I would leave it out,\n\t // but the code to *disallow* sync tests in the real version of this\n\t // function is actually larger than this.\n\t var self = this;\n\t setTimeout(function() {\n\t cb(self[test]);\n\t }, 0);\n\t },\n\t\n\t addTest: function(name, fn, options) {\n\t tests.push({name: name, fn: fn, options: options});\n\t },\n\t\n\t addAsyncTest: function(fn) {\n\t tests.push({name: null, fn: fn});\n\t }\n\t };\n\t\n\t \n\t\n\t // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n\t var Modernizr = function() {};\n\t Modernizr.prototype = ModernizrProto;\n\t\n\t // Leak modernizr globally when you `require` it rather than force it here.\n\t // Overwrite name so constructor name is nicer :D\n\t Modernizr = new Modernizr();\n\t\n\t \n\t\n\t var classes = [];\n\t \n\t\n\t /**\n\t * is returns a boolean if the typeof an obj is exactly type.\n\t *\n\t * @access private\n\t * @function is\n\t * @param {*} obj - A thing we want to check the type of\n\t * @param {string} type - A string to compare the typeof against\n\t * @returns {boolean}\n\t */\n\t\n\t function is(obj, type) {\n\t return typeof obj === type;\n\t }\n\t ;\n\t\n\t /**\n\t * Run through all tests and detect their support in the current UA.\n\t *\n\t * @access private\n\t */\n\t\n\t function testRunner() {\n\t var featureNames;\n\t var feature;\n\t var aliasIdx;\n\t var result;\n\t var nameIdx;\n\t var featureName;\n\t var featureNameSplit;\n\t\n\t for (var featureIdx in tests) {\n\t if (tests.hasOwnProperty(featureIdx)) {\n\t featureNames = [];\n\t feature = tests[featureIdx];\n\t // run the test, throw the return value into the Modernizr,\n\t // then based on that boolean, define an appropriate className\n\t // and push it into an array of classes we'll join later.\n\t //\n\t // If there is no name, it's an 'async' test that is run,\n\t // but not directly added to the object. That should\n\t // be done with a post-run addTest call.\n\t if (feature.name) {\n\t featureNames.push(feature.name.toLowerCase());\n\t\n\t if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n\t // Add all the aliases into the names list\n\t for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n\t featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n\t }\n\t }\n\t }\n\t\n\t // Run the test, or use the raw value if it's not a function\n\t result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\t\n\t\n\t // Set each of the names on the Modernizr object\n\t for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n\t featureName = featureNames[nameIdx];\n\t // Support dot properties as sub tests. We don't do checking to make sure\n\t // that the implied parent tests have been added. You must call them in\n\t // order (either in the test, or make the parent test a dependency).\n\t //\n\t // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n\t // hashtag famous last words\n\t featureNameSplit = featureName.split('.');\n\t\n\t if (featureNameSplit.length === 1) {\n\t Modernizr[featureNameSplit[0]] = result;\n\t } else {\n\t // cast to a Boolean, if not one already\n\t /* jshint -W053 */\n\t if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n\t Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n\t }\n\t\n\t Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n\t }\n\t\n\t classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n\t }\n\t }\n\t }\n\t }\n\t ;\n\t\n\t /**\n\t * If the browsers follow the spec, then they would expose vendor-specific style as:\n\t * elem.style.WebkitBorderRadius\n\t * instead of something like the following, which would be technically incorrect:\n\t * elem.style.webkitBorderRadius\n\t\n\t * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n\t * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n\t * erik.eae.net/archives/2008/03/10/21.48.10/\n\t\n\t * More here: github.com/Modernizr/Modernizr/issues/issue/21\n\t *\n\t * @access private\n\t * @returns {string} The string representing the vendor-specific style properties\n\t */\n\t\n\t var omPrefixes = 'Moz O ms Webkit';\n\t \n\t\n\t var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n\t ModernizrProto._cssomPrefixes = cssomPrefixes;\n\t \n\t\n\t\n\t /**\n\t * contains checks to see if a string contains another string\n\t *\n\t * @access private\n\t * @function contains\n\t * @param {string} str - The string we want to check for substrings\n\t * @param {string} substr - The substring we want to search the first string for\n\t * @returns {boolean}\n\t */\n\t\n\t function contains(str, substr) {\n\t return !!~('' + str).indexOf(substr);\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * docElement is a convenience wrapper to grab the root element of the document\n\t *\n\t * @access private\n\t * @returns {HTMLElement|SVGElement} The root element of the document\n\t */\n\t\n\t var docElement = document.documentElement;\n\t \n\t\n\t /**\n\t * A convenience helper to check if the document we are running in is an SVG document\n\t *\n\t * @access private\n\t * @returns {boolean}\n\t */\n\t\n\t var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n\t \n\t\n\t /**\n\t * createElement is a convenience wrapper around document.createElement. Since we\n\t * use createElement all over the place, this allows for (slightly) smaller code\n\t * as well as abstracting away issues with creating elements in contexts other than\n\t * HTML documents (e.g. SVG documents).\n\t *\n\t * @access private\n\t * @function createElement\n\t * @returns {HTMLElement|SVGElement} An HTML or SVG element\n\t */\n\t\n\t function createElement() {\n\t if (typeof document.createElement !== 'function') {\n\t // This is the case in IE7, where the type of createElement is \"object\".\n\t // For this reason, we cannot call apply() as Object is not a Function.\n\t return document.createElement(arguments[0]);\n\t } else if (isSVG) {\n\t return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n\t } else {\n\t return document.createElement.apply(document, arguments);\n\t }\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * Create our \"modernizr\" element that we do most feature tests on.\n\t *\n\t * @access private\n\t */\n\t\n\t var modElem = {\n\t elem: createElement('modernizr')\n\t };\n\t\n\t // Clean up this element\n\t Modernizr._q.push(function() {\n\t delete modElem.elem;\n\t });\n\t\n\t \n\t\n\t var mStyle = {\n\t style: modElem.elem.style\n\t };\n\t\n\t // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n\t // the front of the queue.\n\t Modernizr._q.unshift(function() {\n\t delete mStyle.style;\n\t });\n\t\n\t \n\t\n\t /**\n\t * getBody returns the body of a document, or an element that can stand in for\n\t * the body if a real body does not exist\n\t *\n\t * @access private\n\t * @function getBody\n\t * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n\t * artificially created element that stands in for the body\n\t */\n\t\n\t function getBody() {\n\t // After page load injecting a fake body doesn't work so check if body exists\n\t var body = document.body;\n\t\n\t if (!body) {\n\t // Can't use the real body create a fake one.\n\t body = createElement(isSVG ? 'svg' : 'body');\n\t body.fake = true;\n\t }\n\t\n\t return body;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * injectElementWithStyles injects an element with style element and some CSS rules\n\t *\n\t * @access private\n\t * @function injectElementWithStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t */\n\t\n\t function injectElementWithStyles(rule, callback, nodes, testnames) {\n\t var mod = 'modernizr';\n\t var style;\n\t var ret;\n\t var node;\n\t var docOverflow;\n\t var div = createElement('div');\n\t var body = getBody();\n\t\n\t if (parseInt(nodes, 10)) {\n\t // In order not to give false positives we create a node for each test\n\t // This also allows the method to scale for unspecified uses\n\t while (nodes--) {\n\t node = createElement('div');\n\t node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n\t div.appendChild(node);\n\t }\n\t }\n\t\n\t style = createElement('style');\n\t style.type = 'text/css';\n\t style.id = 's' + mod;\n\t\n\t // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n\t // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n\t (!body.fake ? div : body).appendChild(style);\n\t body.appendChild(div);\n\t\n\t if (style.styleSheet) {\n\t style.styleSheet.cssText = rule;\n\t } else {\n\t style.appendChild(document.createTextNode(rule));\n\t }\n\t div.id = mod;\n\t\n\t if (body.fake) {\n\t //avoid crashing IE8, if background image is used\n\t body.style.background = '';\n\t //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n\t body.style.overflow = 'hidden';\n\t docOverflow = docElement.style.overflow;\n\t docElement.style.overflow = 'hidden';\n\t docElement.appendChild(body);\n\t }\n\t\n\t ret = callback(div, rule);\n\t // If this is done after page load we don't want to remove the body so check if body exists\n\t if (body.fake) {\n\t body.parentNode.removeChild(body);\n\t docElement.style.overflow = docOverflow;\n\t // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n\t docElement.offsetHeight;\n\t } else {\n\t div.parentNode.removeChild(div);\n\t }\n\t\n\t return !!ret;\n\t\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * domToCSS takes a camelCase string and converts it to kebab-case\n\t * e.g. boxSizing -> box-sizing\n\t *\n\t * @access private\n\t * @function domToCSS\n\t * @param {string} name - String name of camelCase prop we want to convert\n\t * @returns {string} The kebab-case version of the supplied name\n\t */\n\t\n\t function domToCSS(name) {\n\t return name.replace(/([A-Z])/g, function(str, m1) {\n\t return '-' + m1.toLowerCase();\n\t }).replace(/^ms-/, '-ms-');\n\t }\n\t ;\n\t\n\t /**\n\t * nativeTestProps allows for us to use native feature detection functionality if available.\n\t * some prefixed form, or false, in the case of an unsupported rule\n\t *\n\t * @access private\n\t * @function nativeTestProps\n\t * @param {array} props - An array of property names\n\t * @param {string} value - A string representing the value we want to check via @supports\n\t * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n\t */\n\t\n\t // Accepts a list of property names and a single value\n\t // Returns `undefined` if native detection not available\n\t function nativeTestProps(props, value) {\n\t var i = props.length;\n\t // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n\t if ('CSS' in window && 'supports' in window.CSS) {\n\t // Try every prefixed variant of the property\n\t while (i--) {\n\t if (window.CSS.supports(domToCSS(props[i]), value)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t }\n\t // Otherwise fall back to at-rule (for Opera 12.x)\n\t else if ('CSSSupportsRule' in window) {\n\t // Build a condition string for every prefixed variant\n\t var conditionText = [];\n\t while (i--) {\n\t conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n\t }\n\t conditionText = conditionText.join(' or ');\n\t return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n\t return getComputedStyle(node, null).position == 'absolute';\n\t });\n\t }\n\t return undefined;\n\t }\n\t ;\n\t\n\t /**\n\t * cssToDOM takes a kebab-case string and converts it to camelCase\n\t * e.g. box-sizing -> boxSizing\n\t *\n\t * @access private\n\t * @function cssToDOM\n\t * @param {string} name - String name of kebab-case prop we want to convert\n\t * @returns {string} The camelCase version of the supplied name\n\t */\n\t\n\t function cssToDOM(name) {\n\t return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n\t return m1 + m2.toUpperCase();\n\t }).replace(/^-/, '');\n\t }\n\t ;\n\t\n\t // testProps is a generic CSS / DOM property test.\n\t\n\t // In testing support for a given CSS property, it's legit to test:\n\t // `elem.style[styleName] !== undefined`\n\t // If the property is supported it will return an empty string,\n\t // if unsupported it will return undefined.\n\t\n\t // We'll take advantage of this quick test and skip setting a style\n\t // on our modernizr element, but instead just testing undefined vs\n\t // empty string.\n\t\n\t // Property names can be provided in either camelCase or kebab-case.\n\t\n\t function testProps(props, prefixed, value, skipValueTest) {\n\t skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\t\n\t // Try native detect first\n\t if (!is(value, 'undefined')) {\n\t var result = nativeTestProps(props, value);\n\t if (!is(result, 'undefined')) {\n\t return result;\n\t }\n\t }\n\t\n\t // Otherwise do it properly\n\t var afterInit, i, propsLength, prop, before;\n\t\n\t // If we don't have a style element, that means we're running async or after\n\t // the core tests, so we'll need to create our own elements to use\n\t\n\t // inside of an SVG element, in certain browsers, the `style` element is only\n\t // defined for valid tags. Therefore, if `modernizr` does not have one, we\n\t // fall back to a less used element and hope for the best.\n\t var elems = ['modernizr', 'tspan'];\n\t while (!mStyle.style) {\n\t afterInit = true;\n\t mStyle.modElem = createElement(elems.shift());\n\t mStyle.style = mStyle.modElem.style;\n\t }\n\t\n\t // Delete the objects if we created them.\n\t function cleanElems() {\n\t if (afterInit) {\n\t delete mStyle.style;\n\t delete mStyle.modElem;\n\t }\n\t }\n\t\n\t propsLength = props.length;\n\t for (i = 0; i < propsLength; i++) {\n\t prop = props[i];\n\t before = mStyle.style[prop];\n\t\n\t if (contains(prop, '-')) {\n\t prop = cssToDOM(prop);\n\t }\n\t\n\t if (mStyle.style[prop] !== undefined) {\n\t\n\t // If value to test has been passed in, do a set-and-check test.\n\t // 0 (integer) is a valid property value, so check that `value` isn't\n\t // undefined, rather than just checking it's truthy.\n\t if (!skipValueTest && !is(value, 'undefined')) {\n\t\n\t // Needs a try catch block because of old IE. This is slow, but will\n\t // be avoided in most cases because `skipValueTest` will be used.\n\t try {\n\t mStyle.style[prop] = value;\n\t } catch (e) {}\n\t\n\t // If the property value has changed, we assume the value used is\n\t // supported. If `value` is empty string, it'll fail here (because\n\t // it hasn't changed), which matches how browsers have implemented\n\t // CSS.supports()\n\t if (mStyle.style[prop] != before) {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t // Otherwise just return true, or the property name if this is a\n\t // `prefixed()` call\n\t else {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t }\n\t cleanElems();\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * List of JavaScript DOM values used for tests\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr._domPrefixes\n\t * @optionName Modernizr._domPrefixes\n\t * @optionProp domPrefixes\n\t * @access public\n\t * @example\n\t *\n\t * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n\t * than kebab-case properties, all properties are their Capitalized variant\n\t *\n\t * ```js\n\t * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n\t * ```\n\t */\n\t\n\t var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n\t ModernizrProto._domPrefixes = domPrefixes;\n\t \n\t\n\t /**\n\t * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n\t *\n\t * @access private\n\t * @function fnBind\n\t * @param {function} fn - a function you want to change `this` reference to\n\t * @param {object} that - the `this` you want to call the function with\n\t * @returns {function} The wrapped version of the supplied function\n\t */\n\t\n\t function fnBind(fn, that) {\n\t return function() {\n\t return fn.apply(that, arguments);\n\t };\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testDOMProps is a generic DOM property test; if a browser supports\n\t * a certain property, it won't return undefined for it.\n\t *\n\t * @access private\n\t * @function testDOMProps\n\t * @param {array.} props - An array of properties to test for\n\t * @param {object} obj - An object or Element you want to use to test the parameters again\n\t * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n\t */\n\t function testDOMProps(props, obj, elem) {\n\t var item;\n\t\n\t for (var i in props) {\n\t if (props[i] in obj) {\n\t\n\t // return the property name as a string\n\t if (elem === false) {\n\t return props[i];\n\t }\n\t\n\t item = obj[props[i]];\n\t\n\t // let's bind a function\n\t if (is(item, 'function')) {\n\t // bind to obj unless overriden\n\t return fnBind(item, elem || obj);\n\t }\n\t\n\t // return the unbound function or obj or value\n\t return item;\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testPropsAll tests a list of DOM properties we want to check against.\n\t * We specify literally ALL possible (known and/or likely) properties on\n\t * the element including the non-vendor prefixed one, for forward-\n\t * compatibility.\n\t *\n\t * @access private\n\t * @function testPropsAll\n\t * @param {string} prop - A string of the property to test for\n\t * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n\t * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n\t * @param {string} [value] - A string of a css value\n\t * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n\t */\n\t function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\t\n\t var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n\t props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\t\n\t // did they call .prefixed('boxSizing') or are we just testing a prop?\n\t if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n\t return testProps(props, prefixed, value, skipValueTest);\n\t\n\t // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n\t } else {\n\t props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n\t return testDOMProps(props, prefixed, elem);\n\t }\n\t }\n\t\n\t // Modernizr.testAllProps() investigates whether a given style property,\n\t // or any of its vendor-prefixed variants, is recognized\n\t //\n\t // Note that the property names must be provided in the camelCase variant.\n\t // Modernizr.testAllProps('boxSizing')\n\t ModernizrProto.testAllProps = testPropsAll;\n\t\n\t \n\t\n\t /**\n\t * testAllProps determines whether a given CSS property is supported in the browser\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testAllProps\n\t * @optionName Modernizr.testAllProps()\n\t * @optionProp testAllProps\n\t * @access public\n\t * @function testAllProps\n\t * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n\t * @param {string} [value] - String of the value to test\n\t * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n\t * @example\n\t *\n\t * testAllProps determines whether a given CSS property, in some prefixed form,\n\t * is supported by the browser.\n\t *\n\t * ```js\n\t * testAllProps('boxSizing') // true\n\t * ```\n\t *\n\t * It can optionally be given a CSS value in string form to test if a property\n\t * value is valid\n\t *\n\t * ```js\n\t * testAllProps('display', 'block') // true\n\t * testAllProps('display', 'penguin') // false\n\t * ```\n\t *\n\t * A boolean can be passed as a third parameter to skip the value check when\n\t * native detection (@supports) isn't available.\n\t *\n\t * ```js\n\t * testAllProps('shapeOutside', 'content-box', true);\n\t * ```\n\t */\n\t\n\t function testAllProps(prop, value, skipValueTest) {\n\t return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n\t }\n\t ModernizrProto.testAllProps = testAllProps;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Transforms\",\n\t \"property\": \"csstransforms\",\n\t \"caniuse\": \"transforms2d\",\n\t \"tags\": [\"css\"]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms', function() {\n\t // Android < 3.0 is buggy, so we sniff and blacklist\n\t // http://git.io/hHzL7w\n\t return navigator.userAgent.indexOf('Android 2.') === -1 &&\n\t testAllProps('transform', 'scale(1)', true);\n\t });\n\t\n\t\n\t /**\n\t * testStyles injects an element with style element and some CSS rules\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testStyles\n\t * @optionName Modernizr.testStyles()\n\t * @optionProp testStyles\n\t * @access public\n\t * @function testStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t * @example\n\t *\n\t * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n\t * along with (possibly multiple) DOM elements. This lets you check for features\n\t * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n\t * // elem is the first DOM node in the page (by default #modernizr)\n\t * // rule is the first argument you supplied - the CSS rule in string form\n\t *\n\t * addTest('widthworks', elem.style.width === '9px')\n\t * });\n\t * ```\n\t *\n\t * If your test requires multiple nodes, you can include a third argument\n\t * indicating how many additional div elements to include on the page. The\n\t * additional nodes are injected as children of the `elem` that is returned as\n\t * the first argument to the callback.\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n\t * document.getElementById('modernizr').style.width === '1px'; // true\n\t * document.getElementById('modernizr2').style.width === '2px'; // true\n\t * elem.firstChild === document.getElementById('modernizr2'); // true\n\t * }, 1);\n\t * ```\n\t *\n\t * By default, all of the additional elements have an ID of `modernizr[n]`, where\n\t * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n\t * the second additional is `#modernizr3`, etc.).\n\t * If you want to have more meaningful IDs for your function, you can provide\n\t * them as the fourth argument, as an array of strings\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n\t * elem.firstChild === document.getElementById('foo'); // true\n\t * elem.lastChild === document.getElementById('bar'); // true\n\t * }, 2, ['foo', 'bar']);\n\t * ```\n\t *\n\t */\n\t\n\t var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Supports\",\n\t \"property\": \"supports\",\n\t \"caniuse\": \"css-featurequeries\",\n\t \"tags\": [\"css\"],\n\t \"builderAliases\": [\"css_supports\"],\n\t \"notes\": [{\n\t \"name\": \"W3 Spec\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n\t },{\n\t \"name\": \"Related Github Issue\",\n\t \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n\t },{\n\t \"name\": \"W3 Info\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n\t }]\n\t}\n\t!*/\n\t\n\t var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n\t var oldSyntax = 'supportsCSS' in window;\n\t Modernizr.addTest('supports', newSyntax || oldSyntax);\n\t\n\t/*!\n\t{\n\t \"name\": \"CSS Transforms 3D\",\n\t \"property\": \"csstransforms3d\",\n\t \"caniuse\": \"transforms3d\",\n\t \"tags\": [\"css\"],\n\t \"warnings\": [\n\t \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n\t ]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms3d', function() {\n\t var ret = !!testAllProps('perspective', '1px', true);\n\t var usePrefix = Modernizr._config.usePrefixes;\n\t\n\t // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n\t // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n\t // some conditions. As a result, Webkit typically recognizes the syntax but\n\t // will sometimes throw a false positive, thus we must do a more thorough check:\n\t if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n\t var mq;\n\t var defaultStyle = '#modernizr{width:0;height:0}';\n\t // Use CSS Conditional Rules if available\n\t if (Modernizr.supports) {\n\t mq = '@supports (perspective: 1px)';\n\t } else {\n\t // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n\t // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n\t mq = '@media (transform-3d)';\n\t if (usePrefix) {\n\t mq += ',(-webkit-transform-3d)';\n\t }\n\t }\n\t\n\t mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\t\n\t testStyles(defaultStyle + mq, function(elem) {\n\t ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n\t });\n\t }\n\t\n\t return ret;\n\t });\n\t\n\t\n\t // Run each test\n\t testRunner();\n\t\n\t delete ModernizrProto.addTest;\n\t delete ModernizrProto.addAsyncTest;\n\t\n\t // Run the things that are supposed to run after the tests\n\t for (var i = 0; i < Modernizr._q.length; i++) {\n\t Modernizr._q[i]();\n\t }\n\t\n\t // Leak Modernizr namespace\n\t window.Modernizr = Modernizr;\n\t\n\t\n\t;\n\t\n\t})(window, document);\n\tmodule.exports = window.Modernizr;\n\t})(window);\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t KEY = _require.KEY,\n\t EV = _require.EV,\n\t PROPS = _require.PROPS;\n\t\n\tvar text = __webpack_require__(6);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar eventCopy = __webpack_require__(21);\n\tvar eventPaste = __webpack_require__(22);\n\tvar eventBackspace = __webpack_require__(23);\n\tvar eventDelete = __webpack_require__(24);\n\t\n\tvar EVENTS = {\n\t blur: onBlur,\n\t click: onClick,\n\t focus: onFocus,\n\t keydown: onKeydown,\n\t keypress: onKeypress,\n\t keyup: onKeyup,\n\t mscontrolselect: events.prevent,\n\t paste: eventPaste,\n\t resize: events.prevent,\n\t resizestart: events.prevent\n\t};\n\t\n\texports.init = function (nodeWrap) {\n\t var nodeEditor = nodeWrap;\n\t nodeEditor.setAttribute('contenteditable', 'true');\n\t nodeEditor.setAttribute('spellcheck', 'false');\n\t\n\t nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n\t nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n\t nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\t\n\t events.on(nodeEditor, EVENTS);\n\t\n\t return {\n\t addBubble: addBubble.bind(nodeEditor),\n\t editBubble: editBubble.bind(nodeEditor),\n\t inputValue: inputValue.bind(nodeEditor),\n\t removeBubble: removeBubble.bind(nodeEditor),\n\t setContent: setContent.bind(nodeEditor)\n\t };\n\t};\n\t\n\texports.destroy = function (nodeEditor) {\n\t events.off(nodeEditor, EVENTS);\n\t};\n\t\n\tfunction onBlur(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t return events.prevent(event);\n\t }\n\t\n\t select.clear(nodeEditor);\n\t bubble.bubbling(nodeEditor);\n\t}\n\t\n\tfunction onFocus(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t events.prevent(event);\n\t delete nodeEditor[PROPS.LOCK_COPY];\n\t\n\t // Safary 10 не сбрасывает курсор без задержки\n\t raf(function () {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t });\n\t\n\t return false;\n\t }\n\t\n\t cursor.restore(nodeEditor);\n\t}\n\t\n\tfunction onKeyup(event) {\n\t var nodeEditor = event.currentTarget;\n\t var code = events.keyCode(event);\n\t var isPrintableChar = event.key ? event.key.length === 1 : (code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd;\n\t\n\t if (isPrintableChar) {\n\t nodeEditor.fireInput();\n\t }\n\t}\n\t\n\tfunction onKeypress(event) {\n\t var code = events.keyCode(event);\n\t var nodeEditor = event.currentTarget;\n\t\n\t /* eslint no-case-declarations: 0 */\n\t switch (code) {\n\t case KEY.Enter:\n\t event.preventDefault();\n\t if (!nodeEditor.options('disableControls')) {\n\t if (!editBubbleKeyboardEvent(nodeEditor)) {\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.Space:\n\t if (editBubbleKeyboardEvent(nodeEditor)) {\n\t event.preventDefault();\n\t }\n\t break;\n\t\n\t default:\n\t var separator = nodeEditor.options('separator');\n\t if (separator && separator.test(String.fromCharCode(code))) {\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t}\n\t\n\tfunction onKeydown(event) {\n\t var code = events.keyCode(event);\n\t var metaKey = events.metaKey(event);\n\t var nodeEditor = event.currentTarget;\n\t var enable = !nodeEditor.options('disableControls');\n\t\n\t switch (code) {\n\t case KEY.Esc:\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t break;\n\t\n\t case KEY.Backspace:\n\t event.preventDefault();\n\t eventBackspace(event);\n\t break;\n\t\n\t case KEY.Delete:\n\t event.preventDefault();\n\t eventDelete(event);\n\t break;\n\t\n\t case KEY.Left:\n\t event.preventDefault();\n\t arrowLeft(event);\n\t break;\n\t\n\t // сдвигаем курсор в начало списка\n\t case KEY.Top:\n\t event.preventDefault();\n\t if (enable) {\n\t var headBubble = bubbleset.headBubble(nodeEditor);\n\t headBubble && select.uniq(headBubble);\n\t }\n\t break;\n\t\n\t case KEY.Right:\n\t event.preventDefault();\n\t arrowRight(event);\n\t break;\n\t\n\t // сдвигаем курсор в конец списка\n\t // case KEY.Tab:\n\t case KEY.Bottom:\n\t event.preventDefault();\n\t if (enable && select.has(nodeEditor)) {\n\t cursor.restore(nodeEditor);\n\t }\n\t break;\n\t\n\t case KEY.a:\n\t if (metaKey) {\n\t event.preventDefault();\n\t\n\t if (!text.selectAll(null, event.currentTarget)) {\n\t select.all(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.c:\n\t if (metaKey) {\n\t eventCopy(event);\n\t }\n\t break;\n\t\n\t case KEY.x:\n\t if (metaKey) {\n\t eventCopy(event, function () {\n\t return eventDelete(event);\n\t });\n\t }\n\t break;\n\t }\n\t}\n\t\n\tfunction arrowLeft(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowLeft(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[0] === nodeSet.startRangeSelect ? list[list.length - 1] : list[0];\n\t\n\t var node = bubbleset.prevBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t }\n\t}\n\t\n\tfunction arrowRight(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowRight(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.nextBubble(selection.focusNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[list.length - 1] === nodeSet.startRangeSelect ? list[0] : list[list.length - 1];\n\t\n\t var node = bubbleset.nextBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n\t select.clear(nodeSet);\n\t selection.collapse(begin.nextSibling, 0);\n\t } else {\n\t cursor.restore(nodeSet);\n\t }\n\t}\n\t\n\tfunction onClick(event) {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (nodeBubble) {\n\t var clickTime = Date.now();\n\t var isDblclick = nodeSet[PROPS.CLICK_TIME] && clickTime - nodeSet[PROPS.CLICK_TIME] < 200;\n\t\n\t nodeSet[PROPS.CLICK_TIME] = clickTime;\n\t\n\t if (events.metaKey(event)) {\n\t select.add(nodeBubble);\n\t } else if (event.shiftKey) {\n\t if (!nodeSet.startRangeSelect) {\n\t select.uniq(nodeBubble);\n\t } else {\n\t select.range(nodeBubble);\n\t }\n\t } else if (isDblclick) {\n\t bubble.edit(nodeSet, nodeBubble);\n\t } else {\n\t select.toggleUniq(nodeBubble);\n\t }\n\t } else {\n\t select.clear(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t cursor.restore(nodeSet);\n\t }\n\t }\n\t}\n\t\n\tfunction editBubbleKeyboardEvent(nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.rangeCount) {\n\t var list = select.get(nodeEditor);\n\t\n\t if (list.length === 1) {\n\t return bubble.edit(nodeEditor, list[0]);\n\t }\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction setContent(data) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t while (this.firstChild) {\n\t this.removeChild(this.firstChild);\n\t }\n\t\n\t data = text.html2text(data);\n\t this.appendChild(this.ownerDocument.createTextNode(data));\n\t bubble.bubbling(this);\n\t cursor.restore(this);\n\t}\n\t\n\tfunction addBubble(bubbleText, dataAttributes) {\n\t var nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n\t if (!nodeBubble) {\n\t return false;\n\t }\n\t\n\t if (text.text2bubble(this, nodeBubble)) {\n\t this.fireInput();\n\t this.fireChange();\n\t cursor.restore(this);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t this.removeChild(nodeBubble);\n\t this.fireChange();\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction editBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t return bubble.edit(this, nodeBubble);\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction inputValue() {\n\t var textRange = text.currentTextRange(this);\n\t return textRange && text.textClean(textRange.toString()) || '';\n\t}\n\t\n\t/**\n\t * Генерация события редактирования бабла.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireEdit\n\t * @param {HTMLElement} nodeBubble нода бабл\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireEdit(nodeBubble) {\n\t events.dispatch(this, EV.BUBBLE_EDIT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: nodeBubble }\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события изменения набора баблов.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireChange\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireChange() {\n\t events.dispatch(this, EV.CHANGE, {\n\t bubbles: false,\n\t cancelable: false\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события ввода текста.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireInput\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireInput() {\n\t var editText = inputValue.call(this);\n\t\n\t if (this[PROPS.BUBBLE_VALUE] !== editText) {\n\t this[PROPS.BUBBLE_VALUE] = editText;\n\t\n\t events.dispatch(this, EV.BUBBLE_INPUT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: editText }\n\t });\n\t }\n\t}\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * @module x-bubbles/cursor\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\tvar select = __webpack_require__(4);\n\t\n\texports.restore = restore;\n\texports.restoreBasis = restoreBasis;\n\t\n\t/**\n\t * Reset the cursor position to the end of the input field.\n\t * @alias module:x-bubbles/cursor.restore\n\t * @param {HTMLElement} nodeSet\n\t */\n\tfunction restore(nodeSet) {\n\t select.clear(nodeSet);\n\t var basis = restoreBasis(nodeSet);\n\t var selection = context.getSelection();\n\t selection.removeAllRanges();\n\t selection.collapse(basis, 1);\n\t}\n\t\n\t/**\n\t * The creation of the fake text at the end childNodes\n\t * @alias module:x-bubbles/cursor.restoreBasis\n\t * @param {HTMLElement} nodeSet\n\t * @returns {HTMLTextElement} fake text node\n\t */\n\tfunction restoreBasis(nodeSet) {\n\t var fakeText = text.createZws();\n\t\n\t if (nodeSet.hasChildNodes()) {\n\t var lastNode = nodeSet.childNodes[nodeSet.childNodes.length - 1];\n\t\n\t if (lastNode.isEqualNode(fakeText)) {\n\t fakeText = lastNode;\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t\n\t return fakeText;\n\t}\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar events = __webpack_require__(12);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t PROPS = _require.PROPS;\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = function (event) {\n\t var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\t\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t return false;\n\t }\n\t\n\t var list = select.get(nodeEditor);\n\t\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var bubbleCopy = nodeEditor.options('bubbleCopy');\n\t var value = bubbleCopy(list);\n\t\n\t if (!value) {\n\t return false;\n\t }\n\t\n\t nodeEditor[PROPS.LOCK_COPY] = true;\n\t\n\t var target = nodeEditor.ownerDocument.createElement('input');\n\t target.value = value;\n\t target.style.cssText = '\\n position: absolute;\\n left: -9999px;\\n width: 1px;\\n height: 1px;\\n margin: 0;\\n padding: 0;\\n border: none;';\n\t\n\t nodeEditor.parentNode.appendChild(target);\n\t\n\t events.one(target, {\n\t keyup: function keyup() {\n\t return nodeEditor.focus();\n\t },\n\t blur: function blur() {\n\t removeNode(target);\n\t raf(callback);\n\t }\n\t });\n\t\n\t target.select();\n\t return true;\n\t};\n\t\n\tfunction removeNode(node) {\n\t node && node.parentNode && node.parentNode.removeChild(node);\n\t}\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t isIE = _require.isIE;\n\t\n\tmodule.exports = function (event) {\n\t event.preventDefault();\n\t var nodeEditor = event.currentTarget;\n\t\n\t if (context.clipboardData && context.clipboardData.getData) {\n\t onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\t } else if (event.clipboardData) {\n\t (function () {\n\t var contentType = 'text/plain';\n\t var clipboardData = event.clipboardData;\n\t var data = clipboardData.getData && clipboardData.getData(contentType);\n\t\n\t if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n\t Array.prototype.slice.call(clipboardData.items).filter(function (item) {\n\t return item.kind === 'string' && item.type === contentType;\n\t }).some(function (item) {\n\t item.getAsString(function (dataText) {\n\t onPasteSuccess(nodeEditor, dataText);\n\t });\n\t\n\t return true;\n\t });\n\t }\n\t })();\n\t }\n\t};\n\t\n\tfunction onPasteSuccess(nodeEditor, dataText) {\n\t var checkBubblePaste = nodeEditor.options('checkBubblePaste');\n\t var selection = context.getSelection();\n\t var isBubbling = dataText && selection.isCollapsed && !nodeEditor.inputValue ? checkBubblePaste(dataText) : false;\n\t\n\t if (text.replaceString(dataText, selection)) {\n\t if (isBubbling) {\n\t if (isIE) {\n\t raf(function () {\n\t return onReplaceSuccess(nodeEditor);\n\t });\n\t } else {\n\t onReplaceSuccess(nodeEditor);\n\t }\n\t } else {\n\t nodeEditor.fireInput();\n\t }\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction onReplaceSuccess(nodeEditor) {\n\t bubble.bubbling(nodeEditor);\n\t nodeEditor.focus();\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t}\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Backspace.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowLeft(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleLeft(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Delete.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowRight(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleRight(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** x-bubbles.min.js\n **/"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap b69a07b3119acb8c195e\n **/","const context = require('./context');\nconst drag = require('./core/drag');\nconst editor = require('./core/editor');\nconst bubble = require('./core/bubble');\nconst bubbleset = require('./core/bubbleset');\n\nconst OPTIONS = {\n begining: [ 'reg', null, 'begining' ],\n bubbleCopy: [ 'func', bubbleCopyOption, 'bubble-copy' ],\n bubbleDeformation: [ 'func', function () {}, 'bubble-deformation' ],\n bubbleFormation: [ 'func', function () {}, 'bubble-formation' ],\n checkBubblePaste: [ 'func', checkBubblePasteOption, 'check-bubble-paste' ],\n classBubble: [ 'str', 'bubble', 'class-bubble' ],\n disableControls: [ 'bool', false, 'disable-controls' ],\n draggable: [ 'bool', true, 'draggable' ],\n ending: [ 'reg', null, 'ending' ], // /\\@ya\\.ru/g;\n separator: [ 'reg', /[,;]/, 'separator' ],\n tokenizer: [ 'func', null, 'tokenizer' ],\n};\n\nconst XBubbles = Object.create(HTMLDivElement.prototype, {\n createdCallback: {\n value: function () {\n initEditor(this);\n }\n },\n\n attachedCallback: {\n value: function () {\n initEditor(this);\n drag.init(this);\n bubble.bubbling(this);\n }\n },\n\n detachedCallback: {\n value: function () {\n drag.destroy(this);\n destroyEditor(this);\n }\n },\n\n /*\n attributeChangedCallback: {\n value: function (name, prevValue, value) {}\n },\n */\n\n options: {\n value: function (name, value) {\n if (!this._options) {\n this._options = {};\n\n for (const optionName in OPTIONS) {\n this._options[ optionName ] = undefined;\n\n const attrName = `data-${OPTIONS[ optionName ][2]}`;\n if (this.hasAttribute(attrName)) {\n this._options[ optionName ] = this.getAttribute(attrName);\n }\n }\n\n optionsPrepare(this._options);\n }\n\n if (typeof value !== 'undefined') {\n this._options[ name ] = value;\n optionsPrepare(this._options);\n\n } else {\n return this._options[ name ];\n }\n }\n },\n\n items: {\n get: function () {\n return bubbleset.getBubbles(this);\n }\n },\n\n inputValue: {\n get: function () {\n return this.editor.inputValue();\n }\n },\n\n setContent: {\n value: function (data) {\n return this.editor.setContent(data);\n }\n },\n\n addBubble: {\n value: function (bubbleText, data) {\n return this.editor.addBubble(bubbleText, data);\n }\n },\n\n removeBubble: {\n value: function (nodeBubble) {\n return this.editor.removeBubble(nodeBubble);\n }\n },\n\n editBubble: {\n value: function (nodeBubble) {\n return this.editor.editBubble(nodeBubble);\n }\n }\n});\n\nmodule.exports = context.document.registerElement('x-bubbles', {\n extends: 'div',\n prototype: XBubbles\n});\n\nconst OPTIONS_PREPARE = {\n func: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return new Function('context', `return context.${value};`)(context);\n\n case 'function':\n return value;\n }\n },\n bool: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return (value === 'true' || value === 'on');\n\n case 'boolean':\n return value;\n }\n },\n noop: function (value) {\n return value;\n },\n reg: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n if (value) {\n const match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n if (match) {\n return new RegExp(match[1], match[2]);\n }\n }\n\n return null;\n\n case 'object':\n if (value instanceof context.RegExp) {\n return value;\n }\n }\n },\n str: function (value) {\n if (typeof value !== 'undefined') {\n return value ? String(value) : '';\n }\n },\n};\n\nfunction optionsPrepare(options) {\n for (let name in OPTIONS) {\n const [ type, def ] = OPTIONS[ name ];\n options[ name ] = OPTIONS_PREPARE[ type ](options[ name ]);\n if (typeof options[ name ] === 'undefined') {\n options[ name ] = def;\n }\n }\n}\n\nfunction initEditor(node) {\n if (!node.editor) {\n Object.defineProperty(node, 'editor', {\n configurable: true,\n value: editor.init(node)\n });\n }\n}\n\nfunction destroyEditor(node) {\n if (node.editor) {\n editor.destroy(node);\n delete node.editor;\n }\n}\n\nfunction bubbleCopyOption(list) {\n return list.map(item => item.innerHTML).join(', ');\n}\n\nfunction checkBubblePasteOption() {\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","module.exports = (function () {\n /* eslint no-eval: 0 */\n return this || (1, eval)('this');\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./context.js\n **/","const native = require('./drag/native');\nconst mouse = require('./drag/mouse');\nconst { canUseDrag } = require('./utils');\n\nexports.init = function (nodeSet) {\n if (canUseDrag) {\n return native.init(nodeSet);\n }\n\n return mouse.init(nodeSet);\n};\n\nexports.destroy = function (nodeSet) {\n if (canUseDrag) {\n return native.destroy(nodeSet);\n }\n\n return mouse.destroy(nodeSet);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag.js\n **/","const context = require('../../context');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst events = require('../events');\nconst { CLS } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nconst EVENTS = {\n dragend: onDragend,\n dragenter: onDragenter,\n dragleave: onDragleave,\n dragover: onDragover,\n dragstart: onDragstart,\n drop: onDrop,\n};\n\nlet currentDragSet = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, EVENTS);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, EVENTS);\n};\n\nfunction onDragstart(event) {\n event.stopPropagation();\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (!nodeSet || !nodeBubble) {\n event.preventDefault();\n return;\n }\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = nodeSet;\n nodeSet.classList.add(CLS.DRAGSTART);\n select.add(nodeBubble);\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', '');\n\n const list = select.get(currentDragSet);\n if (list.length > 1) {\n event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n }\n}\n\nfunction onDrop(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet || nodeSet === currentDragSet) {\n return;\n }\n\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n}\n\nfunction onDragover(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n event.dataTransfer.dropEffect = 'move';\n}\n\nfunction onDragenter(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n }\n}\n\nfunction onDragleave(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n}\n\nfunction onDragend(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n currentDragSet.classList.remove(CLS.DRAGSTART);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n\n currentDragSet = null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/native.js\n **/","const context = require('../context');\nconst bubble = require('./bubble');\nconst bubbleset = require('./bubbleset');\n\nconst slice = Array.prototype.slice;\nconst PATH_SELECTED = '[bubble][selected]';\nconst PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\nexports.all = all;\nexports.add = add;\nexports.clear = clear;\nexports.get = get;\nexports.uniq = uniq;\nexports.head = head;\nexports.last = last;\nexports.has = has;\nexports.range = range;\nexports.toggleUniq = toggleUniq;\n\nfunction range(node) {\n if (!bubble.isBubbleNode(node)) {\n return;\n }\n\n const set = node.parentNode;\n const list = get(set);\n\n if (!list.length) {\n uniq(node);\n return;\n }\n\n clear(set);\n\n const headList = list[0];\n const lastList = list[ list.length - 1 ];\n\n if (headList === lastList || !set.startRangeSelect) {\n set.startRangeSelect = headList;\n }\n\n let fromNode;\n let toNode;\n const position = node.compareDocumentPosition(set.startRangeSelect);\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n fromNode = set.startRangeSelect;\n toNode = node;\n\n } else {\n fromNode = node;\n toNode = set.startRangeSelect;\n }\n\n if (fromNode && toNode) {\n let item = fromNode;\n\n while (item) {\n if (!setSelected(item)) {\n break;\n }\n\n if (item === toNode) {\n break;\n }\n\n item = item.nextSibling;\n }\n\n bubble.bubbling(set);\n }\n}\n\nfunction all(nodeSet) {\n slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(item => setSelected(item));\n nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\n bubble.bubbling(nodeSet);\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n}\n\nfunction has(nodeSet) {\n return Boolean(nodeSet.querySelector(PATH_SELECTED));\n}\n\nfunction head(set) {\n return get(set)[0];\n}\n\nfunction last(set) {\n const list = get(set);\n return list[ list.length - 1 ];\n}\n\nfunction get(nodeSet) {\n return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n}\n\nfunction clear(nodeSet) {\n get(nodeSet).forEach(item => item.removeAttribute('selected'));\n}\n\nfunction add(node) {\n if (setSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n nodeSet.startRangeSelect = node;\n // ???\n bubble.bubbling(nodeSet);\n\n return true;\n }\n\n return false;\n}\n\nfunction uniq(node) {\n if (!bubble.isBubbleNode(node)) {\n return false;\n }\n\n const nodeSet = bubbleset.closestNodeSet(node);\n const selection = context.getSelection();\n\n selection && selection.removeAllRanges();\n clear(nodeSet);\n\n return add(node);\n}\n\nfunction toggleUniq(node) {\n if (isSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n if (get(nodeSet).length === 1) {\n return removeSelected(node);\n }\n }\n\n return uniq(node);\n}\n\nfunction isSelected(node) {\n return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n}\n\nfunction setSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.setAttribute('selected', '');\n return true;\n }\n\n return false;\n}\n\nfunction removeSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.removeAttribute('selected');\n return true;\n }\n\n return false;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/select.js\n **/","const context = require('../context');\nconst text = require('./text');\nconst { escape, canUseDrag } = require('./utils');\n\nexports.isBubbleNode = isBubbleNode;\nexports.bubbling = bubbling;\nexports.create = create;\nexports.edit = edit;\n\nfunction isBubbleNode(node) {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n\n return node.hasAttribute('bubble');\n}\n\nfunction edit(nodeSet, nodeBubble) {\n if (nodeBubble.hasAttribute('readonly')) {\n return false;\n }\n\n const selection = context.getSelection();\n\n if (!selection) {\n return false;\n }\n\n const bubbleDeformation = nodeSet.options('bubbleDeformation');\n let rangeParams = bubbleDeformation(nodeBubble);\n\n if (!rangeParams) {\n const dataText = text.textClean(nodeBubble.innerText);\n\n rangeParams = {\n text: dataText,\n startOffset: 0,\n endOffset: dataText.length\n };\n }\n\n const textFake = text.createZws();\n const textNode = context.document.createTextNode(rangeParams.text);\n\n nodeSet.fireEdit(nodeBubble);\n nodeSet.replaceChild(textNode, nodeBubble);\n nodeSet.insertBefore(textFake, textNode);\n\n const range = context.document.createRange();\n range.setStart(textNode, rangeParams.startOffset);\n range.setEnd(textNode, rangeParams.endOffset);\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n}\n\n/**\n * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n * @param {[type]} nodeSet [description]\n * @param {[type]} dataText [description]\n * @param {Object} [dataAttributes={}] [description]\n * @returns {[type]} [description]\n */\nfunction create(nodeSet, dataText, dataAttributes = {}) {\n dataText = text.textClean(dataText);\n\n if (!dataText) {\n return;\n }\n\n const bubbleFormation = nodeSet.options('bubbleFormation');\n const classBubble = nodeSet.options('classBubble');\n const draggable = canUseDrag && nodeSet.options('draggable');\n const wrap = nodeSet.ownerDocument.createElement('span');\n\n wrap.innerText = dataText;\n\n for (let key in dataAttributes) {\n if (dataAttributes[ key ]) {\n wrap.setAttribute(`data-${key}`, escape(dataAttributes[ key ]));\n }\n }\n\n bubbleFormation(wrap);\n\n if (classBubble) {\n const classes = String(classBubble).trim().split(/\\s+/);\n let len = classes.length;\n\n while (len--) {\n wrap.classList.add(classes[ len ]);\n }\n }\n\n wrap.setAttribute('bubble', '');\n wrap.setAttribute('contenteditable', 'false');\n draggable && wrap.setAttribute('draggable', 'true');\n\n return wrap;\n}\n\nfunction bubbling(nodeSet) {\n const begining = nodeSet.options('begining');\n const ending = nodeSet.options('ending');\n const separator = nodeSet.options('separator');\n const tokenizer = nodeSet.options('tokenizer');\n const ranges = getBubbleRanges(nodeSet);\n const nodes = [];\n\n ranges.forEach(function (range) {\n const dataText = text.textClean(range.toString());\n\n if (!dataText) {\n range.deleteContents();\n return;\n }\n\n let textParts = [ dataText ];\n\n if (tokenizer) {\n textParts = tokenizer(dataText);\n\n } else {\n if (separator) {\n textParts = dataText\n .split(separator)\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n\n if (ending) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByEnding(str, ending)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n\n } else if (begining) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByBeginning(str, begining)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n }\n\n if (!Array.isArray(textParts) || !textParts.length) {\n range.deleteContents();\n return;\n }\n\n const fragment = context.document.createDocumentFragment();\n\n textParts.forEach(function (textPart) {\n const nodeBubble = create(nodeSet, textPart);\n if (nodeBubble) {\n fragment.appendChild(nodeBubble);\n nodes.push(nodeBubble);\n }\n });\n\n range.deleteContents();\n range.insertNode(fragment);\n });\n\n nodeSet.fireInput();\n\n if (nodes.length) {\n nodeSet.fireChange();\n }\n\n return nodes;\n}\n\nfunction getBubbleRanges(nodeSet) {\n const ranges = [];\n const children = nodeSet.childNodes;\n let range;\n let node;\n\n for (let i = 0; i < children.length; i++) {\n node = children[ i ];\n\n if (isBubbleNode(node)) {\n if (range) {\n range.setEndBefore(node);\n ranges.push(range);\n range = undefined;\n }\n\n } else {\n if (!range) {\n range = context.document.createRange();\n range.setStartBefore(node);\n }\n }\n }\n\n if (range) {\n range.setEndAfter(node);\n ranges.push(range);\n }\n\n return ranges;\n}\n\nfunction trimIterator(str) {\n return str.trim();\n}\n\nfunction nonEmptyIterator(str) {\n return Boolean(str);\n}\n\nfunction parseFragmentByEnding(str, reg) {\n const parts = [];\n let lastIndex = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while (reg.exec(str) !== null && loop) {\n loop--;\n parts.push(str.substring(lastIndex, reg.lastIndex));\n lastIndex = reg.lastIndex;\n }\n\n return parts;\n}\n\nfunction parseFragmentByBeginning(str, reg) {\n const parts = [];\n let res;\n let index = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while ((res = reg.exec(str)) !== null && loop) {\n loop--;\n if (index !== res.index) {\n parts.push(str.substring(index, res.index));\n index = res.index;\n }\n }\n\n parts.push(str.substring(index, str.length));\n return parts;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubble.js\n **/","const context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst { getSelection } = require('./utils');\n\n/* eslint-disable max-len */\nconst REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09FC-\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF2-\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31\\u0B34\\u0B3A\\u0B3B\\u0B45\\u0B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\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1AAE-\\u1AFF\\u1B4C-\\u1B4F\\u1B7D-\\u1B7F\\u1BF4-\\u1BFB\\u1C38-\\u1C3A\\u1C4A-\\u1C4C\\u1C80-\\u1CBF\\u1CC8-\\u1CCF\\u1CF7-\\u1CFF\\u1DE7-\\u1DFB\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FC5\\u1FD4\\u1FD5\\u1FDC\\u1FF0\\u1FF1\\u1FF5\\u1FFF\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u2072\\u2073\\u208F\\u209D-\\u209F\\u20BB-\\u20CF\\u20F1-\\u20FF\\u218A-\\u218F\\u23F4-\\u23FF\\u2427-\\u243F\\u244B-\\u245F\\u2700\\u2B4D-\\u2B4F\\u2B5A-\\u2BFF\\u2C2F\\u2C5F\\u2CF4-\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uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\nconst REG_ZWS = /\\u200B/;\nconst TEXT_ZWS = '\\u200B';\n\nexports.arrowRight = arrowRight;\nexports.arrowLeft = arrowLeft;\nexports.remove = remove;\nexports.html2text = html2text;\nexports.currentTextRange = currentTextRange;\nexports.text2bubble = text2bubble;\nexports.replaceString = replaceString;\nexports.selectAll = selectAll;\nexports.textClean = textClean;\nexports.checkZws = checkZws;\nexports.createZws = createZws;\n\nfunction text2bubble(nodeEditor, nodeBubble) {\n const selection = getSelection(nodeEditor);\n const range = selection && currentTextRange(nodeEditor, selection);\n\n if (range) {\n selection.removeAllRanges();\n selection.addRange(range);\n replace(selection, nodeBubble);\n\n } else {\n nodeEditor.appendChild(nodeBubble);\n }\n\n return true;\n}\n\nfunction currentTextRange(nodeEditor, selection) {\n selection = selection || getSelection(nodeEditor);\n if (!selection) {\n return;\n }\n\n const pointNode = do {\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n selection.focusNode;\n\n } else if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n selection.anchorNode;\n\n } else {\n undefined;\n }\n };\n\n if (!pointNode) {\n return;\n }\n\n let startNode = pointNode;\n let endNode = pointNode;\n let item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n startNode = item;\n item = item.previousSibling;\n }\n\n item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n endNode = item;\n item = item.nextSibling;\n }\n\n const range = nodeEditor.ownerDocument.createRange();\n range.setStartBefore(startNode);\n range.setEndAfter(endNode);\n\n return range;\n}\n\nfunction remove(selection) {\n return replace(selection, createZws());\n}\n\nfunction replace(selection, node) {\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const anchor = context.document.createElement('span');\n selection.getRangeAt(0).surroundContents(anchor);\n anchor.parentNode.replaceChild(node, anchor);\n\n selection.removeAllRanges();\n\n if (node.nodeType === Node.TEXT_NODE) {\n const range = context.document.createRange();\n // для ИЕ обязательно указывать node.nodeValue.length\n range.setStart(node, node.nodeValue.length);\n range.collapse(false);\n selection.addRange(range);\n\n } else {\n selection.collapse(node, 0);\n }\n\n return true;\n}\n\nfunction replaceString(data, selection) {\n data = textClean(data);\n if (!data) {\n return false;\n }\n\n selection = selection || context.getSelection();\n const textNode = context.document.createTextNode(data);\n\n if (!replace(selection, textNode)) {\n return false;\n }\n\n selection.collapse(textNode, textNode.nodeValue.length);\n return true;\n}\n\nfunction arrowLeft(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(startNode, startOffset);\n return true;\n }\n\n const isNativeExtend = Boolean(selection.extend);\n revert = isNativeExtend ? revert : !revert;\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n if (offset === null) {\n offset = node.nodeValue.length;\n }\n\n if (offset - 1 < 0) {\n node = node.previousSibling;\n offset = null;\n continue;\n }\n\n const text = node.nodeValue.substring(offset - 1, offset);\n\n if (checkZws(text)) {\n offset = offset - 1;\n continue;\n }\n\n break;\n }\n\n if (!node || offset === null) {\n return false;\n }\n\n if (extend) {\n if (isNativeExtend) {\n selection.extend(node, offset - 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset - 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset - 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset - 1);\n }\n\n return true;\n}\n\nfunction arrowRight(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.focusNode ||\n selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(endNode, endOffset);\n return true;\n }\n\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n const len = node.nodeValue.length;\n\n if (offset + 1 > len) {\n node = node.nextSibling;\n offset = 0;\n continue;\n }\n\n const text = node.nodeValue.substring(offset, offset + 1);\n\n if (checkZws(text)) {\n offset = offset + 1;\n continue;\n }\n\n break;\n }\n\n if (!node) {\n return false;\n }\n\n if (extend) {\n const isNativeExtend = Boolean(selection.extend);\n\n if (isNativeExtend) {\n selection.extend(node, offset + 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset + 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset + 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset + 1);\n }\n\n return true;\n}\n\nfunction html2text(value) {\n if (!value) {\n return '';\n }\n\n var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n DOMContainer.innerText = value;\n\n return DOMContainer.innerText\n .replace(/^[\\u0020\\u00a0]+$/gm, '')\n .replace(/\\n/gm, ' ')\n .trim();\n}\n\nfunction selectAll(selection, nodeSet) {\n selection = selection || context.getSelection();\n const node = selection && selection.anchorNode;\n\n if (!node || node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n let fromNode;\n let toNode;\n let item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n fromNode = item;\n item = item.previousSibling;\n }\n\n item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n toNode = item;\n item = item.nextSibling;\n }\n\n const hasBubbles = bubbleset.hasBubbles(nodeSet);\n const range = context.document.createRange();\n range.setStartBefore(fromNode);\n range.setEndAfter(toNode);\n\n const dataText = textClean(range.toString());\n\n if (dataText || (!dataText && !hasBubbles)) {\n if (!dataText) {\n range.collapse();\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n }\n\n return false;\n}\n\nfunction createZws() {\n return context.document.createTextNode(TEXT_ZWS);\n}\n\nfunction checkZws(value) {\n return REG_ZWS.test(value);\n}\n\nfunction textClean(value) {\n return String(value || '')\n .trim()\n .replace(REG_REPLACE_NON_PRINTABLE, '');\n}\n\nfunction selectionCorrect(selection) {\n let startNode = selection.anchorNode;\n let endNode = selection.focusNode;\n let startOffset = selection.anchorOffset;\n let endOffset = selection.focusOffset;\n let revert = false;\n\n if (startNode === endNode) {\n startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n revert = selection.anchorOffset > selection.focusOffset;\n\n } else {\n const position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n startNode = selection.focusNode;\n startOffset = selection.focusOffset;\n endNode = selection.anchorNode;\n endOffset = selection.anchorOffset;\n revert = true;\n }\n }\n\n return { startNode, endNode, startOffset, endOffset, revert };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/text.js\n **/","const bubble = require('./bubble');\nconst text = require('./text');\n\nexports.closestNodeBubble = closestNodeBubble;\nexports.closestNodeSet = closestNodeSet;\nexports.findBubbleLeft = findBubbleLeft;\nexports.findBubbleRight = findBubbleRight;\nexports.getBubbles = getBubbles;\nexports.hasBubbles = hasBubbles;\nexports.headBubble = headBubble;\nexports.lastBubble = lastBubble;\nexports.nextBubble = nextBubble;\nexports.prevBubble = prevBubble;\n\nfunction lastBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:last-child');\n}\n\nfunction headBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:first-child');\n}\n\nfunction getBubbles(nodeSet) {\n return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n}\n\nfunction hasBubbles(nodeSet) {\n return Boolean(nodeSet.querySelector('[bubble]'));\n}\n\nfunction findBubbleLeft(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.previousSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.previousSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction findBubbleRight(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.nextSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.nextSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction closestNodeSet(node) {\n while (node) {\n if (isEditorNode(node)) {\n return node;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction closestNodeBubble(node) {\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (isEditorNode(node)) {\n return;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction prevBubble(target) {\n let node = target && target.previousSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction nextBubble(target) {\n let node = target && target.nextSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction isEditorNode(node) {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n node.getAttribute('is') === 'x-bubbles'\n );\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubbleset.js\n **/","const raf = require('raf');\nconst context = require('../context');\n\n/* eslint quotes: 0 */\n\nconst HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n\nconst HTML_UNESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n};\n\nconst REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\nconst REG_UNESCAPED_HTML = /[&<>\"'`]/g;\nconst REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\nconst REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\nconst REG_IE = /Trident|Edge/;\n\nexports.getSelection = function (nodeEditor) {\n const selection = context.getSelection();\n\n if (selection && selection.anchorNode && (nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n return selection;\n }\n};\n\nexports.throttle = function (callback, runContext) {\n let throttle = 0;\n const animationCallback = function () {\n throttle = 0;\n };\n\n return function () {\n if (throttle) {\n return;\n }\n\n throttle = raf(animationCallback);\n\n callback.apply(runContext || this, arguments);\n };\n};\n\nexports.escape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n }\n\n return data;\n};\n\nexports.unescape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n }\n\n return data;\n};\n\nexports.canUseDrag = (function () {\n return !REG_IE.test(context.navigator.userAgent);\n})();\n\nexports.isIE = (function () {\n return REG_IE.test(context.navigator.userAgent);\n})();\n\nfunction unescapeHtmlChar(chr) {\n return HTML_UNESCAPES[ chr ];\n}\n\nfunction escapeHtmlChar(chr) {\n return HTML_ESCAPES[ chr ];\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/utils.js\n **/","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/raf/index.js\n ** module id = 9\n ** module chunks = 0\n **/","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/performance-now/lib/performance-now.js\n ** module id = 10\n ** module chunks = 0\n **/","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * @module x-bubbles/event\n */\n\nconst context = require('../context');\nconst CustomEventCommon = require('../polyfills/CustomEventCommon');\n\nexports.scrollX = scrollX;\nexports.scrollY = scrollY;\nexports.dispatch = dispatch;\n\nexports.keyCode = function (event) {\n return event.charCode || event.keyCode;\n};\n\nexports.metaKey = function (event) {\n return event.ctrlKey || event.metaKey;\n};\n\nexports.pageX = function (event) {\n return (event.pageX === null && event.clientX !== null) ?\n event.clientX + scrollX() :\n event.pageX;\n};\n\nexports.pageY = function (event) {\n return (event.pageY === null && event.clientY !== null) ?\n event.clientY + scrollY() :\n event.pageY;\n};\n\nexports.one = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, oneCallback(target, name, events[ name ]));\n }\n};\n\nexports.on = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, events[ name ]);\n }\n};\n\nexports.off = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.removeEventListener(name, events[ name ]);\n }\n};\n\nexports.prevent = function (event) {\n event.cancelBubble = true;\n event.returnValue = false;\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n return false;\n};\n\nfunction scrollX() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n}\n\nfunction scrollY() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n}\n\n/**\n * Designer events.\n *\n * @example\n * const { Custom } = require('event');\n *\n * new Custom('custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event~Custom\n * @constructor\n */\nconst Custom = (function () {\n if (typeof context.CustomEvent === 'function') {\n return context.CustomEvent;\n }\n\n return CustomEventCommon;\n}());\n\n/**\n * Dispatch event.\n *\n * @example\n * const { dispatch } = require('event');\n * dispatch(node, 'custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event.dispatch\n * @param {HTMLElement} element node events\n * @param {string} name event name\n * @param {Object} params the event parameters\n * @param {boolean} [params.bubbles=false]\n * @param {boolean} [params.cancelable=false]\n * @param {*} [params.detail]\n */\nfunction dispatch(element, name, params = {}) {\n element.dispatchEvent(new Custom(name, params));\n}\n\nfunction oneCallback(target, eventName, callback) {\n return function _callback(event) {\n target.removeEventListener(eventName, _callback);\n callback(event);\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/events.js\n **/","const context = require('../context');\n\n/**\n * @constant {Document}\n * @private\n */\nconst doc = context.document;\n\n/**\n * @constant {Object}\n * @private\n */\nconst protoEvent = context.Event.prototype;\n\nlet issetCustomEvent = false;\n\ntry {\n issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n} catch (e) {\n // do nothing\n}\n\n/**\n * The original function \"stopImmediatePropagation\"\n * @constant {function}\n * @private\n */\nconst stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\n/**\n * Override function to set properties \"immediatePropagationStopped\"\n */\nprotoEvent.stopImmediatePropagation = function () {\n this.immediatePropagationStopped = true;\n\n if (stopImmediatePropagation) {\n stopImmediatePropagation.call(this);\n\n } else {\n this.stopPropagation();\n }\n};\n\nlet CustomEventCommon = (function () {\n if (issetCustomEvent) {\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('CustomEvent');\n\n evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\n return evt;\n };\n }\n\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('Event');\n\n evt.initEvent(eventName, bubbles, cancelable);\n evt.detail = params.detail;\n\n return evt;\n };\n}());\n\nCustomEventCommon.prototype = protoEvent;\n\nmodule.exports = CustomEventCommon;\n\n\n\n/** WEBPACK FOOTER **\n ** ./polyfills/CustomEventCommon.js\n **/","exports.KEY = {\n a: 65,\n Backspace: 8,\n Bottom: 40,\n c: 67,\n Cmd: 91,\n Comma: 44, // ,\n Delete: 46,\n Enter: 13, // Enter\n Esc: 27,\n Left: 37,\n Right: 39,\n Semicolon: 59, // ;\n Space: 32,\n Tab: 9,\n Top: 38,\n x: 88,\n};\n\nexports.CLS = {\n DRAGSTART: 'drag',\n DROPZONE: 'dropzone',\n};\n\nexports.EV = {\n BUBBLE_EDIT: 'bubble-edit',\n BUBBLE_INPUT: 'bubble-input',\n CHANGE: 'change',\n DRAGEND: 'dragend',\n DRAGENTER: 'dragenter',\n DRAGLEAVE: 'dragleave',\n DRAGSTART: 'dragstart',\n DROP: 'drop',\n};\n\nexports.PROPS = {\n BUBBLE_VALUE: '_bubbleValue',\n CLICK_TIME: '_clickTime',\n LOCK_COPY: '_lockCopy',\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/constant.js\n **/","const DRAG_IMG = { w: 16, h: 16 };\n\nlet dragImage = null;\n\nexports.DRAG_IMG = DRAG_IMG;\n\nexports.getDragImage = function () {\n if (!dragImage) {\n dragImage = new Image();\n dragImage.src = require('url?mimetype=image/png!./bubbles.png');\n }\n\n return dragImage;\n};\n\nexports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n fromNodeSet.fireChange();\n toNodeSet.focus();\n toNodeSet.fireChange();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/common.js\n **/","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/url-loader?mimetype=image/png!./core/drag/bubbles.png\n ** module id = 16\n ** module chunks = 0\n **/","const context = require('../../context');\nconst events = require('../events');\nconst utils = require('../utils');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst Modernizr = require('modernizr');\nconst { CLS, EV } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nlet currentDragSet = null;\nlet currentMoveSet = null;\nlet currentDragElement = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, 'mousedown', onMousedown);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, 'mousedown', onMousedown);\n};\n\nfunction onMousedown(event) {\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n if (!nodeBubble) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (!nodeSet) {\n return;\n }\n\n event.preventDefault();\n nodeSet.focus();\n\n const drag = nodeSet.__drag__ = {\n onMouseup: onMouseup.bind(this, nodeSet),\n onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n nodeOffsetX: event.offsetX,\n nodeOffsetY: event.offsetY,\n x: 0,\n y: 0\n };\n\n currentDragSet = null;\n currentMoveSet = null;\n currentDragElement = null;\n\n events.one(document, 'mouseup', drag.onMouseup);\n events.on(document, 'mousemove', drag.onMousemove);\n events.on(document, 'scroll', drag.onScroll);\n}\n\nfunction onMouseup(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n events.off(document, 'mousemove', drag.onMousemove);\n events.off(document, 'scroll', drag.onScroll);\n delete dragSet.__drag__;\n\n if (currentDragElement) {\n currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n currentDragElement = null;\n }\n\n if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n\n if (currentDragSet) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n }\n\n const _ = currentDragSet;\n currentDragSet = null;\n\n _.classList.remove(CLS.DRAGSTART);\n events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onMousemove(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n if (!currentDragSet) {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = dragSet;\n currentDragSet.classList.add(CLS.DRAGSTART);\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n let moveElement;\n\n if (nodeBubble) {\n select.add(nodeBubble);\n if (select.get(currentDragSet).length === 1) {\n moveElement = nodeBubble.cloneNode(true);\n }\n }\n\n if (!moveElement) {\n moveElement = getDragImage();\n drag.nodeOffsetX = DRAG_IMG.w;\n drag.nodeOffsetY = DRAG_IMG.h;\n }\n\n currentDragElement = document.body.appendChild(document.createElement('div'));\n currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n currentDragElement.appendChild(moveElement);\n\n events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n }\n\n drag.x = event.clientX;\n drag.y = event.clientY;\n onScroll(dragSet);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n if (currentMoveSet && currentMoveSet !== nodeSet) {\n currentMoveSet.classList.remove(CLS.DROPZONE);\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\n } else if (!currentMoveSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n }\n\n } else if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onScroll(dragSet) {\n const drag = dragSet.__drag__;\n if (!drag || !currentDragElement) {\n return;\n }\n\n const x = drag.x - drag.nodeOffsetX + events.scrollX();\n const y = drag.y - drag.nodeOffsetY + events.scrollY();\n\n if (Modernizr.csstransforms3d) {\n currentDragElement.style.transform = `translate3d(${x}px, ${y}px, 0px)`;\n\n } else if (Modernizr.csstransforms) {\n currentDragElement.style.transform = `translate(${x}px, ${y}px)`;\n\n } else {\n currentDragElement.style.top = `${y}px`;\n currentDragElement.style.left = `${x}px`;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/mouse.js\n **/",";(function(window){\n/*!\n * modernizr v3.3.1\n * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n *\n * Copyright (c)\n * Faruk Ates\n * Paul Irish\n * Alex Sexton\n * Ryan Seddon\n * Patrick Kettner\n * Stu Cox\n * Richard Herrera\n\n * MIT License\n */\n\n/*\n * Modernizr tests which native CSS3 and HTML5 features are available in the\n * current UA and makes the results available to you in two ways: as properties on\n * a global `Modernizr` object, and as classes on the `` element. This\n * information allows you to progressively enhance your pages with a granular level\n * of control over the experience.\n*/\n\n;(function(window, document, undefined){\n var tests = [];\n \n\n /**\n *\n * ModernizrProto is the constructor for Modernizr\n *\n * @class\n * @access public\n */\n\n var ModernizrProto = {\n // The current version, dummy\n _version: '3.3.1',\n\n // Any settings that don't work as separate modules\n // can go in here as configuration.\n _config: {\n 'classPrefix': '',\n 'enableClasses': true,\n 'enableJSClass': true,\n 'usePrefixes': true\n },\n\n // Queue of tests\n _q: [],\n\n // Stub these for people who are listening\n on: function(test, cb) {\n // I don't really think people should do this, but we can\n // safe guard it a bit.\n // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n // This is in case people listen to synchronous tests. I would leave it out,\n // but the code to *disallow* sync tests in the real version of this\n // function is actually larger than this.\n var self = this;\n setTimeout(function() {\n cb(self[test]);\n }, 0);\n },\n\n addTest: function(name, fn, options) {\n tests.push({name: name, fn: fn, options: options});\n },\n\n addAsyncTest: function(fn) {\n tests.push({name: null, fn: fn});\n }\n };\n\n \n\n // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n var Modernizr = function() {};\n Modernizr.prototype = ModernizrProto;\n\n // Leak modernizr globally when you `require` it rather than force it here.\n // Overwrite name so constructor name is nicer :D\n Modernizr = new Modernizr();\n\n \n\n var classes = [];\n \n\n /**\n * is returns a boolean if the typeof an obj is exactly type.\n *\n * @access private\n * @function is\n * @param {*} obj - A thing we want to check the type of\n * @param {string} type - A string to compare the typeof against\n * @returns {boolean}\n */\n\n function is(obj, type) {\n return typeof obj === type;\n }\n ;\n\n /**\n * Run through all tests and detect their support in the current UA.\n *\n * @access private\n */\n\n function testRunner() {\n var featureNames;\n var feature;\n var aliasIdx;\n var result;\n var nameIdx;\n var featureName;\n var featureNameSplit;\n\n for (var featureIdx in tests) {\n if (tests.hasOwnProperty(featureIdx)) {\n featureNames = [];\n feature = tests[featureIdx];\n // run the test, throw the return value into the Modernizr,\n // then based on that boolean, define an appropriate className\n // and push it into an array of classes we'll join later.\n //\n // If there is no name, it's an 'async' test that is run,\n // but not directly added to the object. That should\n // be done with a post-run addTest call.\n if (feature.name) {\n featureNames.push(feature.name.toLowerCase());\n\n if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n // Add all the aliases into the names list\n for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n }\n }\n }\n\n // Run the test, or use the raw value if it's not a function\n result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\n\n // Set each of the names on the Modernizr object\n for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n featureName = featureNames[nameIdx];\n // Support dot properties as sub tests. We don't do checking to make sure\n // that the implied parent tests have been added. You must call them in\n // order (either in the test, or make the parent test a dependency).\n //\n // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n // hashtag famous last words\n featureNameSplit = featureName.split('.');\n\n if (featureNameSplit.length === 1) {\n Modernizr[featureNameSplit[0]] = result;\n } else {\n // cast to a Boolean, if not one already\n /* jshint -W053 */\n if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n }\n\n Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n }\n\n classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n }\n }\n }\n }\n ;\n\n /**\n * If the browsers follow the spec, then they would expose vendor-specific style as:\n * elem.style.WebkitBorderRadius\n * instead of something like the following, which would be technically incorrect:\n * elem.style.webkitBorderRadius\n\n * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n * erik.eae.net/archives/2008/03/10/21.48.10/\n\n * More here: github.com/Modernizr/Modernizr/issues/issue/21\n *\n * @access private\n * @returns {string} The string representing the vendor-specific style properties\n */\n\n var omPrefixes = 'Moz O ms Webkit';\n \n\n var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n ModernizrProto._cssomPrefixes = cssomPrefixes;\n \n\n\n /**\n * contains checks to see if a string contains another string\n *\n * @access private\n * @function contains\n * @param {string} str - The string we want to check for substrings\n * @param {string} substr - The substring we want to search the first string for\n * @returns {boolean}\n */\n\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n ;\n\n /**\n * docElement is a convenience wrapper to grab the root element of the document\n *\n * @access private\n * @returns {HTMLElement|SVGElement} The root element of the document\n */\n\n var docElement = document.documentElement;\n \n\n /**\n * A convenience helper to check if the document we are running in is an SVG document\n *\n * @access private\n * @returns {boolean}\n */\n\n var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n \n\n /**\n * createElement is a convenience wrapper around document.createElement. Since we\n * use createElement all over the place, this allows for (slightly) smaller code\n * as well as abstracting away issues with creating elements in contexts other than\n * HTML documents (e.g. SVG documents).\n *\n * @access private\n * @function createElement\n * @returns {HTMLElement|SVGElement} An HTML or SVG element\n */\n\n function createElement() {\n if (typeof document.createElement !== 'function') {\n // This is the case in IE7, where the type of createElement is \"object\".\n // For this reason, we cannot call apply() as Object is not a Function.\n return document.createElement(arguments[0]);\n } else if (isSVG) {\n return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n } else {\n return document.createElement.apply(document, arguments);\n }\n }\n\n ;\n\n /**\n * Create our \"modernizr\" element that we do most feature tests on.\n *\n * @access private\n */\n\n var modElem = {\n elem: createElement('modernizr')\n };\n\n // Clean up this element\n Modernizr._q.push(function() {\n delete modElem.elem;\n });\n\n \n\n var mStyle = {\n style: modElem.elem.style\n };\n\n // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n // the front of the queue.\n Modernizr._q.unshift(function() {\n delete mStyle.style;\n });\n\n \n\n /**\n * getBody returns the body of a document, or an element that can stand in for\n * the body if a real body does not exist\n *\n * @access private\n * @function getBody\n * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n * artificially created element that stands in for the body\n */\n\n function getBody() {\n // After page load injecting a fake body doesn't work so check if body exists\n var body = document.body;\n\n if (!body) {\n // Can't use the real body create a fake one.\n body = createElement(isSVG ? 'svg' : 'body');\n body.fake = true;\n }\n\n return body;\n }\n\n ;\n\n /**\n * injectElementWithStyles injects an element with style element and some CSS rules\n *\n * @access private\n * @function injectElementWithStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n */\n\n function injectElementWithStyles(rule, callback, nodes, testnames) {\n var mod = 'modernizr';\n var style;\n var ret;\n var node;\n var docOverflow;\n var div = createElement('div');\n var body = getBody();\n\n if (parseInt(nodes, 10)) {\n // In order not to give false positives we create a node for each test\n // This also allows the method to scale for unspecified uses\n while (nodes--) {\n node = createElement('div');\n node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n div.appendChild(node);\n }\n }\n\n style = createElement('style');\n style.type = 'text/css';\n style.id = 's' + mod;\n\n // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n (!body.fake ? div : body).appendChild(style);\n body.appendChild(div);\n\n if (style.styleSheet) {\n style.styleSheet.cssText = rule;\n } else {\n style.appendChild(document.createTextNode(rule));\n }\n div.id = mod;\n\n if (body.fake) {\n //avoid crashing IE8, if background image is used\n body.style.background = '';\n //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n body.style.overflow = 'hidden';\n docOverflow = docElement.style.overflow;\n docElement.style.overflow = 'hidden';\n docElement.appendChild(body);\n }\n\n ret = callback(div, rule);\n // If this is done after page load we don't want to remove the body so check if body exists\n if (body.fake) {\n body.parentNode.removeChild(body);\n docElement.style.overflow = docOverflow;\n // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n docElement.offsetHeight;\n } else {\n div.parentNode.removeChild(div);\n }\n\n return !!ret;\n\n }\n\n ;\n\n /**\n * domToCSS takes a camelCase string and converts it to kebab-case\n * e.g. boxSizing -> box-sizing\n *\n * @access private\n * @function domToCSS\n * @param {string} name - String name of camelCase prop we want to convert\n * @returns {string} The kebab-case version of the supplied name\n */\n\n function domToCSS(name) {\n return name.replace(/([A-Z])/g, function(str, m1) {\n return '-' + m1.toLowerCase();\n }).replace(/^ms-/, '-ms-');\n }\n ;\n\n /**\n * nativeTestProps allows for us to use native feature detection functionality if available.\n * some prefixed form, or false, in the case of an unsupported rule\n *\n * @access private\n * @function nativeTestProps\n * @param {array} props - An array of property names\n * @param {string} value - A string representing the value we want to check via @supports\n * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n */\n\n // Accepts a list of property names and a single value\n // Returns `undefined` if native detection not available\n function nativeTestProps(props, value) {\n var i = props.length;\n // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n if ('CSS' in window && 'supports' in window.CSS) {\n // Try every prefixed variant of the property\n while (i--) {\n if (window.CSS.supports(domToCSS(props[i]), value)) {\n return true;\n }\n }\n return false;\n }\n // Otherwise fall back to at-rule (for Opera 12.x)\n else if ('CSSSupportsRule' in window) {\n // Build a condition string for every prefixed variant\n var conditionText = [];\n while (i--) {\n conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n }\n conditionText = conditionText.join(' or ');\n return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n return getComputedStyle(node, null).position == 'absolute';\n });\n }\n return undefined;\n }\n ;\n\n /**\n * cssToDOM takes a kebab-case string and converts it to camelCase\n * e.g. box-sizing -> boxSizing\n *\n * @access private\n * @function cssToDOM\n * @param {string} name - String name of kebab-case prop we want to convert\n * @returns {string} The camelCase version of the supplied name\n */\n\n function cssToDOM(name) {\n return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n return m1 + m2.toUpperCase();\n }).replace(/^-/, '');\n }\n ;\n\n // testProps is a generic CSS / DOM property test.\n\n // In testing support for a given CSS property, it's legit to test:\n // `elem.style[styleName] !== undefined`\n // If the property is supported it will return an empty string,\n // if unsupported it will return undefined.\n\n // We'll take advantage of this quick test and skip setting a style\n // on our modernizr element, but instead just testing undefined vs\n // empty string.\n\n // Property names can be provided in either camelCase or kebab-case.\n\n function testProps(props, prefixed, value, skipValueTest) {\n skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\n // Try native detect first\n if (!is(value, 'undefined')) {\n var result = nativeTestProps(props, value);\n if (!is(result, 'undefined')) {\n return result;\n }\n }\n\n // Otherwise do it properly\n var afterInit, i, propsLength, prop, before;\n\n // If we don't have a style element, that means we're running async or after\n // the core tests, so we'll need to create our own elements to use\n\n // inside of an SVG element, in certain browsers, the `style` element is only\n // defined for valid tags. Therefore, if `modernizr` does not have one, we\n // fall back to a less used element and hope for the best.\n var elems = ['modernizr', 'tspan'];\n while (!mStyle.style) {\n afterInit = true;\n mStyle.modElem = createElement(elems.shift());\n mStyle.style = mStyle.modElem.style;\n }\n\n // Delete the objects if we created them.\n function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }\n\n propsLength = props.length;\n for (i = 0; i < propsLength; i++) {\n prop = props[i];\n before = mStyle.style[prop];\n\n if (contains(prop, '-')) {\n prop = cssToDOM(prop);\n }\n\n if (mStyle.style[prop] !== undefined) {\n\n // If value to test has been passed in, do a set-and-check test.\n // 0 (integer) is a valid property value, so check that `value` isn't\n // undefined, rather than just checking it's truthy.\n if (!skipValueTest && !is(value, 'undefined')) {\n\n // Needs a try catch block because of old IE. This is slow, but will\n // be avoided in most cases because `skipValueTest` will be used.\n try {\n mStyle.style[prop] = value;\n } catch (e) {}\n\n // If the property value has changed, we assume the value used is\n // supported. If `value` is empty string, it'll fail here (because\n // it hasn't changed), which matches how browsers have implemented\n // CSS.supports()\n if (mStyle.style[prop] != before) {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n // Otherwise just return true, or the property name if this is a\n // `prefixed()` call\n else {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n }\n cleanElems();\n return false;\n }\n\n ;\n\n /**\n * List of JavaScript DOM values used for tests\n *\n * @memberof Modernizr\n * @name Modernizr._domPrefixes\n * @optionName Modernizr._domPrefixes\n * @optionProp domPrefixes\n * @access public\n * @example\n *\n * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n * than kebab-case properties, all properties are their Capitalized variant\n *\n * ```js\n * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n * ```\n */\n\n var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n ModernizrProto._domPrefixes = domPrefixes;\n \n\n /**\n * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n *\n * @access private\n * @function fnBind\n * @param {function} fn - a function you want to change `this` reference to\n * @param {object} that - the `this` you want to call the function with\n * @returns {function} The wrapped version of the supplied function\n */\n\n function fnBind(fn, that) {\n return function() {\n return fn.apply(that, arguments);\n };\n }\n\n ;\n\n /**\n * testDOMProps is a generic DOM property test; if a browser supports\n * a certain property, it won't return undefined for it.\n *\n * @access private\n * @function testDOMProps\n * @param {array.} props - An array of properties to test for\n * @param {object} obj - An object or Element you want to use to test the parameters again\n * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n */\n function testDOMProps(props, obj, elem) {\n var item;\n\n for (var i in props) {\n if (props[i] in obj) {\n\n // return the property name as a string\n if (elem === false) {\n return props[i];\n }\n\n item = obj[props[i]];\n\n // let's bind a function\n if (is(item, 'function')) {\n // bind to obj unless overriden\n return fnBind(item, elem || obj);\n }\n\n // return the unbound function or obj or value\n return item;\n }\n }\n return false;\n }\n\n ;\n\n /**\n * testPropsAll tests a list of DOM properties we want to check against.\n * We specify literally ALL possible (known and/or likely) properties on\n * the element including the non-vendor prefixed one, for forward-\n * compatibility.\n *\n * @access private\n * @function testPropsAll\n * @param {string} prop - A string of the property to test for\n * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n * @param {string} [value] - A string of a css value\n * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n */\n function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\n var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\n // did they call .prefixed('boxSizing') or are we just testing a prop?\n if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n return testProps(props, prefixed, value, skipValueTest);\n\n // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n } else {\n props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n return testDOMProps(props, prefixed, elem);\n }\n }\n\n // Modernizr.testAllProps() investigates whether a given style property,\n // or any of its vendor-prefixed variants, is recognized\n //\n // Note that the property names must be provided in the camelCase variant.\n // Modernizr.testAllProps('boxSizing')\n ModernizrProto.testAllProps = testPropsAll;\n\n \n\n /**\n * testAllProps determines whether a given CSS property is supported in the browser\n *\n * @memberof Modernizr\n * @name Modernizr.testAllProps\n * @optionName Modernizr.testAllProps()\n * @optionProp testAllProps\n * @access public\n * @function testAllProps\n * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n * @param {string} [value] - String of the value to test\n * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n * @example\n *\n * testAllProps determines whether a given CSS property, in some prefixed form,\n * is supported by the browser.\n *\n * ```js\n * testAllProps('boxSizing') // true\n * ```\n *\n * It can optionally be given a CSS value in string form to test if a property\n * value is valid\n *\n * ```js\n * testAllProps('display', 'block') // true\n * testAllProps('display', 'penguin') // false\n * ```\n *\n * A boolean can be passed as a third parameter to skip the value check when\n * native detection (@supports) isn't available.\n *\n * ```js\n * testAllProps('shapeOutside', 'content-box', true);\n * ```\n */\n\n function testAllProps(prop, value, skipValueTest) {\n return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n }\n ModernizrProto.testAllProps = testAllProps;\n \n/*!\n{\n \"name\": \"CSS Transforms\",\n \"property\": \"csstransforms\",\n \"caniuse\": \"transforms2d\",\n \"tags\": [\"css\"]\n}\n!*/\n\n Modernizr.addTest('csstransforms', function() {\n // Android < 3.0 is buggy, so we sniff and blacklist\n // http://git.io/hHzL7w\n return navigator.userAgent.indexOf('Android 2.') === -1 &&\n testAllProps('transform', 'scale(1)', true);\n });\n\n\n /**\n * testStyles injects an element with style element and some CSS rules\n *\n * @memberof Modernizr\n * @name Modernizr.testStyles\n * @optionName Modernizr.testStyles()\n * @optionProp testStyles\n * @access public\n * @function testStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n * @example\n *\n * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n * along with (possibly multiple) DOM elements. This lets you check for features\n * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n *\n * ```js\n * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n * // elem is the first DOM node in the page (by default #modernizr)\n * // rule is the first argument you supplied - the CSS rule in string form\n *\n * addTest('widthworks', elem.style.width === '9px')\n * });\n * ```\n *\n * If your test requires multiple nodes, you can include a third argument\n * indicating how many additional div elements to include on the page. The\n * additional nodes are injected as children of the `elem` that is returned as\n * the first argument to the callback.\n *\n * ```js\n * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n * document.getElementById('modernizr').style.width === '1px'; // true\n * document.getElementById('modernizr2').style.width === '2px'; // true\n * elem.firstChild === document.getElementById('modernizr2'); // true\n * }, 1);\n * ```\n *\n * By default, all of the additional elements have an ID of `modernizr[n]`, where\n * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n * the second additional is `#modernizr3`, etc.).\n * If you want to have more meaningful IDs for your function, you can provide\n * them as the fourth argument, as an array of strings\n *\n * ```js\n * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n * elem.firstChild === document.getElementById('foo'); // true\n * elem.lastChild === document.getElementById('bar'); // true\n * }, 2, ['foo', 'bar']);\n * ```\n *\n */\n\n var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n \n/*!\n{\n \"name\": \"CSS Supports\",\n \"property\": \"supports\",\n \"caniuse\": \"css-featurequeries\",\n \"tags\": [\"css\"],\n \"builderAliases\": [\"css_supports\"],\n \"notes\": [{\n \"name\": \"W3 Spec\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n },{\n \"name\": \"Related Github Issue\",\n \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n },{\n \"name\": \"W3 Info\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n }]\n}\n!*/\n\n var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n var oldSyntax = 'supportsCSS' in window;\n Modernizr.addTest('supports', newSyntax || oldSyntax);\n\n/*!\n{\n \"name\": \"CSS Transforms 3D\",\n \"property\": \"csstransforms3d\",\n \"caniuse\": \"transforms3d\",\n \"tags\": [\"css\"],\n \"warnings\": [\n \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n ]\n}\n!*/\n\n Modernizr.addTest('csstransforms3d', function() {\n var ret = !!testAllProps('perspective', '1px', true);\n var usePrefix = Modernizr._config.usePrefixes;\n\n // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n // some conditions. As a result, Webkit typically recognizes the syntax but\n // will sometimes throw a false positive, thus we must do a more thorough check:\n if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n var mq;\n var defaultStyle = '#modernizr{width:0;height:0}';\n // Use CSS Conditional Rules if available\n if (Modernizr.supports) {\n mq = '@supports (perspective: 1px)';\n } else {\n // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n mq = '@media (transform-3d)';\n if (usePrefix) {\n mq += ',(-webkit-transform-3d)';\n }\n }\n\n mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\n testStyles(defaultStyle + mq, function(elem) {\n ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n });\n }\n\n return ret;\n });\n\n\n // Run each test\n testRunner();\n\n delete ModernizrProto.addTest;\n delete ModernizrProto.addAsyncTest;\n\n // Run the things that are supposed to run after the tests\n for (var i = 0; i < Modernizr._q.length; i++) {\n Modernizr._q[i]();\n }\n\n // Leak Modernizr namespace\n window.Modernizr = Modernizr;\n\n\n;\n\n})(window, document);\nmodule.exports = window.Modernizr;\n})(window);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../.modernizrrc\n ** module id = 18\n ** module chunks = 0\n **/","const raf = require('raf');\nconst context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst bubble = require('./bubble');\nconst cursor = require('./cursor');\nconst select = require('./select');\nconst { KEY, EV, PROPS } = require('./constant');\nconst text = require('./text');\nconst events = require('./events');\nconst utils = require('./utils');\n\nconst eventCopy = require('./editor/copy');\nconst eventPaste = require('./editor/paste');\nconst eventBackspace = require('./editor/backspace');\nconst eventDelete = require('./editor/delete');\n\nconst EVENTS = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n keydown: onKeydown,\n keypress: onKeypress,\n keyup: onKeyup,\n mscontrolselect: events.prevent,\n paste: eventPaste,\n resize: events.prevent,\n resizestart: events.prevent,\n};\n\nexports.init = function (nodeWrap) {\n const nodeEditor = nodeWrap;\n nodeEditor.setAttribute('contenteditable', 'true');\n nodeEditor.setAttribute('spellcheck', 'false');\n\n nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\n events.on(nodeEditor, EVENTS);\n\n return {\n addBubble: addBubble.bind(nodeEditor),\n editBubble: editBubble.bind(nodeEditor),\n inputValue: inputValue.bind(nodeEditor),\n removeBubble: removeBubble.bind(nodeEditor),\n setContent: setContent.bind(nodeEditor),\n };\n};\n\nexports.destroy = function (nodeEditor) {\n events.off(nodeEditor, EVENTS);\n};\n\nfunction onBlur(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n return events.prevent(event);\n }\n\n select.clear(nodeEditor);\n bubble.bubbling(nodeEditor);\n}\n\nfunction onFocus(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n events.prevent(event);\n delete nodeEditor[ PROPS.LOCK_COPY ];\n\n // Safary 10 не сбрасывает курсор без задержки\n raf(() => {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n });\n\n return false;\n }\n\n cursor.restore(nodeEditor);\n}\n\nfunction onKeyup(event) {\n const nodeEditor = event.currentTarget;\n const code = events.keyCode(event);\n const isPrintableChar = do {\n if (event.key) {\n event.key.length === 1;\n\n } else {\n ((code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd);\n }\n };\n\n if (isPrintableChar) {\n nodeEditor.fireInput();\n }\n}\n\nfunction onKeypress(event) {\n const code = events.keyCode(event);\n const nodeEditor = event.currentTarget;\n\n /* eslint no-case-declarations: 0 */\n switch (code) {\n case KEY.Enter:\n event.preventDefault();\n if (!nodeEditor.options('disableControls')) {\n if (!editBubbleKeyboardEvent(nodeEditor)) {\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n break;\n\n case KEY.Space:\n if (editBubbleKeyboardEvent(nodeEditor)) {\n event.preventDefault();\n }\n break;\n\n default:\n const separator = nodeEditor.options('separator');\n if (separator && separator.test(String.fromCharCode(code))) {\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n}\n\nfunction onKeydown(event) {\n const code = events.keyCode(event);\n const metaKey = events.metaKey(event);\n const nodeEditor = event.currentTarget;\n const enable = !nodeEditor.options('disableControls');\n\n switch (code) {\n case KEY.Esc:\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n break;\n\n case KEY.Backspace:\n event.preventDefault();\n eventBackspace(event);\n break;\n\n case KEY.Delete:\n event.preventDefault();\n eventDelete(event);\n break;\n\n case KEY.Left:\n event.preventDefault();\n arrowLeft(event);\n break;\n\n // сдвигаем курсор в начало списка\n case KEY.Top:\n event.preventDefault();\n if (enable) {\n const headBubble = bubbleset.headBubble(nodeEditor);\n headBubble && select.uniq(headBubble);\n }\n break;\n\n case KEY.Right:\n event.preventDefault();\n arrowRight(event);\n break;\n\n // сдвигаем курсор в конец списка\n // case KEY.Tab:\n case KEY.Bottom:\n event.preventDefault();\n if (enable && select.has(nodeEditor)) {\n cursor.restore(nodeEditor);\n }\n break;\n\n case KEY.a:\n if (metaKey) {\n event.preventDefault();\n\n if (!text.selectAll(null, event.currentTarget)) {\n select.all(nodeEditor);\n }\n }\n break;\n\n case KEY.c:\n if (metaKey) {\n eventCopy(event);\n }\n break;\n\n case KEY.x:\n if (metaKey) {\n eventCopy(event, () => eventDelete(event));\n }\n break;\n }\n}\n\nfunction arrowLeft(event) {\n const selection = context.getSelection();\n\n if (text.arrowLeft(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ 0 ] === nodeSet.startRangeSelect) {\n list[ list.length - 1 ];\n\n } else {\n list[ 0 ];\n }\n };\n\n const node = bubbleset.prevBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n }\n}\n\nfunction arrowRight(event) {\n const selection = context.getSelection();\n\n if (text.arrowRight(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.nextBubble(selection.focusNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ list.length - 1 ] === nodeSet.startRangeSelect) {\n list[ 0 ];\n\n } else {\n list[ list.length - 1 ];\n }\n };\n\n const node = bubbleset.nextBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n\n } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n select.clear(nodeSet);\n selection.collapse(begin.nextSibling, 0);\n\n } else {\n cursor.restore(nodeSet);\n }\n}\n\nfunction onClick(event) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet) {\n return;\n }\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (nodeBubble) {\n const clickTime = Date.now();\n const isDblclick = nodeSet[ PROPS.CLICK_TIME ] && (clickTime - nodeSet[ PROPS.CLICK_TIME ]) < 200;\n\n nodeSet[ PROPS.CLICK_TIME ] = clickTime;\n\n if (events.metaKey(event)) {\n select.add(nodeBubble);\n\n } else if (event.shiftKey) {\n if (!nodeSet.startRangeSelect) {\n select.uniq(nodeBubble);\n\n } else {\n select.range(nodeBubble);\n }\n\n } else if (isDblclick) {\n bubble.edit(nodeSet, nodeBubble);\n\n } else {\n select.toggleUniq(nodeBubble);\n }\n\n } else {\n select.clear(nodeSet);\n\n const selection = context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n cursor.restore(nodeSet);\n }\n }\n}\n\nfunction editBubbleKeyboardEvent(nodeEditor) {\n const selection = context.getSelection();\n\n if (!selection || !selection.rangeCount) {\n const list = select.get(nodeEditor);\n\n if (list.length === 1) {\n return bubble.edit(nodeEditor, list[0]);\n }\n }\n\n return false;\n}\n\nfunction setContent(data) {\n var selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n data = text.html2text(data);\n this.appendChild(this.ownerDocument.createTextNode(data));\n bubble.bubbling(this);\n cursor.restore(this);\n}\n\nfunction addBubble(bubbleText, dataAttributes) {\n const nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n if (!nodeBubble) {\n return false;\n }\n\n if (text.text2bubble(this, nodeBubble)) {\n this.fireInput();\n this.fireChange();\n cursor.restore(this);\n return true;\n }\n\n return false;\n}\n\nfunction removeBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n this.removeChild(nodeBubble);\n this.fireChange();\n return true;\n }\n\n return false;\n}\n\nfunction editBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n return bubble.edit(this, nodeBubble);\n }\n\n return false;\n}\n\nfunction inputValue() {\n const textRange = text.currentTextRange(this);\n return textRange && text.textClean(textRange.toString()) || '';\n}\n\n/**\n * Генерация события редактирования бабла.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireEdit\n * @param {HTMLElement} nodeBubble нода бабл\n * @this HTMLElement\n * @private\n */\nfunction fireEdit(nodeBubble) {\n events.dispatch(this, EV.BUBBLE_EDIT, {\n bubbles: false,\n cancelable: false,\n detail: { data: nodeBubble }\n });\n}\n\n/**\n * Генерация события изменения набора баблов.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireChange\n * @this HTMLElement\n * @private\n */\nfunction fireChange() {\n events.dispatch(this, EV.CHANGE, {\n bubbles: false,\n cancelable: false\n });\n}\n\n/**\n * Генерация события ввода текста.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireInput\n * @this HTMLElement\n * @private\n */\nfunction fireInput() {\n const editText = inputValue.call(this);\n\n if (this[ PROPS.BUBBLE_VALUE ] !== editText) {\n this[ PROPS.BUBBLE_VALUE ] = editText;\n\n events.dispatch(this, EV.BUBBLE_INPUT, {\n bubbles: false,\n cancelable: false,\n detail: { data: editText }\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor.js\n **/","/**\n * @module x-bubbles/cursor\n */\n\nconst context = require('../context');\nconst text = require('./text');\nconst select = require('./select');\n\nexports.restore = restore;\nexports.restoreBasis = restoreBasis;\n\n/**\n * Reset the cursor position to the end of the input field.\n * @alias module:x-bubbles/cursor.restore\n * @param {HTMLElement} nodeSet\n */\nfunction restore(nodeSet) {\n select.clear(nodeSet);\n const basis = restoreBasis(nodeSet);\n const selection = context.getSelection();\n selection.removeAllRanges();\n selection.collapse(basis, 1);\n}\n\n/**\n * The creation of the fake text at the end childNodes\n * @alias module:x-bubbles/cursor.restoreBasis\n * @param {HTMLElement} nodeSet\n * @returns {HTMLTextElement} fake text node\n */\nfunction restoreBasis(nodeSet) {\n let fakeText = text.createZws();\n\n if (nodeSet.hasChildNodes()) {\n const lastNode = nodeSet.childNodes[ nodeSet.childNodes.length - 1 ];\n\n if (lastNode.isEqualNode(fakeText)) {\n fakeText = lastNode;\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n return fakeText;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/cursor.js\n **/","const raf = require('raf');\nconst events = require('../events');\nconst select = require('../select');\nconst { PROPS } = require('../constant');\nconst utils = require('../utils');\n\nmodule.exports = function (event, callback = function () {}) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n return false;\n }\n\n const list = select.get(nodeEditor);\n\n if (!list.length) {\n return false;\n }\n\n const bubbleCopy = nodeEditor.options('bubbleCopy');\n const value = bubbleCopy(list);\n\n if (!value) {\n return false;\n }\n\n nodeEditor[ PROPS.LOCK_COPY ] = true;\n\n const target = nodeEditor.ownerDocument.createElement('input');\n target.value = value;\n target.style.cssText = `\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;`;\n\n nodeEditor.parentNode.appendChild(target);\n\n events.one(target, {\n keyup: () => nodeEditor.focus(),\n blur: () => {\n removeNode(target);\n raf(callback);\n }\n });\n\n target.select();\n return true;\n};\n\nfunction removeNode(node) {\n node && node.parentNode && node.parentNode.removeChild(node);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/copy.js\n **/","const raf = require('raf');\nconst context = require('../../context');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst text = require('../text');\nconst { isIE } = require('../utils');\n\nmodule.exports = function (event) {\n event.preventDefault();\n const nodeEditor = event.currentTarget;\n\n if (context.clipboardData && context.clipboardData.getData) {\n onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\n } else if (event.clipboardData) {\n const contentType = 'text/plain';\n const clipboardData = event.clipboardData;\n const data = clipboardData.getData && clipboardData.getData(contentType);\n\n if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n Array.prototype.slice.call(clipboardData.items)\n .filter(item => item.kind === 'string' && item.type === contentType)\n .some(function (item) {\n item.getAsString(function (dataText) {\n onPasteSuccess(nodeEditor, dataText);\n });\n\n return true;\n });\n }\n }\n};\n\nfunction onPasteSuccess(nodeEditor, dataText) {\n const checkBubblePaste = nodeEditor.options('checkBubblePaste');\n const selection = context.getSelection();\n const isBubbling = do {\n if (dataText && selection.isCollapsed && !nodeEditor.inputValue) {\n checkBubblePaste(dataText);\n\n } else {\n false;\n }\n };\n\n if (text.replaceString(dataText, selection)) {\n if (isBubbling) {\n if (isIE) {\n raf(() => onReplaceSuccess(nodeEditor));\n\n } else {\n onReplaceSuccess(nodeEditor);\n }\n\n } else {\n nodeEditor.fireInput();\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction onReplaceSuccess(nodeEditor) {\n bubble.bubbling(nodeEditor);\n nodeEditor.focus();\n raf(() => cursor.restore(nodeEditor));\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/paste.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Backspace.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowLeft(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleLeft(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/backspace.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Delete.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowRight(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleRight(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/delete.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///x-bubbles.min.js","webpack:///webpack/bootstrap 97b5e590f2bc754a9c50","webpack:///./index.js","webpack:///./context.js","webpack:///./core/drag.js","webpack:///./core/drag/native.js","webpack:///./core/select.js","webpack:///./core/bubble.js","webpack:///./core/text.js","webpack:///./core/bubbleset.js","webpack:///./core/utils.js","webpack:///../~/raf/index.js","webpack:///../~/performance-now/lib/performance-now.js","webpack:///../~/process/browser.js","webpack:///./core/events.js","webpack:///./polyfills/CustomEventCommon.js","webpack:///./core/constant.js","webpack:///./core/drag/common.js","webpack:///./core/drag/bubbles.png","webpack:///./core/drag/mouse.js","webpack:///../.modernizrrc","webpack:///./core/editor.js","webpack:///./core/cursor.js","webpack:///./core/editor/copy.js","webpack:///./core/editor/paste.js","webpack:///./core/editor/backspace.js","webpack:///./core/editor/delete.js"],"names":["XBubbles","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","optionsPrepare","options","name","OPTIONS","_OPTIONS$name","_slicedToArray","type","def","OPTIONS_PREPARE","initEditor","node","editor","Object","defineProperty","configurable","value","init","destroyEditor","destroy","bubbleCopyOption","list","map","item","innerHTML","join","checkBubblePasteOption","sliceIterator","arr","i","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","_typeof","obj","constructor","prototype","context","drag","bubble","bubbleset","begining","bubbleCopy","bubbleDeformation","bubbleFormation","checkBubblePaste","classBubble","disableControls","draggable","ending","separator","tokenizer","create","HTMLDivElement","createdCallback","this","attachedCallback","bubbling","detachedCallback","_options","optionName","attrName","hasAttribute","getAttribute","items","get","getBubbles","inputValue","setContent","data","addBubble","bubbleText","removeBubble","nodeBubble","editBubble","document","registerElement","extends","func","Function","bool","noop","reg","match","RegExp","str","String","eval","native","mouse","_require","canUseDrag","nodeSet","onDragstart","event","stopPropagation","closestNodeSet","target","closestNodeBubble","preventDefault","selection","getSelection","removeAllRanges","currentDragSet","classList","add","CLS","DRAGSTART","select","dataTransfer","effectAllowed","setData","setDragImage","getDragImage","DRAG_IMG","w","h","onDrop","forEach","appendChild","setTimeout","onDropSuccess","onDragover","dropEffect","onDragenter","DROPZONE","onDragleave","remove","onDragend","events","_require2","EVENTS","dragend","dragenter","dragleave","dragover","dragstart","drop","on","off","range","isBubbleNode","set","parentNode","uniq","clear","headList","lastList","startRangeSelect","fromNode","toNode","position","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","setSelected","nextSibling","all","slice","querySelectorAll","PATH_NOT_SELECTED","querySelector","PATH_SELECTED","has","Boolean","head","last","removeAttribute","toggleUniq","isSelected","removeSelected","setAttribute","nodeType","ELEMENT_NODE","edit","rangeParams","dataText","text","textClean","innerText","startOffset","endOffset","textFake","createZws","textNode","createTextNode","fireEdit","replaceChild","insertBefore","createRange","setStart","setEnd","addRange","dataAttributes","arguments","wrap","ownerDocument","createElement","key","escape","classes","trim","split","len","ranges","getBubbleRanges","nodes","toString","deleteContents","textParts","trimIterator","filter","nonEmptyIterator","reduce","parts","concat","parseFragmentByEnding","parseFragmentByBeginning","fragment","createDocumentFragment","textPart","insertNode","fireInput","fireChange","children","childNodes","setEndBefore","setStartBefore","setEndAfter","lastIndex","loop","exec","substring","res","index","text2bubble","nodeEditor","currentTextRange","replace","pointNode","focusNode","TEXT_NODE","anchorNode","startNode","endNode","previousSibling","rangeCount","anchor","getRangeAt","surroundContents","nodeValue","collapse","replaceString","arrowLeft","extend","_selectionCorrect","selectionCorrect","revert","isCollapsed","isNativeExtend","offset","checkZws","arrowRight","_selectionCorrect2","html2text","DOMContainer","implementation","createHTMLDocument","body","selectAll","hasBubbles","TEXT_ZWS","REG_ZWS","test","REG_REPLACE_NON_PRINTABLE","anchorOffset","focusOffset","Math","min","max","lastBubble","headBubble","findBubbleLeft","DOCUMENT_POSITION_FOLLOWING","findBubbleRight","isEditorNode","prevBubble","nextBubble","unescapeHtmlChar","chr","HTML_UNESCAPES","escapeHtmlChar","HTML_ESCAPES","raf","&","<",">","\"","'","`","&","<",">",""","'","`","REG_ESCAPED_HTML","REG_UNESCAPED_HTML","REG_HAS_ESCAPED_HTML","source","REG_HAS_UNESCAPED_HTML","REG_IE","DOCUMENT_POSITION_CONTAINED_BY","throttle","callback","runContext","animationCallback","apply","unescape","navigator","userAgent","isIE","global","now","root","window","vendors","suffix","caf","queue","frameDuration","_now","cp","cancelled","e","round","handle","fn","cancel","polyfill","requestAnimationFrame","cancelAnimationFrame","process","getNanoSeconds","hrtime","loadTime","performance","hr","Date","getTime","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","timeout","run","Item","array","nextTick","args","title","browser","env","argv","version","versions","addListener","once","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","_defineProperty","enumerable","writable","scrollX","html","documentElement","scrollLeft","clientLeft","scrollY","scrollTop","clientTop","dispatch","element","params","dispatchEvent","Custom","oneCallback","eventName","_callback","removeEventListener","CustomEventCommon","keyCode","charCode","metaKey","ctrlKey","pageX","clientX","pageY","clientY","one","addEventListener","prevent","cancelBubble","returnValue","stopImmediatePropagation","CustomEvent","doc","protoEvent","Event","issetCustomEvent","createEvent","immediatePropagationStopped","bubbles","cancelable","evt","initCustomEvent","detail","initEvent","KEY","a","Backspace","Bottom","Cmd","Comma","Delete","Enter","Esc","Left","Right","Semicolon","Space","Tab","Top","x","EV","BUBBLE_EDIT","BUBBLE_INPUT","CHANGE","DRAGEND","DRAGENTER","DRAGLEAVE","DROP","PROPS","BUBBLE_VALUE","CLICK_TIME","LOCK_COPY","dragImage","Image","src","fromNodeSet","toNodeSet","focus","onMousedown","__drag__","onMouseup","bind","onMousemove","utils","onScroll","nodeOffsetX","offsetX","nodeOffsetY","offsetY","y","currentMoveSet","currentDragElement","dragSet","removeChild","_","moveElement","cloneNode","style","cssText","Modernizr","csstransforms3d","transform","csstransforms","top","left","is","testRunner","featureNames","feature","aliasIdx","result","nameIdx","featureName","featureNameSplit","featureIdx","tests","hasOwnProperty","toLowerCase","aliases","contains","substr","indexOf","isSVG","createElementNS","getBody","fake","injectElementWithStyles","rule","testnames","ret","docOverflow","mod","div","parseInt","styleSheet","background","overflow","docElement","offsetHeight","domToCSS","m1","nativeTestProps","props","CSS","supports","conditionText","getComputedStyle","cssToDOM","m2","toUpperCase","testProps","prefixed","skipValueTest","cleanElems","afterInit","mStyle","modElem","propsLength","prop","before","elems","shift","fnBind","that","testDOMProps","elem","testPropsAll","ucProp","charAt","cssomPrefixes","testAllProps","ModernizrProto","_version","_config","classPrefix","enableClasses","enableJSClass","usePrefixes","_q","cb","self","addTest","addAsyncTest","omPrefixes","_cssomPrefixes","nodeName","unshift","domPrefixes","_domPrefixes","testStyles","newSyntax","oldSyntax","usePrefix","mq","defaultStyle","offsetWidth","onBlur","currentTarget","onFocus","cursor","restore","onKeyup","code","isPrintableChar","onKeypress","editBubbleKeyboardEvent","fromCharCode","onKeydown","enable","eventBackspace","eventDelete","eventCopy","shiftKey","begin","onClick","clickTime","isDblclick","firstChild","textRange","editText","eventPaste","blur","click","keydown","keypress","keyup","mscontrolselect","paste","resize","resizestart","nodeWrap","basis","restoreBasis","fakeText","hasChildNodes","lastNode","isEqualNode","removeNode","onPasteSuccess","isBubbling","onReplaceSuccess","clipboardData","getData","contentType","kind","some","getAsString","removeBubbles"],"mappings":"AAAA,GAAIA,UACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAASI,EAAQD,EAASH,GAE/B,YEwHD,SAASW,GAAeC,GACpB,IAAK,GAAIC,KAAQC,GAAS,IAAAC,GAAAC,EACAF,EAASD,GADT,GACdI,EADcF,EAAA,GACRG,EADQH,EAAA,EAEtBH,GAASC,GAASM,EAAiBF,GAAOL,EAASC,IACpB,mBAApBD,GAASC,KAChBD,EAASC,GAASK,IAK9B,QAASE,GAAWC,GACXA,EAAKC,QACNC,OAAOC,eAAeH,EAAM,UACxBI,cAAc,EAC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ackBootstrap\n/******/ \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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _slicedToArray = function () { function sliceIterator(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\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar context = __webpack_require__(1);\n\tvar drag = __webpack_require__(2);\n\tvar editor = __webpack_require__(19);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar OPTIONS = {\n\t begining: ['reg', null, 'begining'],\n\t bubbleCopy: ['func', bubbleCopyOption, 'bubble-copy'],\n\t bubbleDeformation: ['func', function () {}, 'bubble-deformation'],\n\t bubbleFormation: ['func', function () {}, 'bubble-formation'],\n\t checkBubblePaste: ['func', checkBubblePasteOption, 'check-bubble-paste'],\n\t classBubble: ['str', 'bubble', 'class-bubble'],\n\t disableControls: ['bool', false, 'disable-controls'],\n\t draggable: ['bool', true, 'draggable'],\n\t ending: ['reg', null, 'ending'], // /\\@ya\\.ru/g;\n\t separator: ['reg', /[,;]/, 'separator'],\n\t tokenizer: ['func', null, 'tokenizer']\n\t};\n\t\n\tvar XBubbles = Object.create(HTMLDivElement.prototype, {\n\t createdCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t }\n\t },\n\t\n\t attachedCallback: {\n\t value: function value() {\n\t initEditor(this);\n\t drag.init(this);\n\t bubble.bubbling(this);\n\t }\n\t },\n\t\n\t detachedCallback: {\n\t value: function value() {\n\t drag.destroy(this);\n\t destroyEditor(this);\n\t }\n\t },\n\t\n\t /*\n\t attributeChangedCallback: {\n\t value: function (name, prevValue, value) {}\n\t },\n\t */\n\t\n\t options: {\n\t value: function value(name, _value) {\n\t if (!this._options) {\n\t this._options = {};\n\t\n\t for (var optionName in OPTIONS) {\n\t this._options[optionName] = undefined;\n\t\n\t var attrName = 'data-' + OPTIONS[optionName][2];\n\t if (this.hasAttribute(attrName)) {\n\t this._options[optionName] = this.getAttribute(attrName);\n\t }\n\t }\n\t\n\t optionsPrepare(this._options);\n\t }\n\t\n\t if (typeof _value !== 'undefined') {\n\t this._options[name] = _value;\n\t optionsPrepare(this._options);\n\t } else {\n\t return this._options[name];\n\t }\n\t }\n\t },\n\t\n\t items: {\n\t get: function get() {\n\t return bubbleset.getBubbles(this);\n\t }\n\t },\n\t\n\t inputValue: {\n\t get: function get() {\n\t return this.editor.inputValue();\n\t }\n\t },\n\t\n\t setContent: {\n\t value: function value(data) {\n\t return this.editor.setContent(data);\n\t }\n\t },\n\t\n\t addBubble: {\n\t value: function value(bubbleText, data) {\n\t return this.editor.addBubble(bubbleText, data);\n\t }\n\t },\n\t\n\t removeBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.removeBubble(nodeBubble);\n\t }\n\t },\n\t\n\t editBubble: {\n\t value: function value(nodeBubble) {\n\t return this.editor.editBubble(nodeBubble);\n\t }\n\t }\n\t});\n\t\n\tmodule.exports = context.document.registerElement('x-bubbles', {\n\t extends: 'div',\n\t prototype: XBubbles\n\t});\n\t\n\tvar OPTIONS_PREPARE = {\n\t func: function func(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return new Function('context', 'return context.' + value + ';')(context);\n\t\n\t case 'function':\n\t return value;\n\t }\n\t },\n\t bool: function bool(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t return value === 'true' || value === 'on';\n\t\n\t case 'boolean':\n\t return value;\n\t }\n\t },\n\t noop: function noop(value) {\n\t return value;\n\t },\n\t reg: function reg(value) {\n\t var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\t switch (type) {\n\t case 'string':\n\t if (value) {\n\t var match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n\t if (match) {\n\t return new RegExp(match[1], match[2]);\n\t }\n\t }\n\t\n\t return null;\n\t\n\t case 'object':\n\t if (value instanceof context.RegExp || value === null) {\n\t return value;\n\t }\n\t }\n\t },\n\t str: function str(value) {\n\t if (typeof value !== 'undefined') {\n\t return value ? String(value) : '';\n\t }\n\t }\n\t};\n\t\n\tfunction optionsPrepare(options) {\n\t for (var name in OPTIONS) {\n\t var _OPTIONS$name = _slicedToArray(OPTIONS[name], 2),\n\t type = _OPTIONS$name[0],\n\t def = _OPTIONS$name[1];\n\t\n\t options[name] = OPTIONS_PREPARE[type](options[name]);\n\t if (typeof options[name] === 'undefined') {\n\t options[name] = def;\n\t }\n\t }\n\t}\n\t\n\tfunction initEditor(node) {\n\t if (!node.editor) {\n\t Object.defineProperty(node, 'editor', {\n\t configurable: true,\n\t value: editor.init(node)\n\t });\n\t }\n\t}\n\t\n\tfunction destroyEditor(node) {\n\t if (node.editor) {\n\t editor.destroy(node);\n\t delete node.editor;\n\t }\n\t}\n\t\n\tfunction bubbleCopyOption(list) {\n\t return list.map(function (item) {\n\t return item.innerHTML;\n\t }).join(', ');\n\t}\n\t\n\tfunction checkBubblePasteOption() {\n\t return true;\n\t}\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function () {\n\t /* eslint no-eval: 0 */\n\t return this || (1, eval)('this');\n\t}();\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar native = __webpack_require__(3);\n\tvar mouse = __webpack_require__(17);\n\t\n\tvar _require = __webpack_require__(8),\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.init = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.init(nodeSet);\n\t }\n\t\n\t return mouse.init(nodeSet);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t if (canUseDrag) {\n\t return native.destroy(nodeSet);\n\t }\n\t\n\t return mouse.destroy(nodeSet);\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar events = __webpack_require__(12);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar EVENTS = {\n\t dragend: onDragend,\n\t dragenter: onDragenter,\n\t dragleave: onDragleave,\n\t dragover: onDragover,\n\t dragstart: onDragstart,\n\t drop: onDrop\n\t};\n\t\n\tvar currentDragSet = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, EVENTS);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, EVENTS);\n\t};\n\t\n\tfunction onDragstart(event) {\n\t event.stopPropagation();\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (!nodeSet || !nodeBubble) {\n\t event.preventDefault();\n\t return;\n\t }\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = nodeSet;\n\t nodeSet.classList.add(CLS.DRAGSTART);\n\t select.add(nodeBubble);\n\t\n\t event.dataTransfer.effectAllowed = 'move';\n\t event.dataTransfer.setData('text/plain', '');\n\t\n\t var list = select.get(currentDragSet);\n\t if (list.length > 1) {\n\t event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n\t }\n\t}\n\t\n\tfunction onDrop(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet || nodeSet === currentDragSet) {\n\t return;\n\t }\n\t\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t}\n\t\n\tfunction onDragover(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t event.dataTransfer.dropEffect = 'move';\n\t}\n\t\n\tfunction onDragenter(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragleave(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t}\n\t\n\tfunction onDragend(event) {\n\t event.stopPropagation();\n\t event.preventDefault();\n\t\n\t if (!currentDragSet) {\n\t return;\n\t }\n\t\n\t currentDragSet.classList.remove(CLS.DRAGSTART);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t nodeSet.classList.remove(CLS.DROPZONE);\n\t }\n\t\n\t currentDragSet = null;\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar slice = Array.prototype.slice;\n\tvar PATH_SELECTED = '[bubble][selected]';\n\tvar PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\t\n\texports.all = all;\n\texports.add = add;\n\texports.clear = clear;\n\texports.get = get;\n\texports.uniq = uniq;\n\texports.head = head;\n\texports.last = last;\n\texports.has = has;\n\texports.range = range;\n\texports.toggleUniq = toggleUniq;\n\t\n\tfunction range(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return;\n\t }\n\t\n\t var set = node.parentNode;\n\t var list = get(set);\n\t\n\t if (!list.length) {\n\t uniq(node);\n\t return;\n\t }\n\t\n\t clear(set);\n\t\n\t var headList = list[0];\n\t var lastList = list[list.length - 1];\n\t\n\t if (headList === lastList || !set.startRangeSelect) {\n\t set.startRangeSelect = headList;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var position = node.compareDocumentPosition(set.startRangeSelect);\n\t\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t fromNode = set.startRangeSelect;\n\t toNode = node;\n\t } else {\n\t fromNode = node;\n\t toNode = set.startRangeSelect;\n\t }\n\t\n\t if (fromNode && toNode) {\n\t var item = fromNode;\n\t\n\t while (item) {\n\t if (!setSelected(item)) {\n\t break;\n\t }\n\t\n\t if (item === toNode) {\n\t break;\n\t }\n\t\n\t item = item.nextSibling;\n\t }\n\t\n\t bubble.bubbling(set);\n\t }\n\t}\n\t\n\tfunction all(nodeSet) {\n\t slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(function (item) {\n\t return setSelected(item);\n\t });\n\t nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\t\n\t bubble.bubbling(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t}\n\t\n\tfunction has(nodeSet) {\n\t return Boolean(nodeSet.querySelector(PATH_SELECTED));\n\t}\n\t\n\tfunction head(set) {\n\t return get(set)[0];\n\t}\n\t\n\tfunction last(set) {\n\t var list = get(set);\n\t return list[list.length - 1];\n\t}\n\t\n\tfunction get(nodeSet) {\n\t return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n\t}\n\t\n\tfunction clear(nodeSet) {\n\t get(nodeSet).forEach(function (item) {\n\t return item.removeAttribute('selected');\n\t });\n\t}\n\t\n\tfunction add(node) {\n\t if (setSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t nodeSet.startRangeSelect = node;\n\t // ???\n\t bubble.bubbling(nodeSet);\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction uniq(node) {\n\t if (!bubble.isBubbleNode(node)) {\n\t return false;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t var selection = context.getSelection();\n\t\n\t selection && selection.removeAllRanges();\n\t clear(nodeSet);\n\t\n\t return add(node);\n\t}\n\t\n\tfunction toggleUniq(node) {\n\t if (isSelected(node)) {\n\t var nodeSet = bubbleset.closestNodeSet(node);\n\t\n\t if (get(nodeSet).length === 1) {\n\t return removeSelected(node);\n\t }\n\t }\n\t\n\t return uniq(node);\n\t}\n\t\n\tfunction isSelected(node) {\n\t return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n\t}\n\t\n\tfunction setSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.setAttribute('selected', '');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeSelected(node) {\n\t if (bubble.isBubbleNode(node)) {\n\t node.removeAttribute('selected');\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t escape = _require.escape,\n\t canUseDrag = _require.canUseDrag;\n\t\n\texports.isBubbleNode = isBubbleNode;\n\texports.bubbling = bubbling;\n\texports.create = create;\n\texports.edit = edit;\n\t\n\tfunction isBubbleNode(node) {\n\t if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n\t return false;\n\t }\n\t\n\t return node.hasAttribute('bubble');\n\t}\n\t\n\tfunction edit(nodeSet, nodeBubble) {\n\t if (nodeBubble.hasAttribute('readonly')) {\n\t return false;\n\t }\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection) {\n\t return false;\n\t }\n\t\n\t var bubbleDeformation = nodeSet.options('bubbleDeformation');\n\t var rangeParams = bubbleDeformation(nodeBubble);\n\t\n\t if (!rangeParams) {\n\t var dataText = text.textClean(nodeBubble.innerText);\n\t\n\t rangeParams = {\n\t text: dataText,\n\t startOffset: 0,\n\t endOffset: dataText.length\n\t };\n\t }\n\t\n\t var textFake = text.createZws();\n\t var textNode = context.document.createTextNode(rangeParams.text);\n\t\n\t nodeSet.fireEdit(nodeBubble);\n\t nodeSet.replaceChild(textNode, nodeBubble);\n\t nodeSet.insertBefore(textFake, textNode);\n\t\n\t var range = context.document.createRange();\n\t range.setStart(textNode, rangeParams.startOffset);\n\t range.setEnd(textNode, rangeParams.endOffset);\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t}\n\t\n\t/**\n\t * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n\t * @param {[type]} nodeSet [description]\n\t * @param {[type]} dataText [description]\n\t * @param {Object} [dataAttributes={}] [description]\n\t * @returns {[type]} [description]\n\t */\n\tfunction create(nodeSet, dataText) {\n\t var dataAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t dataText = text.textClean(dataText);\n\t\n\t if (!dataText) {\n\t return;\n\t }\n\t\n\t var bubbleFormation = nodeSet.options('bubbleFormation');\n\t var classBubble = nodeSet.options('classBubble');\n\t var draggable = canUseDrag && nodeSet.options('draggable');\n\t var wrap = nodeSet.ownerDocument.createElement('span');\n\t\n\t wrap.innerText = dataText;\n\t\n\t for (var key in dataAttributes) {\n\t if (dataAttributes[key]) {\n\t wrap.setAttribute('data-' + key, escape(dataAttributes[key]));\n\t }\n\t }\n\t\n\t bubbleFormation(wrap);\n\t\n\t if (classBubble) {\n\t var classes = String(classBubble).trim().split(/\\s+/);\n\t var len = classes.length;\n\t\n\t while (len--) {\n\t wrap.classList.add(classes[len]);\n\t }\n\t }\n\t\n\t wrap.setAttribute('bubble', '');\n\t wrap.setAttribute('contenteditable', 'false');\n\t draggable && wrap.setAttribute('draggable', 'true');\n\t\n\t return wrap;\n\t}\n\t\n\tfunction bubbling(nodeSet) {\n\t var begining = nodeSet.options('begining');\n\t var ending = nodeSet.options('ending');\n\t var separator = nodeSet.options('separator');\n\t var tokenizer = nodeSet.options('tokenizer');\n\t var ranges = getBubbleRanges(nodeSet);\n\t var nodes = [];\n\t\n\t ranges.forEach(function (range) {\n\t var dataText = text.textClean(range.toString());\n\t\n\t if (!dataText) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var textParts = [dataText];\n\t\n\t if (tokenizer) {\n\t textParts = tokenizer(dataText);\n\t } else {\n\t if (separator) {\n\t textParts = dataText.split(separator).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t\n\t if (ending) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByEnding(str, ending));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t } else if (begining) {\n\t textParts = textParts.reduce(function (parts, str) {\n\t return parts.concat(parseFragmentByBeginning(str, begining));\n\t }, []).map(trimIterator).filter(nonEmptyIterator);\n\t }\n\t }\n\t\n\t if (!Array.isArray(textParts) || !textParts.length) {\n\t range.deleteContents();\n\t return;\n\t }\n\t\n\t var fragment = context.document.createDocumentFragment();\n\t\n\t textParts.forEach(function (textPart) {\n\t var nodeBubble = create(nodeSet, textPart);\n\t if (nodeBubble) {\n\t fragment.appendChild(nodeBubble);\n\t nodes.push(nodeBubble);\n\t }\n\t });\n\t\n\t range.deleteContents();\n\t range.insertNode(fragment);\n\t });\n\t\n\t nodeSet.fireInput();\n\t\n\t if (nodes.length) {\n\t nodeSet.fireChange();\n\t }\n\t\n\t return nodes;\n\t}\n\t\n\tfunction getBubbleRanges(nodeSet) {\n\t var ranges = [];\n\t var children = nodeSet.childNodes;\n\t var range = void 0;\n\t var node = void 0;\n\t\n\t for (var i = 0; i < children.length; i++) {\n\t node = children[i];\n\t\n\t if (isBubbleNode(node)) {\n\t if (range) {\n\t range.setEndBefore(node);\n\t ranges.push(range);\n\t range = undefined;\n\t }\n\t } else {\n\t if (!range) {\n\t range = context.document.createRange();\n\t range.setStartBefore(node);\n\t }\n\t }\n\t }\n\t\n\t if (range) {\n\t range.setEndAfter(node);\n\t ranges.push(range);\n\t }\n\t\n\t return ranges;\n\t}\n\t\n\tfunction trimIterator(str) {\n\t return str.trim();\n\t}\n\t\n\tfunction nonEmptyIterator(str) {\n\t return Boolean(str);\n\t}\n\t\n\tfunction parseFragmentByEnding(str, reg) {\n\t var parts = [];\n\t var lastIndex = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while (reg.exec(str) !== null && loop) {\n\t loop--;\n\t parts.push(str.substring(lastIndex, reg.lastIndex));\n\t lastIndex = reg.lastIndex;\n\t }\n\t\n\t return parts;\n\t}\n\t\n\tfunction parseFragmentByBeginning(str, reg) {\n\t var parts = [];\n\t var res = void 0;\n\t var index = 0;\n\t var loop = 999;\n\t\n\t reg.lastIndex = 0;\n\t while ((res = reg.exec(str)) !== null && loop) {\n\t loop--;\n\t if (index !== res.index) {\n\t parts.push(str.substring(index, res.index));\n\t index = res.index;\n\t }\n\t }\n\t\n\t parts.push(str.substring(index, str.length));\n\t return parts;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\t\n\tvar _require = __webpack_require__(8),\n\t getSelection = _require.getSelection;\n\t\n\t/* eslint-disable max-len */\n\t\n\t\n\tvar REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08A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0CDF\\u0CE4\\u0CE5\\u0CF0\\u0CF3-\\u0D01\\u0D04\\u0D0D\\u0D11\\u0D3B\\u0D3C\\u0D45\\u0D49\\u0D4F-\\u0D56\\u0D58-\\u0D5F\\u0D64\\u0D65\\u0D76-\\u0D78\\u0D80\\u0D81\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DF1\\u0DF5-\\u0E00\\u0E3B-\\u0E3E\\u0E5C-\\u0E80\\u0E83\\u0E85\\u0E86\\u0E89\\u0E8B\\u0E8C\\u0E8E-\\u0E93\\u0E98\\u0EA0\\u0EA4\\u0EA6\\u0EA8\\u0EA9\\u0EAC\\u0EBA\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A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\uA8FF\\uA954-\\uA95E\\uA97D-\\uA97F\\uA9CE\\uA9DA-\\uA9DD\\uA9E0-\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A\\uAA5B\\uAA7C-\\uAA7F\\uAAC3-\\uAADA\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F-\\uABBF\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBC2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFE\\uFDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\n\tvar REG_ZWS = /\\u200B/;\n\tvar TEXT_ZWS = '\\u200B';\n\t\n\texports.arrowRight = arrowRight;\n\texports.arrowLeft = arrowLeft;\n\texports.remove = remove;\n\texports.html2text = html2text;\n\texports.currentTextRange = currentTextRange;\n\texports.text2bubble = text2bubble;\n\texports.replaceString = replaceString;\n\texports.selectAll = selectAll;\n\texports.textClean = textClean;\n\texports.checkZws = checkZws;\n\texports.createZws = createZws;\n\t\n\tfunction text2bubble(nodeEditor, nodeBubble) {\n\t var selection = getSelection(nodeEditor);\n\t var range = selection && currentTextRange(nodeEditor, selection);\n\t\n\t if (range) {\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t replace(selection, nodeBubble);\n\t } else {\n\t nodeEditor.appendChild(nodeBubble);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction currentTextRange(nodeEditor, selection) {\n\t selection = selection || getSelection(nodeEditor);\n\t if (!selection) {\n\t return;\n\t }\n\t\n\t var pointNode = selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE ? selection.focusNode : selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE ? selection.anchorNode : undefined;\n\t\n\t if (!pointNode) {\n\t return;\n\t }\n\t\n\t var startNode = pointNode;\n\t var endNode = pointNode;\n\t var item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t startNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = pointNode;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t endNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var range = nodeEditor.ownerDocument.createRange();\n\t range.setStartBefore(startNode);\n\t range.setEndAfter(endNode);\n\t\n\t return range;\n\t}\n\t\n\tfunction remove(selection) {\n\t return replace(selection, createZws());\n\t}\n\t\n\tfunction replace(selection, node) {\n\t if (!selection || !selection.rangeCount) {\n\t return false;\n\t }\n\t\n\t var anchor = context.document.createElement('span');\n\t selection.getRangeAt(0).surroundContents(anchor);\n\t anchor.parentNode.replaceChild(node, anchor);\n\t\n\t selection.removeAllRanges();\n\t\n\t if (node.nodeType === Node.TEXT_NODE) {\n\t var range = context.document.createRange();\n\t // для ИЕ обязательно указывать node.nodeValue.length\n\t range.setStart(node, node.nodeValue.length);\n\t range.collapse(false);\n\t selection.addRange(range);\n\t } else {\n\t selection.collapse(node, 0);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction replaceString(data, selection) {\n\t data = textClean(data);\n\t if (!data) {\n\t return false;\n\t }\n\t\n\t selection = selection || context.getSelection();\n\t var textNode = context.document.createTextNode(data);\n\t\n\t if (!replace(selection, textNode)) {\n\t return false;\n\t }\n\t\n\t selection.collapse(textNode, textNode.nodeValue.length);\n\t return true;\n\t}\n\t\n\tfunction arrowLeft(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect = selectionCorrect(selection),\n\t startNode = _selectionCorrect.startNode,\n\t endNode = _selectionCorrect.endNode,\n\t startOffset = _selectionCorrect.startOffset,\n\t endOffset = _selectionCorrect.endOffset,\n\t revert = _selectionCorrect.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(startNode, startOffset);\n\t return true;\n\t }\n\t\n\t var isNativeExtend = Boolean(selection.extend);\n\t revert = isNativeExtend ? revert : !revert;\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t if (offset === null) {\n\t offset = node.nodeValue.length;\n\t }\n\t\n\t if (offset - 1 < 0) {\n\t node = node.previousSibling;\n\t offset = null;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset - 1, offset);\n\t\n\t if (checkZws(text)) {\n\t offset = offset - 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node || offset === null) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t if (isNativeExtend) {\n\t selection.extend(node, offset - 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset - 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset - 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset - 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction arrowRight(selection, extend) {\n\t selection = selection || context.getSelection();\n\t\n\t if (!selection || !selection.focusNode || selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t return false;\n\t }\n\t\n\t var _selectionCorrect2 = selectionCorrect(selection),\n\t startNode = _selectionCorrect2.startNode,\n\t endNode = _selectionCorrect2.endNode,\n\t startOffset = _selectionCorrect2.startOffset,\n\t endOffset = _selectionCorrect2.endOffset,\n\t revert = _selectionCorrect2.revert;\n\t\n\t if (!selection.isCollapsed && !extend) {\n\t selection.collapse(endNode, endOffset);\n\t return true;\n\t }\n\t\n\t var node = revert ? startNode : endNode;\n\t var offset = revert ? startOffset : endOffset;\n\t\n\t while (node) {\n\t if (node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var len = node.nodeValue.length;\n\t\n\t if (offset + 1 > len) {\n\t node = node.nextSibling;\n\t offset = 0;\n\t continue;\n\t }\n\t\n\t var text = node.nodeValue.substring(offset, offset + 1);\n\t\n\t if (checkZws(text)) {\n\t offset = offset + 1;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (!node) {\n\t return false;\n\t }\n\t\n\t if (extend) {\n\t var isNativeExtend = Boolean(selection.extend);\n\t\n\t if (isNativeExtend) {\n\t selection.extend(node, offset + 1);\n\t } else {\n\t var range = context.document.createRange();\n\t\n\t if (revert) {\n\t range.setStart(node, offset + 1);\n\t range.setEnd(endNode, endOffset);\n\t } else {\n\t range.setStart(startNode, startOffset);\n\t range.setEnd(node, offset + 1);\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t }\n\t } else {\n\t selection.collapse(node, offset + 1);\n\t }\n\t\n\t return true;\n\t}\n\t\n\tfunction html2text(value) {\n\t if (!value) {\n\t return '';\n\t }\n\t\n\t var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n\t DOMContainer.innerText = value;\n\t\n\t return DOMContainer.innerText.replace(/^[\\u0020\\u00a0]+$/gm, '').replace(/\\n/gm, ' ').trim();\n\t}\n\t\n\tfunction selectAll(selection, nodeSet) {\n\t selection = selection || context.getSelection();\n\t var node = selection && selection.anchorNode;\n\t\n\t if (!node || node.nodeType !== Node.TEXT_NODE) {\n\t return false;\n\t }\n\t\n\t var fromNode = void 0;\n\t var toNode = void 0;\n\t var item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t fromNode = item;\n\t item = item.previousSibling;\n\t }\n\t\n\t item = node;\n\t\n\t while (item && item.nodeType === Node.TEXT_NODE) {\n\t toNode = item;\n\t item = item.nextSibling;\n\t }\n\t\n\t var hasBubbles = bubbleset.hasBubbles(nodeSet);\n\t var range = context.document.createRange();\n\t range.setStartBefore(fromNode);\n\t range.setEndAfter(toNode);\n\t\n\t var dataText = textClean(range.toString());\n\t\n\t if (dataText || !dataText && !hasBubbles) {\n\t if (!dataText) {\n\t range.collapse();\n\t }\n\t\n\t selection.removeAllRanges();\n\t selection.addRange(range);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction createZws() {\n\t return context.document.createTextNode(TEXT_ZWS);\n\t}\n\t\n\tfunction checkZws(value) {\n\t return REG_ZWS.test(value);\n\t}\n\t\n\tfunction textClean(value) {\n\t return String(value || '').trim().replace(REG_REPLACE_NON_PRINTABLE, '');\n\t}\n\t\n\tfunction selectionCorrect(selection) {\n\t var startNode = selection.anchorNode;\n\t var endNode = selection.focusNode;\n\t var startOffset = selection.anchorOffset;\n\t var endOffset = selection.focusOffset;\n\t var revert = false;\n\t\n\t if (startNode === endNode) {\n\t startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n\t endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n\t revert = selection.anchorOffset > selection.focusOffset;\n\t } else {\n\t var position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n\t if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n\t startNode = selection.focusNode;\n\t startOffset = selection.focusOffset;\n\t endNode = selection.anchorNode;\n\t endOffset = selection.anchorOffset;\n\t revert = true;\n\t }\n\t }\n\t\n\t return { startNode: startNode, endNode: endNode, startOffset: startOffset, endOffset: endOffset, revert: revert };\n\t}\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bubble = __webpack_require__(5);\n\tvar text = __webpack_require__(6);\n\t\n\texports.closestNodeBubble = closestNodeBubble;\n\texports.closestNodeSet = closestNodeSet;\n\texports.findBubbleLeft = findBubbleLeft;\n\texports.findBubbleRight = findBubbleRight;\n\texports.getBubbles = getBubbles;\n\texports.hasBubbles = hasBubbles;\n\texports.headBubble = headBubble;\n\texports.lastBubble = lastBubble;\n\texports.nextBubble = nextBubble;\n\texports.prevBubble = prevBubble;\n\t\n\tfunction lastBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:last-child');\n\t}\n\t\n\tfunction headBubble(nodeSet) {\n\t return nodeSet.querySelector('[bubble]:first-child');\n\t}\n\t\n\tfunction getBubbles(nodeSet) {\n\t return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n\t}\n\t\n\tfunction hasBubbles(nodeSet) {\n\t return Boolean(nodeSet.querySelector('[bubble]'));\n\t}\n\t\n\tfunction findBubbleLeft(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.previousSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.previousSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction findBubbleRight(selection) {\n\t if (!selection.focusNode || !selection.anchorNode) {\n\t return;\n\t }\n\t\n\t var node = selection.focusNode.nextSibling;\n\t\n\t if (selection.anchorNode !== selection.focusNode && selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n\t node = selection.anchorNode.nextSibling;\n\t }\n\t\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n\t return;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction closestNodeSet(node) {\n\t while (node) {\n\t if (isEditorNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction closestNodeBubble(node) {\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t if (isEditorNode(node)) {\n\t return;\n\t }\n\t\n\t node = node.parentNode;\n\t }\n\t}\n\t\n\tfunction prevBubble(target) {\n\t var node = target && target.previousSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.previousSibling;\n\t }\n\t}\n\t\n\tfunction nextBubble(target) {\n\t var node = target && target.nextSibling;\n\t while (node) {\n\t if (bubble.isBubbleNode(node)) {\n\t return node;\n\t }\n\t\n\t node = node.nextSibling;\n\t }\n\t}\n\t\n\tfunction isEditorNode(node) {\n\t return node.nodeType === Node.ELEMENT_NODE && node.getAttribute('is') === 'x-bubbles';\n\t}\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\t\n\t/* eslint quotes: 0 */\n\t\n\tvar HTML_ESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '\"': '"',\n\t \"'\": ''',\n\t '`': '`'\n\t};\n\t\n\tvar HTML_UNESCAPES = {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '"': '\"',\n\t ''': \"'\",\n\t '`': '`'\n\t};\n\t\n\tvar REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\n\tvar REG_UNESCAPED_HTML = /[&<>\"'`]/g;\n\tvar REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\n\tvar REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\n\tvar REG_IE = /Trident|Edge/;\n\t\n\texports.getSelection = function (nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (selection && selection.anchorNode && nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n\t return selection;\n\t }\n\t};\n\t\n\texports.throttle = function (callback, runContext) {\n\t var throttle = 0;\n\t var animationCallback = function animationCallback() {\n\t throttle = 0;\n\t };\n\t\n\t return function () {\n\t if (throttle) {\n\t return;\n\t }\n\t\n\t throttle = raf(animationCallback);\n\t\n\t callback.apply(runContext || this, arguments);\n\t };\n\t};\n\t\n\texports.escape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n\t return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.unescape = function (data) {\n\t data = String(data);\n\t\n\t if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n\t return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n\t }\n\t\n\t return data;\n\t};\n\t\n\texports.canUseDrag = function () {\n\t return !REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\texports.isIE = function () {\n\t return REG_IE.test(context.navigator.userAgent);\n\t}();\n\t\n\tfunction unescapeHtmlChar(chr) {\n\t return HTML_UNESCAPES[chr];\n\t}\n\t\n\tfunction escapeHtmlChar(chr) {\n\t return HTML_ESCAPES[chr];\n\t}\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(10)\n\t , root = typeof window === 'undefined' ? global : window\n\t , vendors = ['moz', 'webkit']\n\t , suffix = 'AnimationFrame'\n\t , raf = root['request' + suffix]\n\t , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\t\n\tfor(var i = 0; !raf && i < vendors.length; i++) {\n\t raf = root[vendors[i] + 'Request' + suffix]\n\t caf = root[vendors[i] + 'Cancel' + suffix]\n\t || root[vendors[i] + 'CancelRequest' + suffix]\n\t}\n\t\n\t// Some versions of FF have rAF but not cAF\n\tif(!raf || !caf) {\n\t var last = 0\n\t , id = 0\n\t , queue = []\n\t , frameDuration = 1000 / 60\n\t\n\t raf = function(callback) {\n\t if(queue.length === 0) {\n\t var _now = now()\n\t , next = Math.max(0, frameDuration - (_now - last))\n\t last = next + _now\n\t setTimeout(function() {\n\t var cp = queue.slice(0)\n\t // Clear queue here to prevent\n\t // callbacks from appending listeners\n\t // to the current frame's queue\n\t queue.length = 0\n\t for(var i = 0; i < cp.length; i++) {\n\t if(!cp[i].cancelled) {\n\t try{\n\t cp[i].callback(last)\n\t } catch(e) {\n\t setTimeout(function() { throw e }, 0)\n\t }\n\t }\n\t }\n\t }, Math.round(next))\n\t }\n\t queue.push({\n\t handle: ++id,\n\t callback: callback,\n\t cancelled: false\n\t })\n\t return id\n\t }\n\t\n\t caf = function(handle) {\n\t for(var i = 0; i < queue.length; i++) {\n\t if(queue[i].handle === handle) {\n\t queue[i].cancelled = true\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = function(fn) {\n\t // Wrap in a new function to prevent\n\t // `cancel` potentially being assigned\n\t // to the native rAF function\n\t return raf.call(root, fn)\n\t}\n\tmodule.exports.cancel = function() {\n\t caf.apply(root, arguments)\n\t}\n\tmodule.exports.polyfill = function() {\n\t root.requestAnimationFrame = raf\n\t root.cancelAnimationFrame = caf\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1\n\t(function() {\n\t var getNanoSeconds, hrtime, loadTime;\n\t\n\t if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n\t module.exports = function() {\n\t return performance.now();\n\t };\n\t } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n\t module.exports = function() {\n\t return (getNanoSeconds() - loadTime) / 1e6;\n\t };\n\t hrtime = process.hrtime;\n\t getNanoSeconds = function() {\n\t var hr;\n\t hr = hrtime();\n\t return hr[0] * 1e9 + hr[1];\n\t };\n\t loadTime = getNanoSeconds();\n\t } else if (Date.now) {\n\t module.exports = function() {\n\t return Date.now() - loadTime;\n\t };\n\t loadTime = Date.now();\n\t } else {\n\t module.exports = function() {\n\t return new Date().getTime() - loadTime;\n\t };\n\t loadTime = new Date().getTime();\n\t }\n\t\n\t}).call(this);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction _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; }\n\t\n\t/**\n\t * @module x-bubbles/event\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar CustomEventCommon = __webpack_require__(13);\n\t\n\texports.scrollX = scrollX;\n\texports.scrollY = scrollY;\n\texports.dispatch = dispatch;\n\t\n\texports.keyCode = function (event) {\n\t return event.charCode || event.keyCode;\n\t};\n\t\n\texports.metaKey = function (event) {\n\t return event.ctrlKey || event.metaKey;\n\t};\n\t\n\texports.pageX = function (event) {\n\t return event.pageX === null && event.clientX !== null ? event.clientX + scrollX() : event.pageX;\n\t};\n\t\n\texports.pageY = function (event) {\n\t return event.pageY === null && event.clientY !== null ? event.clientY + scrollY() : event.pageY;\n\t};\n\t\n\texports.one = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, oneCallback(target, name, events[name]));\n\t }\n\t};\n\t\n\texports.on = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.addEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.off = function (target, eventName, callback) {\n\t var events = callback ? _defineProperty({}, eventName, callback) : eventName;\n\t for (var name in events) {\n\t target.removeEventListener(name, events[name]);\n\t }\n\t};\n\t\n\texports.prevent = function (event) {\n\t event.cancelBubble = true;\n\t event.returnValue = false;\n\t event.stopImmediatePropagation();\n\t event.stopPropagation();\n\t event.preventDefault();\n\t return false;\n\t};\n\t\n\tfunction scrollX() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n\t}\n\t\n\tfunction scrollY() {\n\t var html = context.document.documentElement;\n\t var body = context.document.body;\n\t return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n\t}\n\t\n\t/**\n\t * Designer events.\n\t *\n\t * @example\n\t * const { Custom } = require('event');\n\t *\n\t * new Custom('custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event~Custom\n\t * @constructor\n\t */\n\tvar Custom = function () {\n\t if (typeof context.CustomEvent === 'function') {\n\t return context.CustomEvent;\n\t }\n\t\n\t return CustomEventCommon;\n\t}();\n\t\n\t/**\n\t * Dispatch event.\n\t *\n\t * @example\n\t * const { dispatch } = require('event');\n\t * dispatch(node, 'custom-event', {\n\t * bubbles: true,\n\t * cancelable: true,\n\t * detail: { data: '123' }\n\t * })\n\t *\n\t * @alias module:x-bubbles/event.dispatch\n\t * @param {HTMLElement} element node events\n\t * @param {string} name event name\n\t * @param {Object} params the event parameters\n\t * @param {boolean} [params.bubbles=false]\n\t * @param {boolean} [params.cancelable=false]\n\t * @param {*} [params.detail]\n\t */\n\tfunction dispatch(element, name) {\n\t var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\t\n\t element.dispatchEvent(new Custom(name, params));\n\t}\n\t\n\tfunction oneCallback(target, eventName, callback) {\n\t return function _callback(event) {\n\t target.removeEventListener(eventName, _callback);\n\t callback(event);\n\t };\n\t}\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\t\n\t/**\n\t * @constant {Document}\n\t * @private\n\t */\n\tvar doc = context.document;\n\t\n\t/**\n\t * @constant {Object}\n\t * @private\n\t */\n\tvar protoEvent = context.Event.prototype;\n\t\n\tvar issetCustomEvent = false;\n\t\n\ttry {\n\t issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n\t} catch (e) {}\n\t// do nothing\n\t\n\t\n\t/**\n\t * The original function \"stopImmediatePropagation\"\n\t * @constant {function}\n\t * @private\n\t */\n\tvar stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\t\n\t/**\n\t * Override function to set properties \"immediatePropagationStopped\"\n\t */\n\tprotoEvent.stopImmediatePropagation = function () {\n\t this.immediatePropagationStopped = true;\n\t\n\t if (stopImmediatePropagation) {\n\t stopImmediatePropagation.call(this);\n\t } else {\n\t this.stopPropagation();\n\t }\n\t};\n\t\n\tvar CustomEventCommon = function () {\n\t if (issetCustomEvent) {\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('CustomEvent');\n\t\n\t evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\t\n\t return evt;\n\t };\n\t }\n\t\n\t return function (eventName, params) {\n\t params = params || {};\n\t\n\t var bubbles = Boolean(params.bubbles);\n\t var cancelable = Boolean(params.cancelable);\n\t var evt = doc.createEvent('Event');\n\t\n\t evt.initEvent(eventName, bubbles, cancelable);\n\t evt.detail = params.detail;\n\t\n\t return evt;\n\t };\n\t}();\n\t\n\tCustomEventCommon.prototype = protoEvent;\n\t\n\tmodule.exports = CustomEventCommon;\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\texports.KEY = {\n\t a: 65,\n\t Backspace: 8,\n\t Bottom: 40,\n\t c: 67,\n\t Cmd: 91,\n\t Comma: 44, // ,\n\t Delete: 46,\n\t Enter: 13, // Enter\n\t Esc: 27,\n\t Left: 37,\n\t Right: 39,\n\t Semicolon: 59, // ;\n\t Space: 32,\n\t Tab: 9,\n\t Top: 38,\n\t x: 88\n\t};\n\t\n\texports.CLS = {\n\t DRAGSTART: 'drag',\n\t DROPZONE: 'dropzone'\n\t};\n\t\n\texports.EV = {\n\t BUBBLE_EDIT: 'bubble-edit',\n\t BUBBLE_INPUT: 'bubble-input',\n\t CHANGE: 'change',\n\t DRAGEND: 'dragend',\n\t DRAGENTER: 'dragenter',\n\t DRAGLEAVE: 'dragleave',\n\t DRAGSTART: 'dragstart',\n\t DROP: 'drop'\n\t};\n\t\n\texports.PROPS = {\n\t BUBBLE_VALUE: '_bubbleValue',\n\t CLICK_TIME: '_clickTime',\n\t LOCK_COPY: '_lockCopy'\n\t};\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar DRAG_IMG = { w: 16, h: 16 };\n\t\n\tvar dragImage = null;\n\t\n\texports.DRAG_IMG = DRAG_IMG;\n\t\n\texports.getDragImage = function () {\n\t if (!dragImage) {\n\t dragImage = new Image();\n\t dragImage.src = __webpack_require__(16);\n\t }\n\t\n\t return dragImage;\n\t};\n\t\n\texports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n\t fromNodeSet.fireChange();\n\t toNodeSet.focus();\n\t toNodeSet.fireChange();\n\t};\n\n/***/ },\n/* 16 */\n/***/ function(module, exports) {\n\n\tmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar context = __webpack_require__(1);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\tvar select = __webpack_require__(4);\n\tvar bubbleset = __webpack_require__(7);\n\tvar Modernizr = __webpack_require__(18);\n\t\n\tvar _require = __webpack_require__(14),\n\t CLS = _require.CLS,\n\t EV = _require.EV;\n\t\n\tvar _require2 = __webpack_require__(15),\n\t getDragImage = _require2.getDragImage,\n\t onDropSuccess = _require2.onDropSuccess,\n\t DRAG_IMG = _require2.DRAG_IMG;\n\t\n\tvar currentDragSet = null;\n\tvar currentMoveSet = null;\n\tvar currentDragElement = null;\n\t\n\texports.init = function (nodeSet) {\n\t events.on(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\texports.destroy = function (nodeSet) {\n\t events.off(nodeSet, 'mousedown', onMousedown);\n\t};\n\t\n\tfunction onMousedown(event) {\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t if (!nodeBubble) {\n\t return;\n\t }\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t event.preventDefault();\n\t nodeSet.focus();\n\t\n\t var drag = nodeSet.__drag__ = {\n\t onMouseup: onMouseup.bind(this, nodeSet),\n\t onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n\t onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n\t nodeOffsetX: event.offsetX,\n\t nodeOffsetY: event.offsetY,\n\t x: 0,\n\t y: 0\n\t };\n\t\n\t currentDragSet = null;\n\t currentMoveSet = null;\n\t currentDragElement = null;\n\t\n\t events.one(document, 'mouseup', drag.onMouseup);\n\t events.on(document, 'mousemove', drag.onMousemove);\n\t events.on(document, 'scroll', drag.onScroll);\n\t}\n\t\n\tfunction onMouseup(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t events.off(document, 'mousemove', drag.onMousemove);\n\t events.off(document, 'scroll', drag.onScroll);\n\t delete dragSet.__drag__;\n\t\n\t if (currentDragElement) {\n\t currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n\t currentDragElement = null;\n\t }\n\t\n\t if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t\n\t if (currentDragSet) {\n\t (function () {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t var list = select.get(currentDragSet);\n\t\n\t if (list.length) {\n\t list.forEach(function (item) {\n\t return nodeSet.appendChild(item);\n\t });\n\t context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n\t }\n\t }\n\t\n\t var _ = currentDragSet;\n\t currentDragSet = null;\n\t\n\t _.classList.remove(CLS.DRAGSTART);\n\t events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n\t events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n\t })();\n\t }\n\t}\n\t\n\tfunction onMousemove(dragSet, event) {\n\t var drag = dragSet.__drag__;\n\t if (!drag) {\n\t return;\n\t }\n\t\n\t if (!currentDragSet) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t currentDragSet = dragSet;\n\t currentDragSet.classList.add(CLS.DRAGSTART);\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t var moveElement = void 0;\n\t\n\t if (nodeBubble) {\n\t select.add(nodeBubble);\n\t if (select.get(currentDragSet).length === 1) {\n\t moveElement = nodeBubble.cloneNode(true);\n\t }\n\t }\n\t\n\t if (!moveElement) {\n\t moveElement = getDragImage();\n\t drag.nodeOffsetX = DRAG_IMG.w;\n\t drag.nodeOffsetY = DRAG_IMG.h;\n\t }\n\t\n\t currentDragElement = document.body.appendChild(document.createElement('div'));\n\t currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n\t currentDragElement.appendChild(moveElement);\n\t\n\t events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n\t }\n\t\n\t drag.x = event.clientX;\n\t drag.y = event.clientY;\n\t onScroll(dragSet);\n\t\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t if (nodeSet && nodeSet !== currentDragSet) {\n\t if (currentMoveSet && currentMoveSet !== nodeSet) {\n\t currentMoveSet.classList.remove(CLS.DROPZONE);\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t } else if (!currentMoveSet) {\n\t nodeSet.classList.add(CLS.DROPZONE);\n\t currentMoveSet = nodeSet;\n\t events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\t }\n\t } else if (currentMoveSet) {\n\t var _ = currentMoveSet;\n\t currentMoveSet = null;\n\t\n\t _.classList.remove(CLS.DROPZONE);\n\t events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n\t }\n\t}\n\t\n\tfunction onScroll(dragSet) {\n\t var drag = dragSet.__drag__;\n\t if (!drag || !currentDragElement) {\n\t return;\n\t }\n\t\n\t var x = drag.x - drag.nodeOffsetX + events.scrollX();\n\t var y = drag.y - drag.nodeOffsetY + events.scrollY();\n\t\n\t if (Modernizr.csstransforms3d) {\n\t currentDragElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';\n\t } else if (Modernizr.csstransforms) {\n\t currentDragElement.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\n\t } else {\n\t currentDragElement.style.top = y + 'px';\n\t currentDragElement.style.left = x + 'px';\n\t }\n\t}\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t;(function(window){\n\t/*!\n\t * modernizr v3.3.1\n\t * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n\t *\n\t * Copyright (c)\n\t * Faruk Ates\n\t * Paul Irish\n\t * Alex Sexton\n\t * Ryan Seddon\n\t * Patrick Kettner\n\t * Stu Cox\n\t * Richard Herrera\n\t\n\t * MIT License\n\t */\n\t\n\t/*\n\t * Modernizr tests which native CSS3 and HTML5 features are available in the\n\t * current UA and makes the results available to you in two ways: as properties on\n\t * a global `Modernizr` object, and as classes on the `` element. This\n\t * information allows you to progressively enhance your pages with a granular level\n\t * of control over the experience.\n\t*/\n\t\n\t;(function(window, document, undefined){\n\t var tests = [];\n\t \n\t\n\t /**\n\t *\n\t * ModernizrProto is the constructor for Modernizr\n\t *\n\t * @class\n\t * @access public\n\t */\n\t\n\t var ModernizrProto = {\n\t // The current version, dummy\n\t _version: '3.3.1',\n\t\n\t // Any settings that don't work as separate modules\n\t // can go in here as configuration.\n\t _config: {\n\t 'classPrefix': '',\n\t 'enableClasses': true,\n\t 'enableJSClass': true,\n\t 'usePrefixes': true\n\t },\n\t\n\t // Queue of tests\n\t _q: [],\n\t\n\t // Stub these for people who are listening\n\t on: function(test, cb) {\n\t // I don't really think people should do this, but we can\n\t // safe guard it a bit.\n\t // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n\t // This is in case people listen to synchronous tests. I would leave it out,\n\t // but the code to *disallow* sync tests in the real version of this\n\t // function is actually larger than this.\n\t var self = this;\n\t setTimeout(function() {\n\t cb(self[test]);\n\t }, 0);\n\t },\n\t\n\t addTest: function(name, fn, options) {\n\t tests.push({name: name, fn: fn, options: options});\n\t },\n\t\n\t addAsyncTest: function(fn) {\n\t tests.push({name: null, fn: fn});\n\t }\n\t };\n\t\n\t \n\t\n\t // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n\t var Modernizr = function() {};\n\t Modernizr.prototype = ModernizrProto;\n\t\n\t // Leak modernizr globally when you `require` it rather than force it here.\n\t // Overwrite name so constructor name is nicer :D\n\t Modernizr = new Modernizr();\n\t\n\t \n\t\n\t var classes = [];\n\t \n\t\n\t /**\n\t * is returns a boolean if the typeof an obj is exactly type.\n\t *\n\t * @access private\n\t * @function is\n\t * @param {*} obj - A thing we want to check the type of\n\t * @param {string} type - A string to compare the typeof against\n\t * @returns {boolean}\n\t */\n\t\n\t function is(obj, type) {\n\t return typeof obj === type;\n\t }\n\t ;\n\t\n\t /**\n\t * Run through all tests and detect their support in the current UA.\n\t *\n\t * @access private\n\t */\n\t\n\t function testRunner() {\n\t var featureNames;\n\t var feature;\n\t var aliasIdx;\n\t var result;\n\t var nameIdx;\n\t var featureName;\n\t var featureNameSplit;\n\t\n\t for (var featureIdx in tests) {\n\t if (tests.hasOwnProperty(featureIdx)) {\n\t featureNames = [];\n\t feature = tests[featureIdx];\n\t // run the test, throw the return value into the Modernizr,\n\t // then based on that boolean, define an appropriate className\n\t // and push it into an array of classes we'll join later.\n\t //\n\t // If there is no name, it's an 'async' test that is run,\n\t // but not directly added to the object. That should\n\t // be done with a post-run addTest call.\n\t if (feature.name) {\n\t featureNames.push(feature.name.toLowerCase());\n\t\n\t if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n\t // Add all the aliases into the names list\n\t for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n\t featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n\t }\n\t }\n\t }\n\t\n\t // Run the test, or use the raw value if it's not a function\n\t result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\t\n\t\n\t // Set each of the names on the Modernizr object\n\t for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n\t featureName = featureNames[nameIdx];\n\t // Support dot properties as sub tests. We don't do checking to make sure\n\t // that the implied parent tests have been added. You must call them in\n\t // order (either in the test, or make the parent test a dependency).\n\t //\n\t // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n\t // hashtag famous last words\n\t featureNameSplit = featureName.split('.');\n\t\n\t if (featureNameSplit.length === 1) {\n\t Modernizr[featureNameSplit[0]] = result;\n\t } else {\n\t // cast to a Boolean, if not one already\n\t /* jshint -W053 */\n\t if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n\t Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n\t }\n\t\n\t Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n\t }\n\t\n\t classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n\t }\n\t }\n\t }\n\t }\n\t ;\n\t\n\t /**\n\t * If the browsers follow the spec, then they would expose vendor-specific style as:\n\t * elem.style.WebkitBorderRadius\n\t * instead of something like the following, which would be technically incorrect:\n\t * elem.style.webkitBorderRadius\n\t\n\t * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n\t * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n\t * erik.eae.net/archives/2008/03/10/21.48.10/\n\t\n\t * More here: github.com/Modernizr/Modernizr/issues/issue/21\n\t *\n\t * @access private\n\t * @returns {string} The string representing the vendor-specific style properties\n\t */\n\t\n\t var omPrefixes = 'Moz O ms Webkit';\n\t \n\t\n\t var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n\t ModernizrProto._cssomPrefixes = cssomPrefixes;\n\t \n\t\n\t\n\t /**\n\t * contains checks to see if a string contains another string\n\t *\n\t * @access private\n\t * @function contains\n\t * @param {string} str - The string we want to check for substrings\n\t * @param {string} substr - The substring we want to search the first string for\n\t * @returns {boolean}\n\t */\n\t\n\t function contains(str, substr) {\n\t return !!~('' + str).indexOf(substr);\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * docElement is a convenience wrapper to grab the root element of the document\n\t *\n\t * @access private\n\t * @returns {HTMLElement|SVGElement} The root element of the document\n\t */\n\t\n\t var docElement = document.documentElement;\n\t \n\t\n\t /**\n\t * A convenience helper to check if the document we are running in is an SVG document\n\t *\n\t * @access private\n\t * @returns {boolean}\n\t */\n\t\n\t var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n\t \n\t\n\t /**\n\t * createElement is a convenience wrapper around document.createElement. Since we\n\t * use createElement all over the place, this allows for (slightly) smaller code\n\t * as well as abstracting away issues with creating elements in contexts other than\n\t * HTML documents (e.g. SVG documents).\n\t *\n\t * @access private\n\t * @function createElement\n\t * @returns {HTMLElement|SVGElement} An HTML or SVG element\n\t */\n\t\n\t function createElement() {\n\t if (typeof document.createElement !== 'function') {\n\t // This is the case in IE7, where the type of createElement is \"object\".\n\t // For this reason, we cannot call apply() as Object is not a Function.\n\t return document.createElement(arguments[0]);\n\t } else if (isSVG) {\n\t return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n\t } else {\n\t return document.createElement.apply(document, arguments);\n\t }\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * Create our \"modernizr\" element that we do most feature tests on.\n\t *\n\t * @access private\n\t */\n\t\n\t var modElem = {\n\t elem: createElement('modernizr')\n\t };\n\t\n\t // Clean up this element\n\t Modernizr._q.push(function() {\n\t delete modElem.elem;\n\t });\n\t\n\t \n\t\n\t var mStyle = {\n\t style: modElem.elem.style\n\t };\n\t\n\t // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n\t // the front of the queue.\n\t Modernizr._q.unshift(function() {\n\t delete mStyle.style;\n\t });\n\t\n\t \n\t\n\t /**\n\t * getBody returns the body of a document, or an element that can stand in for\n\t * the body if a real body does not exist\n\t *\n\t * @access private\n\t * @function getBody\n\t * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n\t * artificially created element that stands in for the body\n\t */\n\t\n\t function getBody() {\n\t // After page load injecting a fake body doesn't work so check if body exists\n\t var body = document.body;\n\t\n\t if (!body) {\n\t // Can't use the real body create a fake one.\n\t body = createElement(isSVG ? 'svg' : 'body');\n\t body.fake = true;\n\t }\n\t\n\t return body;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * injectElementWithStyles injects an element with style element and some CSS rules\n\t *\n\t * @access private\n\t * @function injectElementWithStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t */\n\t\n\t function injectElementWithStyles(rule, callback, nodes, testnames) {\n\t var mod = 'modernizr';\n\t var style;\n\t var ret;\n\t var node;\n\t var docOverflow;\n\t var div = createElement('div');\n\t var body = getBody();\n\t\n\t if (parseInt(nodes, 10)) {\n\t // In order not to give false positives we create a node for each test\n\t // This also allows the method to scale for unspecified uses\n\t while (nodes--) {\n\t node = createElement('div');\n\t node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n\t div.appendChild(node);\n\t }\n\t }\n\t\n\t style = createElement('style');\n\t style.type = 'text/css';\n\t style.id = 's' + mod;\n\t\n\t // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n\t // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n\t (!body.fake ? div : body).appendChild(style);\n\t body.appendChild(div);\n\t\n\t if (style.styleSheet) {\n\t style.styleSheet.cssText = rule;\n\t } else {\n\t style.appendChild(document.createTextNode(rule));\n\t }\n\t div.id = mod;\n\t\n\t if (body.fake) {\n\t //avoid crashing IE8, if background image is used\n\t body.style.background = '';\n\t //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n\t body.style.overflow = 'hidden';\n\t docOverflow = docElement.style.overflow;\n\t docElement.style.overflow = 'hidden';\n\t docElement.appendChild(body);\n\t }\n\t\n\t ret = callback(div, rule);\n\t // If this is done after page load we don't want to remove the body so check if body exists\n\t if (body.fake) {\n\t body.parentNode.removeChild(body);\n\t docElement.style.overflow = docOverflow;\n\t // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n\t docElement.offsetHeight;\n\t } else {\n\t div.parentNode.removeChild(div);\n\t }\n\t\n\t return !!ret;\n\t\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * domToCSS takes a camelCase string and converts it to kebab-case\n\t * e.g. boxSizing -> box-sizing\n\t *\n\t * @access private\n\t * @function domToCSS\n\t * @param {string} name - String name of camelCase prop we want to convert\n\t * @returns {string} The kebab-case version of the supplied name\n\t */\n\t\n\t function domToCSS(name) {\n\t return name.replace(/([A-Z])/g, function(str, m1) {\n\t return '-' + m1.toLowerCase();\n\t }).replace(/^ms-/, '-ms-');\n\t }\n\t ;\n\t\n\t /**\n\t * nativeTestProps allows for us to use native feature detection functionality if available.\n\t * some prefixed form, or false, in the case of an unsupported rule\n\t *\n\t * @access private\n\t * @function nativeTestProps\n\t * @param {array} props - An array of property names\n\t * @param {string} value - A string representing the value we want to check via @supports\n\t * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n\t */\n\t\n\t // Accepts a list of property names and a single value\n\t // Returns `undefined` if native detection not available\n\t function nativeTestProps(props, value) {\n\t var i = props.length;\n\t // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n\t if ('CSS' in window && 'supports' in window.CSS) {\n\t // Try every prefixed variant of the property\n\t while (i--) {\n\t if (window.CSS.supports(domToCSS(props[i]), value)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t }\n\t // Otherwise fall back to at-rule (for Opera 12.x)\n\t else if ('CSSSupportsRule' in window) {\n\t // Build a condition string for every prefixed variant\n\t var conditionText = [];\n\t while (i--) {\n\t conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n\t }\n\t conditionText = conditionText.join(' or ');\n\t return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n\t return getComputedStyle(node, null).position == 'absolute';\n\t });\n\t }\n\t return undefined;\n\t }\n\t ;\n\t\n\t /**\n\t * cssToDOM takes a kebab-case string and converts it to camelCase\n\t * e.g. box-sizing -> boxSizing\n\t *\n\t * @access private\n\t * @function cssToDOM\n\t * @param {string} name - String name of kebab-case prop we want to convert\n\t * @returns {string} The camelCase version of the supplied name\n\t */\n\t\n\t function cssToDOM(name) {\n\t return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n\t return m1 + m2.toUpperCase();\n\t }).replace(/^-/, '');\n\t }\n\t ;\n\t\n\t // testProps is a generic CSS / DOM property test.\n\t\n\t // In testing support for a given CSS property, it's legit to test:\n\t // `elem.style[styleName] !== undefined`\n\t // If the property is supported it will return an empty string,\n\t // if unsupported it will return undefined.\n\t\n\t // We'll take advantage of this quick test and skip setting a style\n\t // on our modernizr element, but instead just testing undefined vs\n\t // empty string.\n\t\n\t // Property names can be provided in either camelCase or kebab-case.\n\t\n\t function testProps(props, prefixed, value, skipValueTest) {\n\t skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\t\n\t // Try native detect first\n\t if (!is(value, 'undefined')) {\n\t var result = nativeTestProps(props, value);\n\t if (!is(result, 'undefined')) {\n\t return result;\n\t }\n\t }\n\t\n\t // Otherwise do it properly\n\t var afterInit, i, propsLength, prop, before;\n\t\n\t // If we don't have a style element, that means we're running async or after\n\t // the core tests, so we'll need to create our own elements to use\n\t\n\t // inside of an SVG element, in certain browsers, the `style` element is only\n\t // defined for valid tags. Therefore, if `modernizr` does not have one, we\n\t // fall back to a less used element and hope for the best.\n\t var elems = ['modernizr', 'tspan'];\n\t while (!mStyle.style) {\n\t afterInit = true;\n\t mStyle.modElem = createElement(elems.shift());\n\t mStyle.style = mStyle.modElem.style;\n\t }\n\t\n\t // Delete the objects if we created them.\n\t function cleanElems() {\n\t if (afterInit) {\n\t delete mStyle.style;\n\t delete mStyle.modElem;\n\t }\n\t }\n\t\n\t propsLength = props.length;\n\t for (i = 0; i < propsLength; i++) {\n\t prop = props[i];\n\t before = mStyle.style[prop];\n\t\n\t if (contains(prop, '-')) {\n\t prop = cssToDOM(prop);\n\t }\n\t\n\t if (mStyle.style[prop] !== undefined) {\n\t\n\t // If value to test has been passed in, do a set-and-check test.\n\t // 0 (integer) is a valid property value, so check that `value` isn't\n\t // undefined, rather than just checking it's truthy.\n\t if (!skipValueTest && !is(value, 'undefined')) {\n\t\n\t // Needs a try catch block because of old IE. This is slow, but will\n\t // be avoided in most cases because `skipValueTest` will be used.\n\t try {\n\t mStyle.style[prop] = value;\n\t } catch (e) {}\n\t\n\t // If the property value has changed, we assume the value used is\n\t // supported. If `value` is empty string, it'll fail here (because\n\t // it hasn't changed), which matches how browsers have implemented\n\t // CSS.supports()\n\t if (mStyle.style[prop] != before) {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t // Otherwise just return true, or the property name if this is a\n\t // `prefixed()` call\n\t else {\n\t cleanElems();\n\t return prefixed == 'pfx' ? prop : true;\n\t }\n\t }\n\t }\n\t cleanElems();\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * List of JavaScript DOM values used for tests\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr._domPrefixes\n\t * @optionName Modernizr._domPrefixes\n\t * @optionProp domPrefixes\n\t * @access public\n\t * @example\n\t *\n\t * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n\t * than kebab-case properties, all properties are their Capitalized variant\n\t *\n\t * ```js\n\t * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n\t * ```\n\t */\n\t\n\t var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n\t ModernizrProto._domPrefixes = domPrefixes;\n\t \n\t\n\t /**\n\t * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n\t *\n\t * @access private\n\t * @function fnBind\n\t * @param {function} fn - a function you want to change `this` reference to\n\t * @param {object} that - the `this` you want to call the function with\n\t * @returns {function} The wrapped version of the supplied function\n\t */\n\t\n\t function fnBind(fn, that) {\n\t return function() {\n\t return fn.apply(that, arguments);\n\t };\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testDOMProps is a generic DOM property test; if a browser supports\n\t * a certain property, it won't return undefined for it.\n\t *\n\t * @access private\n\t * @function testDOMProps\n\t * @param {array.} props - An array of properties to test for\n\t * @param {object} obj - An object or Element you want to use to test the parameters again\n\t * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n\t */\n\t function testDOMProps(props, obj, elem) {\n\t var item;\n\t\n\t for (var i in props) {\n\t if (props[i] in obj) {\n\t\n\t // return the property name as a string\n\t if (elem === false) {\n\t return props[i];\n\t }\n\t\n\t item = obj[props[i]];\n\t\n\t // let's bind a function\n\t if (is(item, 'function')) {\n\t // bind to obj unless overriden\n\t return fnBind(item, elem || obj);\n\t }\n\t\n\t // return the unbound function or obj or value\n\t return item;\n\t }\n\t }\n\t return false;\n\t }\n\t\n\t ;\n\t\n\t /**\n\t * testPropsAll tests a list of DOM properties we want to check against.\n\t * We specify literally ALL possible (known and/or likely) properties on\n\t * the element including the non-vendor prefixed one, for forward-\n\t * compatibility.\n\t *\n\t * @access private\n\t * @function testPropsAll\n\t * @param {string} prop - A string of the property to test for\n\t * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n\t * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n\t * @param {string} [value] - A string of a css value\n\t * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n\t */\n\t function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\t\n\t var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n\t props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\t\n\t // did they call .prefixed('boxSizing') or are we just testing a prop?\n\t if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n\t return testProps(props, prefixed, value, skipValueTest);\n\t\n\t // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n\t } else {\n\t props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n\t return testDOMProps(props, prefixed, elem);\n\t }\n\t }\n\t\n\t // Modernizr.testAllProps() investigates whether a given style property,\n\t // or any of its vendor-prefixed variants, is recognized\n\t //\n\t // Note that the property names must be provided in the camelCase variant.\n\t // Modernizr.testAllProps('boxSizing')\n\t ModernizrProto.testAllProps = testPropsAll;\n\t\n\t \n\t\n\t /**\n\t * testAllProps determines whether a given CSS property is supported in the browser\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testAllProps\n\t * @optionName Modernizr.testAllProps()\n\t * @optionProp testAllProps\n\t * @access public\n\t * @function testAllProps\n\t * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n\t * @param {string} [value] - String of the value to test\n\t * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n\t * @example\n\t *\n\t * testAllProps determines whether a given CSS property, in some prefixed form,\n\t * is supported by the browser.\n\t *\n\t * ```js\n\t * testAllProps('boxSizing') // true\n\t * ```\n\t *\n\t * It can optionally be given a CSS value in string form to test if a property\n\t * value is valid\n\t *\n\t * ```js\n\t * testAllProps('display', 'block') // true\n\t * testAllProps('display', 'penguin') // false\n\t * ```\n\t *\n\t * A boolean can be passed as a third parameter to skip the value check when\n\t * native detection (@supports) isn't available.\n\t *\n\t * ```js\n\t * testAllProps('shapeOutside', 'content-box', true);\n\t * ```\n\t */\n\t\n\t function testAllProps(prop, value, skipValueTest) {\n\t return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n\t }\n\t ModernizrProto.testAllProps = testAllProps;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Transforms\",\n\t \"property\": \"csstransforms\",\n\t \"caniuse\": \"transforms2d\",\n\t \"tags\": [\"css\"]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms', function() {\n\t // Android < 3.0 is buggy, so we sniff and blacklist\n\t // http://git.io/hHzL7w\n\t return navigator.userAgent.indexOf('Android 2.') === -1 &&\n\t testAllProps('transform', 'scale(1)', true);\n\t });\n\t\n\t\n\t /**\n\t * testStyles injects an element with style element and some CSS rules\n\t *\n\t * @memberof Modernizr\n\t * @name Modernizr.testStyles\n\t * @optionName Modernizr.testStyles()\n\t * @optionProp testStyles\n\t * @access public\n\t * @function testStyles\n\t * @param {string} rule - String representing a css rule\n\t * @param {function} callback - A function that is used to test the injected element\n\t * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n\t * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n\t * @returns {boolean}\n\t * @example\n\t *\n\t * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n\t * along with (possibly multiple) DOM elements. This lets you check for features\n\t * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n\t * // elem is the first DOM node in the page (by default #modernizr)\n\t * // rule is the first argument you supplied - the CSS rule in string form\n\t *\n\t * addTest('widthworks', elem.style.width === '9px')\n\t * });\n\t * ```\n\t *\n\t * If your test requires multiple nodes, you can include a third argument\n\t * indicating how many additional div elements to include on the page. The\n\t * additional nodes are injected as children of the `elem` that is returned as\n\t * the first argument to the callback.\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n\t * document.getElementById('modernizr').style.width === '1px'; // true\n\t * document.getElementById('modernizr2').style.width === '2px'; // true\n\t * elem.firstChild === document.getElementById('modernizr2'); // true\n\t * }, 1);\n\t * ```\n\t *\n\t * By default, all of the additional elements have an ID of `modernizr[n]`, where\n\t * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n\t * the second additional is `#modernizr3`, etc.).\n\t * If you want to have more meaningful IDs for your function, you can provide\n\t * them as the fourth argument, as an array of strings\n\t *\n\t * ```js\n\t * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n\t * elem.firstChild === document.getElementById('foo'); // true\n\t * elem.lastChild === document.getElementById('bar'); // true\n\t * }, 2, ['foo', 'bar']);\n\t * ```\n\t *\n\t */\n\t\n\t var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n\t \n\t/*!\n\t{\n\t \"name\": \"CSS Supports\",\n\t \"property\": \"supports\",\n\t \"caniuse\": \"css-featurequeries\",\n\t \"tags\": [\"css\"],\n\t \"builderAliases\": [\"css_supports\"],\n\t \"notes\": [{\n\t \"name\": \"W3 Spec\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n\t },{\n\t \"name\": \"Related Github Issue\",\n\t \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n\t },{\n\t \"name\": \"W3 Info\",\n\t \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n\t }]\n\t}\n\t!*/\n\t\n\t var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n\t var oldSyntax = 'supportsCSS' in window;\n\t Modernizr.addTest('supports', newSyntax || oldSyntax);\n\t\n\t/*!\n\t{\n\t \"name\": \"CSS Transforms 3D\",\n\t \"property\": \"csstransforms3d\",\n\t \"caniuse\": \"transforms3d\",\n\t \"tags\": [\"css\"],\n\t \"warnings\": [\n\t \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n\t ]\n\t}\n\t!*/\n\t\n\t Modernizr.addTest('csstransforms3d', function() {\n\t var ret = !!testAllProps('perspective', '1px', true);\n\t var usePrefix = Modernizr._config.usePrefixes;\n\t\n\t // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n\t // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n\t // some conditions. As a result, Webkit typically recognizes the syntax but\n\t // will sometimes throw a false positive, thus we must do a more thorough check:\n\t if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n\t var mq;\n\t var defaultStyle = '#modernizr{width:0;height:0}';\n\t // Use CSS Conditional Rules if available\n\t if (Modernizr.supports) {\n\t mq = '@supports (perspective: 1px)';\n\t } else {\n\t // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n\t // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n\t mq = '@media (transform-3d)';\n\t if (usePrefix) {\n\t mq += ',(-webkit-transform-3d)';\n\t }\n\t }\n\t\n\t mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\t\n\t testStyles(defaultStyle + mq, function(elem) {\n\t ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n\t });\n\t }\n\t\n\t return ret;\n\t });\n\t\n\t\n\t // Run each test\n\t testRunner();\n\t\n\t delete ModernizrProto.addTest;\n\t delete ModernizrProto.addAsyncTest;\n\t\n\t // Run the things that are supposed to run after the tests\n\t for (var i = 0; i < Modernizr._q.length; i++) {\n\t Modernizr._q[i]();\n\t }\n\t\n\t // Leak Modernizr namespace\n\t window.Modernizr = Modernizr;\n\t\n\t\n\t;\n\t\n\t})(window, document);\n\tmodule.exports = window.Modernizr;\n\t})(window);\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t KEY = _require.KEY,\n\t EV = _require.EV,\n\t PROPS = _require.PROPS;\n\t\n\tvar text = __webpack_require__(6);\n\tvar events = __webpack_require__(12);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar eventCopy = __webpack_require__(21);\n\tvar eventPaste = __webpack_require__(22);\n\tvar eventBackspace = __webpack_require__(23);\n\tvar eventDelete = __webpack_require__(24);\n\t\n\tvar EVENTS = {\n\t blur: onBlur,\n\t click: onClick,\n\t focus: onFocus,\n\t keydown: onKeydown,\n\t keypress: onKeypress,\n\t keyup: onKeyup,\n\t mscontrolselect: events.prevent,\n\t paste: eventPaste,\n\t resize: events.prevent,\n\t resizestart: events.prevent\n\t};\n\t\n\texports.init = function (nodeWrap) {\n\t var nodeEditor = nodeWrap;\n\t nodeEditor.setAttribute('contenteditable', 'true');\n\t nodeEditor.setAttribute('spellcheck', 'false');\n\t\n\t nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n\t nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n\t nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\t\n\t events.on(nodeEditor, EVENTS);\n\t\n\t return {\n\t addBubble: addBubble.bind(nodeEditor),\n\t editBubble: editBubble.bind(nodeEditor),\n\t inputValue: inputValue.bind(nodeEditor),\n\t removeBubble: removeBubble.bind(nodeEditor),\n\t setContent: setContent.bind(nodeEditor)\n\t };\n\t};\n\t\n\texports.destroy = function (nodeEditor) {\n\t events.off(nodeEditor, EVENTS);\n\t};\n\t\n\tfunction onBlur(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t return events.prevent(event);\n\t }\n\t\n\t select.clear(nodeEditor);\n\t bubble.bubbling(nodeEditor);\n\t}\n\t\n\tfunction onFocus(event) {\n\t var nodeEditor = event.currentTarget;\n\t if (nodeEditor[PROPS.LOCK_COPY]) {\n\t events.prevent(event);\n\t delete nodeEditor[PROPS.LOCK_COPY];\n\t\n\t // Safary 10 не сбрасывает курсор без задержки\n\t raf(function () {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t });\n\t\n\t return false;\n\t }\n\t\n\t cursor.restore(nodeEditor);\n\t}\n\t\n\tfunction onKeyup(event) {\n\t var nodeEditor = event.currentTarget;\n\t var code = events.keyCode(event);\n\t var isPrintableChar = event.key ? event.key.length === 1 : (code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd;\n\t\n\t if (isPrintableChar) {\n\t nodeEditor.fireInput();\n\t }\n\t}\n\t\n\tfunction onKeypress(event) {\n\t var code = events.keyCode(event);\n\t var nodeEditor = event.currentTarget;\n\t\n\t /* eslint no-case-declarations: 0 */\n\t switch (code) {\n\t case KEY.Enter:\n\t event.preventDefault();\n\t if (!nodeEditor.options('disableControls')) {\n\t if (!editBubbleKeyboardEvent(nodeEditor)) {\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.Space:\n\t if (editBubbleKeyboardEvent(nodeEditor)) {\n\t event.preventDefault();\n\t }\n\t break;\n\t\n\t default:\n\t var separator = nodeEditor.options('separator');\n\t if (separator && separator.test(String.fromCharCode(code))) {\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t }\n\t }\n\t}\n\t\n\tfunction onKeydown(event) {\n\t var code = events.keyCode(event);\n\t var metaKey = events.metaKey(event);\n\t var nodeEditor = event.currentTarget;\n\t var enable = !nodeEditor.options('disableControls');\n\t\n\t switch (code) {\n\t case KEY.Esc:\n\t event.preventDefault();\n\t bubble.bubbling(nodeEditor);\n\t cursor.restore(nodeEditor);\n\t break;\n\t\n\t case KEY.Backspace:\n\t event.preventDefault();\n\t eventBackspace(event);\n\t break;\n\t\n\t case KEY.Delete:\n\t event.preventDefault();\n\t eventDelete(event);\n\t break;\n\t\n\t case KEY.Left:\n\t event.preventDefault();\n\t arrowLeft(event);\n\t break;\n\t\n\t // сдвигаем курсор в начало списка\n\t case KEY.Top:\n\t event.preventDefault();\n\t if (enable) {\n\t var headBubble = bubbleset.headBubble(nodeEditor);\n\t headBubble && select.uniq(headBubble);\n\t }\n\t break;\n\t\n\t case KEY.Right:\n\t event.preventDefault();\n\t arrowRight(event);\n\t break;\n\t\n\t // сдвигаем курсор в конец списка\n\t // case KEY.Tab:\n\t case KEY.Bottom:\n\t event.preventDefault();\n\t if (enable && select.has(nodeEditor)) {\n\t cursor.restore(nodeEditor);\n\t }\n\t break;\n\t\n\t case KEY.a:\n\t if (metaKey) {\n\t event.preventDefault();\n\t\n\t if (!text.selectAll(null, event.currentTarget)) {\n\t select.all(nodeEditor);\n\t }\n\t }\n\t break;\n\t\n\t case KEY.c:\n\t if (metaKey) {\n\t eventCopy(event);\n\t }\n\t break;\n\t\n\t case KEY.x:\n\t if (metaKey) {\n\t eventCopy(event, function () {\n\t return eventDelete(event);\n\t });\n\t }\n\t break;\n\t }\n\t}\n\t\n\tfunction arrowLeft(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowLeft(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[0] === nodeSet.startRangeSelect ? list[list.length - 1] : list[0];\n\t\n\t var node = bubbleset.prevBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t }\n\t}\n\t\n\tfunction arrowRight(event) {\n\t var selection = context.getSelection();\n\t\n\t if (text.arrowRight(selection, event.shiftKey)) {\n\t return;\n\t }\n\t\n\t if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n\t var nodeBubble = bubbleset.nextBubble(selection.focusNode);\n\t nodeBubble && select.uniq(nodeBubble);\n\t return;\n\t }\n\t\n\t var nodeSet = event.currentTarget;\n\t var list = select.get(nodeSet);\n\t var begin = list.length > 1 && list[list.length - 1] === nodeSet.startRangeSelect ? list[0] : list[list.length - 1];\n\t\n\t var node = bubbleset.nextBubble(begin);\n\t\n\t if (node) {\n\t if (event.shiftKey) {\n\t select.range(node);\n\t } else {\n\t select.uniq(node);\n\t }\n\t } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n\t select.clear(nodeSet);\n\t selection.collapse(begin.nextSibling, 0);\n\t } else {\n\t cursor.restore(nodeSet);\n\t }\n\t}\n\t\n\tfunction onClick(event) {\n\t var nodeSet = bubbleset.closestNodeSet(event.target);\n\t\n\t if (!nodeSet) {\n\t return;\n\t }\n\t\n\t var nodeBubble = bubbleset.closestNodeBubble(event.target);\n\t\n\t if (nodeBubble) {\n\t var clickTime = Date.now();\n\t var isDblclick = nodeSet[PROPS.CLICK_TIME] && clickTime - nodeSet[PROPS.CLICK_TIME] < 200;\n\t\n\t nodeSet[PROPS.CLICK_TIME] = clickTime;\n\t\n\t if (events.metaKey(event)) {\n\t select.add(nodeBubble);\n\t } else if (event.shiftKey) {\n\t if (!nodeSet.startRangeSelect) {\n\t select.uniq(nodeBubble);\n\t } else {\n\t select.range(nodeBubble);\n\t }\n\t } else if (isDblclick) {\n\t bubble.edit(nodeSet, nodeBubble);\n\t } else {\n\t select.toggleUniq(nodeBubble);\n\t }\n\t } else {\n\t select.clear(nodeSet);\n\t\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.anchorNode || selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\t\n\t cursor.restore(nodeSet);\n\t }\n\t }\n\t}\n\t\n\tfunction editBubbleKeyboardEvent(nodeEditor) {\n\t var selection = context.getSelection();\n\t\n\t if (!selection || !selection.rangeCount) {\n\t var list = select.get(nodeEditor);\n\t\n\t if (list.length === 1) {\n\t return bubble.edit(nodeEditor, list[0]);\n\t }\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction setContent(data) {\n\t var selection = context.getSelection();\n\t selection && selection.removeAllRanges();\n\t\n\t while (this.firstChild) {\n\t this.removeChild(this.firstChild);\n\t }\n\t\n\t data = text.html2text(data);\n\t this.appendChild(this.ownerDocument.createTextNode(data));\n\t bubble.bubbling(this);\n\t cursor.restore(this);\n\t}\n\t\n\tfunction addBubble(bubbleText, dataAttributes) {\n\t var nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n\t if (!nodeBubble) {\n\t return false;\n\t }\n\t\n\t if (text.text2bubble(this, nodeBubble)) {\n\t this.fireInput();\n\t this.fireChange();\n\t cursor.restore(this);\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction removeBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t this.removeChild(nodeBubble);\n\t this.fireChange();\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction editBubble(nodeBubble) {\n\t if (this.contains(nodeBubble)) {\n\t return bubble.edit(this, nodeBubble);\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction inputValue() {\n\t var textRange = text.currentTextRange(this);\n\t return textRange && text.textClean(textRange.toString()) || '';\n\t}\n\t\n\t/**\n\t * Генерация события редактирования бабла.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireEdit\n\t * @param {HTMLElement} nodeBubble нода бабл\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireEdit(nodeBubble) {\n\t events.dispatch(this, EV.BUBBLE_EDIT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: nodeBubble }\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события изменения набора баблов.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireChange\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireChange() {\n\t events.dispatch(this, EV.CHANGE, {\n\t bubbles: false,\n\t cancelable: false\n\t });\n\t}\n\t\n\t/**\n\t * Генерация события ввода текста.\n\t * Выполняется в контексте узла-обертки.\n\t * @alias module:x-bubbles/editor.fireInput\n\t * @this HTMLElement\n\t * @private\n\t */\n\tfunction fireInput() {\n\t var editText = inputValue.call(this);\n\t\n\t if (this[PROPS.BUBBLE_VALUE] !== editText) {\n\t this[PROPS.BUBBLE_VALUE] = editText;\n\t\n\t events.dispatch(this, EV.BUBBLE_INPUT, {\n\t bubbles: false,\n\t cancelable: false,\n\t detail: { data: editText }\n\t });\n\t }\n\t}\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * @module x-bubbles/cursor\n\t */\n\t\n\tvar context = __webpack_require__(1);\n\tvar text = __webpack_require__(6);\n\tvar select = __webpack_require__(4);\n\t\n\texports.restore = restore;\n\texports.restoreBasis = restoreBasis;\n\t\n\t/**\n\t * Reset the cursor position to the end of the input field.\n\t * @alias module:x-bubbles/cursor.restore\n\t * @param {HTMLElement} nodeSet\n\t */\n\tfunction restore(nodeSet) {\n\t select.clear(nodeSet);\n\t var basis = restoreBasis(nodeSet);\n\t var selection = context.getSelection();\n\t selection.removeAllRanges();\n\t selection.collapse(basis, 1);\n\t}\n\t\n\t/**\n\t * The creation of the fake text at the end childNodes\n\t * @alias module:x-bubbles/cursor.restoreBasis\n\t * @param {HTMLElement} nodeSet\n\t * @returns {HTMLTextElement} fake text node\n\t */\n\tfunction restoreBasis(nodeSet) {\n\t var fakeText = text.createZws();\n\t\n\t if (nodeSet.hasChildNodes()) {\n\t var lastNode = nodeSet.childNodes[nodeSet.childNodes.length - 1];\n\t\n\t if (lastNode.isEqualNode(fakeText)) {\n\t fakeText = lastNode;\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t } else {\n\t nodeSet.appendChild(fakeText);\n\t }\n\t\n\t return fakeText;\n\t}\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar events = __webpack_require__(12);\n\tvar select = __webpack_require__(4);\n\t\n\tvar _require = __webpack_require__(14),\n\t PROPS = _require.PROPS;\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = function (event) {\n\t var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\t\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t return false;\n\t }\n\t\n\t var list = select.get(nodeEditor);\n\t\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var bubbleCopy = nodeEditor.options('bubbleCopy');\n\t var value = bubbleCopy(list);\n\t\n\t if (!value) {\n\t return false;\n\t }\n\t\n\t nodeEditor[PROPS.LOCK_COPY] = true;\n\t\n\t var target = nodeEditor.ownerDocument.createElement('input');\n\t target.value = value;\n\t target.style.cssText = '\\n position: absolute;\\n left: -9999px;\\n width: 1px;\\n height: 1px;\\n margin: 0;\\n padding: 0;\\n border: none;';\n\t\n\t nodeEditor.parentNode.appendChild(target);\n\t\n\t events.one(target, {\n\t keyup: function keyup() {\n\t return nodeEditor.focus();\n\t },\n\t blur: function blur() {\n\t removeNode(target);\n\t raf(callback);\n\t }\n\t });\n\t\n\t target.select();\n\t return true;\n\t};\n\t\n\tfunction removeNode(node) {\n\t node && node.parentNode && node.parentNode.removeChild(node);\n\t}\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar context = __webpack_require__(1);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar text = __webpack_require__(6);\n\t\n\tvar _require = __webpack_require__(8),\n\t isIE = _require.isIE;\n\t\n\tmodule.exports = function (event) {\n\t event.preventDefault();\n\t var nodeEditor = event.currentTarget;\n\t\n\t if (context.clipboardData && context.clipboardData.getData) {\n\t onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\t } else if (event.clipboardData) {\n\t (function () {\n\t var contentType = 'text/plain';\n\t var clipboardData = event.clipboardData;\n\t var data = clipboardData.getData && clipboardData.getData(contentType);\n\t\n\t if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n\t Array.prototype.slice.call(clipboardData.items).filter(function (item) {\n\t return item.kind === 'string' && item.type === contentType;\n\t }).some(function (item) {\n\t item.getAsString(function (dataText) {\n\t onPasteSuccess(nodeEditor, dataText);\n\t });\n\t\n\t return true;\n\t });\n\t }\n\t })();\n\t }\n\t};\n\t\n\tfunction onPasteSuccess(nodeEditor, dataText) {\n\t var checkBubblePaste = nodeEditor.options('checkBubblePaste');\n\t var selection = context.getSelection();\n\t var isBubbling = dataText && selection.isCollapsed && !nodeEditor.inputValue ? checkBubblePaste(dataText) : false;\n\t\n\t if (text.replaceString(dataText, selection)) {\n\t if (isBubbling) {\n\t if (isIE) {\n\t raf(function () {\n\t return onReplaceSuccess(nodeEditor);\n\t });\n\t } else {\n\t onReplaceSuccess(nodeEditor);\n\t }\n\t } else {\n\t nodeEditor.fireInput();\n\t }\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\tfunction onReplaceSuccess(nodeEditor) {\n\t bubble.bubbling(nodeEditor);\n\t nodeEditor.focus();\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t}\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Backspace.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowLeft(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleLeft(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar raf = __webpack_require__(9);\n\tvar select = __webpack_require__(4);\n\tvar text = __webpack_require__(6);\n\tvar bubbleset = __webpack_require__(7);\n\tvar bubble = __webpack_require__(5);\n\tvar cursor = __webpack_require__(20);\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Реакция на событие нажатия на кнопку Delete.\n\t * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n\t * @param {KeyboardEvent} event\n\t */\n\tmodule.exports = function (event) {\n\t var nodeEditor = event.target;\n\t var selection = utils.getSelection(nodeEditor);\n\t\n\t if (selection) {\n\t if (!selection.isCollapsed) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else if (text.arrowRight(selection, true)) {\n\t text.remove(selection);\n\t nodeEditor.fireInput();\n\t } else {\n\t var nodeBubble = bubbleset.findBubbleRight(selection);\n\t nodeBubble && select.uniq(nodeBubble);\n\t }\n\t } else if (!removeBubbles(nodeEditor)) {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t};\n\t\n\tfunction removeBubbles(nodeEditor) {\n\t var list = select.get(nodeEditor);\n\t if (!list.length) {\n\t return false;\n\t }\n\t\n\t var prevBubble = list[0].previousSibling;\n\t var nextBubble = list[list.length - 1].nextSibling;\n\t\n\t list.forEach(function (item) {\n\t return item.parentNode.removeChild(item);\n\t });\n\t\n\t if (bubble.isBubbleNode(nextBubble)) {\n\t select.uniq(nextBubble);\n\t } else if (bubble.isBubbleNode(prevBubble)) {\n\t select.uniq(prevBubble);\n\t } else {\n\t nodeEditor.focus();\n\t // без задержки не восстанавливает курсор\n\t raf(function () {\n\t return cursor.restore(nodeEditor);\n\t });\n\t }\n\t\n\t nodeEditor.fireChange();\n\t return true;\n\t}\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** x-bubbles.min.js\n **/"," \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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 97b5e590f2bc754a9c50\n **/","const context = require('./context');\nconst drag = require('./core/drag');\nconst editor = require('./core/editor');\nconst bubble = require('./core/bubble');\nconst bubbleset = require('./core/bubbleset');\n\nconst OPTIONS = {\n begining: [ 'reg', null, 'begining' ],\n bubbleCopy: [ 'func', bubbleCopyOption, 'bubble-copy' ],\n bubbleDeformation: [ 'func', function () {}, 'bubble-deformation' ],\n bubbleFormation: [ 'func', function () {}, 'bubble-formation' ],\n checkBubblePaste: [ 'func', checkBubblePasteOption, 'check-bubble-paste' ],\n classBubble: [ 'str', 'bubble', 'class-bubble' ],\n disableControls: [ 'bool', false, 'disable-controls' ],\n draggable: [ 'bool', true, 'draggable' ],\n ending: [ 'reg', null, 'ending' ], // /\\@ya\\.ru/g;\n separator: [ 'reg', /[,;]/, 'separator' ],\n tokenizer: [ 'func', null, 'tokenizer' ],\n};\n\nconst XBubbles = Object.create(HTMLDivElement.prototype, {\n createdCallback: {\n value: function () {\n initEditor(this);\n }\n },\n\n attachedCallback: {\n value: function () {\n initEditor(this);\n drag.init(this);\n bubble.bubbling(this);\n }\n },\n\n detachedCallback: {\n value: function () {\n drag.destroy(this);\n destroyEditor(this);\n }\n },\n\n /*\n attributeChangedCallback: {\n value: function (name, prevValue, value) {}\n },\n */\n\n options: {\n value: function (name, value) {\n if (!this._options) {\n this._options = {};\n\n for (const optionName in OPTIONS) {\n this._options[ optionName ] = undefined;\n\n const attrName = `data-${OPTIONS[ optionName ][2]}`;\n if (this.hasAttribute(attrName)) {\n this._options[ optionName ] = this.getAttribute(attrName);\n }\n }\n\n optionsPrepare(this._options);\n }\n\n if (typeof value !== 'undefined') {\n this._options[ name ] = value;\n optionsPrepare(this._options);\n\n } else {\n return this._options[ name ];\n }\n }\n },\n\n items: {\n get: function () {\n return bubbleset.getBubbles(this);\n }\n },\n\n inputValue: {\n get: function () {\n return this.editor.inputValue();\n }\n },\n\n setContent: {\n value: function (data) {\n return this.editor.setContent(data);\n }\n },\n\n addBubble: {\n value: function (bubbleText, data) {\n return this.editor.addBubble(bubbleText, data);\n }\n },\n\n removeBubble: {\n value: function (nodeBubble) {\n return this.editor.removeBubble(nodeBubble);\n }\n },\n\n editBubble: {\n value: function (nodeBubble) {\n return this.editor.editBubble(nodeBubble);\n }\n }\n});\n\nmodule.exports = context.document.registerElement('x-bubbles', {\n extends: 'div',\n prototype: XBubbles\n});\n\nconst OPTIONS_PREPARE = {\n func: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return new Function('context', `return context.${value};`)(context);\n\n case 'function':\n return value;\n }\n },\n bool: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n return (value === 'true' || value === 'on');\n\n case 'boolean':\n return value;\n }\n },\n noop: function (value) {\n return value;\n },\n reg: function (value) {\n const type = typeof value;\n switch (type) {\n case 'string':\n if (value) {\n const match = value.match(/\\/(.+)\\/([gimy]{0,3})/i);\n if (match) {\n return new RegExp(match[1], match[2]);\n }\n }\n\n return null;\n\n case 'object':\n if (value instanceof context.RegExp || value === null) {\n return value;\n }\n }\n },\n str: function (value) {\n if (typeof value !== 'undefined') {\n return value ? String(value) : '';\n }\n },\n};\n\nfunction optionsPrepare(options) {\n for (let name in OPTIONS) {\n const [ type, def ] = OPTIONS[ name ];\n options[ name ] = OPTIONS_PREPARE[ type ](options[ name ]);\n if (typeof options[ name ] === 'undefined') {\n options[ name ] = def;\n }\n }\n}\n\nfunction initEditor(node) {\n if (!node.editor) {\n Object.defineProperty(node, 'editor', {\n configurable: true,\n value: editor.init(node)\n });\n }\n}\n\nfunction destroyEditor(node) {\n if (node.editor) {\n editor.destroy(node);\n delete node.editor;\n }\n}\n\nfunction bubbleCopyOption(list) {\n return list.map(item => item.innerHTML).join(', ');\n}\n\nfunction checkBubblePasteOption() {\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","module.exports = (function () {\n /* eslint no-eval: 0 */\n return this || (1, eval)('this');\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./context.js\n **/","const native = require('./drag/native');\nconst mouse = require('./drag/mouse');\nconst { canUseDrag } = require('./utils');\n\nexports.init = function (nodeSet) {\n if (canUseDrag) {\n return native.init(nodeSet);\n }\n\n return mouse.init(nodeSet);\n};\n\nexports.destroy = function (nodeSet) {\n if (canUseDrag) {\n return native.destroy(nodeSet);\n }\n\n return mouse.destroy(nodeSet);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag.js\n **/","const context = require('../../context');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst events = require('../events');\nconst { CLS } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nconst EVENTS = {\n dragend: onDragend,\n dragenter: onDragenter,\n dragleave: onDragleave,\n dragover: onDragover,\n dragstart: onDragstart,\n drop: onDrop,\n};\n\nlet currentDragSet = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, EVENTS);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, EVENTS);\n};\n\nfunction onDragstart(event) {\n event.stopPropagation();\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (!nodeSet || !nodeBubble) {\n event.preventDefault();\n return;\n }\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = nodeSet;\n nodeSet.classList.add(CLS.DRAGSTART);\n select.add(nodeBubble);\n\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', '');\n\n const list = select.get(currentDragSet);\n if (list.length > 1) {\n event.dataTransfer.setDragImage(getDragImage(), DRAG_IMG.w, DRAG_IMG.h);\n }\n}\n\nfunction onDrop(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet || nodeSet === currentDragSet) {\n return;\n }\n\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n}\n\nfunction onDragover(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n event.dataTransfer.dropEffect = 'move';\n}\n\nfunction onDragenter(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n }\n}\n\nfunction onDragleave(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n}\n\nfunction onDragend(event) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!currentDragSet) {\n return;\n }\n\n currentDragSet.classList.remove(CLS.DRAGSTART);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n nodeSet.classList.remove(CLS.DROPZONE);\n }\n\n currentDragSet = null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/native.js\n **/","const context = require('../context');\nconst bubble = require('./bubble');\nconst bubbleset = require('./bubbleset');\n\nconst slice = Array.prototype.slice;\nconst PATH_SELECTED = '[bubble][selected]';\nconst PATH_NOT_SELECTED = '[bubble]:not([selected])';\n\nexports.all = all;\nexports.add = add;\nexports.clear = clear;\nexports.get = get;\nexports.uniq = uniq;\nexports.head = head;\nexports.last = last;\nexports.has = has;\nexports.range = range;\nexports.toggleUniq = toggleUniq;\n\nfunction range(node) {\n if (!bubble.isBubbleNode(node)) {\n return;\n }\n\n const set = node.parentNode;\n const list = get(set);\n\n if (!list.length) {\n uniq(node);\n return;\n }\n\n clear(set);\n\n const headList = list[0];\n const lastList = list[ list.length - 1 ];\n\n if (headList === lastList || !set.startRangeSelect) {\n set.startRangeSelect = headList;\n }\n\n let fromNode;\n let toNode;\n const position = node.compareDocumentPosition(set.startRangeSelect);\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n fromNode = set.startRangeSelect;\n toNode = node;\n\n } else {\n fromNode = node;\n toNode = set.startRangeSelect;\n }\n\n if (fromNode && toNode) {\n let item = fromNode;\n\n while (item) {\n if (!setSelected(item)) {\n break;\n }\n\n if (item === toNode) {\n break;\n }\n\n item = item.nextSibling;\n }\n\n bubble.bubbling(set);\n }\n}\n\nfunction all(nodeSet) {\n slice.call(nodeSet.querySelectorAll(PATH_NOT_SELECTED)).forEach(item => setSelected(item));\n nodeSet.startRangeSelect = nodeSet.querySelector(PATH_SELECTED);\n\n bubble.bubbling(nodeSet);\n\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n}\n\nfunction has(nodeSet) {\n return Boolean(nodeSet.querySelector(PATH_SELECTED));\n}\n\nfunction head(set) {\n return get(set)[0];\n}\n\nfunction last(set) {\n const list = get(set);\n return list[ list.length - 1 ];\n}\n\nfunction get(nodeSet) {\n return slice.call(nodeSet.querySelectorAll(PATH_SELECTED));\n}\n\nfunction clear(nodeSet) {\n get(nodeSet).forEach(item => item.removeAttribute('selected'));\n}\n\nfunction add(node) {\n if (setSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n nodeSet.startRangeSelect = node;\n // ???\n bubble.bubbling(nodeSet);\n\n return true;\n }\n\n return false;\n}\n\nfunction uniq(node) {\n if (!bubble.isBubbleNode(node)) {\n return false;\n }\n\n const nodeSet = bubbleset.closestNodeSet(node);\n const selection = context.getSelection();\n\n selection && selection.removeAllRanges();\n clear(nodeSet);\n\n return add(node);\n}\n\nfunction toggleUniq(node) {\n if (isSelected(node)) {\n const nodeSet = bubbleset.closestNodeSet(node);\n\n if (get(nodeSet).length === 1) {\n return removeSelected(node);\n }\n }\n\n return uniq(node);\n}\n\nfunction isSelected(node) {\n return bubble.isBubbleNode(node) && node.hasAttribute('selected') || false;\n}\n\nfunction setSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.setAttribute('selected', '');\n return true;\n }\n\n return false;\n}\n\nfunction removeSelected(node) {\n if (bubble.isBubbleNode(node)) {\n node.removeAttribute('selected');\n return true;\n }\n\n return false;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/select.js\n **/","const context = require('../context');\nconst text = require('./text');\nconst { escape, canUseDrag } = require('./utils');\n\nexports.isBubbleNode = isBubbleNode;\nexports.bubbling = bubbling;\nexports.create = create;\nexports.edit = edit;\n\nfunction isBubbleNode(node) {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n\n return node.hasAttribute('bubble');\n}\n\nfunction edit(nodeSet, nodeBubble) {\n if (nodeBubble.hasAttribute('readonly')) {\n return false;\n }\n\n const selection = context.getSelection();\n\n if (!selection) {\n return false;\n }\n\n const bubbleDeformation = nodeSet.options('bubbleDeformation');\n let rangeParams = bubbleDeformation(nodeBubble);\n\n if (!rangeParams) {\n const dataText = text.textClean(nodeBubble.innerText);\n\n rangeParams = {\n text: dataText,\n startOffset: 0,\n endOffset: dataText.length\n };\n }\n\n const textFake = text.createZws();\n const textNode = context.document.createTextNode(rangeParams.text);\n\n nodeSet.fireEdit(nodeBubble);\n nodeSet.replaceChild(textNode, nodeBubble);\n nodeSet.insertBefore(textFake, textNode);\n\n const range = context.document.createRange();\n range.setStart(textNode, rangeParams.startOffset);\n range.setEnd(textNode, rangeParams.endOffset);\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n}\n\n/**\n * У обертки нельзя делать tabindex=-1, иначе будет слетать фокус с поля ввода.\n * @param {[type]} nodeSet [description]\n * @param {[type]} dataText [description]\n * @param {Object} [dataAttributes={}] [description]\n * @returns {[type]} [description]\n */\nfunction create(nodeSet, dataText, dataAttributes = {}) {\n dataText = text.textClean(dataText);\n\n if (!dataText) {\n return;\n }\n\n const bubbleFormation = nodeSet.options('bubbleFormation');\n const classBubble = nodeSet.options('classBubble');\n const draggable = canUseDrag && nodeSet.options('draggable');\n const wrap = nodeSet.ownerDocument.createElement('span');\n\n wrap.innerText = dataText;\n\n for (let key in dataAttributes) {\n if (dataAttributes[ key ]) {\n wrap.setAttribute(`data-${key}`, escape(dataAttributes[ key ]));\n }\n }\n\n bubbleFormation(wrap);\n\n if (classBubble) {\n const classes = String(classBubble).trim().split(/\\s+/);\n let len = classes.length;\n\n while (len--) {\n wrap.classList.add(classes[ len ]);\n }\n }\n\n wrap.setAttribute('bubble', '');\n wrap.setAttribute('contenteditable', 'false');\n draggable && wrap.setAttribute('draggable', 'true');\n\n return wrap;\n}\n\nfunction bubbling(nodeSet) {\n const begining = nodeSet.options('begining');\n const ending = nodeSet.options('ending');\n const separator = nodeSet.options('separator');\n const tokenizer = nodeSet.options('tokenizer');\n const ranges = getBubbleRanges(nodeSet);\n const nodes = [];\n\n ranges.forEach(function (range) {\n const dataText = text.textClean(range.toString());\n\n if (!dataText) {\n range.deleteContents();\n return;\n }\n\n let textParts = [ dataText ];\n\n if (tokenizer) {\n textParts = tokenizer(dataText);\n\n } else {\n if (separator) {\n textParts = dataText\n .split(separator)\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n\n if (ending) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByEnding(str, ending)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n\n } else if (begining) {\n textParts = textParts\n .reduce((parts, str) => parts.concat(parseFragmentByBeginning(str, begining)), [])\n .map(trimIterator)\n .filter(nonEmptyIterator);\n }\n }\n\n if (!Array.isArray(textParts) || !textParts.length) {\n range.deleteContents();\n return;\n }\n\n const fragment = context.document.createDocumentFragment();\n\n textParts.forEach(function (textPart) {\n const nodeBubble = create(nodeSet, textPart);\n if (nodeBubble) {\n fragment.appendChild(nodeBubble);\n nodes.push(nodeBubble);\n }\n });\n\n range.deleteContents();\n range.insertNode(fragment);\n });\n\n nodeSet.fireInput();\n\n if (nodes.length) {\n nodeSet.fireChange();\n }\n\n return nodes;\n}\n\nfunction getBubbleRanges(nodeSet) {\n const ranges = [];\n const children = nodeSet.childNodes;\n let range;\n let node;\n\n for (let i = 0; i < children.length; i++) {\n node = children[ i ];\n\n if (isBubbleNode(node)) {\n if (range) {\n range.setEndBefore(node);\n ranges.push(range);\n range = undefined;\n }\n\n } else {\n if (!range) {\n range = context.document.createRange();\n range.setStartBefore(node);\n }\n }\n }\n\n if (range) {\n range.setEndAfter(node);\n ranges.push(range);\n }\n\n return ranges;\n}\n\nfunction trimIterator(str) {\n return str.trim();\n}\n\nfunction nonEmptyIterator(str) {\n return Boolean(str);\n}\n\nfunction parseFragmentByEnding(str, reg) {\n const parts = [];\n let lastIndex = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while (reg.exec(str) !== null && loop) {\n loop--;\n parts.push(str.substring(lastIndex, reg.lastIndex));\n lastIndex = reg.lastIndex;\n }\n\n return parts;\n}\n\nfunction parseFragmentByBeginning(str, reg) {\n const parts = [];\n let res;\n let index = 0;\n let loop = 999;\n\n reg.lastIndex = 0;\n while ((res = reg.exec(str)) !== null && loop) {\n loop--;\n if (index !== res.index) {\n parts.push(str.substring(index, res.index));\n index = res.index;\n }\n }\n\n parts.push(str.substring(index, str.length));\n return parts;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubble.js\n **/","const context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst { getSelection } = require('./utils');\n\n/* eslint-disable max-len */\nconst REG_REPLACE_NON_PRINTABLE = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085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CE-\\u0CD4\\u0CD7-\\u0CDD\\u0CDF\\u0CE4\\u0CE5\\u0CF0\\u0CF3-\\u0D01\\u0D04\\u0D0D\\u0D11\\u0D3B\\u0D3C\\u0D45\\u0D49\\u0D4F-\\u0D56\\u0D58-\\u0D5F\\u0D64\\u0D65\\u0D76-\\u0D78\\u0D80\\u0D81\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DF1\\u0DF5-\\u0E00\\u0E3B-\\u0E3E\\u0E5C-\\u0E80\\u0E83\\u0E85\\u0E86\\u0E89\\u0E8B\\u0E8C\\u0E8E-\\u0E93\\u0E98\\u0EA0\\u0EA4\\u0EA6\\u0EA8\\u0EA9\\u0EAC\\u0EBA\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19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A8CD\\uA8DA-\\uA8DF\\uA8FC-\\uA8FF\\uA954-\\uA95E\\uA97D-\\uA97F\\uA9CE\\uA9DA-\\uA9DD\\uA9E0-\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A\\uAA5B\\uAA7C-\\uAA7F\\uAAC3-\\uAADA\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F-\\uABBF\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBC2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFE\\uFDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\nconst REG_ZWS = /\\u200B/;\nconst TEXT_ZWS = '\\u200B';\n\nexports.arrowRight = arrowRight;\nexports.arrowLeft = arrowLeft;\nexports.remove = remove;\nexports.html2text = html2text;\nexports.currentTextRange = currentTextRange;\nexports.text2bubble = text2bubble;\nexports.replaceString = replaceString;\nexports.selectAll = selectAll;\nexports.textClean = textClean;\nexports.checkZws = checkZws;\nexports.createZws = createZws;\n\nfunction text2bubble(nodeEditor, nodeBubble) {\n const selection = getSelection(nodeEditor);\n const range = selection && currentTextRange(nodeEditor, selection);\n\n if (range) {\n selection.removeAllRanges();\n selection.addRange(range);\n replace(selection, nodeBubble);\n\n } else {\n nodeEditor.appendChild(nodeBubble);\n }\n\n return true;\n}\n\nfunction currentTextRange(nodeEditor, selection) {\n selection = selection || getSelection(nodeEditor);\n if (!selection) {\n return;\n }\n\n const pointNode = do {\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n selection.focusNode;\n\n } else if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n selection.anchorNode;\n\n } else {\n undefined;\n }\n };\n\n if (!pointNode) {\n return;\n }\n\n let startNode = pointNode;\n let endNode = pointNode;\n let item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n startNode = item;\n item = item.previousSibling;\n }\n\n item = pointNode;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n endNode = item;\n item = item.nextSibling;\n }\n\n const range = nodeEditor.ownerDocument.createRange();\n range.setStartBefore(startNode);\n range.setEndAfter(endNode);\n\n return range;\n}\n\nfunction remove(selection) {\n return replace(selection, createZws());\n}\n\nfunction replace(selection, node) {\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const anchor = context.document.createElement('span');\n selection.getRangeAt(0).surroundContents(anchor);\n anchor.parentNode.replaceChild(node, anchor);\n\n selection.removeAllRanges();\n\n if (node.nodeType === Node.TEXT_NODE) {\n const range = context.document.createRange();\n // для ИЕ обязательно указывать node.nodeValue.length\n range.setStart(node, node.nodeValue.length);\n range.collapse(false);\n selection.addRange(range);\n\n } else {\n selection.collapse(node, 0);\n }\n\n return true;\n}\n\nfunction replaceString(data, selection) {\n data = textClean(data);\n if (!data) {\n return false;\n }\n\n selection = selection || context.getSelection();\n const textNode = context.document.createTextNode(data);\n\n if (!replace(selection, textNode)) {\n return false;\n }\n\n selection.collapse(textNode, textNode.nodeValue.length);\n return true;\n}\n\nfunction arrowLeft(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(startNode, startOffset);\n return true;\n }\n\n const isNativeExtend = Boolean(selection.extend);\n revert = isNativeExtend ? revert : !revert;\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n if (offset === null) {\n offset = node.nodeValue.length;\n }\n\n if (offset - 1 < 0) {\n node = node.previousSibling;\n offset = null;\n continue;\n }\n\n const text = node.nodeValue.substring(offset - 1, offset);\n\n if (checkZws(text)) {\n offset = offset - 1;\n continue;\n }\n\n break;\n }\n\n if (!node || offset === null) {\n return false;\n }\n\n if (extend) {\n if (isNativeExtend) {\n selection.extend(node, offset - 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset - 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset - 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset - 1);\n }\n\n return true;\n}\n\nfunction arrowRight(selection, extend) {\n selection = selection || context.getSelection();\n\n if (!selection ||\n !selection.focusNode ||\n selection.focusNode.nodeType !== Node.TEXT_NODE) {\n\n return false;\n }\n\n let { startNode, endNode, startOffset, endOffset, revert } = selectionCorrect(selection);\n\n if (!selection.isCollapsed && !extend) {\n selection.collapse(endNode, endOffset);\n return true;\n }\n\n let node = revert ? startNode : endNode;\n let offset = revert ? startOffset : endOffset;\n\n while (node) {\n if (node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n const len = node.nodeValue.length;\n\n if (offset + 1 > len) {\n node = node.nextSibling;\n offset = 0;\n continue;\n }\n\n const text = node.nodeValue.substring(offset, offset + 1);\n\n if (checkZws(text)) {\n offset = offset + 1;\n continue;\n }\n\n break;\n }\n\n if (!node) {\n return false;\n }\n\n if (extend) {\n const isNativeExtend = Boolean(selection.extend);\n\n if (isNativeExtend) {\n selection.extend(node, offset + 1);\n\n } else {\n const range = context.document.createRange();\n\n if (revert) {\n range.setStart(node, offset + 1);\n range.setEnd(endNode, endOffset);\n\n } else {\n range.setStart(startNode, startOffset);\n range.setEnd(node, offset + 1);\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n } else {\n selection.collapse(node, offset + 1);\n }\n\n return true;\n}\n\nfunction html2text(value) {\n if (!value) {\n return '';\n }\n\n var DOMContainer = context.document.implementation.createHTMLDocument('').body;\n DOMContainer.innerText = value;\n\n return DOMContainer.innerText\n .replace(/^[\\u0020\\u00a0]+$/gm, '')\n .replace(/\\n/gm, ' ')\n .trim();\n}\n\nfunction selectAll(selection, nodeSet) {\n selection = selection || context.getSelection();\n const node = selection && selection.anchorNode;\n\n if (!node || node.nodeType !== Node.TEXT_NODE) {\n return false;\n }\n\n let fromNode;\n let toNode;\n let item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n fromNode = item;\n item = item.previousSibling;\n }\n\n item = node;\n\n while (item && item.nodeType === Node.TEXT_NODE) {\n toNode = item;\n item = item.nextSibling;\n }\n\n const hasBubbles = bubbleset.hasBubbles(nodeSet);\n const range = context.document.createRange();\n range.setStartBefore(fromNode);\n range.setEndAfter(toNode);\n\n const dataText = textClean(range.toString());\n\n if (dataText || (!dataText && !hasBubbles)) {\n if (!dataText) {\n range.collapse();\n }\n\n selection.removeAllRanges();\n selection.addRange(range);\n return true;\n }\n\n return false;\n}\n\nfunction createZws() {\n return context.document.createTextNode(TEXT_ZWS);\n}\n\nfunction checkZws(value) {\n return REG_ZWS.test(value);\n}\n\nfunction textClean(value) {\n return String(value || '')\n .trim()\n .replace(REG_REPLACE_NON_PRINTABLE, '');\n}\n\nfunction selectionCorrect(selection) {\n let startNode = selection.anchorNode;\n let endNode = selection.focusNode;\n let startOffset = selection.anchorOffset;\n let endOffset = selection.focusOffset;\n let revert = false;\n\n if (startNode === endNode) {\n startOffset = Math.min(selection.anchorOffset, selection.focusOffset);\n endOffset = Math.max(selection.anchorOffset, selection.focusOffset);\n revert = selection.anchorOffset > selection.focusOffset;\n\n } else {\n const position = selection.anchorNode.compareDocumentPosition(selection.focusNode);\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n startNode = selection.focusNode;\n startOffset = selection.focusOffset;\n endNode = selection.anchorNode;\n endOffset = selection.anchorOffset;\n revert = true;\n }\n }\n\n return { startNode, endNode, startOffset, endOffset, revert };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/text.js\n **/","const bubble = require('./bubble');\nconst text = require('./text');\n\nexports.closestNodeBubble = closestNodeBubble;\nexports.closestNodeSet = closestNodeSet;\nexports.findBubbleLeft = findBubbleLeft;\nexports.findBubbleRight = findBubbleRight;\nexports.getBubbles = getBubbles;\nexports.hasBubbles = hasBubbles;\nexports.headBubble = headBubble;\nexports.lastBubble = lastBubble;\nexports.nextBubble = nextBubble;\nexports.prevBubble = prevBubble;\n\nfunction lastBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:last-child');\n}\n\nfunction headBubble(nodeSet) {\n return nodeSet.querySelector('[bubble]:first-child');\n}\n\nfunction getBubbles(nodeSet) {\n return Array.prototype.slice.call(nodeSet.querySelectorAll('[bubble]'));\n}\n\nfunction hasBubbles(nodeSet) {\n return Boolean(nodeSet.querySelector('[bubble]'));\n}\n\nfunction findBubbleLeft(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.previousSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.previousSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction findBubbleRight(selection) {\n if (!selection.focusNode || !selection.anchorNode) {\n return;\n }\n\n let node = selection.focusNode.nextSibling;\n\n if (selection.anchorNode !== selection.focusNode &&\n selection.anchorNode.compareDocumentPosition(selection.focusNode) & Node.DOCUMENT_POSITION_FOLLOWING) {\n node = selection.anchorNode.nextSibling;\n }\n\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (node.nodeType === Node.TEXT_NODE && text.textClean(node.nodeValue)) {\n return;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction closestNodeSet(node) {\n while (node) {\n if (isEditorNode(node)) {\n return node;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction closestNodeBubble(node) {\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n if (isEditorNode(node)) {\n return;\n }\n\n node = node.parentNode;\n }\n}\n\nfunction prevBubble(target) {\n let node = target && target.previousSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.previousSibling;\n }\n}\n\nfunction nextBubble(target) {\n let node = target && target.nextSibling;\n while (node) {\n if (bubble.isBubbleNode(node)) {\n return node;\n }\n\n node = node.nextSibling;\n }\n}\n\nfunction isEditorNode(node) {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n node.getAttribute('is') === 'x-bubbles'\n );\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/bubbleset.js\n **/","const raf = require('raf');\nconst context = require('../context');\n\n/* eslint quotes: 0 */\n\nconst HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n\nconst HTML_UNESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n};\n\nconst REG_ESCAPED_HTML = /&(?:amp|lt|gt|quot|#39|#96);/g;\nconst REG_UNESCAPED_HTML = /[&<>\"'`]/g;\nconst REG_HAS_ESCAPED_HTML = RegExp(REG_ESCAPED_HTML.source);\nconst REG_HAS_UNESCAPED_HTML = RegExp(REG_UNESCAPED_HTML.source);\nconst REG_IE = /Trident|Edge/;\n\nexports.getSelection = function (nodeEditor) {\n const selection = context.getSelection();\n\n if (selection && selection.anchorNode && (nodeEditor.compareDocumentPosition(selection.anchorNode) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n return selection;\n }\n};\n\nexports.throttle = function (callback, runContext) {\n let throttle = 0;\n const animationCallback = function () {\n throttle = 0;\n };\n\n return function () {\n if (throttle) {\n return;\n }\n\n throttle = raf(animationCallback);\n\n callback.apply(runContext || this, arguments);\n };\n};\n\nexports.escape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_UNESCAPED_HTML.test(data)) {\n return data.replace(REG_UNESCAPED_HTML, escapeHtmlChar);\n }\n\n return data;\n};\n\nexports.unescape = function (data) {\n data = String(data);\n\n if (data && REG_HAS_ESCAPED_HTML.test(data)) {\n return data.replace(REG_ESCAPED_HTML, unescapeHtmlChar);\n }\n\n return data;\n};\n\nexports.canUseDrag = (function () {\n return !REG_IE.test(context.navigator.userAgent);\n})();\n\nexports.isIE = (function () {\n return REG_IE.test(context.navigator.userAgent);\n})();\n\nfunction unescapeHtmlChar(chr) {\n return HTML_UNESCAPES[ chr ];\n}\n\nfunction escapeHtmlChar(chr) {\n return HTML_ESCAPES[ chr ];\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/utils.js\n **/","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/raf/index.js\n ** module id = 9\n ** module chunks = 0\n **/","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/performance-now/lib/performance-now.js\n ** module id = 10\n ** module chunks = 0\n **/","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/process/browser.js\n ** module id = 11\n ** module chunks = 0\n **/","/**\n * @module x-bubbles/event\n */\n\nconst context = require('../context');\nconst CustomEventCommon = require('../polyfills/CustomEventCommon');\n\nexports.scrollX = scrollX;\nexports.scrollY = scrollY;\nexports.dispatch = dispatch;\n\nexports.keyCode = function (event) {\n return event.charCode || event.keyCode;\n};\n\nexports.metaKey = function (event) {\n return event.ctrlKey || event.metaKey;\n};\n\nexports.pageX = function (event) {\n return (event.pageX === null && event.clientX !== null) ?\n event.clientX + scrollX() :\n event.pageX;\n};\n\nexports.pageY = function (event) {\n return (event.pageY === null && event.clientY !== null) ?\n event.clientY + scrollY() :\n event.pageY;\n};\n\nexports.one = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, oneCallback(target, name, events[ name ]));\n }\n};\n\nexports.on = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.addEventListener(name, events[ name ]);\n }\n};\n\nexports.off = function (target, eventName, callback) {\n const events = callback ? { [ eventName ]: callback } : eventName;\n for (const name in events) {\n target.removeEventListener(name, events[ name ]);\n }\n};\n\nexports.prevent = function (event) {\n event.cancelBubble = true;\n event.returnValue = false;\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n return false;\n};\n\nfunction scrollX() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0);\n}\n\nfunction scrollY() {\n const html = context.document.documentElement;\n const body = context.document.body;\n return (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0);\n}\n\n/**\n * Designer events.\n *\n * @example\n * const { Custom } = require('event');\n *\n * new Custom('custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event~Custom\n * @constructor\n */\nconst Custom = (function () {\n if (typeof context.CustomEvent === 'function') {\n return context.CustomEvent;\n }\n\n return CustomEventCommon;\n}());\n\n/**\n * Dispatch event.\n *\n * @example\n * const { dispatch } = require('event');\n * dispatch(node, 'custom-event', {\n * bubbles: true,\n * cancelable: true,\n * detail: { data: '123' }\n * })\n *\n * @alias module:x-bubbles/event.dispatch\n * @param {HTMLElement} element node events\n * @param {string} name event name\n * @param {Object} params the event parameters\n * @param {boolean} [params.bubbles=false]\n * @param {boolean} [params.cancelable=false]\n * @param {*} [params.detail]\n */\nfunction dispatch(element, name, params = {}) {\n element.dispatchEvent(new Custom(name, params));\n}\n\nfunction oneCallback(target, eventName, callback) {\n return function _callback(event) {\n target.removeEventListener(eventName, _callback);\n callback(event);\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/events.js\n **/","const context = require('../context');\n\n/**\n * @constant {Document}\n * @private\n */\nconst doc = context.document;\n\n/**\n * @constant {Object}\n * @private\n */\nconst protoEvent = context.Event.prototype;\n\nlet issetCustomEvent = false;\n\ntry {\n issetCustomEvent = Boolean(doc.createEvent('CustomEvent'));\n} catch (e) {\n // do nothing\n}\n\n/**\n * The original function \"stopImmediatePropagation\"\n * @constant {function}\n * @private\n */\nconst stopImmediatePropagation = protoEvent.stopImmediatePropagation;\n\n/**\n * Override function to set properties \"immediatePropagationStopped\"\n */\nprotoEvent.stopImmediatePropagation = function () {\n this.immediatePropagationStopped = true;\n\n if (stopImmediatePropagation) {\n stopImmediatePropagation.call(this);\n\n } else {\n this.stopPropagation();\n }\n};\n\nlet CustomEventCommon = (function () {\n if (issetCustomEvent) {\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('CustomEvent');\n\n evt.initCustomEvent(eventName, bubbles, cancelable, params.detail);\n\n return evt;\n };\n }\n\n return function (eventName, params) {\n params = params || {};\n\n let bubbles = Boolean(params.bubbles);\n let cancelable = Boolean(params.cancelable);\n let evt = doc.createEvent('Event');\n\n evt.initEvent(eventName, bubbles, cancelable);\n evt.detail = params.detail;\n\n return evt;\n };\n}());\n\nCustomEventCommon.prototype = protoEvent;\n\nmodule.exports = CustomEventCommon;\n\n\n\n/** WEBPACK FOOTER **\n ** ./polyfills/CustomEventCommon.js\n **/","exports.KEY = {\n a: 65,\n Backspace: 8,\n Bottom: 40,\n c: 67,\n Cmd: 91,\n Comma: 44, // ,\n Delete: 46,\n Enter: 13, // Enter\n Esc: 27,\n Left: 37,\n Right: 39,\n Semicolon: 59, // ;\n Space: 32,\n Tab: 9,\n Top: 38,\n x: 88,\n};\n\nexports.CLS = {\n DRAGSTART: 'drag',\n DROPZONE: 'dropzone',\n};\n\nexports.EV = {\n BUBBLE_EDIT: 'bubble-edit',\n BUBBLE_INPUT: 'bubble-input',\n CHANGE: 'change',\n DRAGEND: 'dragend',\n DRAGENTER: 'dragenter',\n DRAGLEAVE: 'dragleave',\n DRAGSTART: 'dragstart',\n DROP: 'drop',\n};\n\nexports.PROPS = {\n BUBBLE_VALUE: '_bubbleValue',\n CLICK_TIME: '_clickTime',\n LOCK_COPY: '_lockCopy',\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/constant.js\n **/","const DRAG_IMG = { w: 16, h: 16 };\n\nlet dragImage = null;\n\nexports.DRAG_IMG = DRAG_IMG;\n\nexports.getDragImage = function () {\n if (!dragImage) {\n dragImage = new Image();\n dragImage.src = require('url?mimetype=image/png!./bubbles.png');\n }\n\n return dragImage;\n};\n\nexports.onDropSuccess = function (fromNodeSet, toNodeSet) {\n fromNodeSet.fireChange();\n toNodeSet.focus();\n toNodeSet.fireChange();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/common.js\n **/","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAVCAMAAAAw/0MlAAABblBMVEUAAABOXIZJWIKCkbeNnMKMmsJNW4VNW4VWZY57ibFHV4KVpMxRYImCkLh9jbpgcJ1fcJ1JWoaZqdNUZpaHmMaVpdJIWolTZJKHmMZEV4iXqNdkdqhjdal2iLx2ib2Knc6PodNJXpJJXpNOYpdpfLKCk8JPYpdofLNugblugrqUptdZdLdZd8Nfeb93js1+ksuGm9SGm9VHaLhJarxKZqxKbL9La7pNbr9Pb71Ucr1Wbag/XqU/X6pAVopffMdjf8ZphMpwicx2js9BW51CWZN/ldCBl9KCmNNFYKRFZbGJndWOodVKX5RKX5ZKYJdWdcNXbKJYdL1KYJtAVYpaeMVJXpJKbMBgebpjeLBjf8VLYp5kd65kgMlofLRog8log8tJYqBth8xugrpviMtNabBxi851jc8/X6t3i8BOaK56kdB9lNFOaa5Ob8FPY5qBl9NGXJODmNOEmdNQbrpRcsJUb7RGXJSTptmUptiUp9kfFguNAAAAK3RSTlMAJCQkJDw8P0JCRUVubpaWlpmZwMDAw8nJzMzV29vb7e3t7fDw+Pn5+fn8jndhZAAAAQhJREFUeF6tz2VXwgAYBtBnhBKKkgoGKPY2urvT7u7ujn/vtsM5fN/e+w8uJEaLa+HvR7Zfl8WILo293Qq8vykQaLXtGnRoPcH6i1L1oEcLidpde6BQc6shslXvaVSHIdD7S9c0Sv5+ACbfFRXftBoYuzijUry1AXPHJ1QK5349pvYOqeSPfCaM8Dkq/EFxHAMst0mDY3cL89Clkis0kqmd/CxgvUt8Ukg8rub4UYCZicTiT0rFY5HnNY4dBNC32GiGwtFt+aLhULOx9CWMdRAMbVXK6cyNfJl0ubL8IYytEDHe0/XX7IZ82e/9S3HsZSDpmSQZT/SiQ+UgGDtU6DKYnYrGTrMBon97+TS1J80efgAAAABJRU5ErkJggg==\"\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/url-loader?mimetype=image/png!./core/drag/bubbles.png\n ** module id = 16\n ** module chunks = 0\n **/","const context = require('../../context');\nconst events = require('../events');\nconst utils = require('../utils');\nconst select = require('../select');\nconst bubbleset = require('../bubbleset');\nconst Modernizr = require('modernizr');\nconst { CLS, EV } = require('../constant');\nconst { getDragImage, onDropSuccess, DRAG_IMG } = require('./common');\n\nlet currentDragSet = null;\nlet currentMoveSet = null;\nlet currentDragElement = null;\n\nexports.init = function (nodeSet) {\n events.on(nodeSet, 'mousedown', onMousedown);\n};\n\nexports.destroy = function (nodeSet) {\n events.off(nodeSet, 'mousedown', onMousedown);\n};\n\nfunction onMousedown(event) {\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n if (!nodeBubble) {\n return;\n }\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (!nodeSet) {\n return;\n }\n\n event.preventDefault();\n nodeSet.focus();\n\n const drag = nodeSet.__drag__ = {\n onMouseup: onMouseup.bind(this, nodeSet),\n onMousemove: utils.throttle(onMousemove.bind(this, nodeSet)),\n onScroll: utils.throttle(onScroll.bind(this, nodeSet)),\n nodeOffsetX: event.offsetX,\n nodeOffsetY: event.offsetY,\n x: 0,\n y: 0\n };\n\n currentDragSet = null;\n currentMoveSet = null;\n currentDragElement = null;\n\n events.one(document, 'mouseup', drag.onMouseup);\n events.on(document, 'mousemove', drag.onMousemove);\n events.on(document, 'scroll', drag.onScroll);\n}\n\nfunction onMouseup(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n events.off(document, 'mousemove', drag.onMousemove);\n events.off(document, 'scroll', drag.onScroll);\n delete dragSet.__drag__;\n\n if (currentDragElement) {\n currentDragElement.parentNode && currentDragElement.parentNode.removeChild(currentDragElement);\n currentDragElement = null;\n }\n\n if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n\n if (currentDragSet) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (nodeSet && nodeSet !== currentDragSet) {\n const list = select.get(currentDragSet);\n\n if (list.length) {\n list.forEach(item => nodeSet.appendChild(item));\n context.setTimeout(onDropSuccess, 0, currentDragSet, nodeSet);\n }\n }\n\n const _ = currentDragSet;\n currentDragSet = null;\n\n _.classList.remove(CLS.DRAGSTART);\n events.dispatch(_, EV.DROP, { bubbles: false, cancelable: false });\n events.dispatch(_, EV.DRAGEND, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onMousemove(dragSet, event) {\n const drag = dragSet.__drag__;\n if (!drag) {\n return;\n }\n\n if (!currentDragSet) {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n currentDragSet = dragSet;\n currentDragSet.classList.add(CLS.DRAGSTART);\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n let moveElement;\n\n if (nodeBubble) {\n select.add(nodeBubble);\n if (select.get(currentDragSet).length === 1) {\n moveElement = nodeBubble.cloneNode(true);\n }\n }\n\n if (!moveElement) {\n moveElement = getDragImage();\n drag.nodeOffsetX = DRAG_IMG.w;\n drag.nodeOffsetY = DRAG_IMG.h;\n }\n\n currentDragElement = document.body.appendChild(document.createElement('div'));\n currentDragElement.style.cssText = 'position:absolute;z-index:9999;pointer-events:none;top:0;left:0;';\n currentDragElement.appendChild(moveElement);\n\n events.dispatch(currentDragSet, EV.DRAGSTART, { bubbles: false, cancelable: false });\n }\n\n drag.x = event.clientX;\n drag.y = event.clientY;\n onScroll(dragSet);\n\n const nodeSet = bubbleset.closestNodeSet(event.target);\n if (nodeSet && nodeSet !== currentDragSet) {\n if (currentMoveSet && currentMoveSet !== nodeSet) {\n currentMoveSet.classList.remove(CLS.DROPZONE);\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n\n } else if (!currentMoveSet) {\n nodeSet.classList.add(CLS.DROPZONE);\n currentMoveSet = nodeSet;\n events.dispatch(currentMoveSet, EV.DRAGENTER, { bubbles: false, cancelable: false });\n }\n\n } else if (currentMoveSet) {\n const _ = currentMoveSet;\n currentMoveSet = null;\n\n _.classList.remove(CLS.DROPZONE);\n events.dispatch(_, EV.DRAGLEAVE, { bubbles: false, cancelable: false });\n }\n}\n\nfunction onScroll(dragSet) {\n const drag = dragSet.__drag__;\n if (!drag || !currentDragElement) {\n return;\n }\n\n const x = drag.x - drag.nodeOffsetX + events.scrollX();\n const y = drag.y - drag.nodeOffsetY + events.scrollY();\n\n if (Modernizr.csstransforms3d) {\n currentDragElement.style.transform = `translate3d(${x}px, ${y}px, 0px)`;\n\n } else if (Modernizr.csstransforms) {\n currentDragElement.style.transform = `translate(${x}px, ${y}px)`;\n\n } else {\n currentDragElement.style.top = `${y}px`;\n currentDragElement.style.left = `${x}px`;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/drag/mouse.js\n **/",";(function(window){\n/*!\n * modernizr v3.3.1\n * Build http://modernizr.com/download?-csstransforms-csstransforms3d-dontmin\n *\n * Copyright (c)\n * Faruk Ates\n * Paul Irish\n * Alex Sexton\n * Ryan Seddon\n * Patrick Kettner\n * Stu Cox\n * Richard Herrera\n\n * MIT License\n */\n\n/*\n * Modernizr tests which native CSS3 and HTML5 features are available in the\n * current UA and makes the results available to you in two ways: as properties on\n * a global `Modernizr` object, and as classes on the `` element. This\n * information allows you to progressively enhance your pages with a granular level\n * of control over the experience.\n*/\n\n;(function(window, document, undefined){\n var tests = [];\n \n\n /**\n *\n * ModernizrProto is the constructor for Modernizr\n *\n * @class\n * @access public\n */\n\n var ModernizrProto = {\n // The current version, dummy\n _version: '3.3.1',\n\n // Any settings that don't work as separate modules\n // can go in here as configuration.\n _config: {\n 'classPrefix': '',\n 'enableClasses': true,\n 'enableJSClass': true,\n 'usePrefixes': true\n },\n\n // Queue of tests\n _q: [],\n\n // Stub these for people who are listening\n on: function(test, cb) {\n // I don't really think people should do this, but we can\n // safe guard it a bit.\n // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n // This is in case people listen to synchronous tests. I would leave it out,\n // but the code to *disallow* sync tests in the real version of this\n // function is actually larger than this.\n var self = this;\n setTimeout(function() {\n cb(self[test]);\n }, 0);\n },\n\n addTest: function(name, fn, options) {\n tests.push({name: name, fn: fn, options: options});\n },\n\n addAsyncTest: function(fn) {\n tests.push({name: null, fn: fn});\n }\n };\n\n \n\n // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n var Modernizr = function() {};\n Modernizr.prototype = ModernizrProto;\n\n // Leak modernizr globally when you `require` it rather than force it here.\n // Overwrite name so constructor name is nicer :D\n Modernizr = new Modernizr();\n\n \n\n var classes = [];\n \n\n /**\n * is returns a boolean if the typeof an obj is exactly type.\n *\n * @access private\n * @function is\n * @param {*} obj - A thing we want to check the type of\n * @param {string} type - A string to compare the typeof against\n * @returns {boolean}\n */\n\n function is(obj, type) {\n return typeof obj === type;\n }\n ;\n\n /**\n * Run through all tests and detect their support in the current UA.\n *\n * @access private\n */\n\n function testRunner() {\n var featureNames;\n var feature;\n var aliasIdx;\n var result;\n var nameIdx;\n var featureName;\n var featureNameSplit;\n\n for (var featureIdx in tests) {\n if (tests.hasOwnProperty(featureIdx)) {\n featureNames = [];\n feature = tests[featureIdx];\n // run the test, throw the return value into the Modernizr,\n // then based on that boolean, define an appropriate className\n // and push it into an array of classes we'll join later.\n //\n // If there is no name, it's an 'async' test that is run,\n // but not directly added to the object. That should\n // be done with a post-run addTest call.\n if (feature.name) {\n featureNames.push(feature.name.toLowerCase());\n\n if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n // Add all the aliases into the names list\n for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n }\n }\n }\n\n // Run the test, or use the raw value if it's not a function\n result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\n\n // Set each of the names on the Modernizr object\n for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n featureName = featureNames[nameIdx];\n // Support dot properties as sub tests. We don't do checking to make sure\n // that the implied parent tests have been added. You must call them in\n // order (either in the test, or make the parent test a dependency).\n //\n // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n // hashtag famous last words\n featureNameSplit = featureName.split('.');\n\n if (featureNameSplit.length === 1) {\n Modernizr[featureNameSplit[0]] = result;\n } else {\n // cast to a Boolean, if not one already\n /* jshint -W053 */\n if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n }\n\n Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n }\n\n classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n }\n }\n }\n }\n ;\n\n /**\n * If the browsers follow the spec, then they would expose vendor-specific style as:\n * elem.style.WebkitBorderRadius\n * instead of something like the following, which would be technically incorrect:\n * elem.style.webkitBorderRadius\n\n * Webkit ghosts their properties in lowercase but Opera & Moz do not.\n * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+\n * erik.eae.net/archives/2008/03/10/21.48.10/\n\n * More here: github.com/Modernizr/Modernizr/issues/issue/21\n *\n * @access private\n * @returns {string} The string representing the vendor-specific style properties\n */\n\n var omPrefixes = 'Moz O ms Webkit';\n \n\n var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);\n ModernizrProto._cssomPrefixes = cssomPrefixes;\n \n\n\n /**\n * contains checks to see if a string contains another string\n *\n * @access private\n * @function contains\n * @param {string} str - The string we want to check for substrings\n * @param {string} substr - The substring we want to search the first string for\n * @returns {boolean}\n */\n\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n ;\n\n /**\n * docElement is a convenience wrapper to grab the root element of the document\n *\n * @access private\n * @returns {HTMLElement|SVGElement} The root element of the document\n */\n\n var docElement = document.documentElement;\n \n\n /**\n * A convenience helper to check if the document we are running in is an SVG document\n *\n * @access private\n * @returns {boolean}\n */\n\n var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n \n\n /**\n * createElement is a convenience wrapper around document.createElement. Since we\n * use createElement all over the place, this allows for (slightly) smaller code\n * as well as abstracting away issues with creating elements in contexts other than\n * HTML documents (e.g. SVG documents).\n *\n * @access private\n * @function createElement\n * @returns {HTMLElement|SVGElement} An HTML or SVG element\n */\n\n function createElement() {\n if (typeof document.createElement !== 'function') {\n // This is the case in IE7, where the type of createElement is \"object\".\n // For this reason, we cannot call apply() as Object is not a Function.\n return document.createElement(arguments[0]);\n } else if (isSVG) {\n return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);\n } else {\n return document.createElement.apply(document, arguments);\n }\n }\n\n ;\n\n /**\n * Create our \"modernizr\" element that we do most feature tests on.\n *\n * @access private\n */\n\n var modElem = {\n elem: createElement('modernizr')\n };\n\n // Clean up this element\n Modernizr._q.push(function() {\n delete modElem.elem;\n });\n\n \n\n var mStyle = {\n style: modElem.elem.style\n };\n\n // kill ref for gc, must happen before mod.elem is removed, so we unshift on to\n // the front of the queue.\n Modernizr._q.unshift(function() {\n delete mStyle.style;\n });\n\n \n\n /**\n * getBody returns the body of a document, or an element that can stand in for\n * the body if a real body does not exist\n *\n * @access private\n * @function getBody\n * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an\n * artificially created element that stands in for the body\n */\n\n function getBody() {\n // After page load injecting a fake body doesn't work so check if body exists\n var body = document.body;\n\n if (!body) {\n // Can't use the real body create a fake one.\n body = createElement(isSVG ? 'svg' : 'body');\n body.fake = true;\n }\n\n return body;\n }\n\n ;\n\n /**\n * injectElementWithStyles injects an element with style element and some CSS rules\n *\n * @access private\n * @function injectElementWithStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n */\n\n function injectElementWithStyles(rule, callback, nodes, testnames) {\n var mod = 'modernizr';\n var style;\n var ret;\n var node;\n var docOverflow;\n var div = createElement('div');\n var body = getBody();\n\n if (parseInt(nodes, 10)) {\n // In order not to give false positives we create a node for each test\n // This also allows the method to scale for unspecified uses\n while (nodes--) {\n node = createElement('div');\n node.id = testnames ? testnames[nodes] : mod + (nodes + 1);\n div.appendChild(node);\n }\n }\n\n style = createElement('style');\n style.type = 'text/css';\n style.id = 's' + mod;\n\n // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.\n // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270\n (!body.fake ? div : body).appendChild(style);\n body.appendChild(div);\n\n if (style.styleSheet) {\n style.styleSheet.cssText = rule;\n } else {\n style.appendChild(document.createTextNode(rule));\n }\n div.id = mod;\n\n if (body.fake) {\n //avoid crashing IE8, if background image is used\n body.style.background = '';\n //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible\n body.style.overflow = 'hidden';\n docOverflow = docElement.style.overflow;\n docElement.style.overflow = 'hidden';\n docElement.appendChild(body);\n }\n\n ret = callback(div, rule);\n // If this is done after page load we don't want to remove the body so check if body exists\n if (body.fake) {\n body.parentNode.removeChild(body);\n docElement.style.overflow = docOverflow;\n // Trigger layout so kinetic scrolling isn't disabled in iOS6+\n docElement.offsetHeight;\n } else {\n div.parentNode.removeChild(div);\n }\n\n return !!ret;\n\n }\n\n ;\n\n /**\n * domToCSS takes a camelCase string and converts it to kebab-case\n * e.g. boxSizing -> box-sizing\n *\n * @access private\n * @function domToCSS\n * @param {string} name - String name of camelCase prop we want to convert\n * @returns {string} The kebab-case version of the supplied name\n */\n\n function domToCSS(name) {\n return name.replace(/([A-Z])/g, function(str, m1) {\n return '-' + m1.toLowerCase();\n }).replace(/^ms-/, '-ms-');\n }\n ;\n\n /**\n * nativeTestProps allows for us to use native feature detection functionality if available.\n * some prefixed form, or false, in the case of an unsupported rule\n *\n * @access private\n * @function nativeTestProps\n * @param {array} props - An array of property names\n * @param {string} value - A string representing the value we want to check via @supports\n * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise\n */\n\n // Accepts a list of property names and a single value\n // Returns `undefined` if native detection not available\n function nativeTestProps(props, value) {\n var i = props.length;\n // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface\n if ('CSS' in window && 'supports' in window.CSS) {\n // Try every prefixed variant of the property\n while (i--) {\n if (window.CSS.supports(domToCSS(props[i]), value)) {\n return true;\n }\n }\n return false;\n }\n // Otherwise fall back to at-rule (for Opera 12.x)\n else if ('CSSSupportsRule' in window) {\n // Build a condition string for every prefixed variant\n var conditionText = [];\n while (i--) {\n conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');\n }\n conditionText = conditionText.join(' or ');\n return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) {\n return getComputedStyle(node, null).position == 'absolute';\n });\n }\n return undefined;\n }\n ;\n\n /**\n * cssToDOM takes a kebab-case string and converts it to camelCase\n * e.g. box-sizing -> boxSizing\n *\n * @access private\n * @function cssToDOM\n * @param {string} name - String name of kebab-case prop we want to convert\n * @returns {string} The camelCase version of the supplied name\n */\n\n function cssToDOM(name) {\n return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {\n return m1 + m2.toUpperCase();\n }).replace(/^-/, '');\n }\n ;\n\n // testProps is a generic CSS / DOM property test.\n\n // In testing support for a given CSS property, it's legit to test:\n // `elem.style[styleName] !== undefined`\n // If the property is supported it will return an empty string,\n // if unsupported it will return undefined.\n\n // We'll take advantage of this quick test and skip setting a style\n // on our modernizr element, but instead just testing undefined vs\n // empty string.\n\n // Property names can be provided in either camelCase or kebab-case.\n\n function testProps(props, prefixed, value, skipValueTest) {\n skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;\n\n // Try native detect first\n if (!is(value, 'undefined')) {\n var result = nativeTestProps(props, value);\n if (!is(result, 'undefined')) {\n return result;\n }\n }\n\n // Otherwise do it properly\n var afterInit, i, propsLength, prop, before;\n\n // If we don't have a style element, that means we're running async or after\n // the core tests, so we'll need to create our own elements to use\n\n // inside of an SVG element, in certain browsers, the `style` element is only\n // defined for valid tags. Therefore, if `modernizr` does not have one, we\n // fall back to a less used element and hope for the best.\n var elems = ['modernizr', 'tspan'];\n while (!mStyle.style) {\n afterInit = true;\n mStyle.modElem = createElement(elems.shift());\n mStyle.style = mStyle.modElem.style;\n }\n\n // Delete the objects if we created them.\n function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }\n\n propsLength = props.length;\n for (i = 0; i < propsLength; i++) {\n prop = props[i];\n before = mStyle.style[prop];\n\n if (contains(prop, '-')) {\n prop = cssToDOM(prop);\n }\n\n if (mStyle.style[prop] !== undefined) {\n\n // If value to test has been passed in, do a set-and-check test.\n // 0 (integer) is a valid property value, so check that `value` isn't\n // undefined, rather than just checking it's truthy.\n if (!skipValueTest && !is(value, 'undefined')) {\n\n // Needs a try catch block because of old IE. This is slow, but will\n // be avoided in most cases because `skipValueTest` will be used.\n try {\n mStyle.style[prop] = value;\n } catch (e) {}\n\n // If the property value has changed, we assume the value used is\n // supported. If `value` is empty string, it'll fail here (because\n // it hasn't changed), which matches how browsers have implemented\n // CSS.supports()\n if (mStyle.style[prop] != before) {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n // Otherwise just return true, or the property name if this is a\n // `prefixed()` call\n else {\n cleanElems();\n return prefixed == 'pfx' ? prop : true;\n }\n }\n }\n cleanElems();\n return false;\n }\n\n ;\n\n /**\n * List of JavaScript DOM values used for tests\n *\n * @memberof Modernizr\n * @name Modernizr._domPrefixes\n * @optionName Modernizr._domPrefixes\n * @optionProp domPrefixes\n * @access public\n * @example\n *\n * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather\n * than kebab-case properties, all properties are their Capitalized variant\n *\n * ```js\n * Modernizr._domPrefixes === [ \"Moz\", \"O\", \"ms\", \"Webkit\" ];\n * ```\n */\n\n var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);\n ModernizrProto._domPrefixes = domPrefixes;\n \n\n /**\n * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.\n *\n * @access private\n * @function fnBind\n * @param {function} fn - a function you want to change `this` reference to\n * @param {object} that - the `this` you want to call the function with\n * @returns {function} The wrapped version of the supplied function\n */\n\n function fnBind(fn, that) {\n return function() {\n return fn.apply(that, arguments);\n };\n }\n\n ;\n\n /**\n * testDOMProps is a generic DOM property test; if a browser supports\n * a certain property, it won't return undefined for it.\n *\n * @access private\n * @function testDOMProps\n * @param {array.} props - An array of properties to test for\n * @param {object} obj - An object or Element you want to use to test the parameters again\n * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check\n */\n function testDOMProps(props, obj, elem) {\n var item;\n\n for (var i in props) {\n if (props[i] in obj) {\n\n // return the property name as a string\n if (elem === false) {\n return props[i];\n }\n\n item = obj[props[i]];\n\n // let's bind a function\n if (is(item, 'function')) {\n // bind to obj unless overriden\n return fnBind(item, elem || obj);\n }\n\n // return the unbound function or obj or value\n return item;\n }\n }\n return false;\n }\n\n ;\n\n /**\n * testPropsAll tests a list of DOM properties we want to check against.\n * We specify literally ALL possible (known and/or likely) properties on\n * the element including the non-vendor prefixed one, for forward-\n * compatibility.\n *\n * @access private\n * @function testPropsAll\n * @param {string} prop - A string of the property to test for\n * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip\n * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against\n * @param {string} [value] - A string of a css value\n * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set\n */\n function testPropsAll(prop, prefixed, elem, value, skipValueTest) {\n\n var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),\n props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');\n\n // did they call .prefixed('boxSizing') or are we just testing a prop?\n if (is(prefixed, 'string') || is(prefixed, 'undefined')) {\n return testProps(props, prefixed, value, skipValueTest);\n\n // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])\n } else {\n props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');\n return testDOMProps(props, prefixed, elem);\n }\n }\n\n // Modernizr.testAllProps() investigates whether a given style property,\n // or any of its vendor-prefixed variants, is recognized\n //\n // Note that the property names must be provided in the camelCase variant.\n // Modernizr.testAllProps('boxSizing')\n ModernizrProto.testAllProps = testPropsAll;\n\n \n\n /**\n * testAllProps determines whether a given CSS property is supported in the browser\n *\n * @memberof Modernizr\n * @name Modernizr.testAllProps\n * @optionName Modernizr.testAllProps()\n * @optionProp testAllProps\n * @access public\n * @function testAllProps\n * @param {string} prop - String naming the property to test (either camelCase or kebab-case)\n * @param {string} [value] - String of the value to test\n * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection\n * @example\n *\n * testAllProps determines whether a given CSS property, in some prefixed form,\n * is supported by the browser.\n *\n * ```js\n * testAllProps('boxSizing') // true\n * ```\n *\n * It can optionally be given a CSS value in string form to test if a property\n * value is valid\n *\n * ```js\n * testAllProps('display', 'block') // true\n * testAllProps('display', 'penguin') // false\n * ```\n *\n * A boolean can be passed as a third parameter to skip the value check when\n * native detection (@supports) isn't available.\n *\n * ```js\n * testAllProps('shapeOutside', 'content-box', true);\n * ```\n */\n\n function testAllProps(prop, value, skipValueTest) {\n return testPropsAll(prop, undefined, undefined, value, skipValueTest);\n }\n ModernizrProto.testAllProps = testAllProps;\n \n/*!\n{\n \"name\": \"CSS Transforms\",\n \"property\": \"csstransforms\",\n \"caniuse\": \"transforms2d\",\n \"tags\": [\"css\"]\n}\n!*/\n\n Modernizr.addTest('csstransforms', function() {\n // Android < 3.0 is buggy, so we sniff and blacklist\n // http://git.io/hHzL7w\n return navigator.userAgent.indexOf('Android 2.') === -1 &&\n testAllProps('transform', 'scale(1)', true);\n });\n\n\n /**\n * testStyles injects an element with style element and some CSS rules\n *\n * @memberof Modernizr\n * @name Modernizr.testStyles\n * @optionName Modernizr.testStyles()\n * @optionProp testStyles\n * @access public\n * @function testStyles\n * @param {string} rule - String representing a css rule\n * @param {function} callback - A function that is used to test the injected element\n * @param {number} [nodes] - An integer representing the number of additional nodes you want injected\n * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes\n * @returns {boolean}\n * @example\n *\n * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page\n * along with (possibly multiple) DOM elements. This lets you check for features\n * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).\n *\n * ```js\n * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {\n * // elem is the first DOM node in the page (by default #modernizr)\n * // rule is the first argument you supplied - the CSS rule in string form\n *\n * addTest('widthworks', elem.style.width === '9px')\n * });\n * ```\n *\n * If your test requires multiple nodes, you can include a third argument\n * indicating how many additional div elements to include on the page. The\n * additional nodes are injected as children of the `elem` that is returned as\n * the first argument to the callback.\n *\n * ```js\n * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {\n * document.getElementById('modernizr').style.width === '1px'; // true\n * document.getElementById('modernizr2').style.width === '2px'; // true\n * elem.firstChild === document.getElementById('modernizr2'); // true\n * }, 1);\n * ```\n *\n * By default, all of the additional elements have an ID of `modernizr[n]`, where\n * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,\n * the second additional is `#modernizr3`, etc.).\n * If you want to have more meaningful IDs for your function, you can provide\n * them as the fourth argument, as an array of strings\n *\n * ```js\n * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {\n * elem.firstChild === document.getElementById('foo'); // true\n * elem.lastChild === document.getElementById('bar'); // true\n * }, 2, ['foo', 'bar']);\n * ```\n *\n */\n\n var testStyles = ModernizrProto.testStyles = injectElementWithStyles;\n \n/*!\n{\n \"name\": \"CSS Supports\",\n \"property\": \"supports\",\n \"caniuse\": \"css-featurequeries\",\n \"tags\": [\"css\"],\n \"builderAliases\": [\"css_supports\"],\n \"notes\": [{\n \"name\": \"W3 Spec\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#at-supports\"\n },{\n \"name\": \"Related Github Issue\",\n \"href\": \"github.com/Modernizr/Modernizr/issues/648\"\n },{\n \"name\": \"W3 Info\",\n \"href\": \"http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface\"\n }]\n}\n!*/\n\n var newSyntax = 'CSS' in window && 'supports' in window.CSS;\n var oldSyntax = 'supportsCSS' in window;\n Modernizr.addTest('supports', newSyntax || oldSyntax);\n\n/*!\n{\n \"name\": \"CSS Transforms 3D\",\n \"property\": \"csstransforms3d\",\n \"caniuse\": \"transforms3d\",\n \"tags\": [\"css\"],\n \"warnings\": [\n \"Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004\"\n ]\n}\n!*/\n\n Modernizr.addTest('csstransforms3d', function() {\n var ret = !!testAllProps('perspective', '1px', true);\n var usePrefix = Modernizr._config.usePrefixes;\n\n // Webkit's 3D transforms are passed off to the browser's own graphics renderer.\n // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in\n // some conditions. As a result, Webkit typically recognizes the syntax but\n // will sometimes throw a false positive, thus we must do a more thorough check:\n if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) {\n var mq;\n var defaultStyle = '#modernizr{width:0;height:0}';\n // Use CSS Conditional Rules if available\n if (Modernizr.supports) {\n mq = '@supports (perspective: 1px)';\n } else {\n // Otherwise, Webkit allows this media query to succeed only if the feature is enabled.\n // `@media (transform-3d),(-webkit-transform-3d){ ... }`\n mq = '@media (transform-3d)';\n if (usePrefix) {\n mq += ',(-webkit-transform-3d)';\n }\n }\n\n mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}';\n\n testStyles(defaultStyle + mq, function(elem) {\n ret = elem.offsetWidth === 7 && elem.offsetHeight === 18;\n });\n }\n\n return ret;\n });\n\n\n // Run each test\n testRunner();\n\n delete ModernizrProto.addTest;\n delete ModernizrProto.addAsyncTest;\n\n // Run the things that are supposed to run after the tests\n for (var i = 0; i < Modernizr._q.length; i++) {\n Modernizr._q[i]();\n }\n\n // Leak Modernizr namespace\n window.Modernizr = Modernizr;\n\n\n;\n\n})(window, document);\nmodule.exports = window.Modernizr;\n})(window);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../.modernizrrc\n ** module id = 18\n ** module chunks = 0\n **/","const raf = require('raf');\nconst context = require('../context');\nconst bubbleset = require('./bubbleset');\nconst bubble = require('./bubble');\nconst cursor = require('./cursor');\nconst select = require('./select');\nconst { KEY, EV, PROPS } = require('./constant');\nconst text = require('./text');\nconst events = require('./events');\nconst utils = require('./utils');\n\nconst eventCopy = require('./editor/copy');\nconst eventPaste = require('./editor/paste');\nconst eventBackspace = require('./editor/backspace');\nconst eventDelete = require('./editor/delete');\n\nconst EVENTS = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n keydown: onKeydown,\n keypress: onKeypress,\n keyup: onKeyup,\n mscontrolselect: events.prevent,\n paste: eventPaste,\n resize: events.prevent,\n resizestart: events.prevent,\n};\n\nexports.init = function (nodeWrap) {\n const nodeEditor = nodeWrap;\n nodeEditor.setAttribute('contenteditable', 'true');\n nodeEditor.setAttribute('spellcheck', 'false');\n\n nodeEditor.fireChange = utils.throttle(fireChange, nodeWrap);\n nodeEditor.fireEdit = utils.throttle(fireEdit, nodeWrap);\n nodeEditor.fireInput = utils.throttle(fireInput, nodeWrap);\n\n events.on(nodeEditor, EVENTS);\n\n return {\n addBubble: addBubble.bind(nodeEditor),\n editBubble: editBubble.bind(nodeEditor),\n inputValue: inputValue.bind(nodeEditor),\n removeBubble: removeBubble.bind(nodeEditor),\n setContent: setContent.bind(nodeEditor),\n };\n};\n\nexports.destroy = function (nodeEditor) {\n events.off(nodeEditor, EVENTS);\n};\n\nfunction onBlur(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n return events.prevent(event);\n }\n\n select.clear(nodeEditor);\n bubble.bubbling(nodeEditor);\n}\n\nfunction onFocus(event) {\n const nodeEditor = event.currentTarget;\n if (nodeEditor[ PROPS.LOCK_COPY ]) {\n events.prevent(event);\n delete nodeEditor[ PROPS.LOCK_COPY ];\n\n // Safary 10 не сбрасывает курсор без задержки\n raf(() => {\n const selection = context.getSelection();\n selection && selection.removeAllRanges();\n });\n\n return false;\n }\n\n cursor.restore(nodeEditor);\n}\n\nfunction onKeyup(event) {\n const nodeEditor = event.currentTarget;\n const code = events.keyCode(event);\n const isPrintableChar = do {\n if (event.key) {\n event.key.length === 1;\n\n } else {\n ((code > 47 || code === KEY.Space || code === KEY.Backspace) && code !== KEY.Cmd);\n }\n };\n\n if (isPrintableChar) {\n nodeEditor.fireInput();\n }\n}\n\nfunction onKeypress(event) {\n const code = events.keyCode(event);\n const nodeEditor = event.currentTarget;\n\n /* eslint no-case-declarations: 0 */\n switch (code) {\n case KEY.Enter:\n event.preventDefault();\n if (!nodeEditor.options('disableControls')) {\n if (!editBubbleKeyboardEvent(nodeEditor)) {\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n break;\n\n case KEY.Space:\n if (editBubbleKeyboardEvent(nodeEditor)) {\n event.preventDefault();\n }\n break;\n\n default:\n const separator = nodeEditor.options('separator');\n if (separator && separator.test(String.fromCharCode(code))) {\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n }\n }\n}\n\nfunction onKeydown(event) {\n const code = events.keyCode(event);\n const metaKey = events.metaKey(event);\n const nodeEditor = event.currentTarget;\n const enable = !nodeEditor.options('disableControls');\n\n switch (code) {\n case KEY.Esc:\n event.preventDefault();\n bubble.bubbling(nodeEditor);\n cursor.restore(nodeEditor);\n break;\n\n case KEY.Backspace:\n event.preventDefault();\n eventBackspace(event);\n break;\n\n case KEY.Delete:\n event.preventDefault();\n eventDelete(event);\n break;\n\n case KEY.Left:\n event.preventDefault();\n arrowLeft(event);\n break;\n\n // сдвигаем курсор в начало списка\n case KEY.Top:\n event.preventDefault();\n if (enable) {\n const headBubble = bubbleset.headBubble(nodeEditor);\n headBubble && select.uniq(headBubble);\n }\n break;\n\n case KEY.Right:\n event.preventDefault();\n arrowRight(event);\n break;\n\n // сдвигаем курсор в конец списка\n // case KEY.Tab:\n case KEY.Bottom:\n event.preventDefault();\n if (enable && select.has(nodeEditor)) {\n cursor.restore(nodeEditor);\n }\n break;\n\n case KEY.a:\n if (metaKey) {\n event.preventDefault();\n\n if (!text.selectAll(null, event.currentTarget)) {\n select.all(nodeEditor);\n }\n }\n break;\n\n case KEY.c:\n if (metaKey) {\n eventCopy(event);\n }\n break;\n\n case KEY.x:\n if (metaKey) {\n eventCopy(event, () => eventDelete(event));\n }\n break;\n }\n}\n\nfunction arrowLeft(event) {\n const selection = context.getSelection();\n\n if (text.arrowLeft(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.anchorNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.prevBubble(selection.anchorNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ 0 ] === nodeSet.startRangeSelect) {\n list[ list.length - 1 ];\n\n } else {\n list[ 0 ];\n }\n };\n\n const node = bubbleset.prevBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n }\n}\n\nfunction arrowRight(event) {\n const selection = context.getSelection();\n\n if (text.arrowRight(selection, event.shiftKey)) {\n return;\n }\n\n if (selection.focusNode && selection.focusNode.nodeType === Node.TEXT_NODE) {\n const nodeBubble = bubbleset.nextBubble(selection.focusNode);\n nodeBubble && select.uniq(nodeBubble);\n return;\n }\n\n const nodeSet = event.currentTarget;\n const list = select.get(nodeSet);\n const begin = do {\n if (list.length > 1 && list[ list.length - 1 ] === nodeSet.startRangeSelect) {\n list[ 0 ];\n\n } else {\n list[ list.length - 1 ];\n }\n };\n\n const node = bubbleset.nextBubble(begin);\n\n if (node) {\n if (event.shiftKey) {\n select.range(node);\n\n } else {\n select.uniq(node);\n }\n\n } else if (begin && begin.nextSibling && begin.nextSibling.nodeType === Node.TEXT_NODE) {\n select.clear(nodeSet);\n selection.collapse(begin.nextSibling, 0);\n\n } else {\n cursor.restore(nodeSet);\n }\n}\n\nfunction onClick(event) {\n const nodeSet = bubbleset.closestNodeSet(event.target);\n\n if (!nodeSet) {\n return;\n }\n\n const nodeBubble = bubbleset.closestNodeBubble(event.target);\n\n if (nodeBubble) {\n const clickTime = Date.now();\n const isDblclick = nodeSet[ PROPS.CLICK_TIME ] && (clickTime - nodeSet[ PROPS.CLICK_TIME ]) < 200;\n\n nodeSet[ PROPS.CLICK_TIME ] = clickTime;\n\n if (events.metaKey(event)) {\n select.add(nodeBubble);\n\n } else if (event.shiftKey) {\n if (!nodeSet.startRangeSelect) {\n select.uniq(nodeBubble);\n\n } else {\n select.range(nodeBubble);\n }\n\n } else if (isDblclick) {\n bubble.edit(nodeSet, nodeBubble);\n\n } else {\n select.toggleUniq(nodeBubble);\n }\n\n } else {\n select.clear(nodeSet);\n\n const selection = context.getSelection();\n\n if (!selection ||\n !selection.anchorNode ||\n selection.anchorNode.nodeType !== Node.TEXT_NODE) {\n\n cursor.restore(nodeSet);\n }\n }\n}\n\nfunction editBubbleKeyboardEvent(nodeEditor) {\n const selection = context.getSelection();\n\n if (!selection || !selection.rangeCount) {\n const list = select.get(nodeEditor);\n\n if (list.length === 1) {\n return bubble.edit(nodeEditor, list[0]);\n }\n }\n\n return false;\n}\n\nfunction setContent(data) {\n var selection = context.getSelection();\n selection && selection.removeAllRanges();\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n data = text.html2text(data);\n this.appendChild(this.ownerDocument.createTextNode(data));\n bubble.bubbling(this);\n cursor.restore(this);\n}\n\nfunction addBubble(bubbleText, dataAttributes) {\n const nodeBubble = bubble.create(this, bubbleText, dataAttributes);\n if (!nodeBubble) {\n return false;\n }\n\n if (text.text2bubble(this, nodeBubble)) {\n this.fireInput();\n this.fireChange();\n cursor.restore(this);\n return true;\n }\n\n return false;\n}\n\nfunction removeBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n this.removeChild(nodeBubble);\n this.fireChange();\n return true;\n }\n\n return false;\n}\n\nfunction editBubble(nodeBubble) {\n if (this.contains(nodeBubble)) {\n return bubble.edit(this, nodeBubble);\n }\n\n return false;\n}\n\nfunction inputValue() {\n const textRange = text.currentTextRange(this);\n return textRange && text.textClean(textRange.toString()) || '';\n}\n\n/**\n * Генерация события редактирования бабла.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireEdit\n * @param {HTMLElement} nodeBubble нода бабл\n * @this HTMLElement\n * @private\n */\nfunction fireEdit(nodeBubble) {\n events.dispatch(this, EV.BUBBLE_EDIT, {\n bubbles: false,\n cancelable: false,\n detail: { data: nodeBubble }\n });\n}\n\n/**\n * Генерация события изменения набора баблов.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireChange\n * @this HTMLElement\n * @private\n */\nfunction fireChange() {\n events.dispatch(this, EV.CHANGE, {\n bubbles: false,\n cancelable: false\n });\n}\n\n/**\n * Генерация события ввода текста.\n * Выполняется в контексте узла-обертки.\n * @alias module:x-bubbles/editor.fireInput\n * @this HTMLElement\n * @private\n */\nfunction fireInput() {\n const editText = inputValue.call(this);\n\n if (this[ PROPS.BUBBLE_VALUE ] !== editText) {\n this[ PROPS.BUBBLE_VALUE ] = editText;\n\n events.dispatch(this, EV.BUBBLE_INPUT, {\n bubbles: false,\n cancelable: false,\n detail: { data: editText }\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor.js\n **/","/**\n * @module x-bubbles/cursor\n */\n\nconst context = require('../context');\nconst text = require('./text');\nconst select = require('./select');\n\nexports.restore = restore;\nexports.restoreBasis = restoreBasis;\n\n/**\n * Reset the cursor position to the end of the input field.\n * @alias module:x-bubbles/cursor.restore\n * @param {HTMLElement} nodeSet\n */\nfunction restore(nodeSet) {\n select.clear(nodeSet);\n const basis = restoreBasis(nodeSet);\n const selection = context.getSelection();\n selection.removeAllRanges();\n selection.collapse(basis, 1);\n}\n\n/**\n * The creation of the fake text at the end childNodes\n * @alias module:x-bubbles/cursor.restoreBasis\n * @param {HTMLElement} nodeSet\n * @returns {HTMLTextElement} fake text node\n */\nfunction restoreBasis(nodeSet) {\n let fakeText = text.createZws();\n\n if (nodeSet.hasChildNodes()) {\n const lastNode = nodeSet.childNodes[ nodeSet.childNodes.length - 1 ];\n\n if (lastNode.isEqualNode(fakeText)) {\n fakeText = lastNode;\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n } else {\n nodeSet.appendChild(fakeText);\n }\n\n return fakeText;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/cursor.js\n **/","const raf = require('raf');\nconst events = require('../events');\nconst select = require('../select');\nconst { PROPS } = require('../constant');\nconst utils = require('../utils');\n\nmodule.exports = function (event, callback = function () {}) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n return false;\n }\n\n const list = select.get(nodeEditor);\n\n if (!list.length) {\n return false;\n }\n\n const bubbleCopy = nodeEditor.options('bubbleCopy');\n const value = bubbleCopy(list);\n\n if (!value) {\n return false;\n }\n\n nodeEditor[ PROPS.LOCK_COPY ] = true;\n\n const target = nodeEditor.ownerDocument.createElement('input');\n target.value = value;\n target.style.cssText = `\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n border: none;`;\n\n nodeEditor.parentNode.appendChild(target);\n\n events.one(target, {\n keyup: () => nodeEditor.focus(),\n blur: () => {\n removeNode(target);\n raf(callback);\n }\n });\n\n target.select();\n return true;\n};\n\nfunction removeNode(node) {\n node && node.parentNode && node.parentNode.removeChild(node);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/copy.js\n **/","const raf = require('raf');\nconst context = require('../../context');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst text = require('../text');\nconst { isIE } = require('../utils');\n\nmodule.exports = function (event) {\n event.preventDefault();\n const nodeEditor = event.currentTarget;\n\n if (context.clipboardData && context.clipboardData.getData) {\n onPasteSuccess(nodeEditor, context.clipboardData.getData('Text'));\n\n } else if (event.clipboardData) {\n const contentType = 'text/plain';\n const clipboardData = event.clipboardData;\n const data = clipboardData.getData && clipboardData.getData(contentType);\n\n if (!onPasteSuccess(nodeEditor, data) && clipboardData.items) {\n Array.prototype.slice.call(clipboardData.items)\n .filter(item => item.kind === 'string' && item.type === contentType)\n .some(function (item) {\n item.getAsString(function (dataText) {\n onPasteSuccess(nodeEditor, dataText);\n });\n\n return true;\n });\n }\n }\n};\n\nfunction onPasteSuccess(nodeEditor, dataText) {\n const checkBubblePaste = nodeEditor.options('checkBubblePaste');\n const selection = context.getSelection();\n const isBubbling = do {\n if (dataText && selection.isCollapsed && !nodeEditor.inputValue) {\n checkBubblePaste(dataText);\n\n } else {\n false;\n }\n };\n\n if (text.replaceString(dataText, selection)) {\n if (isBubbling) {\n if (isIE) {\n raf(() => onReplaceSuccess(nodeEditor));\n\n } else {\n onReplaceSuccess(nodeEditor);\n }\n\n } else {\n nodeEditor.fireInput();\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction onReplaceSuccess(nodeEditor) {\n bubble.bubbling(nodeEditor);\n nodeEditor.focus();\n raf(() => cursor.restore(nodeEditor));\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/paste.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Backspace.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowLeft(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleLeft(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/backspace.js\n **/","const raf = require('raf');\nconst select = require('../select');\nconst text = require('../text');\nconst bubbleset = require('../bubbleset');\nconst bubble = require('../bubble');\nconst cursor = require('../cursor');\nconst utils = require('../utils');\n\n/**\n * Реакция на событие нажатия на кнопку Delete.\n * Нельзя выполнять normalize() перед выполнением, иначе в ИЕ сбивается Selection.\n * @param {KeyboardEvent} event\n */\nmodule.exports = function (event) {\n const nodeEditor = event.target;\n const selection = utils.getSelection(nodeEditor);\n\n if (selection) {\n if (!selection.isCollapsed) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else if (text.arrowRight(selection, true)) {\n text.remove(selection);\n nodeEditor.fireInput();\n\n } else {\n const nodeBubble = bubbleset.findBubbleRight(selection);\n nodeBubble && select.uniq(nodeBubble);\n }\n\n } else if (!removeBubbles(nodeEditor)) {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n};\n\nfunction removeBubbles(nodeEditor) {\n const list = select.get(nodeEditor);\n if (!list.length) {\n return false;\n }\n\n const prevBubble = list[ 0 ].previousSibling;\n const nextBubble = list[ list.length - 1 ].nextSibling;\n\n list.forEach(item => item.parentNode.removeChild(item));\n\n if (bubble.isBubbleNode(nextBubble)) {\n select.uniq(nextBubble);\n\n } else if (bubble.isBubbleNode(prevBubble)) {\n select.uniq(prevBubble);\n\n } else {\n nodeEditor.focus();\n // без задержки не восстанавливает курсор\n raf(() => cursor.restore(nodeEditor));\n }\n\n nodeEditor.fireChange();\n return true;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./core/editor/delete.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index eac7e52..673cb4e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "x-bubbles", "description": "Bubbles", - "version": "0.0.25", + "version": "0.0.26", "keywords": [], "homepage": "https://github.com/Katochimoto/x-bubbles", "author": { diff --git a/src/index.js b/src/index.js index 85e22db..3350300 100644 --- a/src/index.js +++ b/src/index.js @@ -153,7 +153,7 @@ const OPTIONS_PREPARE = { return null; case 'object': - if (value instanceof context.RegExp) { + if (value instanceof context.RegExp || value === null) { return value; } }