/** * Draft v0.11.7 * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("immutable"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["immutable","react","react-dom"],t):"object"==typeof exports?exports.Draft=t(require("immutable"),require("react"),require("react-dom")):e.Draft=t(e.Immutable,e.React,e.ReactDOM)}(window,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=79)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e){if(void 0===e)throw new Error("invariant(...): Second argument must be a string.")};e.exports=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i0)return o.getInlineStyleAt(r-1);if(o.getLength())return o.getInlineStyleAt(0);return S(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);if(r0)return o.getInlineStyleAt(r-1);return S(e,n)}(t,n)},e.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.getDirectionMap=function(){return this.getImmutable().get("directionMap")},t.acceptSelection=function(e,t){return v(e,t,!1)},t.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),v(e,t,!0)},t.moveSelectionToEnd=function(e){var n=e.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return t.acceptSelection(e,new c({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},t.moveFocusToEnd=function(e){var n=t.moveSelectionToEnd(e);return t.forceSelection(n,n.getSelection())},t.push=function(e,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===n)return e;var i=s.getDirectionMap(n,e.getDirectionMap());if(!e.getAllowUndo())return t.set(e,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var a=e.getSelection(),c=e.getCurrentContent(),u=e.getUndoStack(),l=n;a!==c.getSelectionAfter()||b(e,r)?(u=u.push(c),l=l.set("selectionBefore",a)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(l=l.set("selectionBefore",c.getSelectionBefore()));var f=e.getInlineStyleOverride(),p=["adjust-depth","change-block-type","split-block"];-1===p.indexOf(r)&&(f=null);var g={currentContent:l,directionMap:i,undoStack:u,redoStack:d(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:f};return t.set(e,g)},t.undo=function(e){if(!e.getAllowUndo())return e;var n=e.getUndoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=s.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:n.shift(),redoStack:e.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},t.redo=function(e){if(!e.getAllowUndo())return e;var n=e.getRedoStack(),r=n.peek();if(!r)return e;var o=e.getCurrentContent(),i=s.getDirectionMap(r,e.getDirectionMap());return t.set(e,{currentContent:r,directionMap:i,undoStack:e.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.getImmutable=function(){return this._immutable},t}();function v(e,t,n){return y.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(e,t){return e.getBlockMap().map((function(n){return i.generate(e,n,t)})).toOrderedMap()}function b(e,t){return t!==e.getLastChangeType()||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}function S(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}e.exports=y},function(e,t,n){"use strict";var r=n(6),o=n(81),i=n(82),a=n(84),s=n(21),c=n(0),u=n(87),l=n(88),f=n(1),d=n(44),p=n(42),g=n(89),h=n(90),y=c.OrderedSet,v={replaceText:function(e,t,n,o,i){var a=p(e,t),s=g(a,t),c=r.create({style:o||y(),entity:i||null});return l(s,s.getSelectionAfter(),n,c)},insertText:function(e,t,n,r,o){return t.isCollapsed()||f(!1,"Target range must be collapsed for `insertText`."),v.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=s(e,t),o=v.removeRange(e,t,"backward");return v.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",o=p(e,t),i=g(o,t);return u(i,i.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var r,o,i,s;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),o=t.getFocusKey(),i=e.getBlockForKey(r),s=e.getBlockForKey(o);var c=t.getStartOffset(),u=t.getEndOffset(),l=i.getEntityAt(c),f=s.getEntityAt(u-1);if(r===o&&l&&l===f){var d=a(e.getEntityMap(),i,s,t,n);return g(e,d)}var h=p(e,t);return g(h,t)},splitBlock:function(e,t){var n=p(e,t),r=g(n,t);return h(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return o.add(e,t,n)},removeInlineStyle:function(e,t,n){return o.remove(e,t,n)},setBlockType:function(e,t,n){return d(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return d(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return d(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=p(e,t);return i(r,t,n)}};e.exports=v},function(e,t,n){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){"use strict";var r=n(100),o=n(103),i=n(104),a=n(105);function s(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var i=n.slice(e.length);return!!t&&(i=r?r(i):i,o.contains(i,t))}function c(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}var u={isBrowser:function(e){return s(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return s(r.browserArchitecture,null,e)},isDevice:function(e){return s(r.deviceName,null,e)},isEngine:function(e){return s(r.engineName,r.engineVersion,e)},isPlatform:function(e){return s(r.platformName,r.platformFullVersion,e,c)},isPlatformArchitecture:function(e){return s(r.platformArchitecture,null,e)}};e.exports=i(u,a)},function(e,t,n){"use strict";var r=n(0),o=r.Map,i=r.OrderedSet,a=r.Record,s=i(),c={style:s,entity:null},u=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.getStyle=function(){return this.get("style")},a.getEntity=function(){return this.get("entity")},a.hasStyle=function(e){return this.getStyle().includes(e)},r.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return r.create(n)},r.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return r.create(n)},r.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return r.create(n)},r.create=function(e){if(!e)return l;var t=o({style:s,entity:null}).merge(e),n=f.get(t);if(n)return n;var i=new r(t);return f=f.set(t,i),i},r.fromJS=function(e){var t=e.style,n=e.entity;return new r({style:Array.isArray(t)?i(t):t,entity:Array.isArray(n)?i(n):n})},r}(a(c)),l=new u,f=o([[o(c),l]]);u.EMPTY=l,e.exports=u},function(e,t,n){"use strict";var r=n(6),o=n(18),i=n(0),a=i.List,s=i.Map,c=i.OrderedSet,u=i.Record,l=i.Repeat,f=c(),d={parent:null,characterList:a(),data:s(),depth:0,key:"",text:"",type:"unstyled",children:a(),prevSibling:null,nextSibling:null},p=function(e,t){return e.getStyle()===t.getStyle()},g=function(e,t){return e.getEntity()===t.getEntity()},h=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(l(r.EMPTY,n.length))),e},y=function(e){var t,n;function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;return e.call(this,h(t))||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getKey=function(){return this.get("key")},i.getType=function(){return this.get("type")},i.getText=function(){return this.get("text")},i.getCharacterList=function(){return this.get("characterList")},i.getLength=function(){return this.getText().length},i.getDepth=function(){return this.get("depth")},i.getData=function(){return this.get("data")},i.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},i.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},i.getChildKeys=function(){return this.get("children")},i.getParentKey=function(){return this.get("parent")},i.getPrevSiblingKey=function(){return this.get("prevSibling")},i.getNextSiblingKey=function(){return this.get("nextSibling")},i.findStyleRanges=function(e,t){o(this.getCharacterList(),p,e,t)},i.findEntityRanges=function(e,t){o(this.getCharacterList(),g,e,t)},r}(u(d));e.exports=y},function(e,n){e.exports=t},function(e,t,n){"use strict";var r={},o=Math.pow(2,24);e.exports=function(){for(var e;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}},function(e,t,n){"use strict";var r={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var t=e.split("-").reverse(),n=t[0],r=t[1];return{blockKey:t.slice(2).reverse().join("-"),decoratorKey:parseInt(r,10),leafKey:parseInt(n,10)}}};e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]}},function(e,t,n){"use strict";var r=n(6),o=n(18),i=n(0),a=i.List,s=i.Map,c=i.OrderedSet,u=i.Record,l=i.Repeat,f=c(),d=u({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:s()}),p=function(e){var t,n;function i(t){return e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(l(r.EMPTY,n.length))),e}(t))||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=i.prototype;return s.getKey=function(){return this.get("key")},s.getType=function(){return this.get("type")},s.getText=function(){return this.get("text")},s.getCharacterList=function(){return this.get("characterList")},s.getLength=function(){return this.getText().length},s.getDepth=function(){return this.get("depth")},s.getData=function(){return this.get("data")},s.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},s.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},s.findStyleRanges=function(e,t){o(this.getCharacterList(),g,e,t)},s.findEntityRanges=function(e,t){o(this.getCharacterList(),h,e,t)},i}(d);function g(e,t){return e.getStyle()===t.getStyle()}function h(e,t){return e.getEntity()===t.getEntity()}e.exports=p},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),u=1;ur||n<=0)return"";var o=0;if(t>0){for(;t>0&&o=r)return""}else if(t<0){for(o=r;t<0&&00&&i=s},o.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},o.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},o.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},o.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},o.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,n(0).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=r},function(e,t,n){"use strict";var r=n(1),o=null;function i(e){return"LTR"===e||"RTL"===e}function a(e){return i(e)||r(!1,"`dir` must be a strong direction to be converted to HTML Direction"),"LTR"===e?"ltr":"rtl"}function s(e){o=e}var c={NEUTRAL:"NEUTRAL",LTR:"LTR",RTL:"RTL",isStrong:i,getHTMLDir:a,getHTMLDirIfDifferent:function(e,t){return i(e)||r(!1,"`dir` must be a strong direction to be converted to HTML Direction"),i(t)||r(!1,"`otherDir` must be a strong direction to be converted to HTML Direction"),e===t?null:a(e)},setGlobalDir:s,initGlobalDir:function(){s("LTR")},getGlobalDir:function(){return o||this.initGlobalDir(),o||r(!1,"Global direction not set."),o}};e.exports=c},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(27),o=n(50);e.exports=function(e){for(var t=e;t&&t!==r(e).documentElement;){var n=o(t);if(null!=n)return n;t=t.parentNode}return null}},function(e,t,n){"use strict";e.exports=function(e){return e&&e.ownerDocument?e.ownerDocument:document}},function(e,t,n){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,n){"use strict";function r(e,t){var n=o.get(e,t);return"auto"===n||"scroll"===n}var o={get:n(115),getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(r(e,"overflow")||r(e,"overflowY")||r(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=o},function(e,t,n){"use strict";var r=n(119),o=n(120);e.exports=function(e){var t=r(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var n=o(e),i=e===t?e.ownerDocument.documentElement:e,a=e.scrollWidth-i.clientWidth,s=e.scrollHeight-i.clientHeight;return n.x=Math.max(0,Math.min(n.x,a)),n.y=Math.max(0,Math.min(n.y,s)),n}},function(e,t,n){"use strict";e.exports=function(e){return"handled"===e||!0===e}},function(e,t,n){"use strict";function r(e){for(var t=1;t1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},s.createEntity=function(e,t,n){return u.__create(e,t,n),this},s.mergeEntityData=function(e,t){return u.__mergeData(e,t),this},s.replaceEntityData=function(e,t){return u.__replaceData(e,t),this},s.addEntity=function(e){return u.__add(e),this},s.getEntity=function(e){return u.__get(e)},s.getAllEntities=function(){return u.__getAll()},s.loadWithEntities=function(e){return u.__loadWithEntities(e)},o.createFromBlockArray=function(e,t){var n=Array.isArray(e)?e:e.contentBlocks,r=i.createFromArray(n),a=r.isEmpty()?new l:l.createEmpty(r.first().getKey());return new o({blockMap:r,entityMap:t||u,selectionBefore:a,selectionAfter:a})},o.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t),r=n.map((function(e){return e=h(e),new x({key:f(),text:e,type:"unstyled",characterList:y(m(a.EMPTY,e.length))})}));return o.createFromBlockArray(r)},o.fromJS=function(e){return new o(r({},e,{blockMap:S(e.blockMap).map(o.createContentBlockFromJS),selectionBefore:new l(e.selectionBefore),selectionAfter:new l(e.selectionAfter)}))},o.createContentBlockFromJS=function(e){var t=e.characterList;return new x(r({},e,{data:b(e.data),characterList:null!=t?y((Array.isArray(t)?t:d(t)).map((function(e){return a.fromJS(e)}))):void 0}))},o}(w);e.exports=k},function(e,t,n){"use strict";var r=n(24),o=n(1),i="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",a="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",s=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+i+a+"]"),c=new RegExp("["+i+a+"]");function u(e){var t=s.exec(e);return null==t?null:t[0]}function l(e){var t=u(e);return null==t?r.NEUTRAL:c.exec(t)?r.RTL:r.LTR}function f(e,t){if(t=t||r.NEUTRAL,!e.length)return t;var n=l(e);return n===r.NEUTRAL?t:n}function d(e,t){return t||(t=r.getGlobalDir()),r.isStrong(t)||o(!1,"Fallback direction must be a strong direction"),f(e,t)}var p={firstStrongChar:u,firstStrongCharDir:l,resolveBlockDir:f,getDirection:d,isDirectionLTR:function(e,t){return d(e,t)===r.LTR},isDirectionRTL:function(e,t){return d(e,t)===r.RTL}};e.exports=p},function(e,t,n){"use strict";var r=n(8),o=n(13),i=(0,n(0).Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:r.createElement("ul",{className:o("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:r.createElement("ol",{className:o("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:r.createElement("pre",{className:o("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});e.exports=i},function(e,t,n){"use strict";var r=n(58).notEmptyKey;function o(e,t){return r(t)&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=function(e,t){var n;if(t.isCollapsed()){var r=t.getAnchorKey(),i=t.getAnchorOffset();return i>0?(n=e.getBlockForKey(r).getEntityAt(i-1))!==e.getBlockForKey(r).getEntityAt(i)?null:o(e.getEntityMap(),n):null}var a=t.getStartKey(),s=t.getStartOffset(),c=e.getBlockForKey(a);return n=s===c.getLength()?null:c.getEntityAt(s),o(e.getEntityMap(),n)}},function(e,t,n){"use strict";var r=n(113);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";function r(e,t){return!!t&&(e===t.documentElement||e===t.body)}var o={getTop:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}};e.exports=o},function(e,t,n){"use strict";var r=n(39);e.exports=function(e,t){var n=e.getSelection();r(n.isCollapsed(),"moveSelectionBackward should only be called with a collapsed SelectionState");var o=e.getCurrentContent(),i=n.getStartKey(),a=n.getStartOffset(),s=i,c=0;if(t>a){var u=o.getKeyBefore(i);if(null==u)s=i;else s=u,c=o.getBlockForKey(u).getText().length}else c=a-t;return n.merge({focusKey:s,focusOffset:c,isBackward:!0})}},function(e,t,n){"use strict";n(67);function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2?n-2:0),i=2;i0?a.get(n-1):void 0,c=n=n&&(r={start:e,end:t})})),"object"!=typeof r&&i(!1,"Removal range must exist within character list."),r}(a,l,n),p=d.start,g=d.end;p0&&(n=i.childNodes.length));if(0===n){var f=null;if(null!=u)f=u;else{var d=function(e){for(;e.firstChild&&(s(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||o(e.firstChild));)e=e.firstChild;return e}(i);f=c(o(d))}return{key:f,offset:0}}var p=i.childNodes[n-1],g=null,h=null;if(o(p)){var y=function(e){for(;e.lastChild&&(s(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||o(e.lastChild));)e=e.lastChild;return e}(p);g=c(o(y)),h=l(y)}else g=c(u),h=l(p);return{key:g,offset:h}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}e.exports=function(e,t,n,o,a,s){var l=n.nodeType===Node.TEXT_NODE,f=a.nodeType===Node.TEXT_NODE;if(l&&f)return{selectionState:i(e,c(r(n)),o,c(r(a)),s),needsRecovery:!1};var d=null,p=null,g=!0;return l?(d={key:c(r(n)),offset:o},p=u(t,a,s)):f?(p={key:c(r(a)),offset:s},d=u(t,n,o)):(d=u(t,n,o),p=u(t,a,s),n===a&&o===s&&(g=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:i(e,d.key,d.offset,p.key,p.offset),needsRecovery:g}}},function(e,t,n){"use strict";var r=n(10),o=n(4);e.exports=function(e,t,n,i,a){var s=o(e.getSelection());if(!t||!i)return console.warn("Invalid selection state.",arguments,e.toJS()),s;var c=r.decode(t),u=c.blockKey,l=e.getBlockTree(u),f=l&&l.getIn([c.decoratorKey,"leaves",c.leafKey]),d=r.decode(i),p=d.blockKey,g=e.getBlockTree(p),h=g&&g.getIn([d.decoratorKey,"leaves",d.leafKey]);if(!f||!h)return console.warn("Invalid selection state.",arguments,e.toJS()),s;var y=f.get("start"),v=h.get("start"),m=f?y+n:null,b=h?v+a:null,S=s.getAnchorKey()===u&&s.getAnchorOffset()===m&&s.getFocusKey()===p&&s.getFocusOffset()===b;if(S)return s;var w=!1;if(u===p){var x=f.get("end"),k=h.get("end");w=v===y&&k===x?a0&&window.scrollTo(i.x,i.y+r+10)}else{b(n)||m(!1,"blockNode is not an HTMLElement"),(r=n.offsetHeight+n.offsetTop-(o.offsetTop+o.offsetHeight+i.y))>0&&l.setTop(o,l.getTop(o)+r+10)}}}}},x._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),i=this.props.tree.size-1,a=w(this.props.selection,n);return this.props.tree.map((function(l,f){var g=l.get("leaves");if(0===g.size)return null;var h=g.size-1,y=g.map((function(o,l){var d=c.encode(n,f,l),p=o.get("start"),g=o.get("end");return u.createElement(s,{key:d,offsetKey:d,block:t,start:p,selection:a?e.props.selection:null,forceSelection:e.props.forceSelection,text:r.slice(p,g),styleSet:t.getInlineStyleAt(p),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:f===i&&l===h})})).toArray(),v=l.get("decoratorKey");if(null==v)return y;if(!e.props.decorator)return y;var m=S(e.props.decorator),b=m.getComponentForKey(v);if(!b)return y;var w=m.getPropsForKey(v),x=c.encode(n,f,0),k=g.first().get("start"),C=g.last().get("end"),E=r.slice(k,C),O=t.getEntityAt(l.get("start")),_=p.getHTMLDirIfDifferent(d.getDirection(E),e.props.direction),T={contentState:e.props.contentState,decoratedText:E,dir:_,start:k,end:C,blockKey:n,entityKey:O,offsetKey:x};return u.createElement(b,o({},w,T,{key:x}),y)})).toArray()},x.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,o=g({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return u.createElement("div",{"data-offset-key":r,className:o,ref:function(t){return e._node=t}},this._renderChildren())},r}(u.Component);e.exports=x},function(e,t,n){"use strict";var r=n(124),o=n(125),i=n(67),a=new RegExp("\r\n","g"),s={"text/rtf":1,"text/html":1};function c(e){if("file"==e.kind)return e.getAsFile()}var u=function(){function e(e){this.data=e,this.types=e.types?o(e.types):[]}var t=e.prototype;return t.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(e){return s[e]}))},t.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(a,"\n"):null},t.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},t.isLink=function(){return this.types.some((function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")}))},t.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},t.isImage=function(){var e=this.types.some((function(e){return-1!=e.indexOf("application/x-moz-file")}));if(e)return!0;for(var t=this.getFiles(),n=0;n0},e}();e.exports=u},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";(function(t){var r=n(1),o=/\.textClipping$/,i={"text/plain":!0,"text/html":!0,"text/rtf":!0};e.exports=function(e,n){var a=0,s=[];e.forEach((function(c){!function(e,n){if(!t.FileReader||e.type&&!(e.type in i))return void n("");if(""===e.type){var a="";return o.test(e.name)&&(a=e.name.replace(o,"")),void n(a)}var s=new FileReader;s.onload=function(){var e=s.result;"string"!=typeof e&&r(!1,'We should be calling "FileReader.readAsText" which returns a string'),n(e)},s.onerror=function(){n("")},s.readAsText(e)}(c,(function(t){a++,t&&s.push(t.slice(0,5e3)),a==e.length&&n(s.join("\r"))}))}))}}).call(this,n(25))},function(e,t,n){"use strict";var r=n(21);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:r(e.getCurrentContent(),t)}},function(e,t,n){"use strict";var r=n(2),o=n(16),i=n(38),a=n(20);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),a=t.getAnchorOffset(),s=n.getBlockForKey(r).getText()[a-1];return i(e,s?o.getUTF16Length(s,0):1)}),"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")}},function(e,t,n){"use strict";var r=n(5),o=n(1);var i=r.isBrowser("Chrome")?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var i=r===e.commonAncestorContainer;i?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var a,s=Array.from(t.getClientRects());if(n.push(s),i)return n.reverse(),(a=[]).concat.apply(a,n);t.setEndBefore(r)}o(!1,"Found an unexpected detached subtree when getting range client rects.")}:function(e){return Array.from(e.getClientRects())};e.exports=i},function(e,t,n){"use strict";var r="\\s|(?![_])"+n(147).getPunctuation(),o=new RegExp("^(?:"+r+")*(?:['‘’]|(?!"+r+").)*(?:(?!"+r+").)"),i=new RegExp("(?:(?!"+r+").)(?:['‘’]|(?!"+r+").)*(?:"+r+")*$");function a(e,t){var n=t?i.exec(e):o.exec(e);return n?n[0]:e}var s={getBackward:function(e){return a(e,!0)},getForward:function(e){return a(e,!1)}};e.exports=s},function(e,t,n){"use strict";var r=n(39);e.exports=function(e,t){var n=e.getSelection();r(n.isCollapsed(),"moveSelectionForward should only be called with a collapsed SelectionState");var o,i=n.getStartKey(),a=n.getStartOffset(),s=e.getCurrentContent(),c=i;return t>s.getBlockForKey(i).getText().length-a?(c=s.getKeyAfter(i),o=0):o=a+t,n.merge({focusKey:c,focusOffset:o})}},function(e,t,n){"use strict";var r;function o(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(R).some((function(n){e.classList.contains(n)&&(t=R[n])})),t},j=function(e){if(!S(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new f(t.href);return!0}catch(e){return!1}},U=function(e){if(!k(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},H=function(e,t){if(!x(e))return t;var n=e,r=n.style.fontWeight,o=n.style.fontStyle,i=n.style.textDecoration;return t.withMutations((function(e){M.indexOf(r)>=0?e.add("BOLD"):A.indexOf(r)>=0&&e.remove("BOLD"),"italic"===o?e.add("ITALIC"):"normal"===o&&e.remove("ITALIC"),"underline"===i&&e.add("UNDERLINE"),"line-through"===i&&e.add("STRIKETHROUGH"),"none"===i&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}))},z=function(e){return"ul"===e||"ol"===e},W=function(){function e(e,t){i(this,"characterList",v()),i(this,"currentBlockType","unstyled"),i(this,"currentDepth",0),i(this,"currentEntity",null),i(this,"currentText",""),i(this,"wrapper",null),i(this,"blockConfigs",[]),i(this,"contentBlocks",[]),i(this,"entityMap",l),i(this,"blockTypeMap",void 0),i(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var t=e.prototype;return t.clear=function(){this.characterList=v(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},t.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],b())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},t.getContentBlocks=function(){return 0===this.contentBlocks.length&&(C?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},t._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key||p(),n=o({key:t,type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:v(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=v(),this.currentBlockType="unstyled",this.currentText="",n},t._toBlockConfigs=function(e,t){for(var n=[],r=0;r(n=void 0!==(r=this.characterList.reverse().findEntry((function(e){return null!==e.getEntity()})))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=v()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},t._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(_,"")).replace(O," ")),this._appendText(n,t)},t._addBreakNode=function(e,t){w(e)&&this._appendText("\n",t)},t._addImgNode=function(e,t){if(k(e)){var n=e,r={};L.forEach((function(e){var t=n.getAttribute(e);t&&(r[e]=t)})),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),h("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},t._addAnchorNode=function(e,t,n){if(S(e)){var r=e,o={};B.forEach((function(e){var t=r.getAttribute(e);t&&(o[e]=t)})),o.url=new f(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",o||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},t._toContentBlocks=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.length-1,r=0;r<=n;r++){var i=e[r];i.parent=t,i.prevSibling=r>0?e[r-1].key:null,i.nextSibling=r1&&void 0!==arguments[1]?arguments[1]:g,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=t(e=e.trim().replace(E,"").replace(T," ").replace(D,"").replace(K,""));if(!r)return null;var o=N(n),i=function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null};return new W(o,i).addDOMNode(r).getContentBlocks()}},function(e,t,n){"use strict";var r=n(5),o=n(1),i=r.isBrowser("IE <= 9");e.exports=function(e){var t,n=null;return!i&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||o(!1,"Missing doc.documentElement"),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}},function(e,t,n){"use strict";var r=n(3),o=n(2),i=n(160),a=n(4),s={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some((function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()}))},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return s.toggleInlineStyle(e,"BOLD");case"italic":return s.toggleInlineStyle(e,"ITALIC");case"underline":return s.toggleInlineStyle(e,"UNDERLINE");case"code":return s.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return s.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return s.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=r.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=o.push(e,t,"insert-characters");return o.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockBefore(r);if(i&&"atomic"===i.getType()){var a=n.getBlockMap().delete(i.getKey()),c=n.merge({blockMap:a,selectionAfter:t});if(c!==n)return o.push(e,c,"remove-range")}var u=s.tryToRemoveBlockStyle(e);return u?o.push(e,u,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),i=t.getStartKey(),a=n.getBlockForKey(i).getLength();if(t.getStartOffset()=e.start}));1!=g.length&&i(!1,"There should only be one entity range within this removal range.");var h=g[0];if("IMMUTABLE"===d)return n.merge({anchorOffset:h.start,focusOffset:h.end,isBackward:!1});c||(u?f=h.end:l=h.start);var y=r.getRemovalRange(l,f,t.getText().slice(h.start,h.end),h.start,a);return n.merge({anchorOffset:y.start,focusOffset:y.end,isBackward:!1})}e.exports=function(e,t,n,r,o){var i=r.getStartOffset(),s=r.getEndOffset(),c=t.getEntityAt(i),u=n.getEntityAt(s-1);if(!c&&!u)return r;var l=r;if(c&&c===u)l=a(e,t,l,o,c,!0,!0);else if(c&&u){var f=a(e,t,l,o,c,!1,!0),d=a(e,n,l,o,u,!1,!1);l=l.merge({anchorOffset:f.getAnchorOffset(),focusOffset:d.getFocusOffset(),isBackward:!1})}else if(c){var p=a(e,t,l,o,c,!1,!0);l=l.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(u){var g=a(e,n,l,o,u,!1,!1);l=l.merge({focusOffset:g.getEndOffset(),isBackward:!1})}return l}},function(e,t,n){"use strict";e.exports={getRemovalRange:function(e,t,n,r,o){var i=n.split(" ");i=i.map((function(e,t){if("forward"===o){if(t>0)return" "+e}else if(t6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",c=n.get(o),u=c.getText(),l=c.getCharacterList(),f=o,d=i+r.getText().length,p=null;switch(s){case"MERGE_OLD_DATA_TO_NEW_DATA":p=r.getData().merge(c.getData());break;case"REPLACE_WITH_NEW_DATA":p=r.getData()}var g=c.getType();u&&"unstyled"===g&&(g=r.getType());var h=c.merge({text:u.slice(0,i)+r.getText()+u.slice(i),characterList:a(l,r.getCharacterList(),i),type:g,data:p});return e.merge({blockMap:n.set(o,h),selectionBefore:t,selectionAfter:t.merge({anchorKey:f,anchorOffset:d,focusKey:f,focusOffset:d,isBackward:!1})})},f=function(e,t,n,i,a,s){var c=n.first()instanceof o,l=[],f=i.size,d=n.get(a),p=i.first(),g=i.last(),h=g.getLength(),y=g.getKey(),v=c&&(!d.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty());n.forEach((function(e,t){t===a?(v?l.push(e):l.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.slice(0,t),a=o.slice(0,t),s=n.first();return e.merge({text:i+s.getText(),characterList:a.concat(s.getCharacterList()),type:i?e.getType():s.getType(),data:s.getData()})}(e,s,i)),i.slice(v?0:1,f-1).forEach((function(e){return l.push(e)})),l.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),i=r.length,a=r.slice(t,i),s=o.slice(t,i),c=n.last();return c.merge({text:c.getText()+a,characterList:c.getCharacterList().concat(s),data:c.getData()})}(e,s,i))):l.push(e)}));var m=r.createFromArray(l);return c&&(m=function(e,t,n,r){return e.withMutations((function(t){var o=n.getKey(),i=r.getKey(),a=n.getNextSiblingKey(),s=n.getParentKey(),c=function(e,t){var n=e.getKey(),r=e,o=[];for(t.get(n)&&o.push(n);r&&r.getNextSiblingKey();){var i=r.getNextSiblingKey();if(!i)break;o.push(i),r=t.get(i)}return o}(r,e),l=c[c.length-1];if(t.get(i)?(t.setIn([o,"nextSibling"],i),t.setIn([i,"prevSibling"],o)):(t.setIn([o,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],o)),t.setIn([l,"nextSibling"],a),a&&t.setIn([a,"prevSibling"],l),c.forEach((function(e){return t.setIn([e,"parent"],s)})),s){var f=e.get(s).getChildKeys(),d=f.indexOf(o)+1,p=f.toArray();p.splice.apply(p,[d,0].concat(c)),t.setIn([s,"children"],u(p))}}))}(m,0,d,p)),e.merge({blockMap:m,selectionBefore:t,selectionAfter:t.merge({anchorKey:y,anchorOffset:h,focusKey:y,focusOffset:h,isBackward:!1})})};e.exports=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";t.isCollapsed()||s(!1,"`insertFragment` should only be called with a collapsed selection state.");var i=e.getBlockMap(),a=c(n),u=t.getStartKey(),d=t.getStartOffset(),p=i.get(u);return p instanceof o&&(p.getChildKeys().isEmpty()||s(!1,"`insertFragment` should not be called when a container node is selected.")),1===a.size?l(e,t,i,a.first(),u,d,r):f(e,t,i,a,u,d)}},function(e,t,n){"use strict";var r=n(0),o=n(43),i=n(1),a=r.Repeat;e.exports=function(e,t,n,r){t.isCollapsed()||i(!1,"`insertText` should only be called with a collapsed range.");var s=null;if(null!=n&&(s=n.length),null==s||0===s)return e;var c=e.getBlockMap(),u=t.getStartKey(),l=t.getStartOffset(),f=c.get(u),d=f.getText(),p=f.merge({text:d.slice(0,l)+n+d.slice(l,f.getLength()),characterList:o(f.getCharacterList(),a(r,s).toList(),l)}),g=l+s;return e.merge({blockMap:c.set(u,p),selectionAfter:t.merge({anchorOffset:g,focusOffset:g})})}},function(e,t,n){"use strict";var r=n(7),o=n(45),i=n(0),a=(i.List,i.Map),s=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},c=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var o=r.getParentKey();o&&n.push(o),r=o?t.get(o):null}return n},u=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},l=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},f=function(e,t,n,r){return e.withMutations((function(i){if(s(t.getKey(),i,(function(e){return e.merge({nextSibling:u(e,i,r),prevSibling:l(e,i,r)})})),s(n.getKey(),i,(function(e){return e.merge({nextSibling:u(e,i,r),prevSibling:l(e,i,r)})})),c(t.getKey(),r).forEach((function(e){return s(e,i,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return i.get(e)})),nextSibling:u(e,i,r),prevSibling:l(e,i,r)})}))})),s(t.getNextSiblingKey(),i,(function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})})),s(t.getPrevSiblingKey(),i,(function(e){return e.merge({nextSibling:u(e,i,r)})})),s(n.getNextSiblingKey(),i,(function(e){return e.merge({prevSibling:l(e,i,r)})})),s(n.getPrevSiblingKey(),i,(function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})),c(n.getKey(),r).forEach((function(e){s(e,i,(function(e){return e.merge({children:e.getChildKeys().filter((function(e){return i.get(e)})),nextSibling:u(e,i,r),prevSibling:l(e,i,r)})}))})),function(e,t){var n=[];if(!e)return n;for(var r=o(e,t);r&&t.get(r);){var i=t.get(r);n.push(r),r=i.getParentKey()?o(i,t):null}return n}(n,r).forEach((function(e){return s(e,i,(function(e){return e.merge({nextSibling:u(e,i,r),prevSibling:l(e,i,r)})}))})),null==e.get(t.getKey())&&null!=e.get(n.getKey())&&n.getParentKey()===t.getKey()&&null==n.getPrevSiblingKey()){var a=t.getPrevSiblingKey();s(n.getKey(),i,(function(e){return e.merge({prevSibling:a})})),s(a,i,(function(e){return e.merge({nextSibling:n.getKey()})}));var f=a?e.get(a):null,d=f?f.getParentKey():null;if(t.getChildKeys().forEach((function(e){s(e,i,(function(e){return e.merge({parent:d})}))})),null!=d){var p=e.get(d);s(d,i,(function(e){return e.merge({children:p.getChildKeys().concat(t.getChildKeys())})}))}s(t.getChildKeys().find((function(t){return null===e.get(t).getNextSiblingKey()})),i,(function(e){return e.merge({nextSibling:t.getNextSiblingKey()})}))}}))},d=function(e,t,n){if(0===t)for(;tt;)e=e.pop(),n--;else{var r=e.slice(0,t),o=e.slice(n);e=r.concat(o).toList()}return e};e.exports=function(e,t){if(t.isCollapsed())return e;var n,i=e.getBlockMap(),s=t.getStartKey(),u=t.getStartOffset(),l=t.getEndKey(),p=t.getEndOffset(),g=i.get(s),h=i.get(l),y=g instanceof r,v=[];if(y){var m=h.getChildKeys(),b=c(l,i);h.getNextSiblingKey()&&(v=v.concat(b)),m.isEmpty()||(v=v.concat(b.concat([l]))),v=v.concat(c(o(h,i),i))}n=g===h?d(g.getCharacterList(),u,p):g.getCharacterList().slice(0,u).concat(h.getCharacterList().slice(p));var S=g.merge({text:g.getText().slice(0,u)+h.getText().slice(p),characterList:n}),w=y&&0===u&&0===p&&h.getParentKey()===s&&null==h.getPrevSiblingKey()?a([[s,null]]):i.toSeq().skipUntil((function(e,t){return t===s})).takeUntil((function(e,t){return t===l})).filter((function(e,t){return-1===v.indexOf(t)})).concat(a([[l,null]])).map((function(e,t){return t===s?S:null})),x=i.merge(w).filter((function(e){return!!e}));return y&&g!==h&&(x=f(x,g,h,i)),e.merge({blockMap:x,selectionBefore:t,selectionAfter:t.merge({anchorKey:s,anchorOffset:u,focusKey:s,focusOffset:u,isBackward:!1})})}},function(e,t,n){"use strict";var r=n(7),o=n(9),i=n(0),a=n(1),s=n(44),c=i.List,u=i.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};e.exports=function(e,t){t.isCollapsed()||a(!1,"Selection range must be collapsed.");var n=t.getAnchorKey(),i=e.getBlockMap(),f=i.get(n),d=f.getText();if(!d){var p=f.getType();if("unordered-list-item"===p||"ordered-list-item"===p)return s(e,t,(function(e){return e.merge({type:"unstyled",depth:0})}))}var g=t.getAnchorOffset(),h=f.getCharacterList(),y=o(),v=f instanceof r,m=f.merge({text:d.slice(0,g),characterList:h.slice(0,g)}),b=m.merge({key:y,text:d.slice(g),characterList:h.slice(g),data:u()}),S=i.toSeq().takeUntil((function(e){return e===f})),w=i.toSeq().skipUntil((function(e){return e===f})).rest(),x=S.concat([[n,m],[y,b]],w).toOrderedMap();return v&&(f.getChildKeys().isEmpty()||a(!1,"ContentBlockNode must not have children"),x=function(e,t,n){return e.withMutations((function(e){var r=t.getKey(),o=n.getKey();l(t.getParentKey(),e,(function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,i=t.toArray();return i.splice(n,0,o),e.merge({children:c(i)})})),l(t.getNextSiblingKey(),e,(function(e){return e.merge({prevSibling:o})})),l(r,e,(function(e){return e.merge({nextSibling:o})})),l(o,e,(function(e){return e.merge({prevSibling:r})}))}))}(x,m,b)),e.merge({blockMap:x,selectionBefore:t,selectionAfter:t.merge({anchorKey:y,anchorOffset:0,focusKey:y,focusOffset:0,isBackward:!1})})}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(18),i=n(46),a=n(0),s=a.List,c=a.Repeat,u=a.Record,l=function(){return!0},f=u({start:null,end:null}),d=u({start:null,end:null,decoratorKey:null,leaves:null}),p={generate:function(e,t,n){var r=t.getLength();if(!r)return s.of(new d({start:0,end:0,decoratorKey:null,leaves:s.of(new f({start:0,end:0}))}));var i=[],a=n?n.getDecorations(t,e):s(c(null,r)),u=t.getCharacterList();return o(a,h,l,(function(e,t){i.push(new d({start:e,end:t,decoratorKey:a.get(e),leaves:g(u.slice(e,t).toList(),e)}))})),s(i)},fromJS:function(e){var t=e.leaves,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["leaves"]);return new d(function(e){for(var t=1;t * Dual licensed under GPLv2 or MIT */!function(o,i){"use strict";var a="model",s="name",c="type",u="vendor",l="version",f="mobile",d="tablet",p={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},g={rgx:function(e,t){for(var n,r,o,i,a,s,c=0;c0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;c+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r=|~>|~|>|)?\s*(.+)/,c=/^(\d*)(.*)/;function u(e,t){var n=e.split(i);return n.length>1?n.some((function(e){return S.contains(e,t)})):function(e,t){var n=e.split(a);if(n.length>0&&n.length<=2||r(!1,'the "-" operator expects exactly 2 operands'),1===n.length)return l(n[0],t);var o=n[0],i=n[1];return h(o)&&h(i)||r(!1,'operands to the "-" operator must be simple (no modifiers)'),l(">="+o,t)&&l("<="+i,t)}(e=n[0].trim(),t)}function l(e,t){if(""===(e=e.trim()))return!0;var n,r=t.split(o),i=p(e),a=i.modifier,s=i.rangeComponents;switch(a){case"<":return f(r,s);case"<=":return-1===(n=b(r,s))||0===n;case">=":return d(r,s);case">":return function(e,t){return 1===b(e,t)}(r,s);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var o=r.length-1,i=parseInt(r[o],10);g(i)&&(r[o]=i+1+"");return d(e,n)&&f(e,r)}(r,s);default:return function(e,t){return 0===b(e,t)}(r,s)}}function f(e,t){return-1===b(e,t)}function d(e,t){var n=b(e,t);return 1===n||0===n}function p(e){var t=e.split(o),n=t[0].match(s);return n||r(!1,"expected regex to match but it did not"),{modifier:n[1],rangeComponents:[n[2]].concat(t.slice(1))}}function g(e){return!isNaN(e)&&isFinite(e)}function h(e){return!p(e).modifier}function y(e,t){for(var n=e.length;nt?1:e0&&window.scrollTo(i.x,i.y+r+10)}else{m(n)||v(!1,"blockNode is not an HTMLElement");var s=n;(r=s.offsetHeight+s.offsetTop-(o.offsetHeight+i.y))>0&&f.setTop(o,f.getTop(o)+r+10)}}}},y.render=function(){var e=this,t=this.props,n=t.block,i=t.blockRenderMap,s=t.blockRendererFn,f=t.blockStyleFn,d=t.contentState,p=t.decorator,g=t.editorKey,h=t.editorState,y=t.customStyleFn,v=t.customStyleMap,m=t.direction,k=t.forceSelection,C=t.selection,E=t.tree,O=null;n.children.size&&(O=n.children.reduce((function(t,n){var o=u.encode(n,0,0),c=d.getBlockForKey(n),p=w(c,s),y=p.CustomComponent||r,v=S(c,i),m=v.Element,b=v.wrapperTemplate,k=x(c,g,o,f,p,null),C=a({},e.props,{tree:h.getBlockTree(n),blockProps:p.customProps,offsetKey:o,block:c});return t.push(l.createElement(m,k,l.createElement(y,C))),!b||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(c,d)||function(e,t,n){var r=[],o=!0,i=!1,a=void 0;try{for(var s,c=n.reverse()[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var f=s.value;if(f.type!==t)break;r.push(f)}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}n.splice(n.indexOf(r[0]),r.length+1);var d=r.reverse(),p=d[0].key;n.push(l.cloneElement(e,{key:"".concat(p,"-wrap"),"data-offset-key":u.encode(p,0,0)},d))}(b,m,t),t}),[]));var _=n.getKey(),T=u.encode(_,0,0),D=w(n,s),K=D.CustomComponent,M=null!=K?l.createElement(K,o({},this.props,{tree:h.getBlockTree(_),blockProps:D.customProps,offsetKey:T,block:n})):l.createElement(c,{block:n,children:O,contentState:d,customStyleFn:y,customStyleMap:v,decorator:p,direction:m,forceSelection:k,hasSelection:b(C,_),selection:C,tree:E});if(n.getParentKey())return M;var A=S(n,i).Element,B=x(n,g,T,f,D,this.wrapperRef);return l.createElement(A,B,M)},r}(l.Component);e.exports=k},function(e,t,n){"use strict";var r=n(110),o=n(59),i=n(10),a=n(0),s=n(8),c=n(13),u=(a.List,function(e){var t,n;function a(){return e.apply(this,arguments)||this}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.prototype.render=function(){var e=this.props,t=e.block,n=e.contentState,a=e.customStyleFn,u=e.customStyleMap,l=e.decorator,f=e.direction,d=e.forceSelection,p=e.hasSelection,g=e.selection,h=e.tree,y=t.getKey(),v=t.getText(),m=h.size-1,b=this.props.children||h.map((function(e,c){var h=e.get("decoratorKey"),b=e.get("leaves"),S=b.size-1,w=b.map((function(e,n){var r=i.encode(y,c,n),l=e.get("start"),f=e.get("end");return s.createElement(o,{key:r,offsetKey:r,block:t,start:l,selection:p?g:null,forceSelection:d,text:v.slice(l,f),styleSet:t.getInlineStyleAt(l),customStyleMap:u,customStyleFn:a,isLast:h===m&&n===S})})).toArray();return h&&l?s.createElement(r,{block:t,children:w,contentState:n,decorator:l,decoratorKey:h,direction:f,leafSet:e,text:v,key:c}):w})).toArray();return s.createElement("div",{"data-offset-key":i.encode(y,0,0),className:c({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===f,"public/DraftStyleDefault/rtl":"RTL"===f})},b)},a}(s.Component));e.exports=u},function(e,t,n){"use strict";var r=n(14);function o(){return(o=r||function(e){for(var t=1;tg(t)&&o.logSelectionStateFailure({anonymizedDom:p(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(r.toJS())});var c=t===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(t,n)}catch(a){throw o.logSelectionStateFailure({anonymizedDom:p(t,(function(t){var n=[];return t===i&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n})),extraParams:JSON.stringify({activeElementName:i?i.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:c,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:a?""+a:null,offset:n},null,2),selectionState:JSON.stringify(r.toJS(),null,2)}),a}}else if(t&&e.rangeCount>0){var u=e.getRangeAt(0);u.setEnd(t,n),e.addRange(u.cloneRange())}}function y(e,t,n,i){var a=c(t).createRange();if(n>g(t)&&(o.logSelectionStateFailure({anonymizedDom:p(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(i.toJS())}),r.handleExtensionCausedError()),a.setStart(t,n),f)try{e.addRange(a)}catch(e){console.warn("Call to selection.addRange() threw exception: ",e)}else e.addRange(a)}e.exports={setDraftEditorSelection:function(e,t,n,r,o){var i=c(t);if(a(i.documentElement,t)){var s=i.defaultView.getSelection(),u=e.getAnchorKey(),l=e.getAnchorOffset(),f=e.getFocusKey(),d=e.getFocusOffset(),p=e.getIsBackward();if(!s.extend&&p){var g=u,v=l;u=f,l=d,f=g,d=v,p=!1}var m=u===n&&r<=l&&o>=l,b=f===n&&r<=d&&o>=d;if(m&&b)return s.removeAllRanges(),y(s,t,l-r,e),void h(s,t,d-r,e);if(p){if(b&&(s.removeAllRanges(),y(s,t,d-r,e)),m){var S=s.focusNode,w=s.focusOffset;s.removeAllRanges(),y(s,t,l-r,e),h(s,S,w,e)}}else m&&(s.removeAllRanges(),y(s,t,l-r,e)),b&&h(s,t,d-r,e)}},addFocusToSelection:h}},function(e,t,n){"use strict";var r=n(114);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(116),o=n(117);function i(e){return null==e?e:String(e)}e.exports=function(e,t){var n;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return i(n.getPropertyValue(o(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return i(n.getPropertyValue(o(t)));if("display"===t)return"none"}return e.currentStyle?i("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[r(t)]):i(e.style&&e.style[r(t)])}},function(e,t,n){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,(function(e,t){return t.toUpperCase()}))}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(36);e.exports=function(e){var t=e.ownerDocument.documentElement;if(!("getBoundingClientRect"in e)||!r(t,e))return{left:0,right:0,top:0,bottom:0};var n=e.getBoundingClientRect();return{left:Math.round(n.left)-t.clientLeft,right:Math.round(n.right)-t.clientLeft,top:Math.round(n.top)-t.clientTop,bottom:Math.round(n.bottom)-t.clientTop}}},function(e,t,n){"use strict";var r="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;e.exports=function(e){return(e=e||document).scrollingElement?e.scrollingElement:r||"CSS1Compat"!==e.compatMode?e.body:e.documentElement}},function(e,t,n){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},function(e,t,n){"use strict";var r=n(14);function o(){return(o=r||function(e){for(var t=1;t=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},g=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),i=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&i)return!1;var a=t.getCurrentContent(),s=n.getCurrentContent(),c=t.getDecorator(),u=n.getDecorator();return o!==i||a!==s||c!==u||n.mustForceSelection()},a.render=function(){for(var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,r=e.blockStyleFn,a=e.customStyleMap,l=e.customStyleFn,g=e.editorState,h=e.editorKey,y=e.preventScroll,v=e.textDirectionality,m=g.getCurrentContent(),b=g.getSelection(),S=g.mustForceSelection(),w=g.getDecorator(),x=d(g.getDirectionMap()),k=m.getBlocksAsArray(),C=[],E=null,O=null,_=0;_E,R));var z=A||s,W={className:H,"data-block":!0,"data-editor":h,"data-offset-key":F,key:D};void 0!==L&&(W=i({},W,{contentEditable:L,suppressContentEditableWarning:!0}));var V=u.createElement(j,W,u.createElement(z,o({},N,{key:D})));C.push({block:V,wrapperTemplate:P,key:D,offsetKey:F}),E=P?T.getDepth():null,O=P}for(var G=[],q=0;q1)for(var r=1;r0){if(e.props.handleDroppedFiles&&f(e.props.handleDroppedFiles(p,y)))return;c(y,(function(t){t&&e.update(h(l,p,t))}))}else{var v=e._internalDrag?"internal":"external";e.props.handleDrop&&f(e.props.handleDrop(p,n,v))||(e._internalDrag?e.update(function(e,t){var n=o.moveText(e.getCurrentContent(),e.getSelection(),t);return i.push(e,n,"insert-fragment")}(l,p)):e.update(h(l,p,n.getText()))),g(e)}}}};function g(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:l(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function h(e,t,n){var r=o.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return i.push(e,r,"insert-fragment")}e.exports=p},function(e,t,n){"use strict";var r={isImage:function(e){return"image"===o(e)[0]},isJpeg:function(e){var t=o(e);return r.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function o(e){return e.split("/")}e.exports=r},function(e,t,n){"use strict";var r=n(1);e.exports=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&r(!1,"toArray: Array-like object expected"),"number"!=typeof t&&r(!1,"toArray: Object needs a length property"),0===t||t-1 in e||r(!1,"toArray: Object should have keys for indices"),"function"==typeof e.callee&&r(!1,"toArray: Object can't be `arguments`. Use rest params (function(...args) {}) or Array.from() instead."),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),o=0;o=p?r.length:0),a=t.get("end"),s=a+(a>=p?r.length:0),c=n.get("start"),u=n.get("end"),l=n.get("decoratorKey");return t.get("decoratorKey")!==l||t.get("leaves").size!==n.get("leaves").size||i!==c||s!==u||null!=l&&u-c!=a-o}))}if(v||(h=r,v=f&&("'"==h||"/"==h)),v||(v=u(y.getDirectionMap()).get(g)!==u(n.getDirectionMap()).get(g)),v)return t.preventDefault(),y=o.set(y,{forceSelection:!0}),void e.update(y);y=o.set(y,{nativelyRenderedContent:y.getCurrentContent()}),e._pendingStateFromBeforeInput=y,l((function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),o=t.getStartOffset(),i=!1;return r.some((function(e){return o===e.get("start")?(i=!0,!0):o1)for(var n=1;n=0;g--)if(!(null!=p&&g>0&&r.isSurrogatePair(p,g-1))){if(e.setStart(f,g),!s(i(e),n))break;u=f,l=g}if(-1===g||0===f.childNodes.length)break;d=c(f=f.childNodes[g])}return e.setStart(u,l),e}},function(e,t,n){"use strict";var r=n(72),o=n(2),i=n(38),a=n(20);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return i(e,1);var o=t.getStartKey(),a=e.getCurrentContent().getBlockForKey(o).getText().slice(0,n),s=r.getBackward(a);return i(e,s.length||1)}),"backward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";e.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},function(e,t,n){"use strict";var r=n(72),o=n(2),i=n(73),a=n(20);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=t.getStartOffset(),o=t.getStartKey(),a=e.getCurrentContent().getBlockForKey(o).getText().slice(n),s=r.getForward(a);return i(e,s.length||1)}),"forward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";var r=n(3),o=n(2);e.exports=function(e){var t=r.splitBlock(e.getCurrentContent(),e.getSelection());return o.push(e,t,"split-block")}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e){var t=e.getSelection(),n=t.getEndKey(),o=e.getCurrentContent().getBlockForKey(n).getLength();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:o,focusKey:n,focusOffset:o,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e){var t=e.getSelection(),n=t.getStartKey();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(2),o=n(16),i=n(73),a=n(20);e.exports=function(e){var t=a(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),a=t.getAnchorOffset(),s=n.getBlockForKey(r).getText()[a];return i(e,s?o.getUTF16Length(s,0):1)}),"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")}},function(e,t,n){"use strict";var r=n(3),o=n(2),i=n(21);e.exports=function(e){var t=e.getSelection();if(!t.isCollapsed())return e;var n=t.getAnchorOffset();if(0===n)return e;var a,s,c=t.getAnchorKey(),u=e.getCurrentContent(),l=u.getBlockForKey(c).getLength();if(l<=1)return e;n===l?(a=t.set("anchorOffset",n-1),s=t):s=(a=t.set("focusOffset",n+1)).set("anchorOffset",n+1);var f=i(u,a),d=r.removeRange(u,a,"backward"),p=d.getSelectionAfter(),g=p.getAnchorOffset()-1,h=p.merge({anchorOffset:g,focusOffset:g}),y=r.replaceWithFragment(d,h,f),v=o.push(e,y,"insert-fragment");return o.acceptSelection(v,s)}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){var o=r.undo(t);if("spellcheck-change"!==t.getLastChangeType())e.preventDefault(),t.getNativelyRenderedContent()?(n(r.set(t,{nativelyRenderedContent:null})),setTimeout((function(){n(o)}),0)):n(o);else{var i=o.getCurrentContent();n(r.set(o,{nativelyRenderedContent:i}))}}},function(e,t,n){"use strict";var r=n(17),o=n(6),i=n(66),a=n(3),s=n(156),c=n(2),u=n(76),l=n(35),f=n(68),d=n(31),p=n(161);function g(e,t,n){var r=a.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return c.push(e,r.set("entityMap",n),"insert-fragment")}e.exports=function(e,t){t.preventDefault();var n=new i(t.clipboardData);if(!n.isRichText()){var h=n.getFiles(),y=n.getText();if(h.length>0){if(e.props.handlePastedFiles&&d(e.props.handlePastedFiles(h)))return;return void f(h,(function(t){if(t=t||y){var n=e._latestEditorState,i=p(t),f=o.create({style:n.getCurrentInlineStyle(),entity:l(n.getCurrentContent(),n.getSelection())}),d=u.getCurrentBlockType(n),g=s.processText(i,f,d),h=r.createFromArray(g),v=a.replaceWithFragment(n.getCurrentContent(),n.getSelection(),h);e.update(c.push(n,v,"insert-fragment"))}}))}}var v=[],m=n.getText(),b=n.getHTML(),S=e._latestEditorState;if(e.props.formatPastedText){var w=e.props.formatPastedText(m,b);m=w.text,b=w.html}if(!e.props.handlePastedText||!d(e.props.handlePastedText(m,b,S))){if(m&&(v=p(m)),!e.props.stripPastedStyles){var x,k=e.getClipboard();if(!e.props.formatPastedText&&n.isRichText()&&k){if(-1!==(null===(x=b)||void 0===x?void 0:x.indexOf(e.getEditorKey()))||1===v.length&&1===k.size&&k.first().getText()===m)return void e.update(g(e._latestEditorState,k))}else if(k&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every((function(t,n){return t.getText()===e[n]}))}(v,k))return void e.update(g(e._latestEditorState,k));if(b){var C=s.processHTML(b,e.props.blockRenderMap);if(C){var E=C.contentBlocks,O=C.entityMap;if(E){var _=r.createFromArray(E);return void e.update(g(e._latestEditorState,_,O))}}}e.setClipboard(null)}if(v.length){var T=o.create({style:S.getCurrentInlineStyle(),entity:l(S.getCurrentContent(),S.getSelection())}),D=u.getCurrentBlockType(S),K=s.processText(v,T,D),M=r.createFromArray(K);e.update(g(e._latestEditorState,M))}}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(12),i=n(7),a=n(74),s=n(9),c=n(75),u=n(11),l=n(0),f=n(48),d=l.List,p=l.Repeat,g=u("draft_tree_data_support"),h=g?i:o,y={processHTML:function(e,t){return a(e,c,t)},processText:function(e,t,n){return e.reduce((function(e,o,i){o=f(o);var a=s(),c={key:a,type:n,text:o,characterList:d(p(t,o.length))};if(g&&0!==i){var u=i-1;c=function(e){for(var t=1;t0})),o=b&&!n?u.fromRawStateToRawTreeState(e).blocks:e.blocks;if(!b)return function(e,t){return x(e.map((function(e){var n=new i(k(e,t));return[n.getKey(),n]})))}(n?u.fromRawTreeStateToRawState(e).blocks:o,t);var s=function(e,t){return e.map(E).reduce((function(n,o,i){Array.isArray(o.children)||m(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode");var s=o.children.map(E),c=new a(r({},k(o,t),{prevSibling:0===i?null:e[i-1].key,nextSibling:i===e.length-1?null:e[i+1].key,children:S(s.map((function(e){return e.key})))}));n=n.set(c.getKey(),c);for(var u=O([],s,c);u.length>0;){var l=u.pop(),f=l.parentRef,d=f.getChildKeys(),p=d.indexOf(l.key),g=Array.isArray(l.children);if(!g){g||m(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode");break}var h=l.children.map(E),y=new a(r({},k(l,t),{parent:f.getKey(),children:S(h.map((function(e){return e.key}))),prevSibling:0===p?null:d.get(p-1),nextSibling:p===d.size-1?null:d.get(p+1)}));n=n.set(y.getKey(),y),u=O(u,h,y)}return n}),x())}(o,t);return l.isValidTree(s)||m(!1,"Should be a valid tree"),s};e.exports=function(e){Array.isArray(e.blocks)||m(!1,"invalid RawDraftContentState");var t=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach((function(e){var r=t[e],o=r.type,i=r.mutability,a=r.data;n[e]=c.__create(o,i,a||{})})),n}(e),n=_(e,t),r=n.isEmpty()?new f:f.createEmpty(n.first().getKey());return new s({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})}},function(e,t,n){"use strict";function r(e){for(var t=1;t0)||(delete t.children,n.push(t))})),e.blocks=n,r({},e,{blocks:n})):e},fromRawStateToRawTreeState:function(e){var t=[],n=[];return e.blocks.forEach((function(e){var o=s(e),a=e.depth||0,c=r({},e,{children:[]});if(o){var u=n[0];if(null==u&&0===a)t.push(c);else if(null==u||u.depth=a;)n.shift(),u=n[0];a>0?u.children.push(c):t.push(c)}}else t.push(c)})),r({},e,{blocks:t})}};e.exports=c},function(e,t,n){"use strict";var r=n(39),o={isValidBlock:function(e,t){var n=e.getKey(),o=e.getParentKey();if(null!=o&&!t.get(o).getChildKeys().includes(n))return r(!0,"Tree is missing parent -> child pointer on %s",n),!1;if(!e.getChildKeys().map((function(e){return t.get(e)})).every((function(e){return e.getParentKey()===n})))return r(!0,"Tree is missing child -> parent pointer on %s",n),!1;var i=e.getPrevSiblingKey();if(null!=i&&t.get(i).getNextSiblingKey()!==n)return r(!0,"Tree is missing nextSibling pointer on %s's prevSibling",n),!1;var a=e.getNextSiblingKey();if(null!=a&&t.get(a).getPrevSiblingKey()!==n)return r(!0,"Tree is missing prevSibling pointer on %s's nextSibling",n),!1;return null!==a&&null!==i&&i===a?(r(!0,"Tree has a two-node cycle at %s",n),!1):!(""!=e.text&&e.getChildKeys().size>0)||(r(!0,"Leaf node %s has children",n),!1)},isConnectedTree:function(e){var t=e.toArray().filter((function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()}));if(1!==t.length)return r(!0,"Tree is not connected. More or less than one first node"),!1;for(var n=0,o=t.shift().getKey(),i=[];null!=o;){var a=e.get(o),s=a.getChildKeys(),c=a.getNextSiblingKey();if(s.size>0){null!=c&&i.unshift(c);var u=s.map((function(t){return e.get(t)})).find((function(e){return null==e.getPrevSiblingKey()}));if(null==u)return r(!0,"%s has no first child",o),!1;o=u.getKey()}else o=null!=a.getNextSiblingKey()?a.getNextSiblingKey():i.shift();n++}return n===e.size||(r(!0,"Tree is not connected. %s nodes were seen instead of %s",n,e.size),!1)},isValidTree:function(e){var t=this;return!!e.toArray().every((function(n){return t.isValidBlock(n,e)}))&&this.isConnectedTree(e)}};e.exports=o},function(e,t,n){"use strict";var r=n(6),o=n(0).List;e.exports=function(e,t){var n=e.map((function(e,n){var o=t[n];return r.create({style:e,entity:o})}));return o(n)}},function(e,t,n){"use strict";var r=n(16).substr;e.exports=function(e,t){var n=Array(e.length).fill(null);return t&&t.forEach((function(t){for(var o=r(e,0,t.offset).length,i=o+r(e,t.offset,t.length).length,a=o;a1&&0===t[0].width){var s=t[1];n=s.top,o=s.right,i=s.bottom,a=s.left}else{var c=t[0];n=c.top,o=c.right,i=c.bottom,a=c.left}for(var u=1;u