Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-react

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-react - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

dist/ckeditor.js

@@ -5,3 +5,3 @@ /*!

*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.CKEditor=e(require("react")):t.CKEditor=e(t.React)}(window,(function(t){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e,r){"use strict";var o=r(4),n="object"==typeof self&&self&&self.Object===Object&&self,i=o.a||n||Function("return this")();e.a=i},function(t,e,r){t.exports=r(9)()},function(t,e,r){"use strict";(function(t){var o=r(4),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===n&&o.a.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=s}).call(this,r(6)(t))},function(e,r){e.exports=t},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(11))},function(t,e,r){"use strict";(function(t){var o=r(0),n=r(7),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?o.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||n.a;e.a=c}).call(this,r(6)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){var o=r(0),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===n?o.a.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,o=s?s(r):new t.constructor(r);return t.copy(o),o}}).call(this,r(6)(t))},function(t,e,r){"use strict";var o=r(10);function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function t(t,e,r,n,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},function(t,e,r){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r.r(e),r.d(e,"CKEditor",(function(){return Rr})),r.d(e,"CKEditorContext",(function(){return Wr}));var o=r(3),n=r.n(o),i=r(1),a=r.n(i);var s=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},c=r(0),u=function(){return c.a.Date.now()},h=/\s/;var d=function(t){for(var e=t.length;e--&&h.test(t.charAt(e)););return e},l=/^\s+/;var f=function(t){return t?t.slice(0,d(t)+1).replace(l,""):t},p=c.a.Symbol,_=Object.prototype,y=_.hasOwnProperty,v=_.toString,b=p?p.toStringTag:void 0;var g=function(t){var e=y.call(t,b),r=t[b];try{t[b]=void 0;var o=!0}catch(t){}var n=v.call(t);return o&&(e?t[b]=r:delete t[b]),n},m=Object.prototype.toString;var j=function(t){return m.call(t)},w=p?p.toStringTag:void 0;var x=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?g(t):j(t)};var E=function(t){return null!=t&&"object"==typeof t};var O=function(t){return"symbol"==typeof t||E(t)&&"[object Symbol]"==x(t)},P=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,A=/^0o[0-7]+$/i,T=parseInt;var S=function(t){if("number"==typeof t)return t;if(O(t))return NaN;if(s(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=s(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=f(t);var r=C.test(t);return r||A.test(t)?T(t.slice(2),r?2:8):P.test(t)?NaN:+t},W=Math.max,R=Math.min;var D=function(t,e,r){var o,n,i,a,c,h,d=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(e){var r=o,i=n;return o=n=void 0,d=e,a=t.apply(i,r)}function y(t){return d=t,c=setTimeout(b,e),l?_(t):a}function v(t){var r=t-h;return void 0===h||r>=e||r<0||f&&t-d>=i}function b(){var t=u();if(v(t))return g(t);c=setTimeout(b,function(t){var r=e-(t-h);return f?R(r,i-(t-d)):r}(t))}function g(t){return c=void 0,p&&o?_(t):(o=n=void 0,a)}function m(){var t=u(),r=v(t);if(o=arguments,n=this,h=t,r){if(void 0===c)return y(h);if(f)return clearTimeout(c),c=setTimeout(b,e),_(h)}return void 0===c&&(c=setTimeout(b,e)),a}return e=S(e)||0,s(r)&&(l=!!r.leading,i=(f="maxWait"in r)?W(S(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),m.cancel=function(){void 0!==c&&clearTimeout(c),d=0,o=h=n=c=void 0},m.flush=function(){return void 0===c?a:g(u())},m};var I=function(t,e,r){var o=!0,n=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return s(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),D(t,e,{leading:o,maxWait:e,trailing:n})};var z=function(){this.__data__=[],this.size=0};var F=function(t,e){return t===e||t!=t&&e!=e};var M=function(t,e){for(var r=t.length;r--;)if(F(t[r][0],e))return r;return-1},U=Array.prototype.splice;var N=function(t){var e=this.__data__,r=M(e,t);return!(r<0)&&(r==e.length-1?e.pop():U.call(e,r,1),--this.size,!0)};var k=function(t){var e=this.__data__,r=M(e,t);return r<0?void 0:e[r][1]};var L=function(t){return M(this.__data__,t)>-1};var B=function(t,e){var r=this.__data__,o=M(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this};function $(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}$.prototype.clear=z,$.prototype.delete=N,$.prototype.get=k,$.prototype.has=L,$.prototype.set=B;var q=$;var H=function(){this.__data__=new q,this.size=0};var Q=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var V=function(t){return this.__data__.get(t)};var K=function(t){return this.__data__.has(t)};var G,Y=function(t){if(!s(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},J=c.a["__core-js_shared__"],X=(G=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";var Z=function(t){return!!X&&X in t},tt=Function.prototype.toString;var et=function(t){if(null!=t){try{return tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},rt=/^\[object .+?Constructor\]$/,ot=Function.prototype,nt=Object.prototype,it=ot.toString,at=nt.hasOwnProperty,st=RegExp("^"+it.call(at).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ct=function(t){return!(!s(t)||Z(t))&&(Y(t)?st:rt).test(et(t))};var ut=function(t,e){return null==t?void 0:t[e]};var ht=function(t,e){var r=ut(t,e);return ct(r)?r:void 0},dt=ht(c.a,"Map"),lt=ht(Object,"create");var ft=function(){this.__data__=lt?lt(null):{},this.size=0};var pt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},_t=Object.prototype.hasOwnProperty;var yt=function(t){var e=this.__data__;if(lt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return _t.call(e,t)?e[t]:void 0},vt=Object.prototype.hasOwnProperty;var bt=function(t){var e=this.__data__;return lt?void 0!==e[t]:vt.call(e,t)};var gt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=lt&&void 0===e?"__lodash_hash_undefined__":e,this};function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}mt.prototype.clear=ft,mt.prototype.delete=pt,mt.prototype.get=yt,mt.prototype.has=bt,mt.prototype.set=gt;var jt=mt;var wt=function(){this.size=0,this.__data__={hash:new jt,map:new(dt||q),string:new jt}};var xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Et=function(t,e){var r=t.__data__;return xt(e)?r["string"==typeof e?"string":"hash"]:r.map};var Ot=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e};var Pt=function(t){return Et(this,t).get(t)};var Ct=function(t){return Et(this,t).has(t)};var At=function(t,e){var r=Et(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this};function Tt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Tt.prototype.clear=wt,Tt.prototype.delete=Ot,Tt.prototype.get=Pt,Tt.prototype.has=Ct,Tt.prototype.set=At;var St=Tt;var Wt=function(t,e){var r=this.__data__;if(r instanceof q){var o=r.__data__;if(!dt||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new St(o)}return r.set(t,e),this.size=r.size,this};function Rt(t){var e=this.__data__=new q(t);this.size=e.size}Rt.prototype.clear=H,Rt.prototype.delete=Q,Rt.prototype.get=V,Rt.prototype.has=K,Rt.prototype.set=Wt;var Dt=Rt;var It=function(t,e){for(var r=-1,o=null==t?0:t.length;++r<o&&!1!==e(t[r],r,t););return t},zt=function(){try{var t=ht(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Ft=function(t,e,r){"__proto__"==e&&zt?zt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},Mt=Object.prototype.hasOwnProperty;var Ut=function(t,e,r){var o=t[e];Mt.call(t,e)&&F(o,r)&&(void 0!==r||e in t)||Ft(t,e,r)};var Nt=function(t,e,r,o){var n=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var s=e[i],c=o?o(r[s],t[s],s,r,t):void 0;void 0===c&&(c=t[s]),n?Ft(r,s,c):Ut(r,s,c)}return r};var kt=function(t,e){for(var r=-1,o=Array(t);++r<t;)o[r]=e(r);return o};var Lt=function(t){return E(t)&&"[object Arguments]"==x(t)},Bt=Object.prototype,$t=Bt.hasOwnProperty,qt=Bt.propertyIsEnumerable,Ht=Lt(function(){return arguments}())?Lt:function(t){return E(t)&&$t.call(t,"callee")&&!qt.call(t,"callee")},Qt=Array.isArray,Vt=r(5),Kt=/^(?:0|[1-9]\d*)$/;var Gt=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Kt.test(t))&&t>-1&&t%1==0&&t<e};var Yt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Jt={};Jt["[object Float32Array]"]=Jt["[object Float64Array]"]=Jt["[object Int8Array]"]=Jt["[object Int16Array]"]=Jt["[object Int32Array]"]=Jt["[object Uint8Array]"]=Jt["[object Uint8ClampedArray]"]=Jt["[object Uint16Array]"]=Jt["[object Uint32Array]"]=!0,Jt["[object Arguments]"]=Jt["[object Array]"]=Jt["[object ArrayBuffer]"]=Jt["[object Boolean]"]=Jt["[object DataView]"]=Jt["[object Date]"]=Jt["[object Error]"]=Jt["[object Function]"]=Jt["[object Map]"]=Jt["[object Number]"]=Jt["[object Object]"]=Jt["[object RegExp]"]=Jt["[object Set]"]=Jt["[object String]"]=Jt["[object WeakMap]"]=!1;var Xt=function(t){return E(t)&&Yt(t.length)&&!!Jt[x(t)]};var Zt=function(t){return function(e){return t(e)}},te=r(2),ee=te.a&&te.a.isTypedArray,re=ee?Zt(ee):Xt,oe=Object.prototype.hasOwnProperty;var ne=function(t,e){var r=Qt(t),o=!r&&Ht(t),n=!r&&!o&&Object(Vt.a)(t),i=!r&&!o&&!n&&re(t),a=r||o||n||i,s=a?kt(t.length,String):[],c=s.length;for(var u in t)!e&&!oe.call(t,u)||a&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Gt(u,c))||s.push(u);return s},ie=Object.prototype;var ae=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ie)};var se=function(t,e){return function(r){return t(e(r))}},ce=se(Object.keys,Object),ue=Object.prototype.hasOwnProperty;var he=function(t){if(!ae(t))return ce(t);var e=[];for(var r in Object(t))ue.call(t,r)&&"constructor"!=r&&e.push(r);return e};var de=function(t){return null!=t&&Yt(t.length)&&!Y(t)};var le=function(t){return de(t)?ne(t):he(t)};var fe=function(t,e){return t&&Nt(e,le(e),t)};var pe=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},_e=Object.prototype.hasOwnProperty;var ye=function(t){if(!s(t))return pe(t);var e=ae(t),r=[];for(var o in t)("constructor"!=o||!e&&_e.call(t,o))&&r.push(o);return r};var ve=function(t){return de(t)?ne(t,!0):ye(t)};var be=function(t,e){return t&&Nt(e,ve(e),t)},ge=r(8);var me=function(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r<o;)e[r]=t[r];return e};var je=function(t,e){for(var r=-1,o=null==t?0:t.length,n=0,i=[];++r<o;){var a=t[r];e(a,r,t)&&(i[n++]=a)}return i};var we=function(){return[]},xe=Object.prototype.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols,Oe=Ee?function(t){return null==t?[]:(t=Object(t),je(Ee(t),(function(e){return xe.call(t,e)})))}:we;var Pe=function(t,e){return Nt(t,Oe(t),e)};var Ce=function(t,e){for(var r=-1,o=e.length,n=t.length;++r<o;)t[n+r]=e[r];return t},Ae=se(Object.getPrototypeOf,Object),Te=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ce(e,Oe(t)),t=Ae(t);return e}:we;var Se=function(t,e){return Nt(t,Te(t),e)};var We=function(t,e,r){var o=e(t);return Qt(t)?o:Ce(o,r(t))};var Re=function(t){return We(t,le,Oe)};var De=function(t){return We(t,ve,Te)},Ie=ht(c.a,"DataView"),ze=ht(c.a,"Promise"),Fe=ht(c.a,"Set"),Me=ht(c.a,"WeakMap"),Ue=et(Ie),Ne=et(dt),ke=et(ze),Le=et(Fe),Be=et(Me),$e=x;(Ie&&"[object DataView]"!=$e(new Ie(new ArrayBuffer(1)))||dt&&"[object Map]"!=$e(new dt)||ze&&"[object Promise]"!=$e(ze.resolve())||Fe&&"[object Set]"!=$e(new Fe)||Me&&"[object WeakMap]"!=$e(new Me))&&($e=function(t){var e=x(t),r="[object Object]"==e?t.constructor:void 0,o=r?et(r):"";if(o)switch(o){case Ue:return"[object DataView]";case Ne:return"[object Map]";case ke:return"[object Promise]";case Le:return"[object Set]";case Be:return"[object WeakMap]"}return e});var qe=$e,He=Object.prototype.hasOwnProperty;var Qe=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&He.call(t,"index")&&(r.index=t.index,r.input=t.input),r},Ve=c.a.Uint8Array;var Ke=function(t){var e=new t.constructor(t.byteLength);return new Ve(e).set(new Ve(t)),e};var Ge=function(t,e){var r=e?Ke(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Ye=/\w*$/;var Je=function(t){var e=new t.constructor(t.source,Ye.exec(t));return e.lastIndex=t.lastIndex,e},Xe=p?p.prototype:void 0,Ze=Xe?Xe.valueOf:void 0;var tr=function(t){return Ze?Object(Ze.call(t)):{}};var er=function(t,e){var r=e?Ke(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var rr=function(t,e,r){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return Ke(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return Ge(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return er(t,r);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return Je(t);case"[object Set]":return new o;case"[object Symbol]":return tr(t)}},or=Object.create,nr=function(){function t(){}return function(e){if(!s(e))return{};if(or)return or(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var ir=function(t){return"function"!=typeof t.constructor||ae(t)?{}:nr(Ae(t))};var ar=function(t){return E(t)&&"[object Map]"==qe(t)},sr=te.a&&te.a.isMap,cr=sr?Zt(sr):ar;var ur=function(t){return E(t)&&"[object Set]"==qe(t)},hr=te.a&&te.a.isSet,dr=hr?Zt(hr):ur,lr={};lr["[object Arguments]"]=lr["[object Array]"]=lr["[object ArrayBuffer]"]=lr["[object DataView]"]=lr["[object Boolean]"]=lr["[object Date]"]=lr["[object Float32Array]"]=lr["[object Float64Array]"]=lr["[object Int8Array]"]=lr["[object Int16Array]"]=lr["[object Int32Array]"]=lr["[object Map]"]=lr["[object Number]"]=lr["[object Object]"]=lr["[object RegExp]"]=lr["[object Set]"]=lr["[object String]"]=lr["[object Symbol]"]=lr["[object Uint8Array]"]=lr["[object Uint8ClampedArray]"]=lr["[object Uint16Array]"]=lr["[object Uint32Array]"]=!0,lr["[object Error]"]=lr["[object Function]"]=lr["[object WeakMap]"]=!1;var fr=function t(e,r,o,n,i,a){var c,u=1&r,h=2&r,d=4&r;if(o&&(c=i?o(e,n,i,a):o(e)),void 0!==c)return c;if(!s(e))return e;var l=Qt(e);if(l){if(c=Qe(e),!u)return me(e,c)}else{var f=qe(e),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(Object(Vt.a)(e))return Object(ge.a)(e,u);if("[object Object]"==f||"[object Arguments]"==f||p&&!i){if(c=h||p?{}:ir(e),!u)return h?Se(e,be(c,e)):Pe(e,fe(c,e))}else{if(!lr[f])return i?e:{};c=rr(e,f,u)}}a||(a=new Dt);var _=a.get(e);if(_)return _;a.set(e,c),dr(e)?e.forEach((function(n){c.add(t(n,r,o,n,e,a))})):cr(e)&&e.forEach((function(n,i){c.set(i,t(n,r,o,i,e,a))}));var y=l?void 0:(d?h?De:Re:h?ve:le)(e);return It(y||e,(function(n,i){y&&(n=e[i=n]),Ut(c,i,t(n,r,o,i,e,a))})),c};var pr=function(t,e){return fr(t,5,e="function"==typeof e?e:void 0)},_r=Function.prototype,yr=Object.prototype,vr=_r.toString,br=yr.hasOwnProperty,gr=vr.call(Object);var mr=function(t){if(!E(t)||"[object Object]"!=x(t))return!1;var e=Ae(t);if(null===e)return!0;var r=br.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&vr.call(r)==gr};var jr=function(t){return E(t)&&1===t.nodeType&&!mr(t)};function wr(t,e=new Set){const r=[t],o=new Set;for(;r.length>0;){const t=r.shift();if(!(o.has(t)||xr(t)||e.has(t)))if(o.add(t),t[Symbol.iterator])try{for(const e of t)r.push(e)}catch(t){}else for(const e in t)"defaultValue"!==e&&r.push(t[e])}return o}function xr(t){const e=Object.prototype.toString.call(t),r=typeof t;return"number"===r||"boolean"===r||"string"===r||"symbol"===r||"function"===r||"[object Date]"===e||"[object RegExp]"===e||"[object Module]"===e||null==t||t instanceof EventTarget||t instanceof Event}function Er(t,e,r=new Set){if(t===e&&("object"==typeof(o=t)&&null!==o))return!0;var o;const n=wr(t,r),i=wr(e,r);for(const t of n)if(i.has(t))return!0;return!1}class Or{constructor(t){if(this.crashes=[],this.state="initializing",this._crashNumberLimit="number"==typeof t.crashNumberLimit?t.crashNumberLimit:3,this._now=Date.now,this._minimumNonErrorTimePeriod="number"==typeof t.minimumNonErrorTimePeriod?t.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=t=>{const e=t.error||t.reason;e instanceof Error&&this._handleError(e,t)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}destroy(){this._stopErrorHandling(),this._listeners={}}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)}off(t,e){this._listeners[t]=this._listeners[t].filter(t=>t!==e)}_fire(t,...e){const r=this._listeners[t]||[];for(const t of r)t.apply(this,[null,...e])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(t,e){if(this._shouldReactToError(t)){this.crashes.push({message:t.message,stack:t.stack,filename:e.filename,lineno:e.lineno,colno:e.colno,date:this._now()});const r=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:t,causesRestart:r}),r?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(t){return t.is&&t.is("CKEditorError")&&void 0!==t.context&&null!==t.context&&"ready"===this.state&&this._isErrorComingFromThisItem(t)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}class Pr extends Or{constructor(t,e={}){super(e),this._editor=null,this._throttledSave=I(this._save.bind(this),"number"==typeof e.saveInterval?e.saveInterval:5e3),this._creator=(e,r)=>t.create(e,r),this._destructor=t=>t.destroy()}get editor(){return this._editor}get _item(){return this._editor}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(t=>{console.error("An error happened during the editor destroying.",t)}).then(()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const t=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,t,t.context)}}).then(()=>{this._fire("restart")})}create(t=this._elementOrData,e=this._config,r){return Promise.resolve().then(()=>(super._startErrorHandling(),this._elementOrData=t,this._config=this._cloneEditorConfiguration(e)||{},this._config.context=r,this._creator(t,this._config))).then(t=>{this._editor=t,t.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=t.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")})}destroy(){return Promise.resolve().then(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling(),this._throttledSave.flush();const t=this._editor;return this._editor=null,this._destructor(t)})}_save(){const t=this._editor.model.document.version;if(t!==this._lastDocumentVersion)try{this._data=this._getData(),this._lastDocumentVersion=t}catch(t){console.error(t,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(t){this._excludedProps=t}_getData(){const t={};for(const e of this._editor.model.document.getRootNames())t[e]=this._editor.data.get({rootName:e});return t}_isErrorComingFromThisItem(t){return Er(this._editor,t.context,this._excludedProps)}_cloneEditorConfiguration(t){return pr(t,(t,e)=>jr(t)||"context"===e?t:void 0)}}const Cr=new Array(256).fill().map((t,e)=>("0"+e.toString(16)).slice(-2));class Ar extends Or{constructor(t,e={}){super(e),this._watchdogs=new Map,this._watchdogConfig=e,this._context=null,this._contextProps=new Set,this._actionQueue=new Tr,this._creator=e=>t.create(e),this._destructor=t=>t.destroy(),this._actionQueue.onEmpty(()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))})}get context(){return this._context}create(t={}){return this._actionQueue.enqueue(()=>(this._contextConfig=t,this._create()))}getItem(t){return this._getWatchdog(t)._item}getItemState(t){return this._getWatchdog(t).state}add(t){const e=Array.isArray(t)?t:[t];return this._actionQueue.enqueue(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");return Promise.all(e.map(t=>{let e;if(this._watchdogs.has(t.id))throw new Error(`Item with the given id is already added: '${t.id}'.`);if("editor"===t.type)return e=new Pr(this._watchdogConfig),e.setCreator(t.creator),e._setExcludedProperties(this._contextProps),t.destructor&&e.setDestructor(t.destructor),this._watchdogs.set(t.id,e),e.on("error",(r,{error:o,causesRestart:n})=>{this._fire("itemError",{itemId:t.id,error:o}),n&&this._actionQueue.enqueue(()=>new Promise(r=>{e.on("restart",function o(){e.off("restart",o),this._fire("itemRestart",{itemId:t.id}),r()}.bind(this))}))}),e.create(t.sourceElementOrData,t.config,this._context);throw new Error(`Not supported item type: '${t.type}'.`)}))})}remove(t){const e=Array.isArray(t)?t:[t];return this._actionQueue.enqueue(()=>Promise.all(e.map(t=>{const e=this._getWatchdog(t);return this._watchdogs.delete(t),e.destroy()})))}destroy(){return this._actionQueue.enqueue(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueue.enqueue(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(t=>{console.error("An error happened during destroying the context or items.",t)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(t=>(this._context=t,this._contextProps=wr(this._context),Promise.all(Array.from(this._watchdogs.values()).map(t=>(t._setExcludedProperties(this._contextProps),t.create(void 0,void 0,this._context))))))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling();const t=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(t=>t.destroy())).then(()=>this._destructor(t))})}_getWatchdog(t){const e=this._watchdogs.get(t);if(!e)throw new Error(`Item with the given id was not registered: ${t}.`);return e}_isErrorComingFromThisItem(t){for(const e of this._watchdogs.values())if(e._isErrorComingFromThisItem(t))return!1;return Er(this._context,t.context)}}class Tr{constructor(){this._promiseQueue=Promise.resolve(),this._onEmptyCallbacks=[]}onEmpty(t){this._onEmptyCallbacks.push(t)}enqueue(t){let e;const r=this._promiseQueue.then(t).then(()=>{this._promiseQueue===e&&this._onEmptyCallbacks.forEach(t=>t())});return e=this._promiseQueue=r.catch(()=>{}),r}}const Sr=n.a.createContext("contextWatchdog");class Wr extends n.a.Component{constructor(t,e){super(t,e),this.contextWatchdog=null,this.props.isLayoutReady&&this._initializeContextWatchdog(this.props.config)}shouldComponentUpdate(t){return t.id!==this.props.id&&(this.contextWatchdog&&this.contextWatchdog.destroy(),this._initializeContextWatchdog(t.config)),t.isLayoutReady&&!this.contextWatchdog?(this._initializeContextWatchdog(t.config),!0):this.props.children!==t.children}render(){return n.a.createElement(Sr.Provider,{value:this.contextWatchdog},this.props.children)}componentWillUnmount(){this._destroyContext()}_initializeContextWatchdog(t){this.contextWatchdog=new Ar(this.props.context),this.contextWatchdog.create(t).catch(t=>{this.props.onError(t,{phase:"initialization",willContextRestart:!1})}),this.contextWatchdog.on("error",(t,e)=>{this.props.onError(e.error,{phase:"runtime",willContextRestart:e.causesRestart})}),this.contextWatchdog.on("stateChange",()=>{"ready"===this.contextWatchdog.state&&this.props.onReady&&this.props.onReady(this.contextWatchdog.context)})}_destroyContext(){this.contextWatchdog&&(this.contextWatchdog.destroy(),this.contextWatchdog=null)}}Wr.defaultProps={isLayoutReady:!0,onError:(t,e)=>console.error(t,e)},Wr.propTypes={id:a.a.string,isLayoutReady:a.a.bool,context:a.a.func,config:a.a.object,onReady:a.a.func,onError:a.a.func};class Rr extends n.a.Component{constructor(t){super(t),this.domContainer=n.a.createRef(),this.watchdog=null}get editor(){return this.watchdog?this.watchdog.editor:null}shouldComponentUpdate(t){return!!this.editor&&(t.id!==this.props.id?(this._destroyEditor(),!0):(this._shouldUpdateEditor(t)&&this.editor.setData(t.data),"disabled"in t&&(this.editor.isReadOnly=t.disabled),!1))}componentDidMount(){this._initializeEditor()}componentDidUpdate(){this._initializeEditor()}componentWillUnmount(){this._destroyEditor()}render(){return n.a.createElement("div",{ref:this.domContainer})}_initializeEditor(){this.context instanceof Ar?this.watchdog=new Dr(this.context):this.watchdog=new Pr(this.editor),this.watchdog.setCreator((t,e)=>this._createEditor(t,e)),this.watchdog.on("error",(t,{error:e,causesRestart:r})=>{this.props.onError(e,{phase:"runtime",willEditorRestart:r})}),this.watchdog.create(this.domContainer.current,this._getConfig()).catch(t=>this.props.onError(t,{phase:"initialization",willEditorRestart:!1}))}_createEditor(t,e){return this.props.editor.create(t,e).then(t=>{"disabled"in this.props&&(t.isReadOnly=this.props.disabled);const e=t.model.document,r=t.editing.view.document;return e.on("change:data",e=>{this.props.onChange&&this.props.onChange(e,t)}),r.on("focus",e=>{this.props.onFocus&&this.props.onFocus(e,t)}),r.on("blur",e=>{this.props.onBlur&&this.props.onBlur(e,t)}),setTimeout(()=>{this.props.onReady&&this.props.onReady(this.editor)}),t})}_destroyEditor(){this.watchdog&&(this.watchdog.destroy(),this.watchdog=null)}_shouldUpdateEditor(t){return this.props.data!==t.data&&this.editor.getData()!==t.data}_getConfig(){return this.props.data&&this.props.config.initialData&&console.warn("Editor data should be provided either using `config.initialData` or `data` properties. The config property is over the data value and the first one will be used when specified both."),{...this.props.config,initialData:this.props.config.initialData||this.props.data||""}}}class Dr{constructor(t){this._contextWatchdog=t,this._id=function(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+Cr[t>>0&255]+Cr[t>>8&255]+Cr[t>>16&255]+Cr[t>>24&255]+Cr[e>>0&255]+Cr[e>>8&255]+Cr[e>>16&255]+Cr[e>>24&255]+Cr[r>>0&255]+Cr[r>>8&255]+Cr[r>>16&255]+Cr[r>>24&255]+Cr[o>>0&255]+Cr[o>>8&255]+Cr[o>>16&255]+Cr[o>>24&255]}()}setCreator(t){this._creator=t}create(t,e){return this._contextWatchdog.add({sourceElementOrData:t,config:e,creator:this._creator,id:this._id,type:"editor"})}on(t,e){this._contextWatchdog.on("itemError",(t,{itemId:r,causesRestart:o,error:n})=>{r===this._id&&e(null,{error:n,causesRestart:o})})}destroy(){this._contextWatchdog.remove(this._id)}get editor(){try{return this._contextWatchdog.getItem(this._id)}catch(t){return null}}}Rr.contextType=Sr,Rr.propTypes={editor:a.a.func.isRequired,data:a.a.string,config:a.a.object,onChange:a.a.func,onReady:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onError:a.a.func,disabled:a.a.bool,onInit:(t,e)=>{if(t[e])return new Error('The "onInit" property is not supported anymore by the CKEditor component. Use the "onReady" property instead.')}},Rr.defaultProps={config:{},onError:(t,e)=>console.error(t,e)}}])}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.CKEditor=e(require("react")):t.CKEditor=e(t.React)}(window,(function(t){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e,r){"use strict";var o=r(4),n="object"==typeof self&&self&&self.Object===Object&&self,i=o.a||n||Function("return this")();e.a=i},function(t,e,r){t.exports=r(9)()},function(t,e,r){"use strict";(function(t){var o=r(4),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===n&&o.a.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=s}).call(this,r(6)(t))},function(e,r){e.exports=t},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(11))},function(t,e,r){"use strict";(function(t){var o=r(0),n=r(7),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?o.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||n.a;e.a=c}).call(this,r(6)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){var o=r(0),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=n&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===n?o.a.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,o=s?s(r):new t.constructor(r);return t.copy(o),o}}).call(this,r(6)(t))},function(t,e,r){"use strict";var o=r(10);function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function t(t,e,r,n,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},function(t,e,r){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r.r(e),r.d(e,"CKEditor",(function(){return Rr})),r.d(e,"CKEditorContext",(function(){return Sr}));var o=r(3),n=r.n(o),i=r(1),a=r.n(i);var s=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},c=r(0),u=function(){return c.a.Date.now()},h=/\s/;var d=function(t){for(var e=t.length;e--&&h.test(t.charAt(e)););return e},l=/^\s+/;var f=function(t){return t?t.slice(0,d(t)+1).replace(l,""):t},p=c.a.Symbol,_=Object.prototype,y=_.hasOwnProperty,v=_.toString,b=p?p.toStringTag:void 0;var g=function(t){var e=y.call(t,b),r=t[b];try{t[b]=void 0;var o=!0}catch(t){}var n=v.call(t);return o&&(e?t[b]=r:delete t[b]),n},m=Object.prototype.toString;var j=function(t){return m.call(t)},w=p?p.toStringTag:void 0;var x=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?g(t):j(t)};var E=function(t){return null!=t&&"object"==typeof t};var O=function(t){return"symbol"==typeof t||E(t)&&"[object Symbol]"==x(t)},P=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,A=/^0o[0-7]+$/i,T=parseInt;var W=function(t){if("number"==typeof t)return t;if(O(t))return NaN;if(s(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=s(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=f(t);var r=C.test(t);return r||A.test(t)?T(t.slice(2),r?2:8):P.test(t)?NaN:+t},S=Math.max,R=Math.min;var D=function(t,e,r){var o,n,i,a,c,h,d=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(e){var r=o,i=n;return o=n=void 0,d=e,a=t.apply(i,r)}function y(t){return d=t,c=setTimeout(b,e),l?_(t):a}function v(t){var r=t-h;return void 0===h||r>=e||r<0||f&&t-d>=i}function b(){var t=u();if(v(t))return g(t);c=setTimeout(b,function(t){var r=e-(t-h);return f?R(r,i-(t-d)):r}(t))}function g(t){return c=void 0,p&&o?_(t):(o=n=void 0,a)}function m(){var t=u(),r=v(t);if(o=arguments,n=this,h=t,r){if(void 0===c)return y(h);if(f)return clearTimeout(c),c=setTimeout(b,e),_(h)}return void 0===c&&(c=setTimeout(b,e)),a}return e=W(e)||0,s(r)&&(l=!!r.leading,i=(f="maxWait"in r)?S(W(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),m.cancel=function(){void 0!==c&&clearTimeout(c),d=0,o=h=n=c=void 0},m.flush=function(){return void 0===c?a:g(u())},m};var I=function(t,e,r){var o=!0,n=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return s(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),D(t,e,{leading:o,maxWait:e,trailing:n})};var z=function(){this.__data__=[],this.size=0};var F=function(t,e){return t===e||t!=t&&e!=e};var M=function(t,e){for(var r=t.length;r--;)if(F(t[r][0],e))return r;return-1},U=Array.prototype.splice;var N=function(t){var e=this.__data__,r=M(e,t);return!(r<0)&&(r==e.length-1?e.pop():U.call(e,r,1),--this.size,!0)};var k=function(t){var e=this.__data__,r=M(e,t);return r<0?void 0:e[r][1]};var L=function(t){return M(this.__data__,t)>-1};var B=function(t,e){var r=this.__data__,o=M(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this};function $(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}$.prototype.clear=z,$.prototype.delete=N,$.prototype.get=k,$.prototype.has=L,$.prototype.set=B;var q=$;var H=function(){this.__data__=new q,this.size=0};var Q=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var V=function(t){return this.__data__.get(t)};var K=function(t){return this.__data__.has(t)};var G,Y=function(t){if(!s(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},J=c.a["__core-js_shared__"],X=(G=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";var Z=function(t){return!!X&&X in t},tt=Function.prototype.toString;var et=function(t){if(null!=t){try{return tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},rt=/^\[object .+?Constructor\]$/,ot=Function.prototype,nt=Object.prototype,it=ot.toString,at=nt.hasOwnProperty,st=RegExp("^"+it.call(at).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ct=function(t){return!(!s(t)||Z(t))&&(Y(t)?st:rt).test(et(t))};var ut=function(t,e){return null==t?void 0:t[e]};var ht=function(t,e){var r=ut(t,e);return ct(r)?r:void 0},dt=ht(c.a,"Map"),lt=ht(Object,"create");var ft=function(){this.__data__=lt?lt(null):{},this.size=0};var pt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},_t=Object.prototype.hasOwnProperty;var yt=function(t){var e=this.__data__;if(lt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return _t.call(e,t)?e[t]:void 0},vt=Object.prototype.hasOwnProperty;var bt=function(t){var e=this.__data__;return lt?void 0!==e[t]:vt.call(e,t)};var gt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=lt&&void 0===e?"__lodash_hash_undefined__":e,this};function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}mt.prototype.clear=ft,mt.prototype.delete=pt,mt.prototype.get=yt,mt.prototype.has=bt,mt.prototype.set=gt;var jt=mt;var wt=function(){this.size=0,this.__data__={hash:new jt,map:new(dt||q),string:new jt}};var xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Et=function(t,e){var r=t.__data__;return xt(e)?r["string"==typeof e?"string":"hash"]:r.map};var Ot=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e};var Pt=function(t){return Et(this,t).get(t)};var Ct=function(t){return Et(this,t).has(t)};var At=function(t,e){var r=Et(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this};function Tt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Tt.prototype.clear=wt,Tt.prototype.delete=Ot,Tt.prototype.get=Pt,Tt.prototype.has=Ct,Tt.prototype.set=At;var Wt=Tt;var St=function(t,e){var r=this.__data__;if(r instanceof q){var o=r.__data__;if(!dt||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new Wt(o)}return r.set(t,e),this.size=r.size,this};function Rt(t){var e=this.__data__=new q(t);this.size=e.size}Rt.prototype.clear=H,Rt.prototype.delete=Q,Rt.prototype.get=V,Rt.prototype.has=K,Rt.prototype.set=St;var Dt=Rt;var It=function(t,e){for(var r=-1,o=null==t?0:t.length;++r<o&&!1!==e(t[r],r,t););return t},zt=function(){try{var t=ht(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Ft=function(t,e,r){"__proto__"==e&&zt?zt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},Mt=Object.prototype.hasOwnProperty;var Ut=function(t,e,r){var o=t[e];Mt.call(t,e)&&F(o,r)&&(void 0!==r||e in t)||Ft(t,e,r)};var Nt=function(t,e,r,o){var n=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var s=e[i],c=o?o(r[s],t[s],s,r,t):void 0;void 0===c&&(c=t[s]),n?Ft(r,s,c):Ut(r,s,c)}return r};var kt=function(t,e){for(var r=-1,o=Array(t);++r<t;)o[r]=e(r);return o};var Lt=function(t){return E(t)&&"[object Arguments]"==x(t)},Bt=Object.prototype,$t=Bt.hasOwnProperty,qt=Bt.propertyIsEnumerable,Ht=Lt(function(){return arguments}())?Lt:function(t){return E(t)&&$t.call(t,"callee")&&!qt.call(t,"callee")},Qt=Array.isArray,Vt=r(5),Kt=/^(?:0|[1-9]\d*)$/;var Gt=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Kt.test(t))&&t>-1&&t%1==0&&t<e};var Yt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Jt={};Jt["[object Float32Array]"]=Jt["[object Float64Array]"]=Jt["[object Int8Array]"]=Jt["[object Int16Array]"]=Jt["[object Int32Array]"]=Jt["[object Uint8Array]"]=Jt["[object Uint8ClampedArray]"]=Jt["[object Uint16Array]"]=Jt["[object Uint32Array]"]=!0,Jt["[object Arguments]"]=Jt["[object Array]"]=Jt["[object ArrayBuffer]"]=Jt["[object Boolean]"]=Jt["[object DataView]"]=Jt["[object Date]"]=Jt["[object Error]"]=Jt["[object Function]"]=Jt["[object Map]"]=Jt["[object Number]"]=Jt["[object Object]"]=Jt["[object RegExp]"]=Jt["[object Set]"]=Jt["[object String]"]=Jt["[object WeakMap]"]=!1;var Xt=function(t){return E(t)&&Yt(t.length)&&!!Jt[x(t)]};var Zt=function(t){return function(e){return t(e)}},te=r(2),ee=te.a&&te.a.isTypedArray,re=ee?Zt(ee):Xt,oe=Object.prototype.hasOwnProperty;var ne=function(t,e){var r=Qt(t),o=!r&&Ht(t),n=!r&&!o&&Object(Vt.a)(t),i=!r&&!o&&!n&&re(t),a=r||o||n||i,s=a?kt(t.length,String):[],c=s.length;for(var u in t)!e&&!oe.call(t,u)||a&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Gt(u,c))||s.push(u);return s},ie=Object.prototype;var ae=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ie)};var se=function(t,e){return function(r){return t(e(r))}},ce=se(Object.keys,Object),ue=Object.prototype.hasOwnProperty;var he=function(t){if(!ae(t))return ce(t);var e=[];for(var r in Object(t))ue.call(t,r)&&"constructor"!=r&&e.push(r);return e};var de=function(t){return null!=t&&Yt(t.length)&&!Y(t)};var le=function(t){return de(t)?ne(t):he(t)};var fe=function(t,e){return t&&Nt(e,le(e),t)};var pe=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},_e=Object.prototype.hasOwnProperty;var ye=function(t){if(!s(t))return pe(t);var e=ae(t),r=[];for(var o in t)("constructor"!=o||!e&&_e.call(t,o))&&r.push(o);return r};var ve=function(t){return de(t)?ne(t,!0):ye(t)};var be=function(t,e){return t&&Nt(e,ve(e),t)},ge=r(8);var me=function(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r<o;)e[r]=t[r];return e};var je=function(t,e){for(var r=-1,o=null==t?0:t.length,n=0,i=[];++r<o;){var a=t[r];e(a,r,t)&&(i[n++]=a)}return i};var we=function(){return[]},xe=Object.prototype.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols,Oe=Ee?function(t){return null==t?[]:(t=Object(t),je(Ee(t),(function(e){return xe.call(t,e)})))}:we;var Pe=function(t,e){return Nt(t,Oe(t),e)};var Ce=function(t,e){for(var r=-1,o=e.length,n=t.length;++r<o;)t[n+r]=e[r];return t},Ae=se(Object.getPrototypeOf,Object),Te=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ce(e,Oe(t)),t=Ae(t);return e}:we;var We=function(t,e){return Nt(t,Te(t),e)};var Se=function(t,e,r){var o=e(t);return Qt(t)?o:Ce(o,r(t))};var Re=function(t){return Se(t,le,Oe)};var De=function(t){return Se(t,ve,Te)},Ie=ht(c.a,"DataView"),ze=ht(c.a,"Promise"),Fe=ht(c.a,"Set"),Me=ht(c.a,"WeakMap"),Ue=et(Ie),Ne=et(dt),ke=et(ze),Le=et(Fe),Be=et(Me),$e=x;(Ie&&"[object DataView]"!=$e(new Ie(new ArrayBuffer(1)))||dt&&"[object Map]"!=$e(new dt)||ze&&"[object Promise]"!=$e(ze.resolve())||Fe&&"[object Set]"!=$e(new Fe)||Me&&"[object WeakMap]"!=$e(new Me))&&($e=function(t){var e=x(t),r="[object Object]"==e?t.constructor:void 0,o=r?et(r):"";if(o)switch(o){case Ue:return"[object DataView]";case Ne:return"[object Map]";case ke:return"[object Promise]";case Le:return"[object Set]";case Be:return"[object WeakMap]"}return e});var qe=$e,He=Object.prototype.hasOwnProperty;var Qe=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&He.call(t,"index")&&(r.index=t.index,r.input=t.input),r},Ve=c.a.Uint8Array;var Ke=function(t){var e=new t.constructor(t.byteLength);return new Ve(e).set(new Ve(t)),e};var Ge=function(t,e){var r=e?Ke(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Ye=/\w*$/;var Je=function(t){var e=new t.constructor(t.source,Ye.exec(t));return e.lastIndex=t.lastIndex,e},Xe=p?p.prototype:void 0,Ze=Xe?Xe.valueOf:void 0;var tr=function(t){return Ze?Object(Ze.call(t)):{}};var er=function(t,e){var r=e?Ke(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var rr=function(t,e,r){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return Ke(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return Ge(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return er(t,r);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return Je(t);case"[object Set]":return new o;case"[object Symbol]":return tr(t)}},or=Object.create,nr=function(){function t(){}return function(e){if(!s(e))return{};if(or)return or(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var ir=function(t){return"function"!=typeof t.constructor||ae(t)?{}:nr(Ae(t))};var ar=function(t){return E(t)&&"[object Map]"==qe(t)},sr=te.a&&te.a.isMap,cr=sr?Zt(sr):ar;var ur=function(t){return E(t)&&"[object Set]"==qe(t)},hr=te.a&&te.a.isSet,dr=hr?Zt(hr):ur,lr={};lr["[object Arguments]"]=lr["[object Array]"]=lr["[object ArrayBuffer]"]=lr["[object DataView]"]=lr["[object Boolean]"]=lr["[object Date]"]=lr["[object Float32Array]"]=lr["[object Float64Array]"]=lr["[object Int8Array]"]=lr["[object Int16Array]"]=lr["[object Int32Array]"]=lr["[object Map]"]=lr["[object Number]"]=lr["[object Object]"]=lr["[object RegExp]"]=lr["[object Set]"]=lr["[object String]"]=lr["[object Symbol]"]=lr["[object Uint8Array]"]=lr["[object Uint8ClampedArray]"]=lr["[object Uint16Array]"]=lr["[object Uint32Array]"]=!0,lr["[object Error]"]=lr["[object Function]"]=lr["[object WeakMap]"]=!1;var fr=function t(e,r,o,n,i,a){var c,u=1&r,h=2&r,d=4&r;if(o&&(c=i?o(e,n,i,a):o(e)),void 0!==c)return c;if(!s(e))return e;var l=Qt(e);if(l){if(c=Qe(e),!u)return me(e,c)}else{var f=qe(e),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(Object(Vt.a)(e))return Object(ge.a)(e,u);if("[object Object]"==f||"[object Arguments]"==f||p&&!i){if(c=h||p?{}:ir(e),!u)return h?We(e,be(c,e)):Pe(e,fe(c,e))}else{if(!lr[f])return i?e:{};c=rr(e,f,u)}}a||(a=new Dt);var _=a.get(e);if(_)return _;a.set(e,c),dr(e)?e.forEach((function(n){c.add(t(n,r,o,n,e,a))})):cr(e)&&e.forEach((function(n,i){c.set(i,t(n,r,o,i,e,a))}));var y=l?void 0:(d?h?De:Re:h?ve:le)(e);return It(y||e,(function(n,i){y&&(n=e[i=n]),Ut(c,i,t(n,r,o,i,e,a))})),c};var pr=function(t,e){return fr(t,5,e="function"==typeof e?e:void 0)},_r=Function.prototype,yr=Object.prototype,vr=_r.toString,br=yr.hasOwnProperty,gr=vr.call(Object);var mr=function(t){if(!E(t)||"[object Object]"!=x(t))return!1;var e=Ae(t);if(null===e)return!0;var r=br.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&vr.call(r)==gr};var jr=function(t){return E(t)&&1===t.nodeType&&!mr(t)};function wr(t,e=new Set){const r=[t],o=new Set;for(;r.length>0;){const t=r.shift();if(!(o.has(t)||xr(t)||e.has(t)))if(o.add(t),t[Symbol.iterator])try{for(const e of t)r.push(e)}catch(t){}else for(const e in t)"defaultValue"!==e&&r.push(t[e])}return o}function xr(t){const e=Object.prototype.toString.call(t),r=typeof t;return"number"===r||"boolean"===r||"string"===r||"symbol"===r||"function"===r||"[object Date]"===e||"[object RegExp]"===e||"[object Module]"===e||null==t||t instanceof EventTarget||t instanceof Event}function Er(t,e,r=new Set){if(t===e&&("object"==typeof(o=t)&&null!==o))return!0;var o;const n=wr(t,r),i=wr(e,r);for(const t of n)if(i.has(t))return!0;return!1}class Or{constructor(t){if(this.crashes=[],this.state="initializing",this._crashNumberLimit="number"==typeof t.crashNumberLimit?t.crashNumberLimit:3,this._now=Date.now,this._minimumNonErrorTimePeriod="number"==typeof t.minimumNonErrorTimePeriod?t.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=t=>{const e=t.error||t.reason;e instanceof Error&&this._handleError(e,t)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}destroy(){this._stopErrorHandling(),this._listeners={}}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)}off(t,e){this._listeners[t]=this._listeners[t].filter(t=>t!==e)}_fire(t,...e){const r=this._listeners[t]||[];for(const t of r)t.apply(this,[null,...e])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(t,e){if(this._shouldReactToError(t)){this.crashes.push({message:t.message,stack:t.stack,filename:e.filename,lineno:e.lineno,colno:e.colno,date:this._now()});const r=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:t,causesRestart:r}),r?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(t){return t.is&&t.is("CKEditorError")&&void 0!==t.context&&null!==t.context&&"ready"===this.state&&this._isErrorComingFromThisItem(t)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}class Pr extends Or{constructor(t,e={}){super(e),this._editor=null,this._throttledSave=I(this._save.bind(this),"number"==typeof e.saveInterval?e.saveInterval:5e3),this._creator=(e,r)=>t.create(e,r),this._destructor=t=>t.destroy()}get editor(){return this._editor}get _item(){return this._editor}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(t=>{console.error("An error happened during the editor destroying.",t)}).then(()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const t=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,t,t.context)}}).then(()=>{this._fire("restart")})}create(t=this._elementOrData,e=this._config,r){return Promise.resolve().then(()=>(super._startErrorHandling(),this._elementOrData=t,this._config=this._cloneEditorConfiguration(e)||{},this._config.context=r,this._creator(t,this._config))).then(t=>{this._editor=t,t.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=t.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")})}destroy(){return Promise.resolve().then(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling(),this._throttledSave.flush();const t=this._editor;return this._editor=null,this._destructor(t)})}_save(){const t=this._editor.model.document.version;if(t!==this._lastDocumentVersion)try{this._data=this._getData(),this._lastDocumentVersion=t}catch(t){console.error(t,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(t){this._excludedProps=t}_getData(){const t={};for(const e of this._editor.model.document.getRootNames())t[e]=this._editor.data.get({rootName:e});return t}_isErrorComingFromThisItem(t){return Er(this._editor,t.context,this._excludedProps)}_cloneEditorConfiguration(t){return pr(t,(t,e)=>jr(t)||"context"===e?t:void 0)}}const Cr=new Array(256).fill().map((t,e)=>("0"+e.toString(16)).slice(-2));class Ar extends Or{constructor(t,e={}){super(e),this._watchdogs=new Map,this._watchdogConfig=e,this._context=null,this._contextProps=new Set,this._actionQueue=new Tr,this._creator=e=>t.create(e),this._destructor=t=>t.destroy(),this._actionQueue.onEmpty(()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))})}get context(){return this._context}create(t={}){return this._actionQueue.enqueue(()=>(this._contextConfig=t,this._create()))}getItem(t){return this._getWatchdog(t)._item}getItemState(t){return this._getWatchdog(t).state}add(t){const e=Array.isArray(t)?t:[t];return this._actionQueue.enqueue(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");return Promise.all(e.map(t=>{let e;if(this._watchdogs.has(t.id))throw new Error(`Item with the given id is already added: '${t.id}'.`);if("editor"===t.type)return e=new Pr(this._watchdogConfig),e.setCreator(t.creator),e._setExcludedProperties(this._contextProps),t.destructor&&e.setDestructor(t.destructor),this._watchdogs.set(t.id,e),e.on("error",(r,{error:o,causesRestart:n})=>{this._fire("itemError",{itemId:t.id,error:o}),n&&this._actionQueue.enqueue(()=>new Promise(r=>{e.on("restart",function o(){e.off("restart",o),this._fire("itemRestart",{itemId:t.id}),r()}.bind(this))}))}),e.create(t.sourceElementOrData,t.config,this._context);throw new Error(`Not supported item type: '${t.type}'.`)}))})}remove(t){const e=Array.isArray(t)?t:[t];return this._actionQueue.enqueue(()=>Promise.all(e.map(t=>{const e=this._getWatchdog(t);return this._watchdogs.delete(t),e.destroy()})))}destroy(){return this._actionQueue.enqueue(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueue.enqueue(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(t=>{console.error("An error happened during destroying the context or items.",t)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(t=>(this._context=t,this._contextProps=wr(this._context),Promise.all(Array.from(this._watchdogs.values()).map(t=>(t._setExcludedProperties(this._contextProps),t.create(void 0,void 0,this._context))))))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling();const t=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(t=>t.destroy())).then(()=>this._destructor(t))})}_getWatchdog(t){const e=this._watchdogs.get(t);if(!e)throw new Error(`Item with the given id was not registered: ${t}.`);return e}_isErrorComingFromThisItem(t){for(const e of this._watchdogs.values())if(e._isErrorComingFromThisItem(t))return!1;return Er(this._context,t.context)}}class Tr{constructor(){this._promiseQueue=Promise.resolve(),this._onEmptyCallbacks=[]}onEmpty(t){this._onEmptyCallbacks.push(t)}enqueue(t){let e;const r=this._promiseQueue.then(t).then(()=>{this._promiseQueue===e&&this._onEmptyCallbacks.forEach(t=>t())});return e=this._promiseQueue=r.catch(()=>{}),r}}const Wr=n.a.createContext("contextWatchdog");class Sr extends n.a.Component{constructor(t,e){super(t,e),this.contextWatchdog=null,this.props.isLayoutReady&&this._initializeContextWatchdog(this.props.config)}shouldComponentUpdate(t){return t.id!==this.props.id&&(this.contextWatchdog&&this.contextWatchdog.destroy(),this._initializeContextWatchdog(t.config)),t.isLayoutReady&&!this.contextWatchdog?(this._initializeContextWatchdog(t.config),!0):this.props.children!==t.children}render(){return n.a.createElement(Wr.Provider,{value:this.contextWatchdog},this.props.children)}componentWillUnmount(){this._destroyContext()}_initializeContextWatchdog(t){this.contextWatchdog=new Ar(this.props.context),this.contextWatchdog.create(t).catch(t=>{this.props.onError(t,{phase:"initialization",willContextRestart:!1})}),this.contextWatchdog.on("error",(t,e)=>{this.props.onError(e.error,{phase:"runtime",willContextRestart:e.causesRestart})}),this.contextWatchdog.on("stateChange",()=>{"ready"===this.contextWatchdog.state&&this.props.onReady&&this.props.onReady(this.contextWatchdog.context)})}_destroyContext(){this.contextWatchdog&&(this.contextWatchdog.destroy(),this.contextWatchdog=null)}}Sr.defaultProps={isLayoutReady:!0,onError:(t,e)=>console.error(t,e)},Sr.propTypes={id:a.a.string,isLayoutReady:a.a.bool,context:a.a.func,config:a.a.object,onReady:a.a.func,onError:a.a.func};class Rr extends n.a.Component{constructor(t){super(t),this.domContainer=n.a.createRef(),this.watchdog=null}get editor(){return this.watchdog?this.watchdog.editor:null}shouldComponentUpdate(t){return!!this.editor&&(t.id!==this.props.id||(this._shouldUpdateEditor(t)&&this.editor.setData(t.data),"disabled"in t&&(this.editor.isReadOnly=t.disabled),!1))}componentDidMount(){this._initializeEditor()}componentDidUpdate(){this._destroyEditor(),this._initializeEditor()}componentWillUnmount(){this._destroyEditor()}render(){return n.a.createElement("div",{ref:this.domContainer})}_initializeEditor(){this.context instanceof Ar?this.watchdog=new Dr(this.context):this.watchdog=new Rr._EditorWatchdog(this.props.editor),this.watchdog.setCreator((t,e)=>this._createEditor(t,e)),this.watchdog.on("error",(t,{error:e,causesRestart:r})=>{this.props.onError(e,{phase:"runtime",willEditorRestart:r})}),this.watchdog.create(this.domContainer.current,this._getConfig()).catch(t=>this.props.onError(t,{phase:"initialization",willEditorRestart:!1}))}_createEditor(t,e){return this.props.editor.create(t,e).then(t=>{"disabled"in this.props&&(t.isReadOnly=this.props.disabled);const e=t.model.document,r=t.editing.view.document;return e.on("change:data",e=>{this.props.onChange&&this.props.onChange(e,t)}),r.on("focus",e=>{this.props.onFocus&&this.props.onFocus(e,t)}),r.on("blur",e=>{this.props.onBlur&&this.props.onBlur(e,t)}),setTimeout(()=>{this.props.onReady&&this.props.onReady(this.editor)}),t})}_destroyEditor(){this.watchdog&&(this.watchdog.destroy(),this.watchdog=null)}_shouldUpdateEditor(t){return this.props.data!==t.data&&this.editor.getData()!==t.data}_getConfig(){return this.props.data&&this.props.config.initialData&&console.warn("Editor data should be provided either using `config.initialData` or `data` properties. The config property is over the data value and the first one will be used when specified both."),{...this.props.config,initialData:this.props.config.initialData||this.props.data||""}}}class Dr{constructor(t){this._contextWatchdog=t,this._id=function(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+Cr[t>>0&255]+Cr[t>>8&255]+Cr[t>>16&255]+Cr[t>>24&255]+Cr[e>>0&255]+Cr[e>>8&255]+Cr[e>>16&255]+Cr[e>>24&255]+Cr[r>>0&255]+Cr[r>>8&255]+Cr[r>>16&255]+Cr[r>>24&255]+Cr[o>>0&255]+Cr[o>>8&255]+Cr[o>>16&255]+Cr[o>>24&255]}()}setCreator(t){this._creator=t}create(t,e){return this._contextWatchdog.add({sourceElementOrData:t,config:e,creator:this._creator,id:this._id,type:"editor"})}on(t,e){this._contextWatchdog.on("itemError",(t,{itemId:r,causesRestart:o,error:n})=>{r===this._id&&e(null,{error:n,causesRestart:o})})}destroy(){this._contextWatchdog.remove(this._id)}get editor(){return this._contextWatchdog.getItem(this._id)}}Rr.contextType=Wr,Rr.propTypes={editor:a.a.func.isRequired,data:a.a.string,config:a.a.object,onChange:a.a.func,onReady:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onError:a.a.func,disabled:a.a.bool,onInit:(t,e)=>{if(t[e])return new Error('The "onInit" property is not supported anymore by the CKEditor component. Use the "onReady" property instead.')}},Rr.defaultProps={config:{},onError:(t,e)=>console.error(t,e)},Rr._EditorWatchdog=Pr}])}));
//# sourceMappingURL=ckeditor.js.map
{
"name": "@ckeditor/ckeditor5-react",
"version": "3.0.2",
"version": "3.0.3",
"main": "dist/ckeditor.js",

@@ -5,0 +5,0 @@ "description": "Official React component for CKEditor 5 – the best browser-based rich text editor.",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc